!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Rx"),require("rxjs/operator/toPromise")):"function"==typeof define&&define.amd?define(["Rx","rxjs/operator/toPromise"],t):"object"==typeof exports?exports.ng=t(require("Rx"),require("rxjs/operator/toPromise")):e.ng=t(e.Rx,e.Rx.Observable.prototype)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){t.core=n(2),t.common=n(112),t.compiler=n(161),t.platform={browser:n(195),common_dom:n(218)},t.http=n(226),t.router=n(241),t.router_link_dsl=n(271),t.instrumentation=n(273),t.upgrade=n(274)},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(3)),r(n(76)),r(n(77)),r(n(6)),r(n(78));var i=n(5);t.enableProdMode=i.enableProdMode;var o=n(79);t.platform=o.platform,t.createNgZone=o.createNgZone,t.PlatformRef=o.PlatformRef,t.ApplicationRef=o.ApplicationRef;var s=n(82);t.APP_ID=s.APP_ID,t.APP_COMPONENT=s.APP_COMPONENT,t.APP_INITIALIZER=s.APP_INITIALIZER,t.PACKAGE_ROOT_URL=s.PACKAGE_ROOT_URL,t.PLATFORM_INITIALIZER=s.PLATFORM_INITIALIZER,r(n(101)),r(n(102)),r(n(103));var a=n(106);t.DebugElement=a.DebugElement,t.DebugNode=a.DebugNode,t.asNativeElements=a.asNativeElements,r(n(83)),r(n(25)),r(n(107)),r(n(108)),r(n(109)),r(n(17))},function(e,t,n){var r=n(4);t.QueryMetadata=r.QueryMetadata,t.ContentChildrenMetadata=r.ContentChildrenMetadata,t.ContentChildMetadata=r.ContentChildMetadata,t.ViewChildrenMetadata=r.ViewChildrenMetadata,t.ViewQueryMetadata=r.ViewQueryMetadata,t.ViewChildMetadata=r.ViewChildMetadata,t.AttributeMetadata=r.AttributeMetadata;var i=n(24);t.ComponentMetadata=i.ComponentMetadata,t.DirectiveMetadata=i.DirectiveMetadata,t.PipeMetadata=i.PipeMetadata,t.InputMetadata=i.InputMetadata,t.OutputMetadata=i.OutputMetadata,t.HostBindingMetadata=i.HostBindingMetadata,t.HostListenerMetadata=i.HostListenerMetadata;var o=n(75);t.ViewMetadata=o.ViewMetadata,t.ViewEncapsulation=o.ViewEncapsulation;var s=n(4),a=n(24),c=n(75),u=n(9);t.Component=u.makeDecorator(a.ComponentMetadata,function(e){return e.View=p}),t.Directive=u.makeDecorator(a.DirectiveMetadata);var p=u.makeDecorator(c.ViewMetadata,function(e){return e.View=p});t.Attribute=u.makeParamDecorator(s.AttributeMetadata),t.Query=u.makeParamDecorator(s.QueryMetadata),t.ContentChildren=u.makePropDecorator(s.ContentChildrenMetadata),t.ContentChild=u.makePropDecorator(s.ContentChildMetadata),t.ViewChildren=u.makePropDecorator(s.ViewChildrenMetadata),t.ViewChild=u.makePropDecorator(s.ViewChildMetadata),t.ViewQuery=u.makeParamDecorator(s.ViewQueryMetadata),t.Pipe=u.makeDecorator(a.PipeMetadata),t.Input=u.makePropDecorator(a.InputMetadata),t.Output=u.makePropDecorator(a.OutputMetadata),t.HostBinding=u.makePropDecorator(a.HostBindingMetadata),t.HostListener=u.makePropDecorator(a.HostListenerMetadata)},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(6),c=n(7),u=function(e){function t(t){e.call(this),this.attributeName=t}return r(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Attribute("+s.stringify(this.attributeName)+")"},t=i([s.CONST(),o("design:paramtypes",[String])],t)}(c.DependencyMetadata);t.AttributeMetadata=u;var p=function(e){function t(t,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s;e.call(this),this._selector=t,this.descendants=o,this.first=a}return r(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return a.resolveForwardRef(this._selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVarBindingQuery",{get:function(){return s.isString(this.selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"varBindings",{get:function(){return this.selector.split(",")},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Query("+s.stringify(this.selector)+")"},t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(c.DependencyMetadata);t.QueryMetadata=p;var l=function(e){function t(t,n){var r=(void 0===n?{}:n).descendants,i=void 0===r?!1:r;e.call(this,t,{descendants:i})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(p);t.ContentChildrenMetadata=l;var h=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(p);t.ContentChildMetadata=h;var f=function(e){function t(t,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s;e.call(this,t,{descendants:o,first:a})}return r(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@ViewQuery("+s.stringify(this.selector)+")"},t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(p);t.ViewQueryMetadata=f;var d=function(e){function t(t){e.call(this,t,{descendants:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(f);t.ViewChildrenMetadata=d;var y=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(f);t.ViewChildMetadata=y},function(e,t){(function(e){function n(e){Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function r(e){return e.name?e.name:typeof e}function i(){U=!0}function o(){if(U)throw"Cannot enable prod mode after platform setup.";W=!1}function s(){return W}function a(e){return e}function c(){return function(e){return e}}function u(e){return void 0!==e&&null!==e}function p(e){return void 0===e||null===e}function l(e){return"string"==typeof e}function h(e){return"function"==typeof e}function f(e){return h(e)}function d(e){return"object"==typeof e&&null!==e}function y(e){return e instanceof F.Promise}function v(e){return Array.isArray(e)}function g(e){return"number"==typeof e}function m(e){return e instanceof t.Date&&!isNaN(e.valueOf())}function _(){}function b(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.name)return e.name;if(e.overriddenName)return e.overriddenName;var t=e.toString(),n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function P(e){return e}function C(e,t){return e}function w(e,t){return e[t]}function R(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function E(e){return e}function O(e){return p(e)?null:e}function S(e){return p(e)?!1:e}function A(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function D(e){console.log(e)}function x(e,t,n){for(var r=t.split("."),i=e;r.length>1;){var o=r.shift();i=i.hasOwnProperty(o)&&u(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[r.shift()]=n}function T(){if(p(Z))if(u(Symbol)&&u(Symbol.iterator))Z=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t=0&&e[r]==t;r--)n--;e=e.substring(0,n)}return e},e.replace=function(e,t,n){return e.replace(t,n)},e.replaceAll=function(e,t,n){return e.replace(t,n)},e.slice=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=null),e.slice(t,null===n?void 0:n)},e.replaceAllMapped=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;te?-1:e>t?1:0},e}();t.StringWrapper=H;var q=function(){function e(e){void 0===e&&(e=[]),this.parts=e}return e.prototype.add=function(e){this.parts.push(e)},e.prototype.toString=function(){return this.parts.join("")},e}();t.StringJoiner=q;var G=function(e){function t(t){e.call(this),this.message=t}return L(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=G;var z=function(){function e(){}return e.toFixed=function(e,t){return e.toFixed(t)},e.equal=function(e,t){return e===t},e.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new G("Invalid integer literal when parsing "+e);return t},e.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var n=parseInt(e,t);if(!isNaN(n))return n}throw new G("Invalid integer literal when parsing "+e+" in base "+t)},e.parseFloat=function(e){return parseFloat(e)},Object.defineProperty(e,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),e.isNaN=function(e){return isNaN(e)},e.isInteger=function(e){return Number.isInteger(e)},e}();t.NumberWrapper=z,t.RegExp=F.RegExp;var K=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new F.RegExp(e,t+"g")},e.firstMatch=function(e,t){return e.lastIndex=0,e.exec(t)},e.test=function(e,t){return e.lastIndex=0,e.test(t)},e.matcher=function(e,t){return e.lastIndex=0,{re:e,input:t}},e.replaceAll=function(e,t,n){var r=e.exec(t),i="";e.lastIndex=0;for(var o=0;r;)i+=t.substring(o,r.index),i+=n(r),o=r.index+r[0].length,e.lastIndex=o,r=e.exec(t);return i+=t.substring(o)},e}();t.RegExpWrapper=K;var $=function(){function e(){}return e.next=function(e){return e.re.exec(e.input)},e}();t.RegExpMatcherWrapper=$;var X=function(){function e(){}return e.apply=function(e,t){return e.apply(null,t)},e}();t.FunctionWrapper=X,t.looseIdentical=R,t.getMapKey=E,t.normalizeBlank=O,t.normalizeBool=S,t.isJsObject=A,t.print=D;var Q=function(){function e(){}return e.parse=function(e){return F.JSON.parse(e)},e.stringify=function(e){return F.JSON.stringify(e,null,2)},e}();t.Json=Q;var J=function(){function e(){}return e.create=function(e,n,r,i,o,s,a){return void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),new t.Date(e,n-1,r,i,o,s,a)},e.fromISOString=function(e){return new t.Date(e)},e.fromMillis=function(e){return new t.Date(e)},e.toMillis=function(e){return e.getTime()},e.now=function(){return new t.Date},e.toJson=function(e){return e.toJSON()},e}();t.DateWrapper=J,t.setValueOnPath=x;var Z=null;t.getSymbolIterator=T,t.evalExpression=I,t.isPrimitive=N,t.hasConstructor=k,t.bitWiseOr=M,t.bitWiseAnd=V,t.escape=j}).call(t,function(){return this}())},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(7);t.InjectMetadata=i.InjectMetadata,t.OptionalMetadata=i.OptionalMetadata,t.InjectableMetadata=i.InjectableMetadata,t.SelfMetadata=i.SelfMetadata,t.HostMetadata=i.HostMetadata,t.SkipSelfMetadata=i.SkipSelfMetadata,t.DependencyMetadata=i.DependencyMetadata,r(n(8));var o=n(10);t.forwardRef=o.forwardRef,t.resolveForwardRef=o.resolveForwardRef;var s=n(11);t.Injector=s.Injector;var a=n(13);t.Binding=a.Binding,t.ProviderBuilder=a.ProviderBuilder,t.ResolvedFactory=a.ResolvedFactory,t.Dependency=a.Dependency,t.bind=a.bind,t.Provider=a.Provider,t.provide=a.provide;var c=n(21);t.Key=c.Key;var u=n(22);t.NoProviderError=u.NoProviderError,t.AbstractProviderError=u.AbstractProviderError,t.CyclicDependencyError=u.CyclicDependencyError,t.InstantiationError=u.InstantiationError,t.InvalidProviderError=u.InvalidProviderError,t.NoAnnotationError=u.NoAnnotationError,t.OutOfBoundsError=u.OutOfBoundsError;var p=n(23);t.OpaqueToken=p.OpaqueToken},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.token=e}return e.prototype.toString=function(){return"@Inject("+o.stringify(this.token)+")"},e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.InjectMetadata=s;var a=function(){function e(){}return e.prototype.toString=function(){return"@Optional()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.OptionalMetadata=a;var c=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return null},enumerable:!0,configurable:!0}),e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DependencyMetadata=c;var u=function(){function e(){}return e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.InjectableMetadata=u;var p=function(){function e(){}return e.prototype.toString=function(){return"@Self()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.SelfMetadata=p;var l=function(){function e(){}return e.prototype.toString=function(){return"@SkipSelf()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.SkipSelfMetadata=l;var h=function(){function e(){}return e.prototype.toString=function(){return"@Host()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.HostMetadata=h},function(e,t,n){var r=n(7),i=n(9);t.Inject=i.makeParamDecorator(r.InjectMetadata),t.Optional=i.makeParamDecorator(r.OptionalMetadata),t.Injectable=i.makeDecorator(r.InjectableMetadata),t.Self=i.makeParamDecorator(r.SelfMetadata),t.Host=i.makeParamDecorator(r.HostMetadata),t.SkipSelf=i.makeParamDecorator(r.SkipSelfMetadata)},function(e,t,n){function r(e){return u.isFunction(e)&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function i(e,t){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+u.stringify(e)+" as constructor");if(u.isFunction(e))return e;if(e instanceof Array){var n=e,i=e[e.length-1];if(!u.isFunction(i))throw new Error("Last position of Class method array must be Function in key "+t+" was '"+u.stringify(i)+"'");var o=n.length-1;if(o!=i.length)throw new Error("Number of annotations ("+o+") does not match number of arguments ("+i.length+") in the function: "+u.stringify(i));for(var s=[],a=0,c=n.length-1;c>a;a++){var p=[];s.push(p);var h=n[a];if(h instanceof Array)for(var f=0;f0&&(this.provider0=t[0].provider,this.keyId0=t[0].getKeyId(),this.visibility0=t[0].visibility),n>1&&(this.provider1=t[1].provider,this.keyId1=t[1].getKeyId(),this.visibility1=t[1].visibility),n>2&&(this.provider2=t[2].provider,this.keyId2=t[2].getKeyId(),this.visibility2=t[2].visibility),n>3&&(this.provider3=t[3].provider,this.keyId3=t[3].getKeyId(),this.visibility3=t[3].visibility),n>4&&(this.provider4=t[4].provider,this.keyId4=t[4].getKeyId(),this.visibility4=t[4].visibility),n>5&&(this.provider5=t[5].provider,this.keyId5=t[5].getKeyId(),this.visibility5=t[5].visibility),n>6&&(this.provider6=t[6].provider,this.keyId6=t[6].getKeyId(),this.visibility6=t[6].visibility),n>7&&(this.provider7=t[7].provider,this.keyId7=t[7].getKeyId(),this.visibility7=t[7].visibility),n>8&&(this.provider8=t[8].provider,this.keyId8=t[8].getKeyId(),this.visibility8=t[8].visibility),n>9&&(this.provider9=t[9].provider,this.keyId9=t[9].getKeyId(),this.visibility9=t[9].visibility)}return e.prototype.getProviderAtIndex=function(e){if(0==e)return this.provider0;if(1==e)return this.provider1;if(2==e)return this.provider2;if(3==e)return this.provider3;if(4==e)return this.provider4;if(5==e)return this.provider5;if(6==e)return this.provider6;if(7==e)return this.provider7;if(8==e)return this.provider8;if(9==e)return this.provider9;throw new a.OutOfBoundsError(e)},e.prototype.createInjectorStrategy=function(e){return new g(e,this)},e}();t.ProtoInjectorInlineStrategy=d;var y=function(){function e(e,t){var n=t.length;this.providers=o.ListWrapper.createFixedSize(n),this.keyIds=o.ListWrapper.createFixedSize(n),this.visibilities=o.ListWrapper.createFixedSize(n);for(var r=0;n>r;r++)this.providers[r]=t[r].provider,this.keyIds[r]=t[r].getKeyId(),this.visibilities[r]=t[r].visibility}return e.prototype.getProviderAtIndex=function(e){if(0>e||e>=this.providers.length)throw new a.OutOfBoundsError(e);return this.providers[e]},e.prototype.createInjectorStrategy=function(e){return new m(this,e)},e}();t.ProtoInjectorDynamicStrategy=y;var v=function(){function e(e){this.numberOfProviders=e.length,this._strategy=e.length>h?new y(this,e):new d(this,e)}return e.fromResolvedProviders=function(t){var n=t.map(function(e){return new _(e,f.Public)});return new e(n)},e.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},e}();t.ProtoInjector=v;var g=function(){function e(e,n){this.injector=e,this.protoStrategy=n,this.obj0=t.UNDEFINED,this.obj1=t.UNDEFINED,this.obj2=t.UNDEFINED,this.obj3=t.UNDEFINED,this.obj4=t.UNDEFINED,this.obj5=t.UNDEFINED,this.obj6=t.UNDEFINED,this.obj7=t.UNDEFINED,this.obj8=t.UNDEFINED,this.obj9=t.UNDEFINED}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.getObjByKeyId=function(e,n){var i=this.protoStrategy,o=this.injector;return i.keyId0===e&&r(i.visibility0,n)?(this.obj0===t.UNDEFINED&&(this.obj0=o._new(i.provider0,i.visibility0)),this.obj0):i.keyId1===e&&r(i.visibility1,n)?(this.obj1===t.UNDEFINED&&(this.obj1=o._new(i.provider1,i.visibility1)),this.obj1):i.keyId2===e&&r(i.visibility2,n)?(this.obj2===t.UNDEFINED&&(this.obj2=o._new(i.provider2,i.visibility2)),this.obj2):i.keyId3===e&&r(i.visibility3,n)?(this.obj3===t.UNDEFINED&&(this.obj3=o._new(i.provider3,i.visibility3)),this.obj3):i.keyId4===e&&r(i.visibility4,n)?(this.obj4===t.UNDEFINED&&(this.obj4=o._new(i.provider4,i.visibility4)),this.obj4):i.keyId5===e&&r(i.visibility5,n)?(this.obj5===t.UNDEFINED&&(this.obj5=o._new(i.provider5,i.visibility5)),this.obj5):i.keyId6===e&&r(i.visibility6,n)?(this.obj6===t.UNDEFINED&&(this.obj6=o._new(i.provider6,i.visibility6)),this.obj6):i.keyId7===e&&r(i.visibility7,n)?(this.obj7===t.UNDEFINED&&(this.obj7=o._new(i.provider7,i.visibility7)),this.obj7):i.keyId8===e&&r(i.visibility8,n)?(this.obj8===t.UNDEFINED&&(this.obj8=o._new(i.provider8,i.visibility8)),this.obj8):i.keyId9===e&&r(i.visibility9,n)?(this.obj9===t.UNDEFINED&&(this.obj9=o._new(i.provider9,i.visibility9)),this.obj9):t.UNDEFINED},e.prototype.getObjAtIndex=function(e){if(0==e)return this.obj0;if(1==e)return this.obj1;if(2==e)return this.obj2;if(3==e)return this.obj3;if(4==e)return this.obj4;if(5==e)return this.obj5;if(6==e)return this.obj6;if(7==e)return this.obj7;if(8==e)return this.obj8;if(9==e)return this.obj9;throw new a.OutOfBoundsError(e)},e.prototype.getMaxNumberOfObjects=function(){return h},e}();t.InjectorInlineStrategy=g;var m=function(){function e(e,n){this.protoStrategy=e,this.injector=n,this.objs=o.ListWrapper.createFixedSize(e.providers.length),o.ListWrapper.fill(this.objs,t.UNDEFINED)}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.getObjByKeyId=function(e,n){for(var i=this.protoStrategy,o=0;oe||e>=this.objs.length)throw new a.OutOfBoundsError(e);return this.objs[e]},e.prototype.getMaxNumberOfObjects=function(){return this.objs.length},e}();t.InjectorDynamicStrategy=m;var _=function(){function e(e,t){this.provider=e,this.visibility=t}return e.prototype.getKeyId=function(){return this.provider.key.id},e}();t.ProviderWithVisibility=_;var b=function(){function e(e,t,n,r,i){void 0===t&&(t=null),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===i&&(i=null),this._isHostBoundary=n,this._depProvider=r,this._debugContext=i,this._constructionCounter=0,this._proto=e,this._parent=t,this._strategy=e._strategy.createInjectorStrategy(this)}return e.resolve=function(e){return s.resolveProviders(e)},e.resolveAndCreate=function(t){var n=e.resolve(t);return e.fromResolvedProviders(n)},e.fromResolvedProviders=function(t){return new e(v.fromResolvedProviders(t))},e.fromResolvedBindings=function(t){return e.fromResolvedProviders(t)},Object.defineProperty(e.prototype,"hostBoundary",{get:function(){return this._isHostBoundary},enumerable:!0,configurable:!0}),e.prototype.debugContext=function(){return this._debugContext()},e.prototype.get=function(e){return this._getByKey(p.Key.get(e),null,null,!1,f.PublicAndPrivate)},e.prototype.getOptional=function(e){return this._getByKey(p.Key.get(e),null,null,!0,f.PublicAndPrivate)},e.prototype.getAt=function(e){return this._strategy.getObjAtIndex(e)},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),e.prototype.resolveAndCreateChild=function(t){var n=e.resolve(t);return this.createChildFromResolved(n)},e.prototype.createChildFromResolved=function(t){var n=t.map(function(e){return new _(e,f.Public)}),r=new v(n),i=new e(r);return i._parent=this,i},e.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(e.resolve([t])[0])},e.prototype.instantiateResolved=function(e){return this._instantiateProvider(e,f.PublicAndPrivate)},e.prototype._new=function(e,t){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new a.CyclicDependencyError(this,e.key);return this._instantiateProvider(e,t)},e.prototype._instantiateProvider=function(e,t){if(e.multiProvider){for(var n=o.ListWrapper.createFixedSize(e.resolvedFactories.length),r=0;r0?this._getByDependency(e,O[0],n):null,i=S>1?this._getByDependency(e,O[1],n):null,o=S>2?this._getByDependency(e,O[2],n):null,s=S>3?this._getByDependency(e,O[3],n):null,c=S>4?this._getByDependency(e,O[4],n):null,p=S>5?this._getByDependency(e,O[5],n):null,l=S>6?this._getByDependency(e,O[6],n):null,h=S>7?this._getByDependency(e,O[7],n):null,f=S>8?this._getByDependency(e,O[8],n):null,d=S>9?this._getByDependency(e,O[9],n):null,y=S>10?this._getByDependency(e,O[10],n):null,v=S>11?this._getByDependency(e,O[11],n):null,g=S>12?this._getByDependency(e,O[12],n):null,m=S>13?this._getByDependency(e,O[13],n):null,_=S>14?this._getByDependency(e,O[14],n):null,b=S>15?this._getByDependency(e,O[15],n):null,P=S>16?this._getByDependency(e,O[16],n):null,C=S>17?this._getByDependency(e,O[17],n):null,w=S>18?this._getByDependency(e,O[18],n):null,R=S>19?this._getByDependency(e,O[19],n):null}catch(A){throw(A instanceof a.AbstractProviderError||A instanceof a.InstantiationError)&&A.addKey(this,e.key),A}var D;try{switch(S){case 0:D=E();break;case 1:D=E(r);break;case 2:D=E(r,i);break;case 3:D=E(r,i,o);break;case 4:D=E(r,i,o,s);break;case 5:D=E(r,i,o,s,c);break;case 6:D=E(r,i,o,s,c,p);break;case 7:D=E(r,i,o,s,c,p,l);break;case 8:D=E(r,i,o,s,c,p,l,h);break;case 9:D=E(r,i,o,s,c,p,l,h,f);break;case 10:D=E(r,i,o,s,c,p,l,h,f,d);break;case 11:D=E(r,i,o,s,c,p,l,h,f,d,y);break;case 12:D=E(r,i,o,s,c,p,l,h,f,d,y,v);break;case 13:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g);break;case 14:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m);break;case 15:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_);break;case 16:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b);break;case 17:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P);break;case 18:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C);break;case 19:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C,w);break;case 20:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C,w,R);break;default:throw new u.BaseException("Cannot instantiate '"+e.key.displayName+"' because it has more than 20 dependencies")}}catch(A){throw new a.InstantiationError(this,A,A.stack,e.key)}return D},e.prototype._getByDependency=function(e,n,r){var i=c.isPresent(this._depProvider)?this._depProvider.getDependency(this,e,n):t.UNDEFINED;return i!==t.UNDEFINED?i:this._getByKey(n.key,n.lowerBoundVisibility,n.upperBoundVisibility,n.optional,r)},e.prototype._getByKey=function(e,t,n,r,i){return e===P?this:n instanceof l.SelfMetadata?this._getByKeySelf(e,r,i):n instanceof l.HostMetadata?this._getByKeyHost(e,r,i,t):this._getByKeyDefault(e,r,i,t)},e.prototype._throwOrNull=function(e,t){if(t)return null;throw new a.NoProviderError(this,e)},e.prototype._getByKeySelf=function(e,n,r){var i=this._strategy.getObjByKeyId(e.id,r);return i!==t.UNDEFINED?i:this._throwOrNull(e,n)},e.prototype._getByKeyHost=function(e,n,r,i){var o=this;if(i instanceof l.SkipSelfMetadata){if(o._isHostBoundary)return this._getPrivateDependency(e,n,o);o=o._parent}for(;null!=o;){var s=o._strategy.getObjByKeyId(e.id,r);if(s!==t.UNDEFINED)return s;if(c.isPresent(o._parent)&&o._isHostBoundary)return this._getPrivateDependency(e,n,o);o=o._parent}return this._throwOrNull(e,n)},e.prototype._getPrivateDependency=function(e,n,r){var i=r._parent._strategy.getObjByKeyId(e.id,f.Private);return i!==t.UNDEFINED?i:this._throwOrNull(e,n)},e.prototype._getByKeyDefault=function(e,n,r,i){var o=this;for(i instanceof l.SkipSelfMetadata&&(r=o._isHostBoundary?f.PublicAndPrivate:f.Public,o=o._parent);null!=o;){var s=o._strategy.getObjByKeyId(e.id,r);if(s!==t.UNDEFINED)return s;r=o._isHostBoundary?f.PublicAndPrivate:f.Public,o=o._parent}return this._throwOrNull(e,n)},Object.defineProperty(e.prototype,"displayName",{get:function(){return"Injector(providers: ["+i(this,function(e){return' "'+e.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.displayName},e}();t.Injector=b;var P=p.Key.get(b)},function(e,t,n){function r(e){return s.isJsObject(e)?s.isArray(e)||!(e instanceof t.Map)&&s.getSymbolIterator()in e:!1}function i(e,t,n){for(var r=e[s.getSymbolIterator()](),i=t[s.getSymbolIterator()]();;){var o=r.next(),a=i.next();if(o.done&&a.done)return!0;if(o.done||a.done)return!1;if(!n(o.value,a.value))return!1; }}function o(e,t){if(s.isArray(e))for(var n=0;n-1?(e.splice(n,1),!0):!1},e.clear=function(e){e.length=0},e.isEmpty=function(e){return 0==e.length},e.fill=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=null),e.fill(t,n,null===r?e.length:r)},e.equals=function(e,t){if(e.length!=t.length)return!1;for(var n=0;nr&&(n=o,r=a)}}return n},e.isImmutable=function(e){return Object.isSealed(e)},e.flatten=function(e){var t=[];return e.forEach(function(e){return t=t.concat(e)}),t},e}();t.ListWrapper=f,t.isListLikeIterable=r,t.areIterablesEqual=i,t.iterateListLike=o;var d=function(){var e=new t.Set([1,2,3]);return 3===e.size?function(e){return new t.Set(e)}:function(e){var n=new t.Set(e);if(n.size!==e.length)for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},v=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=n(5),m=n(14),_=n(12),b=n(17),P=n(21),C=n(7),w=n(22),R=n(10),E=function(){function e(e,t,n,r,i){this.key=e,this.optional=t,this.lowerBoundVisibility=n,this.upperBoundVisibility=r,this.properties=i}return e.fromKey=function(t){return new e(t,!1,null,null,[])},e}();t.Dependency=E;var O=g.CONST_EXPR([]),S=function(){function e(e,t){var n=t.useClass,r=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;this.token=e,this.useClass=n,this.useValue=r,this.useExisting=i,this.useFactory=o,this.dependencies=s,this._multi=a}return Object.defineProperty(e.prototype,"multi",{get:function(){return g.normalizeBool(this._multi)},enumerable:!0,configurable:!0}),e=y([g.CONST(),v("design:paramtypes",[Object,Object])],e)}();t.Provider=S;var A=function(e){function t(t,n){var r=n.toClass,i=n.toValue,o=n.toAlias,s=n.toFactory,a=n.deps,c=n.multi;e.call(this,t,{useClass:r,useValue:i,useExisting:o,useFactory:s,deps:a,multi:c})}return d(t,e),Object.defineProperty(t.prototype,"toClass",{get:function(){return this.useClass},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toAlias",{get:function(){return this.useExisting},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toFactory",{get:function(){return this.useFactory},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toValue",{get:function(){return this.useValue},enumerable:!0,configurable:!0}),t=y([g.CONST(),v("design:paramtypes",[Object,Object])],t)}(S);t.Binding=A;var D=function(){function e(e,t,n){this.key=e,this.resolvedFactories=t,this.multiProvider=n}return Object.defineProperty(e.prototype,"resolvedFactory",{get:function(){return this.resolvedFactories[0]},enumerable:!0,configurable:!0}),e}();t.ResolvedProvider_=D;var x=function(){function e(e,t){this.factory=e,this.dependencies=t}return e}();t.ResolvedFactory=x,t.bind=r,t.provide=i;var T=function(){function e(e){this.token=e}return e.prototype.toClass=function(e){if(!g.isType(e))throw new m.BaseException('Trying to create a class provider but "'+g.stringify(e)+'" is not a class!');return new S(this.token,{useClass:e})},e.prototype.toValue=function(e){return new S(this.token,{useValue:e})},e.prototype.toAlias=function(e){if(g.isBlank(e))throw new m.BaseException("Can not alias "+g.stringify(this.token)+" to a blank value!");return new S(this.token,{useExisting:e})},e.prototype.toFactory=function(e,t){if(!g.isFunction(e))throw new m.BaseException('Trying to create a factory provider but "'+g.stringify(e)+'" is not a function!');return new S(this.token,{useFactory:e,deps:t})},e}();t.ProviderBuilder=T,t.resolveFactory=o,t.resolveProvider=s,t.resolveProviders=a,t.mergeResolvedProviders=c},function(e,t,n){function r(e){return new TypeError(e)}function i(){throw new u("unimplemented")}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(15),a=n(16),c=n(16);t.ExceptionHandler=c.ExceptionHandler;var u=function(e){function t(t){void 0===t&&(t="--"),e.call(this,t),this.message=t,this.stack=new Error(t).stack}return o(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.BaseException=u;var p=function(e){function t(t,n,r,i){e.call(this,t),this._wrapperMessage=t,this._originalException=n,this._originalStack=r,this._context=i,this._wrapperStack=new Error(t).stack}return o(t,e),Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){return this._wrapperMessage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapperStack",{get:function(){return this._wrapperStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalException",{get:function(){return this._originalException},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalStack",{get:function(){return this._originalStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return a.ExceptionHandler.exceptionToString(this)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.message},t}(s.BaseWrappedException);t.WrappedException=p,t.makeTypeError=r,t.unimplemented=i},function(e,t){var n=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=function(e){function t(t){e.call(this,t)}return n(t,e),Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapperStack",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalException",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalStack",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return""},enumerable:!0,configurable:!0}),t}(Error);t.BaseWrappedException=r},function(e,t,n){var r=n(5),i=n(15),o=n(12),s=function(){function e(){this.res=[]}return e.prototype.log=function(e){this.res.push(e)},e.prototype.logError=function(e){this.res.push(e)},e.prototype.logGroup=function(e){this.res.push(e)},e.prototype.logGroupEnd=function(){},e}(),a=function(){function e(e,t){void 0===t&&(t=!0),this._logger=e,this._rethrowException=t}return e.exceptionToString=function(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=new s,o=new e(i,!1);return o.call(t,n,r),i.res.join("\n")},e.prototype.call=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this._findOriginalException(e),o=this._findOriginalStack(e),s=this._findContext(e);if(this._logger.logGroup("EXCEPTION: "+this._extractMessage(e)),r.isPresent(t)&&r.isBlank(o)&&(this._logger.logError("STACKTRACE:"),this._logger.logError(this._longStackTrace(t))),r.isPresent(n)&&this._logger.logError("REASON: "+n),r.isPresent(i)&&this._logger.logError("ORIGINAL EXCEPTION: "+this._extractMessage(i)),r.isPresent(o)&&(this._logger.logError("ORIGINAL STACKTRACE:"),this._logger.logError(this._longStackTrace(o))),r.isPresent(s)&&(this._logger.logError("ERROR CONTEXT:"),this._logger.logError(s)),this._logger.logGroupEnd(),this._rethrowException)throw e},e.prototype._extractMessage=function(e){return e instanceof i.BaseWrappedException?e.wrapperMessage:e.toString()},e.prototype._longStackTrace=function(e){return o.isListLikeIterable(e)?e.join("\n\n-----async gap-----\n"):e.toString()},e.prototype._findContext=function(e){try{return e instanceof i.BaseWrappedException?r.isPresent(e.context)?e.context:this._findContext(e.originalException):null}catch(t){return null}},e.prototype._findOriginalException=function(e){if(!(e instanceof i.BaseWrappedException))return null;for(var t=e.originalException;t instanceof i.BaseWrappedException&&r.isPresent(t.originalException);)t=t.originalException;return t},e.prototype._findOriginalStack=function(e){if(!(e instanceof i.BaseWrappedException))return null;for(var t=e,n=e.originalStack;t instanceof i.BaseWrappedException&&r.isPresent(t.originalException);)t=t.originalException,t instanceof i.BaseWrappedException&&r.isPresent(t.originalException)&&(n=t.originalStack);return n},e}();t.ExceptionHandler=a},function(e,t,n){var r=n(18),i=n(18);t.Reflector=i.Reflector,t.ReflectionInfo=i.ReflectionInfo;var o=n(20);t.reflector=new r.Reflector(new o.ReflectionCapabilities)},function(e,t,n){function r(e,t){a.StringMapWrapper.forEach(t,function(t,n){return e.set(n,t)})}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=n(5),s=n(14),a=n(12),c=n(19),u=function(){function e(e,t,n,r,i){this.annotations=e,this.parameters=t,this.factory=n,this.interfaces=r,this.propMetadata=i}return e}();t.ReflectionInfo=u;var p=function(e){function t(t){e.call(this),this._injectableInfo=new a.Map,this._getters=new a.Map,this._setters=new a.Map,this._methods=new a.Map,this._usedKeys=null,this.reflectionCapabilities=t}return i(t,e),t.prototype.isReflectionEnabled=function(){return this.reflectionCapabilities.isReflectionEnabled()},t.prototype.trackUsage=function(){this._usedKeys=new a.Set},t.prototype.listUnusedKeys=function(){var e=this;if(null==this._usedKeys)throw new s.BaseException("Usage tracking is disabled");var t=a.MapWrapper.keys(this._injectableInfo);return t.filter(function(t){return!a.SetWrapper.has(e._usedKeys,t)})},t.prototype.registerFunction=function(e,t){this._injectableInfo.set(e,t)},t.prototype.registerType=function(e,t){this._injectableInfo.set(e,t)},t.prototype.registerGetters=function(e){r(this._getters,e)},t.prototype.registerSetters=function(e){r(this._setters,e)},t.prototype.registerMethods=function(e){r(this._methods,e)},t.prototype.factory=function(e){if(this._containsReflectionInfo(e)){var t=this._getReflectionInfo(e).factory;return o.isPresent(t)?t:null}return this.reflectionCapabilities.factory(e)},t.prototype.parameters=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).parameters;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.parameters(e)},t.prototype.annotations=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).annotations;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.annotations(e)},t.prototype.propMetadata=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).propMetadata;return o.isPresent(t)?t:{}}return this.reflectionCapabilities.propMetadata(e)},t.prototype.interfaces=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).interfaces;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.interfaces(e)},t.prototype.getter=function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},t.prototype.setter=function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},t.prototype.method=function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},t.prototype._getReflectionInfo=function(e){return o.isPresent(this._usedKeys)&&this._usedKeys.add(e),this._injectableInfo.get(e)},t.prototype._containsReflectionInfo=function(e){return this._injectableInfo.has(e)},t.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},t}(c.ReflectorReader);t.Reflector=p},function(e,t){var n=function(){function e(){}return e}();t.ReflectorReader=n},function(e,t,n){var r=n(5),i=n(14),o=function(){function e(e){this._reflect=r.isPresent(e)?e:r.global.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){switch(e.length){case 0:return function(){return new e};case 1:return function(t){return new e(t)};case 2:return function(t,n){return new e(t,n)};case 3:return function(t,n,r){return new e(t,n,r)};case 4:return function(t,n,r,i){return new e(t,n,r,i)};case 5:return function(t,n,r,i,o){return new e(t,n,r,i,o)};case 6:return function(t,n,r,i,o,s){return new e(t,n,r,i,o,s)};case 7:return function(t,n,r,i,o,s,a){return new e(t,n,r,i,o,s,a)};case 8:return function(t,n,r,i,o,s,a,c){return new e(t,n,r,i,o,s,a,c)};case 9:return function(t,n,r,i,o,s,a,c,u){return new e(t,n,r,i,o,s,a,c,u)};case 10:return function(t,n,r,i,o,s,a,c,u,p){return new e(t,n,r,i,o,s,a,c,u,p)};case 11:return function(t,n,r,i,o,s,a,c,u,p,l){return new e(t,n,r,i,o,s,a,c,u,p,l)};case 12:return function(t,n,r,i,o,s,a,c,u,p,l,h){return new e(t,n,r,i,o,s,a,c,u,p,l,h)};case 13:return function(t,n,r,i,o,s,a,c,u,p,l,h,f){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f)};case 14:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d)};case 15:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y)};case 16:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v)};case 17:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g)};case 18:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m)};case 19:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_)};case 20:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_,b){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_,b)}}throw new Error("Cannot create a factory for '"+r.stringify(e)+"' because its constructor has more than 20 arguments")},e.prototype._zipTypesAndAnnotations=function(e,t){var n;n="undefined"==typeof e?new Array(t.length):new Array(e.length);for(var i=0;i1){var t=r(s.ListWrapper.reversed(e)),n=t.map(function(e){return a.stringify(e.token)});return" ("+n.join(" -> ")+")"}return""}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(12),a=n(5),c=n(14),u=function(e){function t(t,n,r){e.call(this,"DI Exception"),this.keys=[n],this.injectors=[t],this.constructResolvingMessage=r,this.message=this.constructResolvingMessage(this.keys)}return o(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)},Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(c.BaseException);t.AbstractProviderError=u;var p=function(e){function t(t,n){e.call(this,t,n,function(e){var t=a.stringify(s.ListWrapper.first(e).token);return"No provider for "+t+"!"+i(e)})}return o(t,e),t}(u);t.NoProviderError=p;var l=function(e){function t(t,n){e.call(this,t,n,function(e){return"Cannot instantiate cyclic dependency!"+i(e)})}return o(t,e),t}(u);t.CyclicDependencyError=l;var h=function(e){function t(t,n,r,i){e.call(this,"DI Exception",n,r,null),this.keys=[i],this.injectors=[t]}return o(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t)},Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){var e=a.stringify(s.ListWrapper.first(this.keys).token);return"Error during instantiation of "+e+"!"+i(this.keys)+"."},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"causeKey",{get:function(){return this.keys[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(c.WrappedException);t.InstantiationError=h;var f=function(e){function t(t){e.call(this,"Invalid provider - only instances of Provider and Type are allowed, got: "+t.toString())}return o(t,e),t}(c.BaseException);t.InvalidProviderError=f;var d=function(e){function t(n,r){e.call(this,t._genMessage(n,r))}return o(t,e),t._genMessage=function(e,t){for(var n=[],r=0,i=t.length;i>r;r++){var o=t[r];a.isBlank(o)||0==o.length?n.push("?"):n.push(o.map(a.stringify).join(" "))}return"Cannot resolve all parameters for '"+a.stringify(e)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+a.stringify(e)+"' is decorated with Injectable."},t}(c.BaseException);t.NoAnnotationError=d;var y=function(e){function t(t){e.call(this,"Index "+t+" is out-of-bounds.")}return o(t,e),t}(c.BaseException);t.OutOfBoundsError=y;var v=function(e){function t(t,n){e.call(this,"Cannot mix multi providers and regular providers, got: "+t.toString()+" "+n.toString())}return o(t,e),t}(c.BaseException);t.MixingMultiProvidersWithRegularProvidersError=v},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this._desc=e}return e.prototype.toString=function(){return"Token "+this._desc},e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.OpaqueToken=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(7),c=n(25),u=function(e){function t(t){var n=void 0===t?{}:t,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,c=n.host,u=n.bindings,p=n.providers,l=n.exportAs,h=n.queries;e.call(this),this.selector=r,this._inputs=i,this._properties=s,this._outputs=o,this._events=a,this.host=c,this.exportAs=l,this.queries=h,this._providers=p,this._bindings=u}return r(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return s.isPresent(this._properties)&&this._properties.length>0?this._properties:this._inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this.inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return s.isPresent(this._events)&&this._events.length>0?this._events:this._outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return this.outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providers",{get:function(){return s.isPresent(this._bindings)&&this._bindings.length>0?this._bindings:this._providers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return this.providers},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(a.InjectableMetadata);t.DirectiveMetadata=u;var p=function(e){function t(t){var n=void 0===t?{}:t,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,u=n.host,p=n.exportAs,l=n.moduleId,h=n.bindings,f=n.providers,d=n.viewBindings,y=n.viewProviders,v=n.changeDetection,g=void 0===v?c.ChangeDetectionStrategy.Default:v,m=n.queries,_=n.templateUrl,b=n.template,P=n.styleUrls,C=n.styles,w=n.directives,R=n.pipes,E=n.encapsulation;e.call(this,{selector:r,inputs:i,outputs:o,properties:s,events:a,host:u,exportAs:p,bindings:h,providers:f,queries:m}),this.changeDetection=g,this._viewProviders=y,this._viewBindings=d,this.templateUrl=_,this.template=b,this.styleUrls=P,this.styles=C,this.directives=w,this.pipes=R,this.encapsulation=E,this.moduleId=l}return r(t,e),Object.defineProperty(t.prototype,"viewProviders",{get:function(){return s.isPresent(this._viewBindings)&&this._viewBindings.length>0?this._viewBindings:this._viewProviders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewBindings",{get:function(){return this.viewProviders},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(u);t.ComponentMetadata=p;var l=function(e){function t(t){var n=t.name,r=t.pure;e.call(this),this.name=n,this._pure=r}return r(t,e),Object.defineProperty(t.prototype,"pure",{get:function(){return s.isPresent(this._pure)?this._pure:!0},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(a.InjectableMetadata);t.PipeMetadata=l;var h=function(){function e(e){this.bindingPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.InputMetadata=h;var f=function(){function e(e){this.bindingPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.OutputMetadata=f;var d=function(){function e(e){this.hostPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.HostBindingMetadata=d;var y=function(){function e(e,t){this.eventName=e,this.args=t}return e=i([s.CONST(),o("design:paramtypes",[String,Array])],e)}();t.HostListenerMetadata=y},function(e,t,n){var r=n(26);t.ChangeDetectionStrategy=r.ChangeDetectionStrategy,t.ExpressionChangedAfterItHasBeenCheckedException=r.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=r.ChangeDetectionError,t.ChangeDetectorRef=r.ChangeDetectorRef,t.WrappedValue=r.WrappedValue,t.SimpleChange=r.SimpleChange,t.IterableDiffers=r.IterableDiffers,t.KeyValueDiffers=r.KeyValueDiffers,t.CollectionChangeRecord=r.CollectionChangeRecord,t.KeyValueChangeRecord=r.KeyValueChangeRecord},function(e,t,n){var r=n(27),i=n(28),o=n(29),s=n(30),a=n(5),c=n(30);t.DefaultKeyValueDifferFactory=c.DefaultKeyValueDifferFactory,t.KeyValueChangeRecord=c.KeyValueChangeRecord;var u=n(28);t.DefaultIterableDifferFactory=u.DefaultIterableDifferFactory,t.CollectionChangeRecord=u.CollectionChangeRecord;var p=n(31);t.ASTWithSource=p.ASTWithSource,t.AST=p.AST,t.AstTransformer=p.AstTransformer,t.PropertyRead=p.PropertyRead,t.LiteralArray=p.LiteralArray,t.ImplicitReceiver=p.ImplicitReceiver;var l=n(32);t.Lexer=l.Lexer;var h=n(33); t.Parser=h.Parser;var f=n(34);t.Locals=f.Locals;var d=n(35);t.DehydratedException=d.DehydratedException,t.ExpressionChangedAfterItHasBeenCheckedException=d.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=d.ChangeDetectionError;var y=n(36);t.ChangeDetectorDefinition=y.ChangeDetectorDefinition,t.DebugContext=y.DebugContext,t.ChangeDetectorGenConfig=y.ChangeDetectorGenConfig;var v=n(37);t.ChangeDetectionStrategy=v.ChangeDetectionStrategy,t.CHANGE_DETECTION_STRATEGY_VALUES=v.CHANGE_DETECTION_STRATEGY_VALUES;var g=n(38);t.DynamicProtoChangeDetector=g.DynamicProtoChangeDetector;var m=n(70);t.JitProtoChangeDetector=m.JitProtoChangeDetector;var _=n(41);t.BindingRecord=_.BindingRecord,t.BindingTarget=_.BindingTarget;var b=n(42);t.DirectiveIndex=b.DirectiveIndex,t.DirectiveRecord=b.DirectiveRecord;var P=n(43);t.DynamicChangeDetector=P.DynamicChangeDetector;var C=n(45);t.ChangeDetectorRef=C.ChangeDetectorRef;var w=n(27);t.IterableDiffers=w.IterableDiffers;var R=n(29);t.KeyValueDiffers=R.KeyValueDiffers;var E=n(39);t.WrappedValue=E.WrappedValue,t.SimpleChange=E.SimpleChange,t.keyValDiff=a.CONST_EXPR([a.CONST_EXPR(new s.DefaultKeyValueDifferFactory)]),t.iterableDiff=a.CONST_EXPR([a.CONST_EXPR(new i.DefaultIterableDifferFactory)]),t.defaultIterableDiffers=a.CONST_EXPR(new r.IterableDiffers(t.iterableDiff)),t.defaultKeyValueDiffers=a.CONST_EXPR(new o.KeyValueDiffers(t.keyValDiff))},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(6),u=function(){function e(e){this.factories=e}return e.create=function(t,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return t=t.concat(r),new e(t)}return new e(t)},e.extend=function(t){return new c.Provider(e,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new c.SkipSelfMetadata,new c.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(o.isPresent(t))return t;throw new s.BaseException("Cannot find a differ supporting object '"+e+"' of type '"+o.getTypeNameForDebugging(e)+"'")},e=r([c.Injectable(),o.CONST(),i("design:paramtypes",[Array])],e)}();t.IterableDiffers=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(5),u=function(){function e(){}return e.prototype.supports=function(e){return a.isListLikeIterable(e)},e.prototype.create=function(e,t){return new l(t)},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=u;var p=function(e,t){return t},l=function(){function e(e){this._trackByFn=e,this._length=null,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=c.isPresent(this._trackByFn)?this._trackByFn:p}return Object.defineProperty(e.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},e.prototype.diff=function(e){if(c.isBlank(e)&&(e=[]),!a.isListLikeIterable(e))throw new s.BaseException("Error trying to diff '"+e+"'");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(c.isArray(e)){if(e!==this._collection||!a.ListWrapper.isImmutable(e)){var u=e;for(this._length=e.length,n=0;n"+c.stringify(this.currentIndex)+"]"},e}();t.CollectionChangeRecord=h;var f=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(6),u=function(){function e(e){this.factories=e}return e.create=function(t,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return t=t.concat(r),new e(t)}return new e(t)},e.extend=function(t){return new c.Provider(e,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new c.SkipSelfMetadata,new c.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(o.isPresent(t))return t;throw new s.BaseException("Cannot find a differ supporting object '"+e+"'")},e=r([c.Injectable(),o.CONST(),i("design:paramtypes",[Array])],e)}();t.KeyValueDiffers=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(12),s=n(5),a=n(14),c=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||s.isJsObject(e)},e.prototype.create=function(e){return new u},e=r([s.CONST(),i("design:paramtypes",[])],e)}();t.DefaultKeyValueDifferFactory=c;var u=function(){function e(){this._records=new Map,this._mapHead=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(s.isBlank(e)&&(e=o.MapWrapper.createFromPairs([])),!(e instanceof Map||s.isJsObject(e)))throw new a.BaseException("Error trying to diff '"+e+"'");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n=this._records,r=this._mapHead,i=null,o=null,a=!1;return this._forEach(e,function(e,c){var u;null!==r&&c===r.key?(u=r,s.looseIdentical(e,r.currentValue)||(r.previousValue=r.currentValue,r.currentValue=e,t._addToChanges(r))):(a=!0,null!==r&&(r._next=null,t._removeFromSeq(i,r),t._addToRemovals(r)),n.has(c)?u=n.get(c):(u=new p(c),n.set(c,u),u.currentValue=e,t._addToAdditions(u))),a&&(t._isInRemovals(u)&&t._removeFromRemovals(u),null==o?t._mapHead=u:o._next=u),i=r,o=u,r=null===r?null:r._next}),this._truncate(i,r),this.isDirty},e.prototype._reset=function(){if(this.isDirty){var e;for(e=this._previousMapHead=this._mapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=this._removalsTail=null}},e.prototype._truncate=function(e,t){for(;null!==t;){null===e?this._mapHead=null:e._next=null;var n=t._next;this._addToRemovals(t),e=t,t=n}for(var r=this._removalsHead;null!==r;r=r._nextRemoved)r.previousValue=r.currentValue,r.currentValue=null,this._records["delete"](r.key)},e.prototype._isInRemovals=function(e){return e===this._removalsHead||null!==e._nextRemoved||null!==e._prevRemoved},e.prototype._addToRemovals=function(e){null===this._removalsHead?this._removalsHead=this._removalsTail=e:(this._removalsTail._nextRemoved=e,e._prevRemoved=this._removalsTail,this._removalsTail=e)},e.prototype._removeFromSeq=function(e,t){var n=t._next;null===e?this._mapHead=n:e._next=n},e.prototype._removeFromRemovals=function(e){var t=e._prevRemoved,n=e._nextRemoved;null===t?this._removalsHead=n:t._nextRemoved=n,null===n?this._removalsTail=t:n._prevRemoved=t,e._prevRemoved=e._nextRemoved=null},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype.toString=function(){var e,t=[],n=[],r=[],i=[],o=[];for(e=this._mapHead;null!==e;e=e._next)t.push(s.stringify(e));for(e=this._previousMapHead;null!==e;e=e._nextPrevious)n.push(s.stringify(e));for(e=this._changesHead;null!==e;e=e._nextChanged)r.push(s.stringify(e));for(e=this._additionsHead;null!==e;e=e._nextAdded)i.push(s.stringify(e));for(e=this._removalsHead;null!==e;e=e._nextRemoved)o.push(s.stringify(e));return"map: "+t.join(", ")+"\nprevious: "+n.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+r.join(", ")+"\nremovals: "+o.join(", ")+"\n"},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):o.StringMapWrapper.forEach(e,t)},e}();t.DefaultKeyValueDiffer=u;var p=function(){function e(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._nextAdded=null,this._nextRemoved=null,this._prevRemoved=null,this._nextChanged=null}return e.prototype.toString=function(){return s.looseIdentical(this.previousValue,this.currentValue)?s.stringify(this.key):s.stringify(this.key)+"["+s.stringify(this.previousValue)+"->"+s.stringify(this.currentValue)+"]"},e}();t.KeyValueChangeRecord=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=function(){function e(){}return e.prototype.visit=function(e){return null},e.prototype.toString=function(){return"AST"},e}();t.AST=o;var s=function(e){function t(t,n,r){e.call(this),this.prefix=t,this.uninterpretedExpression=n,this.location=r}return r(t,e),t.prototype.visit=function(e){return e.visitQuote(this)},t.prototype.toString=function(){return"Quote"},t}(o);t.Quote=s;var a=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.visit=function(e){},t}(o);t.EmptyExpr=a;var c=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.visit=function(e){return e.visitImplicitReceiver(this)},t}(o);t.ImplicitReceiver=c;var u=function(e){function t(t){e.call(this),this.expressions=t}return r(t,e),t.prototype.visit=function(e){return e.visitChain(this)},t}(o);t.Chain=u;var p=function(e){function t(t,n,r){e.call(this),this.condition=t,this.trueExp=n,this.falseExp=r}return r(t,e),t.prototype.visit=function(e){return e.visitConditional(this)},t}(o);t.Conditional=p;var l=function(e){function t(t,n,r){e.call(this),this.receiver=t,this.name=n,this.getter=r}return r(t,e),t.prototype.visit=function(e){return e.visitPropertyRead(this)},t}(o);t.PropertyRead=l;var h=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.setter=r,this.value=i}return r(t,e),t.prototype.visit=function(e){return e.visitPropertyWrite(this)},t}(o);t.PropertyWrite=h;var f=function(e){function t(t,n,r){e.call(this),this.receiver=t,this.name=n,this.getter=r}return r(t,e),t.prototype.visit=function(e){return e.visitSafePropertyRead(this)},t}(o);t.SafePropertyRead=f;var d=function(e){function t(t,n){e.call(this),this.obj=t,this.key=n}return r(t,e),t.prototype.visit=function(e){return e.visitKeyedRead(this)},t}(o);t.KeyedRead=d;var y=function(e){function t(t,n,r){e.call(this),this.obj=t,this.key=n,this.value=r}return r(t,e),t.prototype.visit=function(e){return e.visitKeyedWrite(this)},t}(o);t.KeyedWrite=y;var v=function(e){function t(t,n,r){e.call(this),this.exp=t,this.name=n,this.args=r}return r(t,e),t.prototype.visit=function(e){return e.visitPipe(this)},t}(o);t.BindingPipe=v;var g=function(e){function t(t){e.call(this),this.value=t}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralPrimitive(this)},t}(o);t.LiteralPrimitive=g;var m=function(e){function t(t){e.call(this),this.expressions=t}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralArray(this)},t}(o);t.LiteralArray=m;var _=function(e){function t(t,n){e.call(this),this.keys=t,this.values=n}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralMap(this)},t}(o);t.LiteralMap=_;var b=function(e){function t(t,n){e.call(this),this.strings=t,this.expressions=n}return r(t,e),t.prototype.visit=function(e){return e.visitInterpolation(this)},t}(o);t.Interpolation=b;var P=function(e){function t(t,n,r){e.call(this),this.operation=t,this.left=n,this.right=r}return r(t,e),t.prototype.visit=function(e){return e.visitBinary(this)},t}(o);t.Binary=P;var C=function(e){function t(t){e.call(this),this.expression=t}return r(t,e),t.prototype.visit=function(e){return e.visitPrefixNot(this)},t}(o);t.PrefixNot=C;var w=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.fn=r,this.args=i}return r(t,e),t.prototype.visit=function(e){return e.visitMethodCall(this)},t}(o);t.MethodCall=w;var R=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.fn=r,this.args=i}return r(t,e),t.prototype.visit=function(e){return e.visitSafeMethodCall(this)},t}(o);t.SafeMethodCall=R;var E=function(e){function t(t,n){e.call(this),this.target=t,this.args=n}return r(t,e),t.prototype.visit=function(e){return e.visitFunctionCall(this)},t}(o);t.FunctionCall=E;var O=function(e){function t(t,n,r){e.call(this),this.ast=t,this.source=n,this.location=r}return r(t,e),t.prototype.visit=function(e){return this.ast.visit(e)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(o);t.ASTWithSource=O;var S=function(){function e(e,t,n,r){this.key=e,this.keyIsVar=t,this.name=n,this.expression=r}return e}();t.TemplateBinding=S;var A=function(){function e(){}return e.prototype.visitBinary=function(e){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e){return this.visitAll(e.expressions)},e.prototype.visitConditional=function(e){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e){return e.exp.visit(this),this.visitAll(e.args),null},e.prototype.visitFunctionCall=function(e){return e.target.visit(this),this.visitAll(e.args),null},e.prototype.visitImplicitReceiver=function(e){return null},e.prototype.visitInterpolation=function(e){return this.visitAll(e.expressions)},e.prototype.visitKeyedRead=function(e){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e){return this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e){return this.visitAll(e.values)},e.prototype.visitLiteralPrimitive=function(e){return null},e.prototype.visitMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitPrefixNot=function(e){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitAll=function(e){var t=this;return e.forEach(function(e){return e.visit(t)}),null},e.prototype.visitQuote=function(e){return null},e}();t.RecursiveAstVisitor=A;var D=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e){return e},e.prototype.visitInterpolation=function(e){return new b(e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e){return new g(e.value)},e.prototype.visitPropertyRead=function(e){return new l(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitPropertyWrite=function(e){return new h(e.receiver.visit(this),e.name,e.setter,e.value)},e.prototype.visitSafePropertyRead=function(e){return new f(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitMethodCall=function(e){return new w(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e){return new R(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e){return new E(e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e){return new m(this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e){return new _(e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e){return new P(e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e){return new C(e.expression.visit(this))},e.prototype.visitConditional=function(e){return new p(e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e){return new v(e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e){return new d(e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e){return new y(e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=i.ListWrapper.createFixedSize(e.length),n=0;n=t.$TAB&&e<=t.$SPACE||e==H}function p(e){return e>=k&&U>=e||e>=D&&T>=e||e==N||e==t.$$}function l(e){if(0==e.length)return!1;var n=new G(e);if(!p(n.peek))return!1;for(n.advance();n.peek!==t.$EOF;){if(!h(n.peek))return!1;n.advance()}return!0}function h(e){return e>=k&&U>=e||e>=D&&T>=e||e>=S&&A>=e||e==N||e==t.$$}function f(e){return e>=S&&A>=e}function d(e){return e==M||e==x}function y(e){return e==t.$MINUS||e==t.$PLUS}function v(e){switch(e){case j:return t.$LF;case V:return t.$FF;case B:return t.$CR;case L:return t.$TAB;case W:return t.$VTAB;default:return e}}var g=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},m=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},_=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},b=n(8),P=n(12),C=n(5),w=n(14);!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number"}(t.TokenType||(t.TokenType={}));var R=t.TokenType,E=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new G(e),n=[],r=t.scanToken();null!=r;)n.push(r),r=t.scanToken();return n},e=m([b.Injectable(),_("design:paramtypes",[])],e)}();t.Lexer=E;var O=function(){function e(e,t,n,r){this.index=e,this.type=t,this.numValue=n,this.strValue=r}return e.prototype.isCharacter=function(e){return this.type==R.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==R.Number},e.prototype.isString=function(){return this.type==R.String},e.prototype.isOperator=function(e){return this.type==R.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==R.Identifier},e.prototype.isKeyword=function(){return this.type==R.Keyword},e.prototype.isKeywordVar=function(){return this.type==R.Keyword&&"var"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==R.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==R.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==R.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==R.Keyword&&"false"==this.strValue},e.prototype.toNumber=function(){return this.type==R.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case R.Character:case R.Identifier:case R.Keyword:case R.Operator:case R.String:return this.strValue;case R.Number:return this.numValue.toString();default:return null}},e}();t.Token=O,t.EOF=new O(-1,R.Character,0,""),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63;var S=48,A=57,D=65,x=69,T=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var I=94,N=95,k=97,M=101,V=102,j=110,B=114,L=116,F=117,W=118,U=122;t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125;var H=160,q=function(e){function t(t){e.call(this),this.message=t}return g(t,e),t.prototype.toString=function(){return this.message},t}(w.BaseException);t.ScannerError=q;var G=function(){function e(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return e.prototype.advance=function(){this.peek=++this.index>=this.length?t.$EOF:C.StringWrapper.charCodeAt(this.input,this.index)},e.prototype.scanToken=function(){for(var e=this.input,n=this.length,i=this.peek,o=this.index;i<=t.$SPACE;){if(++o>=n){i=t.$EOF;break}i=C.StringWrapper.charCodeAt(e,o)}if(this.peek=i,this.index=o,o>=n)return null;if(p(i))return this.scanIdentifier();if(f(i))return this.scanNumber(o);var s=o;switch(i){case t.$PERIOD:return this.advance(),f(this.peek)?this.scanNumber(s):r(s,t.$PERIOD);case t.$LPAREN:case t.$RPAREN:case t.$LBRACE:case t.$RBRACE:case t.$LBRACKET:case t.$RBRACKET:case t.$COMMA:case t.$COLON:case t.$SEMICOLON:return this.scanCharacter(s,i);case t.$SQ:case t.$DQ:return this.scanString();case t.$HASH:case t.$PLUS:case t.$MINUS:case t.$STAR:case t.$SLASH:case t.$PERCENT:case I:return this.scanOperator(s,C.StringWrapper.fromCharCode(i));case t.$QUESTION:return this.scanComplexOperator(s,"?",t.$PERIOD,".");case t.$LT:case t.$GT:return this.scanComplexOperator(s,C.StringWrapper.fromCharCode(i),t.$EQ,"=");case t.$BANG:case t.$EQ:return this.scanComplexOperator(s,C.StringWrapper.fromCharCode(i),t.$EQ,"=",t.$EQ,"="); case t.$AMPERSAND:return this.scanComplexOperator(s,"&",t.$AMPERSAND,"&");case t.$BAR:return this.scanComplexOperator(s,"|",t.$BAR,"|");case H:for(;u(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+C.StringWrapper.fromCharCode(i)+"]",0),null},e.prototype.scanCharacter=function(e,t){return this.advance(),r(e,t)},e.prototype.scanOperator=function(e,t){return this.advance(),s(e,t)},e.prototype.scanComplexOperator=function(e,t,n,r,i,o){this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),C.isPresent(i)&&this.peek==i&&(this.advance(),a+=o),s(e,a)},e.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();h(this.peek);)this.advance();var t=this.input.substring(e,this.index);return P.SetWrapper.has(z,t)?o(e,t):i(e,t)},e.prototype.scanNumber=function(e){var n=this.index===e;for(this.advance();;){if(f(this.peek));else if(this.peek==t.$PERIOD)n=!1;else{if(!d(this.peek))break;this.advance(),y(this.peek)&&this.advance(),f(this.peek)||this.error("Invalid exponent",-1),n=!1}this.advance()}var r=this.input.substring(e,this.index),i=n?C.NumberWrapper.parseIntAutoRadix(r):C.NumberWrapper.parseFloat(r);return c(e,i)},e.prototype.scanString=function(){var e=this.index,n=this.peek;this.advance();for(var r,i=this.index,o=this.input;this.peek!=n;)if(this.peek==t.$BACKSLASH){null==r&&(r=new C.StringJoiner),r.add(o.substring(i,this.index)),this.advance();var s;if(this.peek==F){var c=o.substring(this.index+1,this.index+5);try{s=C.NumberWrapper.parseInt(c,16)}catch(u){this.error("Invalid unicode escape [\\u"+c+"]",0)}for(var p=0;5>p;p++)this.advance()}else s=v(this.peek),this.advance();r.add(C.StringWrapper.fromCharCode(s)),i=this.index}else this.peek==t.$EOF?this.error("Unterminated quote",0):this.advance();var l=o.substring(i,this.index);this.advance();var h=l;return null!=r&&(r.add(l),h=r.toString()),a(e,h)},e.prototype.error=function(e,t){var n=this.index+t;throw new q("Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")},e}();t.isIdentifier=l;var z=(P.SetWrapper.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),P.SetWrapper.createFromList(["var","null","undefined","true","false","if","else"]))},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(8),a=n(5),c=n(14),u=n(12),p=n(32),l=n(17),h=n(31),f=new h.ImplicitReceiver,d=/\{\{([\s\S]*?)\}\}/g,y=function(e){function t(t,n,r,i){e.call(this,"Parser Error: "+t+" "+r+" ["+n+"] in "+i)}return r(t,e),t}(c.BaseException),v=function(){function e(e,t){this.strings=e,this.expressions=t}return e}();t.SplitInterpolation=v;var g=function(){function e(e,t){void 0===t&&(t=null),this._lexer=e,this._reflector=a.isPresent(t)?t:l.reflector}return e.prototype.parseAction=function(e,t){this._checkNoInterpolation(e,t);var n=this._lexer.tokenize(e),r=new m(e,t,n,this._reflector,!0).parseChain();return new h.ASTWithSource(r,e,t)},e.prototype.parseBinding=function(e,t){var n=this._parseBindingAst(e,t);return new h.ASTWithSource(n,e,t)},e.prototype.parseSimpleBinding=function(e,t){var n=this._parseBindingAst(e,t);if(!_.check(n))throw new y("Host binding expression can only contain field access and constants",e,t);return new h.ASTWithSource(n,e,t)},e.prototype._parseBindingAst=function(e,t){var n=this._parseQuote(e,t);if(a.isPresent(n))return n;this._checkNoInterpolation(e,t);var r=this._lexer.tokenize(e);return new m(e,t,r,this._reflector,!1).parseChain()},e.prototype._parseQuote=function(e,t){if(a.isBlank(e))return null;var n=e.indexOf(":");if(-1==n)return null;var r=e.substring(0,n).trim();if(!p.isIdentifier(r))return null;var i=e.substring(n+1);return new h.Quote(r,i,t)},e.prototype.parseTemplateBindings=function(e,t){var n=this._lexer.tokenize(e);return new m(e,t,n,this._reflector,!1).parseTemplateBindings()},e.prototype.parseInterpolation=function(e,t){var n=this.splitInterpolation(e,t);if(null==n)return null;for(var r=[],i=0;i0))throw new y("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(n,o)+" in",t);i.push(s)}}return new v(r,i)},e.prototype.wrapLiteralPrimitive=function(e,t){return new h.ASTWithSource(new h.LiteralPrimitive(e),e,t)},e.prototype._checkNoInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length>1)throw new y("Got interpolation ({{}}) where expression was expected",e,"at column "+this._findInterpolationErrorColumn(n,1)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t){for(var n="",r=0;t>r;r++)n+=r%2===0?e[r]:"{{"+e[r]+"}}";return n.length},e=i([s.Injectable(),o("design:paramtypes",[p.Lexer,l.Reflector])],e)}();t.Parser=g;var m=function(){function e(e,t,n,r,i){this.input=e,this.location=t,this.tokens=n,this.reflector=r,this.parseAction=i,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t"))e=new h.Binary(">",e,this.parseAdditive());else if(this.optionalOperator("<="))e=new h.Binary("<=",e,this.parseAdditive());else{if(!this.optionalOperator(">="))return e;e=new h.Binary(">=",e,this.parseAdditive())}},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();;)if(this.optionalOperator("+"))e=new h.Binary("+",e,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return e;e=new h.Binary("-",e,this.parseMultiplicative())}},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();;)if(this.optionalOperator("*"))e=new h.Binary("*",e,this.parsePrefix());else if(this.optionalOperator("%"))e=new h.Binary("%",e,this.parsePrefix());else{if(!this.optionalOperator("/"))return e;e=new h.Binary("/",e,this.parsePrefix())}},e.prototype.parsePrefix=function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new h.Binary("-",new h.LiteralPrimitive(0),this.parsePrefix()):this.optionalOperator("!")?new h.PrefixNot(this.parsePrefix()):this.parseCallChain()},e.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(p.$PERIOD))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(p.$LBRACKET)){var t=this.parsePipe();if(this.expectCharacter(p.$RBRACKET),this.optionalOperator("=")){var n=this.parseConditional();e=new h.KeyedWrite(e,t,n)}else e=new h.KeyedRead(e,t)}else{if(!this.optionalCharacter(p.$LPAREN))return e;var r=this.parseCallArguments();this.expectCharacter(p.$RPAREN),e=new h.FunctionCall(e,r)}},e.prototype.parsePrimary=function(){if(this.optionalCharacter(p.$LPAREN)){var e=this.parsePipe();return this.expectCharacter(p.$RPAREN),e}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new h.LiteralPrimitive(null);if(this.next.isKeywordTrue())return this.advance(),new h.LiteralPrimitive(!0);if(this.next.isKeywordFalse())return this.advance(),new h.LiteralPrimitive(!1);if(this.optionalCharacter(p.$LBRACKET)){var t=this.parseExpressionList(p.$RBRACKET);return this.expectCharacter(p.$RBRACKET),new h.LiteralArray(t)}if(this.next.isCharacter(p.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(f,!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new h.LiteralPrimitive(n)}if(this.next.isString()){var r=this.next.toString();return this.advance(),new h.LiteralPrimitive(r)}throw this.index>=this.tokens.length?this.error("Unexpected end of expression: "+this.input):this.error("Unexpected token "+this.next),new c.BaseException("Fell through all cases in parsePrimary")},e.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return t},e.prototype.parseLiteralMap=function(){var e=[],t=[];if(this.expectCharacter(p.$LBRACE),!this.optionalCharacter(p.$RBRACE)){do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(p.$COLON),t.push(this.parsePipe())}while(this.optionalCharacter(p.$COMMA));this.expectCharacter(p.$RBRACE)}return new h.LiteralMap(e,t)},e.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(p.$LPAREN)){var r=this.parseCallArguments();this.expectCharacter(p.$RPAREN);var i=this.reflector.method(n);return t?new h.SafeMethodCall(e,n,i,r):new h.MethodCall(e,n,i,r)}if(!t){if(this.optionalOperator("=")){this.parseAction||this.error("Bindings cannot contain assignments");var o=this.parseConditional();return new h.PropertyWrite(e,n,this.reflector.setter(n),o)}return new h.PropertyRead(e,n,this.reflector.getter(n))}return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),null):new h.SafePropertyRead(e,n,this.reflector.getter(n))},e.prototype.parseCallArguments=function(){if(this.next.isCharacter(p.$RPAREN))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return e},e.prototype.parseBlockContent=function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var e=[];this.index":return"operation_greater_then";case"<=":return"operation_less_or_equals_then";case">=":return"operation_greater_or_equals_then";default:throw new h.BaseException("Unsupported operation "+e)}}function c(e){switch(e){case"+":return y.ChangeDetectionUtil.operation_add;case"-":return y.ChangeDetectionUtil.operation_subtract;case"*":return y.ChangeDetectionUtil.operation_multiply;case"/":return y.ChangeDetectionUtil.operation_divide;case"%":return y.ChangeDetectionUtil.operation_remainder;case"==":return y.ChangeDetectionUtil.operation_equals;case"!=":return y.ChangeDetectionUtil.operation_not_equals;case"===":return y.ChangeDetectionUtil.operation_identical;case"!==":return y.ChangeDetectionUtil.operation_not_identical;case"<":return y.ChangeDetectionUtil.operation_less_then;case">":return y.ChangeDetectionUtil.operation_greater_then;case"<=":return y.ChangeDetectionUtil.operation_less_or_equals_then;case">=":return y.ChangeDetectionUtil.operation_greater_or_equals_then;default:throw new h.BaseException("Unsupported operation "+e)}}function u(e){return l.isPresent(e)?""+e:""}function p(e){var t=e.length,n=t>0?e[0]:null,r=t>1?e[1]:null,i=t>2?e[2]:null,o=t>3?e[3]:null,s=t>4?e[4]:null,a=t>5?e[5]:null,c=t>6?e[6]:null,p=t>7?e[7]:null,l=t>8?e[8]:null,f=t>9?e[9]:null;switch(t-1){case 1:return function(e){return n+u(e)+r};case 2:return function(e,t){return n+u(e)+r+u(t)+i};case 3:return function(e,t,s){return n+u(e)+r+u(t)+i+u(s)+o};case 4:return function(e,t,a,c){return n+u(e)+r+u(t)+i+u(a)+o+u(c)+s};case 5:return function(e,t,c,p,l){return n+u(e)+r+u(t)+i+u(c)+o+u(p)+s+u(l)+a};case 6:return function(e,t,p,l,h,f){return n+u(e)+r+u(t)+i+u(p)+o+u(l)+s+u(h)+a+u(f)+c};case 7:return function(e,t,l,h,f,d,y){return n+u(e)+r+u(t)+i+u(l)+o+u(h)+s+u(f)+a+u(d)+c+u(y)+p};case 8:return function(e,t,h,f,d,y,v,g){return n+u(e)+r+u(t)+i+u(h)+o+u(f)+s+u(d)+a+u(y)+c+u(v)+p+u(g)+l};case 9:return function(e,t,h,d,y,v,g,m,_){return n+u(e)+r+u(t)+i+u(h)+o+u(d)+s+u(y)+a+u(v)+c+u(g)+p+u(m)+l+u(_)+f};default:throw new h.BaseException("Does not support more than 9 expressions")}}var l=n(5),h=n(14),f=n(12),d=n(31),y=n(39),v=n(43),g=n(42),m=n(68),_=n(69),b=n(67),P=function(){function e(e){this._definition=e,this._propertyBindingRecords=r(e),this._eventBindingRecords=i(e),this._propertyBindingTargets=this._definition.bindingRecords.map(function(e){return e.target}),this._directiveIndices=this._definition.directiveRecords.map(function(e){return e.directiveIndex})}return e.prototype.instantiate=function(){return new v.DynamicChangeDetector(this._definition.id,this._propertyBindingRecords.length,this._propertyBindingTargets,this._directiveIndices,this._definition.strategy,this._propertyBindingRecords,this._eventBindingRecords,this._definition.directiveRecords,this._definition.genConfig)},e}();t.DynamicProtoChangeDetector=P,t.createPropertyRecords=r,t.createEventRecords=i;var C=function(){function e(){this.records=[]}return e.prototype.add=function(e,t,n){var r=f.ListWrapper.last(this.records);l.isPresent(r)&&r.bindingRecord.directiveRecord==e.directiveRecord&&(r.lastInDirective=!1);var i=this.records.length;this._appendRecords(e,t,n);var o=f.ListWrapper.last(this.records);l.isPresent(o)&&o!==r&&(o.lastInBinding=!0,o.lastInDirective=!0,this._setArgumentToPureFunction(i))},e.prototype._setArgumentToPureFunction=function(e){for(var t=this,n=e;ne},e.operation_greater_then=function(e,t){return e>t},e.operation_less_or_equals_then=function(e,t){return t>=e},e.operation_greater_or_equals_then=function(e,t){return e>=t},e.cond=function(e,t,n){return e?t:n},e.mapFn=function(e){function t(t){for(var n=s.StringMapWrapper.create(),r=0;rt?null:e[t-1]},e.callPipeOnDestroy=function(e){c.implementsOnDestroy(e.pipe)&&e.pipe.ngOnDestroy()},e.bindingTarget=function(e,t,n,r,i){return new u.BindingTarget(e,t,n,r,i)},e.directiveIndex=function(e,t){return new p.DirectiveIndex(e,t)},e.looseNotIdentical=function(e,t){return!i.looseIdentical(e,t)},e.devModeEqual=function(t,n){return s.isListLikeIterable(t)&&s.isListLikeIterable(n)?s.areIterablesEqual(t,n,e.devModeEqual):s.isListLikeIterable(t)||i.isPrimitive(t)||s.isListLikeIterable(n)||i.isPrimitive(n)?i.looseIdentical(t,n):!0},e.uninitialized=i.CONST_EXPR(new Object),e}();t.ChangeDetectionUtil=y},function(e,t){function n(e){return e.constructor.prototype.ngOnDestroy}t.implementsOnDestroy=n},function(e,t,n){var r=n(5),i="directiveLifecycle",o="native",s="directive",a="elementProperty",c="elementAttribute",u="elementClass",p="elementStyle",l="textNode",h="event",f="hostEvent",d=function(){function e(e,t,n,r,i){this.mode=e,this.elementIndex=t,this.name=n,this.unit=r,this.debug=i}return e.prototype.isDirective=function(){return this.mode===s},e.prototype.isElementProperty=function(){return this.mode===a},e.prototype.isElementAttribute=function(){return this.mode===c},e.prototype.isElementClass=function(){return this.mode===u},e.prototype.isElementStyle=function(){return this.mode===p},e.prototype.isTextNode=function(){return this.mode===l},e}();t.BindingTarget=d;var y=function(){function e(e,t,n,r,i,o,s){this.mode=e,this.target=t,this.implicitReceiver=n,this.ast=r,this.setter=i,this.lifecycleEvent=o,this.directiveRecord=s}return e.prototype.isDirectiveLifecycle=function(){return this.mode===i},e.prototype.callOnChanges=function(){return r.isPresent(this.directiveRecord)&&this.directiveRecord.callOnChanges},e.prototype.isDefaultChangeDetection=function(){return r.isBlank(this.directiveRecord)||this.directiveRecord.isDefaultChangeDetection()},e.createDirectiveDoCheck=function(t){return new e(i,null,0,null,null,"DoCheck",t)},e.createDirectiveOnInit=function(t){return new e(i,null,0,null,null,"OnInit",t)},e.createDirectiveOnChanges=function(t){return new e(i,null,0,null,null,"OnChanges",t)},e.createForDirective=function(t,n,r,i){var o=i.directiveIndex.elementIndex,a=new d(s,o,n,null,t.toString());return new e(s,a,0,t,r,null,i)},e.createForElementProperty=function(t,n,r){var i=new d(a,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementAttribute=function(t,n,r){var i=new d(c,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementClass=function(t,n,r){var i=new d(u,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementStyle=function(t,n,r,i){var s=new d(p,n,r,i,t.toString());return new e(o,s,0,t,null,null,null)},e.createForHostProperty=function(t,n,r){var i=new d(a,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostAttribute=function(t,n,r){var i=new d(c,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostClass=function(t,n,r){var i=new d(u,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostStyle=function(t,n,r,i){var s=new d(p,t.elementIndex,r,i,n.toString());return new e(o,s,t,n,null,null,null)},e.createForTextNode=function(t,n){var r=new d(l,n,null,null,t.toString());return new e(o,r,0,t,null,null,null)},e.createForEvent=function(t,n,r){var i=new d(h,r,n,null,t.toString());return new e(h,i,0,t,null,null,null)},e.createForHostEvent=function(t,n,r){var i=r.directiveIndex,o=new d(f,i.elementIndex,n,null,t.toString());return new e(f,o,i,t,null,null,r)},e}();t.BindingRecord=y},function(e,t,n){var r=n(5),i=n(37),o=function(){function e(e,t){this.elementIndex=e,this.directiveIndex=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.elementIndex+"_"+this.directiveIndex},enumerable:!0,configurable:!0}),e}();t.DirectiveIndex=o;var s=function(){function e(e){var t=void 0===e?{}:e,n=t.directiveIndex,i=t.callAfterContentInit,o=t.callAfterContentChecked,s=t.callAfterViewInit,a=t.callAfterViewChecked,c=t.callOnChanges,u=t.callDoCheck,p=t.callOnInit,l=t.callOnDestroy,h=t.changeDetection,f=t.outputs;this.directiveIndex=n,this.callAfterContentInit=r.normalizeBool(i),this.callAfterContentChecked=r.normalizeBool(o),this.callOnChanges=r.normalizeBool(c),this.callAfterViewInit=r.normalizeBool(s),this.callAfterViewChecked=r.normalizeBool(a),this.callDoCheck=r.normalizeBool(u),this.callOnInit=r.normalizeBool(p),this.callOnDestroy=r.normalizeBool(l),this.changeDetection=h,this.outputs=f}return e.prototype.isDefaultChangeDetection=function(){return i.isDefaultChangeDetectionStrategy(this.changeDetection)},e}();t.DirectiveRecord=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(12),a=n(44),c=n(39),u=n(37),p=n(67),l=n(17),h=n(48),f=function(e){function t(t,n,r,i,o,a,c,u,p){e.call(this,t,n,r,i,o),this._records=a,this._eventBindings=c,this._directiveRecords=u,this._genConfig=p;var l=a.length+1;this.values=s.ListWrapper.createFixedSize(l),this.localPipes=s.ListWrapper.createFixedSize(l),this.prevContexts=s.ListWrapper.createFixedSize(l),this.changes=s.ListWrapper.createFixedSize(l),this.dehydrateDirectives(!1)}return r(t,e),t.prototype.handleEventInternal=function(e,t,n){var r=this,i=!1;return this._matchingEventBindings(e,t).forEach(function(e){var t=r._processEventBinding(e,n);t===!1&&(i=!0)}),i},t.prototype._processEventBinding=function(e,t){var n=s.ListWrapper.createFixedSize(e.records.length);n[0]=this.values[0];for(var r=0;r=0;--t){var n=e[t];n.callAfterContentInit&&this.state==u.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterContentInit(),n.callAfterContentChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterContentChecked()}},t.prototype.afterViewLifecycleCallbacksInternal=function(){for(var e=this._directiveRecords,t=e.length-1;t>=0;--t){var n=e[t];n.callAfterViewInit&&this.state==u.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterViewInit(),n.callAfterViewChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterViewChecked()}},t.prototype._updateDirectiveOrElement=function(t,n){if(i.isBlank(n.directiveRecord))e.prototype.notifyDispatcher.call(this,t.currentValue);else{var r=n.directiveRecord.directiveIndex;n.setter(this._getDirectiveFor(r),t.currentValue)}this._genConfig.logBindingUpdate&&e.prototype.logBindingUpdate.call(this,t.currentValue)},t.prototype._addChange=function(t,n,r){return t.callOnChanges()?e.prototype.addChange.call(this,r,n.previousValue,n.currentValue):r},t.prototype._getDirectiveFor=function(e){return this.dispatcher.getDirectiveFor(e)},t.prototype._getDetectorFor=function(e){return this.dispatcher.getDetectorFor(e)},t.prototype._check=function(e,t,n,r){return e.isPipeRecord()?this._pipeCheck(e,t,n):this._referenceCheck(e,t,n,r)},t.prototype._referenceCheck=function(e,t,n,r){if(this._pureFuncAndArgsDidNotChange(e))return this._setChanged(e,!1),null;var i=this._calculateCurrValue(e,n,r);if(e.shouldBeChecked()){var o=this._readSelf(e,n),s=t?!c.ChangeDetectionUtil.devModeEqual(o,i):c.ChangeDetectionUtil.looseNotIdentical(o,i);if(s){if(e.lastInBinding){var a=c.ChangeDetectionUtil.simpleChange(o,i);return t&&this.throwOnChangeError(o,i),this._writeSelf(e,i,n),this._setChanged(e,!0),a}return this._writeSelf(e,i,n),this._setChanged(e,!0),null}return this._setChanged(e,!1),null}return this._writeSelf(e,i,n),this._setChanged(e,!0),null},t.prototype._calculateCurrValue=function(e,t,n){switch(e.mode){case p.RecordType.Self:return this._readContext(e,t);case p.RecordType.Const:return e.funcOrValue;case p.RecordType.PropertyRead:var r=this._readContext(e,t);return e.funcOrValue(r);case p.RecordType.SafeProperty:var r=this._readContext(e,t);return i.isBlank(r)?null:e.funcOrValue(r);case p.RecordType.PropertyWrite:var r=this._readContext(e,t),s=this._readArgs(e,t)[0];return e.funcOrValue(r,s),s;case p.RecordType.KeyedWrite:var r=this._readContext(e,t),a=this._readArgs(e,t)[0],s=this._readArgs(e,t)[1];return r[a]=s,s;case p.RecordType.Local:return n.get(e.name);case p.RecordType.InvokeMethod:var r=this._readContext(e,t),c=this._readArgs(e,t);return e.funcOrValue(r,c);case p.RecordType.SafeMethodInvoke:var r=this._readContext(e,t);if(i.isBlank(r))return null;var c=this._readArgs(e,t);return e.funcOrValue(r,c);case p.RecordType.KeyedRead:var u=this._readArgs(e,t)[0];return this._readContext(e,t)[u];case p.RecordType.Chain:var c=this._readArgs(e,t);return c[c.length-1];case p.RecordType.InvokeClosure:return i.FunctionWrapper.apply(this._readContext(e,t),this._readArgs(e,t));case p.RecordType.Interpolate:case p.RecordType.PrimitiveOp:case p.RecordType.CollectionLiteral:return i.FunctionWrapper.apply(e.funcOrValue,this._readArgs(e,t));default:throw new o.BaseException("Unknown operation "+e.mode)}},t.prototype._pipeCheck=function(e,t,n){var r=this._readContext(e,n),i=this._pipeFor(e,r);if(!i.pure||this._argsOrContextChanged(e)){var o=this._readArgs(e,n),s=i.pipe.transform(r,o);if(e.shouldBeChecked()){var a=this._readSelf(e,n),u=t?!c.ChangeDetectionUtil.devModeEqual(a,s):c.ChangeDetectionUtil.looseNotIdentical(a,s);if(u){if(s=c.ChangeDetectionUtil.unwrapValue(s),e.lastInBinding){var p=c.ChangeDetectionUtil.simpleChange(a,s);return t&&this.throwOnChangeError(a,s),this._writeSelf(e,s,n),this._setChanged(e,!0),p}return this._writeSelf(e,s,n),this._setChanged(e,!0),null}return this._setChanged(e,!1),null}return this._writeSelf(e,s,n),this._setChanged(e,!0),null}},t.prototype._pipeFor=function(e,t){var n=this._readPipe(e);if(i.isPresent(n))return n;var r=this.pipes.get(e.name);return this._writePipe(e,r),r},t.prototype._readContext=function(e,t){return-1==e.contextIndex?this._getDirectiveFor(e.directiveIndex):t[e.contextIndex]},t.prototype._readSelf=function(e,t){return t[e.selfIndex]},t.prototype._writeSelf=function(e,t,n){n[e.selfIndex]=t},t.prototype._readPipe=function(e){return this.localPipes[e.selfIndex]},t.prototype._writePipe=function(e,t){this.localPipes[e.selfIndex]=t},t.prototype._setChanged=function(e,t){e.argumentToPureFunction&&(this.changes[e.selfIndex]=t)},t.prototype._pureFuncAndArgsDidNotChange=function(e){return e.isPureFunction()&&!this._argsChanged(e)},t.prototype._argsChanged=function(e){for(var t=e.args,n=0;n "+e);try{var i=new Map;i.set("$event",n);var o=!this.handleEventInternal(e,t,new c.Locals(this.locals,i));return this.markPathToRootAsCheckOnce(),o}catch(s){var u=this.dispatcher.getDebugContext(null,t,null),p=r.isPresent(u)?new a.EventEvaluationErrorContext(u.element,u.componentElement,u.context,u.locals,u.injector):null;throw new a.EventEvaluationError(e,s,s.stack,p)}},e.prototype.handleEventInternal=function(e,t,n){return!1},e.prototype.detectChanges=function(){this.runDetectChanges(!1)},e.prototype.checkNoChanges=function(){r.assertionsEnabled()&&this.runDetectChanges(!0)},e.prototype.runDetectChanges=function(e){if(this.mode!==u.ChangeDetectionStrategy.Detached&&this.mode!==u.ChangeDetectionStrategy.Checked&&this.state!==u.ChangeDetectorState.Errored){var t=h(this.id,e);this.detectChangesInRecords(e),this._detectChangesContentChildren(e),e||this.afterContentLifecycleCallbacks(),this._detectChangesInViewChildren(e),e||this.afterViewLifecycleCallbacks(),this.mode===u.ChangeDetectionStrategy.CheckOnce&&(this.mode=u.ChangeDetectionStrategy.Checked),this.state=u.ChangeDetectorState.CheckedBefore,p.wtfLeave(t)}},e.prototype.detectChangesInRecords=function(e){this.hydrated()||this.throwDehydratedError(this.id);try{this.detectChangesInRecordsInternal(e)}catch(t){t instanceof a.ExpressionChangedAfterItHasBeenCheckedException||(this.state=u.ChangeDetectorState.Errored),this._throwError(t,t.stack)}},e.prototype.detectChangesInRecordsInternal=function(e){},e.prototype.hydrate=function(e,t,n,r){this.dispatcher=n,this.mode=o.ChangeDetectionUtil.changeDetectionMode(this.strategy),this.context=e,this.locals=t,this.pipes=r,this.hydrateDirectives(n),this.state=u.ChangeDetectorState.NeverChecked},e.prototype.hydrateDirectives=function(e){},e.prototype.dehydrate=function(){this.dehydrateDirectives(!0),this._unsubscribeFromOutputs(),this.dispatcher=null,this.context=null,this.locals=null,this.pipes=null},e.prototype.dehydrateDirectives=function(e){},e.prototype.hydrated=function(){return r.isPresent(this.context)},e.prototype.destroyRecursive=function(){this.dispatcher.notifyOnDestroy(),this.dehydrate();for(var e=this.contentChildren,t=0;t0},e.dispose=function(e){e.unsubscribe()},e.callNext=function(e,t){e.next(t)},e.callEmit=function(e,t){e.emit(t)},e.callError=function(e,t){e.error(t)},e.callComplete=function(e){e.complete()},e.fromPromise=function(e){return a.PromiseObservable.create(e)},e.toPromise=function(e){return c.toPromise.call(e)},e}();t.ObservableWrapper=h;var f=function(e){function t(t){void 0===t&&(t=!0),e.call(this),this._isAsync=t}return r(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.next=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,r){var i,o=function(e){return null},s=function(){return null};return t&&"object"==typeof t?(i=this._isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this._isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this._isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this._isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(o=this._isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),r&&(s=this._isAsync?function(){setTimeout(function(){return r()})}:function(){r()})),e.prototype.subscribe.call(this,i,o,s)},t}(s.Subject);t.EventEmitter=f},function(e,t){var n=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e}();t.PromiseCompleter=n;var r=function(){function e(){}return e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e,t){return Promise.reject(e)},e.catchError=function(e,t){return e["catch"](t)},e.all=function(e){return 0==e.length?Promise.resolve([]):Promise.all(e)},e.then=function(e,t,n){return e.then(t,n)},e.wrap=function(e){return new Promise(function(t,n){try{t(e())}catch(r){n(r)}})},e.scheduleMicrotask=function(t){e.then(e.resolve(null),t,function(e){})},e.isPromise=function(e){return e instanceof Promise},e.completer=function(){return new n},e}();t.PromiseWrapper=r},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){var t=e.value,n=e.subscriber;n.isUnsubscribed||(n.next(t),n.complete())}function i(e){var t=e.err,n=e.subscriber;n.isUnsubscribed||n.error(t)}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(52),a=n(54),c=function(e){function t(t,n){void 0===n&&(n=null),e.call(this),this.promise=t,this.scheduler=n}return o(t,e),t.create=function(e,n){return void 0===n&&(n=null),new t(e,n)},t.prototype._subscribe=function(e){var t=this,n=this.promise,o=this.scheduler;if(null==o)this._isScalar?e.isUnsubscribed||(e.next(this.value),e.complete()):n.then(function(n){t.value=n,t._isScalar=!0,e.isUnsubscribed||(e.next(n),e.complete())},function(t){e.isUnsubscribed||e.error(t)}).then(null,function(e){s.root.setTimeout(function(){throw e})});else if(this._isScalar){if(!e.isUnsubscribed)return o.schedule(r,0,{value:this.value,subscriber:e})}else n.then(function(n){t.value=n,t._isScalar=!0,e.isUnsubscribed||e.add(o.schedule(r,0,{value:n,subscriber:e}))},function(t){e.isUnsubscribed||e.add(o.schedule(i,0,{err:t,subscriber:e}))}).then(null,function(e){s.root.setTimeout(function(){throw e})})},t}(a.Observable);t.PromiseObservable=c},function(e,t,n){(function(e,n){"use strict";var r={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};t.root=r[typeof self]&&self||r[typeof window]&&window;var i=(r[typeof t]&&t&&!t.nodeType&&t,r[typeof e]&&e&&!e.nodeType&&e,r[typeof n]&&n);!i||i.global!==i&&i.window!==i||(t.root=i)}).call(t,n(53)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(52),i=n(55),o=n(56),s=n(62),a=n(63),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,n);if(r?i.add(this._subscribe(r.call(i))):i.add(this._subscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype.forEach=function(e,t,n){if(n||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?n=r.root.Rx.config.Promise:r.root.Promise&&(n=r.root.Promise)),!n)throw new Error("no Promise impl found");var i=this;return new n(function(n,r){i.subscribe(function(n){var i=s.tryCatch(e).call(t,n);i===a.errorObject&&r(a.errorObject.e)},r,n)})},e.prototype._subscribe=function(e){return this.source.subscribe(e)},e.prototype[i.SymbolShim.observable]=function(){return this},e.create=function(t){return new e(t)},e}();t.Observable=c},function(e,t,n){"use strict";function r(e){var t=o(e);return a(t,e),c(t),i(t),t}function i(e){e["for"]||(e["for"]=s)}function o(e){return e.Symbol||(e.Symbol=function(e){return"@@Symbol("+e+"):"+p++}),e.Symbol}function s(e){return"@@"+e}function a(e,t){if(!e.iterator)if("function"==typeof e["for"])e.iterator=e["for"]("iterator");else if(t.Set&&"function"==typeof(new t.Set)["@@iterator"])e.iterator="@@iterator";else if(t.Map)for(var n=Object.getOwnPropertyNames(t.Map.prototype),r=0;r0);r.set(f.selfIndex,y.selfIndex)}}return i(t)}function i(e){for(var t=[],n=h.ListWrapper.createFixedSize(e.length),r=new h.Map,i=0;ii+1){var c=a(s,t,r);t.push(c),n[c.fixedArgs[0]]=c}}else{var c=a(s,t,r);t.push(c),r.set(s.selfIndex,c.selfIndex)}}return t}function o(e,t,n,r){var i=s(e,t,n);return l.isPresent(i)?(e.lastInBinding?(t.push(u(e,i.selfIndex,t.length+1)),i.referencedBySelf=!0):e.argumentToPureFunction&&(i.argumentToPureFunction=!0),i):(r&&n.push(e.selfIndex),t.push(e),e)}function s(e,t,n){return t.find(function(t){return-1==n.indexOf(t.selfIndex)&&t.mode!==f.RecordType.DirectiveLifecycle&&p(t,e)&&t.mode===e.mode&&l.looseIdentical(t.funcOrValue,e.funcOrValue)&&t.contextIndex===e.contextIndex&&l.looseIdentical(t.name,e.name)&&h.ListWrapper.equals(t.args,e.args)})}function a(e,t,n){var r=e.args.map(function(e){return c(n,e)}),i=c(n,e.contextIndex),o=t.length+1;return new f.ProtoRecord(e.mode,e.name,e.funcOrValue,r,e.fixedArgs,i,e.directiveIndex,o,e.bindingRecord,e.lastInBinding,e.lastInDirective,e.argumentToPureFunction,e.referencedBySelf,e.propertyBindingIndex)}function c(e,t){var n=e.get(t);return l.isPresent(n)?n:t}function u(e,t,n){return new f.ProtoRecord(f.RecordType.Self,"self",null,[],e.fixedArgs,t,e.directiveIndex,n,e.bindingRecord,e.lastInBinding,e.lastInDirective,!1,!1,e.propertyBindingIndex)}function p(e,t){var n=l.isBlank(e.directiveIndex)?null:e.directiveIndex.directiveIndex,r=l.isBlank(e.directiveIndex)?null:e.directiveIndex.elementIndex,i=l.isBlank(t.directiveIndex)?null:t.directiveIndex.directiveIndex,o=l.isBlank(t.directiveIndex)?null:t.directiveIndex.elementIndex;return n===i&&r===o}var l=n(5),h=n(12),f=n(67);t.coalesce=r},function(e,t,n){var r=n(71),i=function(){function e(e){this.definition=e,this._factory=this._createFactory(e)}return e.isSupported=function(){return!0},e.prototype.instantiate=function(){return this._factory()},e.prototype._createFactory=function(e){return new r.ChangeDetectorJITGenerator(e,"util","AbstractChangeDetector","ChangeDetectorStatus").generate()},e}();t.JitProtoChangeDetector=i},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=n(44),a=n(39),c=n(67),u=n(72),p=n(73),l=n(74),h=n(37),f=n(38),d="isChanged",y="changes",v=function(){function e(e,t,n,r){this.changeDetectionUtilVarName=t,this.abstractChangeDetectorVarName=n,this.changeDetectorStateVarName=r;var i=f.createPropertyRecords(e),o=f.createEventRecords(e),s=e.bindingRecords.map(function(e){return e.target});this.id=e.id,this.changeDetectionStrategy=e.strategy,this.genConfig=e.genConfig,this.records=i,this.propertyBindingTargets=s,this.eventBindings=o,this.directiveRecords=e.directiveRecords,this._names=new u.CodegenNameUtil(this.records,this.eventBindings,this.directiveRecords,this.changeDetectionUtilVarName),this._logic=new p.CodegenLogicUtil(this._names,this.changeDetectionUtilVarName,this.changeDetectorStateVarName),this.typeName=u.sanitizeName("ChangeDetector_"+this.id)}return e.prototype.generate=function(){var e="\n "+this.generateSource()+"\n return function() {\n return new "+this.typeName+"();\n }\n ";return new Function(this.abstractChangeDetectorVarName,this.changeDetectionUtilVarName,this.changeDetectorStateVarName,e)(s.AbstractChangeDetector,a.ChangeDetectionUtil,h.ChangeDetectorState)},e.prototype.generateSource=function(){return"\n var "+this.typeName+" = function "+this.typeName+"() {\n "+this.abstractChangeDetectorVarName+".call(\n this, "+JSON.stringify(this.id)+", "+this.records.length+",\n "+this.typeName+".gen_propertyBindingTargets, "+this.typeName+".gen_directiveIndices,\n "+l.codify(this.changeDetectionStrategy)+");\n this.dehydrateDirectives(false);\n }\n\n "+this.typeName+".prototype = Object.create("+this.abstractChangeDetectorVarName+".prototype);\n\n "+this.typeName+".prototype.detectChangesInRecordsInternal = function(throwOnChange) {\n "+this._names.genInitLocals()+"\n var "+d+" = false;\n var "+y+" = null;\n\n "+this._genAllRecords(this.records)+"\n }\n\n "+this._maybeGenHandleEventInternal()+"\n\n "+this._maybeGenAfterContentLifecycleCallbacks()+"\n\n "+this._maybeGenAfterViewLifecycleCallbacks()+"\n\n "+this._maybeGenHydrateDirectives()+"\n\n "+this._maybeGenDehydrateDirectives()+"\n\n "+this._genPropertyBindingTargets()+"\n\n "+this._genDirectiveIndices()+"\n "},e.prototype._genPropertyBindingTargets=function(){var e=this._logic.genPropertyBindingTargets(this.propertyBindingTargets,this.genConfig.genDebugInfo);return this.typeName+".gen_propertyBindingTargets = "+e+";"},e.prototype._genDirectiveIndices=function(){var e=this._logic.genDirectiveIndices(this.directiveRecords);return this.typeName+".gen_directiveIndices = "+e+";"},e.prototype._maybeGenHandleEventInternal=function(){var e=this;if(this.eventBindings.length>0){var t=this.eventBindings.map(function(t){return e._genEventBinding(t)}).join("\n");return"\n "+this.typeName+".prototype.handleEventInternal = function(eventName, elIndex, locals) {\n var "+this._names.getPreventDefaultAccesor()+" = false;\n "+this._names.genInitEventLocals()+"\n "+t+"\n return "+this._names.getPreventDefaultAccesor()+";\n }\n "}return""},e.prototype._genEventBinding=function(e){var t=this,n=[];return this._endOfBlockIdxs=[],o.ListWrapper.forEachWithIndex(e.records,function(r,i){var o;o=r.isConditionalSkipRecord()?t._genConditionalSkip(r,t._names.getEventLocalName(e,i)):r.isUnconditionalSkipRecord()?t._genUnconditionalSkip(r):t._genEventBindingEval(e,r),o+=t._genEndOfSkipBlock(i),n.push(o)}),'\n if (eventName === "'+e.eventName+'" && elIndex === '+e.elIndex+") {\n "+n.join("\n")+"\n }"},e.prototype._genEventBindingEval=function(e,t){if(t.lastInBinding){var n=this._logic.genEventBindingEvalValue(e,t),r=this._genMarkPathToRootAsCheckOnce(t),i=this._genUpdatePreventDefault(e,t);return r+"\n"+n+"\n"+i}return this._logic.genEventBindingEvalValue(e,t)},e.prototype._genMarkPathToRootAsCheckOnce=function(e){var t=e.bindingRecord;return t.isDefaultChangeDetection()?"":this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markPathToRootAsCheckOnce();"},e.prototype._genUpdatePreventDefault=function(e,t){var n=this._names.getEventLocalName(e,t.selfIndex);return"if ("+n+" === false) { "+this._names.getPreventDefaultAccesor()+" = true};"},e.prototype._maybeGenDehydrateDirectives=function(){var e=this._names.genPipeOnDestroy(),t=this._logic.genDirectivesOnDestroy(this.directiveRecords),n=this._names.genDehydrateFields();return e||t||n?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n if (destroyPipes) {\n "+e+"\n "+t+"\n }\n "+n+"\n }":""},e.prototype._maybeGenHydrateDirectives=function(){var e=this._logic.genHydrateDirectives(this.directiveRecords),t=this._logic.genHydrateDetectors(this.directiveRecords);return e||t?this.typeName+".prototype.hydrateDirectives = function(directives) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenAfterContentLifecycleCallbacks=function(){var e=this._logic.genContentLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterContentLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._maybeGenAfterViewLifecycleCallbacks=function(){var e=this._logic.genViewLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterViewLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._genAllRecords=function(e){var t=[];this._endOfBlockIdxs=[];for(var n=0;na;++a)this._sanitizedNames[a+1]=r(""+this._records[a].name+a);for(var u=0;ua;++a)l.push(r(""+p.records[a].name+a+"_"+u));this._sanitizedEventNames.set(p,l)}}return e.prototype._addFieldPrefix=function(e){return""+d+e},e.prototype.getDispatcherName=function(){return this._addFieldPrefix(u)},e.prototype.getPipesAccessorName=function(){return this._addFieldPrefix(h)},e.prototype.getProtosName=function(){return this._addFieldPrefix(f)},e.prototype.getDirectivesAccessorName=function(){return this._addFieldPrefix(c)},e.prototype.getLocalsAccessorName=function(){return this._addFieldPrefix(p)},e.prototype.getStateName=function(){return this._addFieldPrefix(s)},e.prototype.getModeName=function(){return this._addFieldPrefix(l)},e.prototype.getPropertyBindingIndex=function(){return this._addFieldPrefix(a)},e.prototype.getLocalName=function(e){return"l_"+this._sanitizedNames[e]},e.prototype.getEventLocalName=function(e,t){return"l_"+this._sanitizedEventNames.get(e)[t]},e.prototype.getChangeName=function(e){return"c_"+this._sanitizedNames[e]},e.prototype.genInitLocals=function(){for(var e=[],n=[],r=0,i=this.getFieldCount();i>r;++r)if(r==t.CONTEXT_INDEX)e.push(this.getLocalName(r)+" = "+this.getFieldName(r));else{var s=this._records[r-1];if(s.argumentToPureFunction){var a=this.getChangeName(r);e.push(this.getLocalName(r)+","+a),n.push(a)}else e.push(""+this.getLocalName(r))}var c=o.ListWrapper.isEmpty(n)?"":n.join("=")+" = false;";return"var "+e.join(",")+";"+c},e.prototype.genInitEventLocals=function(){var e=this,n=[this.getLocalName(t.CONTEXT_INDEX)+" = "+this.getFieldName(t.CONTEXT_INDEX)];return this._sanitizedEventNames.forEach(function(r,i){for(var o=0;o1?"var "+n.join(",")+";":""},e.prototype.getPreventDefaultAccesor=function(){return"preventDefault"},e.prototype.getFieldCount=function(){return this._sanitizedNames.length},e.prototype.getFieldName=function(e){return this._addFieldPrefix(this._sanitizedNames[e])},e.prototype.getAllFieldNames=function(){for(var e=[],t=0,n=this.getFieldCount();n>t;++t)(0===t||this._records[t-1].shouldBeChecked())&&e.push(this.getFieldName(t));for(var r=0,i=this._records.length;i>r;++r){var o=this._records[r];o.isPipeRecord()&&e.push(this.getPipeName(o.selfIndex))}for(var s=0,a=this._directiveRecords.length;a>s;++s){var c=this._directiveRecords[s];e.push(this.getDirectiveName(c.directiveIndex)),c.isDefaultChangeDetection()||e.push(this.getDetectorName(c.directiveIndex))}return e},e.prototype.genDehydrateFields=function(){var e=this.getAllFieldNames();return o.ListWrapper.removeAt(e,t.CONTEXT_INDEX),o.ListWrapper.isEmpty(e)?"":(e.push(this._utilName+".uninitialized;"),e.join(" = "))},e.prototype.genPipeOnDestroy=function(){var e=this;return this._records.filter(function(e){return e.isPipeRecord()}).map(function(t){return e._utilName+".callPipeOnDestroy("+e.getPipeName(t.selfIndex)+");"}).join("\n")},e.prototype.getPipeName=function(e){return this._addFieldPrefix(this._sanitizedNames[e]+"_pipe")},e.prototype.getDirectiveName=function(e){return this._addFieldPrefix("directive_"+e.name)},e.prototype.getDetectorName=function(e){return this._addFieldPrefix("detector_"+e.name)},e}();t.CodegenNameUtil=v},function(e,t,n){var r=n(5),i=n(74),o=n(67),s=n(14),a=function(){function e(e,t,n){this._names=e,this._utilName=t,this._changeDetectorStateName=n}return e.prototype.genPropertyBindingEvalValue=function(e){var t=this;return this._genEvalValue(e,function(e){return t._names.getLocalName(e)},this._names.getLocalsAccessorName())},e.prototype.genEventBindingEvalValue=function(e,t){var n=this;return this._genEvalValue(t,function(t){return n._names.getEventLocalName(e,t)},"locals")},e.prototype._genEvalValue=function(e,t,n){var r,a=-1==e.contextIndex?this._names.getDirectiveName(e.directiveIndex):t(e.contextIndex),c=e.args.map(function(e){return t(e)}).join(", ");switch(e.mode){case o.RecordType.Self:r=a;break;case o.RecordType.Const:r=i.codify(e.funcOrValue);break;case o.RecordType.PropertyRead:r=a+"."+e.name;break;case o.RecordType.SafeProperty:var u=a+"."+e.name;r=this._utilName+".isValueBlank("+a+") ? null : "+u;break;case o.RecordType.PropertyWrite:r=a+"."+e.name+" = "+t(e.args[0]);break;case o.RecordType.Local:r=n+".get("+i.rawString(e.name)+")";break;case o.RecordType.InvokeMethod:r=a+"."+e.name+"("+c+")";break;case o.RecordType.SafeMethodInvoke:var p=a+"."+e.name+"("+c+")";r=this._utilName+".isValueBlank("+a+") ? null : "+p;break;case o.RecordType.InvokeClosure:r=a+"("+c+")";break;case o.RecordType.PrimitiveOp:r=this._utilName+"."+e.name+"("+c+")";break;case o.RecordType.CollectionLiteral:r=this._utilName+"."+e.name+"("+c+")";break;case o.RecordType.Interpolate:r=this._genInterpolation(e);break;case o.RecordType.KeyedRead:r=a+"["+t(e.args[0])+"]";break;case o.RecordType.KeyedWrite:r=a+"["+t(e.args[0])+"] = "+t(e.args[1]);break;case o.RecordType.Chain:r=""+t(e.args[e.args.length-1]);break;default:throw new s.BaseException("Unknown operation "+e.mode)}return t(e.selfIndex)+" = "+r+";"},e.prototype.genPropertyBindingTargets=function(e,t){var n=this,o=e.map(function(e){if(r.isBlank(e))return"null";var o=t?i.codify(e.debug):"null";return n._utilName+".bindingTarget("+i.codify(e.mode)+", "+e.elementIndex+", "+i.codify(e.name)+", "+i.codify(e.unit)+", "+o+")"});return"["+o.join(", ")+"]"},e.prototype.genDirectiveIndices=function(e){var t=this,n=e.map(function(e){return t._utilName+".directiveIndex("+e.directiveIndex.elementIndex+", "+e.directiveIndex.directiveIndex+")"});return"["+n.join(", ")+"]"},e.prototype._genInterpolation=function(e){for(var t=[],n=0;n0){var c="this.outputSubscriptions";r.IS_DART?n.unshift(c+" = new List("+i+");"):n.unshift(c+" = new Array("+i+");")}return n.join("\n")},e.prototype.genDirectivesOnDestroy=function(e){for(var t=[],n=0;n this.handleEvent('"+t+"', "+e+", event)":"(function(event) { return this.handleEvent('"+t+"', "+e+", event); }).bind(this)"},e.prototype._genReadDirective=function(e){return"this.getDirectiveFor(directives, "+e+")"},e.prototype.genHydrateDetectors=function(e){for(var t=[],n=0;n=0;--i){var o=e[i];o.callAfterContentInit&&t.push("if("+this._names.getStateName()+" "+n+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(o.directiveIndex)+".ngAfterContentInit();"),o.callAfterContentChecked&&t.push(this._names.getDirectiveName(o.directiveIndex)+".ngAfterContentChecked();")}return t},e.prototype.genViewLifecycleCallbacks=function(e){for(var t=[],n=r.IS_DART?"==":"===",i=e.length-1;i>=0;--i){var o=e[i];o.callAfterViewInit&&t.push("if("+this._names.getStateName()+" "+n+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(o.directiveIndex)+".ngAfterViewInit();"),o.callAfterViewChecked&&t.push(this._names.getDirectiveName(o.directiveIndex)+".ngAfterViewChecked();")}return t},e}();t.CodegenLogicUtil=a},function(e,t){function n(e){return JSON.stringify(e)}function r(e){return"'"+e+"'"}function i(e){return e.join(" + ")}t.codify=n,t.rawString=r,t.combineGeneratedStrings=i},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5);!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None"}(t.ViewEncapsulation||(t.ViewEncapsulation={}));var s=t.ViewEncapsulation;t.VIEW_ENCAPSULATION_VALUES=[s.Emulated,s.Native,s.None];var a=function(){function e(e){var t=void 0===e?{}:e,n=t.templateUrl,r=t.template,i=t.directives,o=t.pipes,s=t.encapsulation,a=t.styles,c=t.styleUrls;this.templateUrl=n,this.template=r,this.styleUrls=c,this.styles=a,this.directives=i,this.pipes=o,this.encapsulation=s}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.ViewMetadata=a},function(e,t,n){var r=n(9);t.Class=r.Class},function(e,t,n){var r=n(5);t.enableProdMode=r.enableProdMode},function(e,t,n){var r=n(5);t.Type=r.Type;var i=n(48);t.EventEmitter=i.EventEmitter;var o=n(14);t.WrappedException=o.WrappedException;var s=n(16);t.ExceptionHandler=s.ExceptionHandler},function(e,t,n){function r(e){return[f.provide(d.APP_COMPONENT,{useValue:e}),f.provide(d.APP_COMPONENT_REF_PROMISE,{useFactory:function(t,n,r){var i;return t.loadAsRoot(e,null,r,function(){n._unloadComponent(i)}).then(function(e){i=e;var t=r.getOptional(g.Testability);return h.isPresent(t)&&r.get(g.TestabilityRegistry).registerApplication(e.location.nativeElement,t),e})},deps:[m.DynamicComponentLoader,S,f.Injector]}),f.provide(e,{useFactory:function(e){return e.then(function(e){return e.instance})},deps:[d.APP_COMPONENT_REF_PROMISE]})]}function i(){return new l.NgZone({enableLongStackTrace:h.assertionsEnabled()})}function o(e){if(C.lockMode(),h.isPresent(w)){if(v.ListWrapper.equals(R,e))return w;throw new _.BaseException("platform cannot be initialized with different sets of providers.")}return a(e)}function s(){h.isPresent(w)&&(w.dispose(),w=null)}function a(e){R=e;var t=f.Injector.resolveAndCreate(e);return w=new O(t,function(){w=null,R=null}),c(t),w}function c(e){var t=e.getOptional(d.PLATFORM_INITIALIZER);h.isPresent(t)&&t.forEach(function(e){return e()})}function u(e){var t=e.getOptional(d.APP_INITIALIZER),n=[];return h.isPresent(t)&&t.forEach(function(e){var t=e();y.PromiseWrapper.isPromise(t)&&n.push(t)}),n.length>0?y.PromiseWrapper.all(n):null}var p=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},l=n(80),h=n(5),f=n(6),d=n(82),y=n(48),v=n(12),g=n(83),m=n(84),_=n(14),b=n(100),P=n(46),C=n(5);t.createNgZone=i;var w,R;t.platform=o,t.disposePlatform=s;var E=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){throw _.unimplemented()},enumerable:!0,configurable:!0}),e}();t.PlatformRef=E;var O=function(e){function t(t,n){e.call(this),this._injector=t,this._dispose=n,this._applications=[],this._disposeListeners=[]}return p(t,e),t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.application=function(e){var t=this._initApp(i(),e);if(y.PromiseWrapper.isPromise(t))throw new _.BaseException("Cannot use asyncronous app initializers with application. Use asyncApplication instead.");return t},t.prototype.asyncApplication=function(e,t){var n=this,r=i(),o=y.PromiseWrapper.completer();return null===e?o.resolve(this._initApp(r,t)):r.run(function(){y.PromiseWrapper.then(e(r),function(e){h.isPresent(t)&&(e=v.ListWrapper.concat(e,t));var i=n._initApp(r,e);o.resolve(i)})}),o.promise},t.prototype._initApp=function(e,t){var n,r,i=this; e.run(function(){t=v.ListWrapper.concat(t,[f.provide(l.NgZone,{useValue:e}),f.provide(S,{useFactory:function(){return r},deps:[]})]);var o;try{n=i.injector.resolveAndCreateChild(t),o=n.get(_.ExceptionHandler),y.ObservableWrapper.subscribe(e.onError,function(e){o.call(e.error,e.stackTrace)})}catch(s){h.isPresent(o)?o.call(s,s.stack):h.print(s.toString())}}),r=new A(this,e,n),this._applications.push(r);var o=u(n);return null!==o?y.PromiseWrapper.then(o,function(e){return r}):r},t.prototype.dispose=function(){v.ListWrapper.clone(this._applications).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._dispose()},t.prototype._applicationDisposed=function(e){v.ListWrapper.remove(this._applications,e)},t}(E);t.PlatformRef_=O;var S=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zone",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentTypes",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ApplicationRef=S;var A=function(e){function t(t,n,r){var i=this;e.call(this),this._platform=t,this._zone=n,this._injector=r,this._bootstrapListeners=[],this._disposeListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1,h.isPresent(this._zone)&&y.ObservableWrapper.subscribe(this._zone.onMicrotaskEmpty,function(e){i._zone.run(function(){i.tick()})}),this._enforceNoNewChanges=h.assertionsEnabled()}return p(t,e),t.prototype.registerBootstrapListener=function(e){this._bootstrapListeners.push(e)},t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},t.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},t.prototype.unregisterChangeDetector=function(e){v.ListWrapper.remove(this._changeDetectorRefs,e)},t.prototype.bootstrap=function(e,t){var n=this,i=y.PromiseWrapper.completer();return this._zone.run(function(){var o=r(e);h.isPresent(t)&&o.push(t);var s=n._injector.get(_.ExceptionHandler);n._rootComponentTypes.push(e);try{var a=n._injector.resolveAndCreateChild(o),c=a.get(d.APP_COMPONENT_REF_PROMISE),u=function(e){n._loadComponent(e),i.resolve(e)},p=y.PromiseWrapper.then(c,u);y.PromiseWrapper.then(p,null,function(e,t){i.reject(e,t),s.call(e,t)})}catch(l){s.call(l,l.stack),i.reject(l,l.stack)}}),i.promise.then(function(e){var t=n._injector.get(b.Console);return h.assertionsEnabled()&&t.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),e})},t.prototype._loadComponent=function(e){var t=e.location.internalElement.parentView.changeDetector;this._changeDetectorRefs.push(t.ref),this.tick(),this._rootComponents.push(e),this._bootstrapListeners.forEach(function(t){return t(e)})},t.prototype._unloadComponent=function(e){v.ListWrapper.contains(this._rootComponents,e)&&(this.unregisterChangeDetector(e.location.internalElement.parentView.changeDetector.ref),v.ListWrapper.remove(this._rootComponents,e))},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),t.prototype.tick=function(){if(this._runningTick)throw new _.BaseException("ApplicationRef.tick is called recursively");var e=t._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(e){return e.checkNoChanges()})}finally{this._runningTick=!1,P.wtfLeave(e)}},t.prototype.dispose=function(){v.ListWrapper.clone(this._rootComponents).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._platform._applicationDisposed(this)},Object.defineProperty(t.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),t._tickScope=P.wtfCreateScope("ApplicationRef#tick()"),t}(S);t.ApplicationRef_=A},function(e,t,n){var r=n(48),i=n(81),o=n(14),s=n(81);t.NgZoneError=s.NgZoneError;var a=function(){function e(e){var t=this,n=e.enableLongStackTrace,o=void 0===n?!1:n;this._hasPendingMicrotasks=!1,this._hasPendingMacrotasks=!1,this._isStable=!0,this._nesting=0,this._onUnstable=new r.EventEmitter(!1),this._onMicrotaskEmpty=new r.EventEmitter(!1),this._onStable=new r.EventEmitter(!1),this._onErrorEvents=new r.EventEmitter(!1),this._zoneImpl=new i.NgZoneImpl({trace:o,onEnter:function(){t._nesting++,t._isStable&&(t._isStable=!1,t._onUnstable.emit(null))},onLeave:function(){t._nesting--,t._checkStable()},setMicrotask:function(e){t._hasPendingMicrotasks=e,t._checkStable()},setMacrotask:function(e){t._hasPendingMacrotasks=e},onError:function(e){return t._onErrorEvents.emit(e)}})}return e.isInAngularZone=function(){return i.NgZoneImpl.isInAngularZone()},e.assertInAngularZone=function(){if(!i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to be in Angular Zone, but it is not!")},e.assertNotInAngularZone=function(){if(i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to not be in Angular Zone, but it is!")},e.prototype._checkStable=function(){var e=this;if(0==this._nesting&&!this._hasPendingMicrotasks&&!this._isStable)try{this._nesting++,this._onMicrotaskEmpty.emit(null)}finally{if(this._nesting--,!this._hasPendingMicrotasks)try{this.runOutsideAngular(function(){return e._onStable.emit(null)})}finally{this._isStable=!0}}},Object.defineProperty(e.prototype,"onUnstable",{get:function(){return this._onUnstable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMicrotaskEmpty",{get:function(){return this._onMicrotaskEmpty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onStable",{get:function(){return this._onStable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingMicrotasks",{get:function(){return this._hasPendingMicrotasks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingMacrotasks",{get:function(){return this._hasPendingMacrotasks},enumerable:!0,configurable:!0}),e.prototype.run=function(e){return this._zoneImpl.runInner(e)},e.prototype.runOutsideAngular=function(e){return this._zoneImpl.runOuter(e)},e}();t.NgZone=a},function(e,t){var n=function(){function e(e,t){this.error=e,this.stackTrace=t}return e}();t.NgZoneError=n;var r=function(){function e(e){var t=this,r=e.trace,i=e.onEnter,o=e.onLeave,s=e.setMicrotask,a=e.setMacrotask,c=e.onError;if(this.onEnter=i,this.onLeave=o,this.setMicrotask=s,this.setMacrotask=a,this.onError=c,!Zone)throw new Error("Angular2 needs to be run with Zone.js polyfill.");this.outer=this.inner=Zone.current,Zone.wtfZoneSpec&&(this.inner=this.inner.fork(Zone.wtfZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this.inner=this.inner.fork(Zone.longStackTraceZoneSpec)),this.inner=this.inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(e,n,r,i,o,s){try{return t.onEnter(),e.invokeTask(r,i,o,s)}finally{t.onLeave()}},onInvoke:function(e,n,r,i,o,s,a){try{return t.onEnter(),e.invoke(r,i,o,s,a)}finally{t.onLeave()}},onHasTask:function(e,n,r,i){e.hasTask(r,i),n==r&&("microTask"==i.change?t.setMicrotask(i.microTask):"macroTask"==i.change&&t.setMacrotask(i.macroTask))},onHandleError:function(e,r,i,o){return e.handleError(i,o),t.onError(new n(o,o.stack)),!1}})}return e.isInAngularZone=function(){return Zone.current.get("isAngularZone")===!0},e.prototype.runInner=function(e){return this.inner.runGuarded(e)},e.prototype.runOuter=function(e){return this.outer.run(e)},e}();t.NgZoneImpl=r},function(e,t,n){function r(){return""+i()+i()+i()}function i(){return s.StringWrapper.fromCharCode(97+s.Math.floor(25*s.Math.random()))}var o=n(6),s=n(5);t.APP_COMPONENT_REF_PROMISE=s.CONST_EXPR(new o.OpaqueToken("Promise")),t.APP_COMPONENT=s.CONST_EXPR(new o.OpaqueToken("AppComponent")),t.APP_ID=s.CONST_EXPR(new o.OpaqueToken("AppId")),t.APP_ID_RANDOM_PROVIDER=s.CONST_EXPR(new o.Provider(t.APP_ID,{useFactory:r,deps:[]})),t.PLATFORM_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Platform Initializer")),t.APP_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Application Initializer")),t.PACKAGE_ROOT_URL=s.CONST_EXPR(new o.OpaqueToken("Application Packages Root URL"))},function(e,t,n){function r(e){y=e}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(12),c=n(5),u=n(14),p=n(80),l=n(48),h=function(){function e(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return e.prototype._watchAngularEvents=function(){var e=this;l.ObservableWrapper.subscribe(this._ngZone.onUnstable,function(t){e._didWork=!0,e._isZoneStable=!1}),this._ngZone.runOutsideAngular(function(){l.ObservableWrapper.subscribe(e._ngZone.onStable,function(t){p.NgZone.assertNotInAngularZone(),c.scheduleMicroTask(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new u.BaseException("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},e.prototype._runCallbacksIfReady=function(){var e=this;this.isStable()?c.scheduleMicroTask(function(){for(;0!==e._callbacks.length;)e._callbacks.pop()(e._didWork);e._didWork=!1}):this._didWork=!0},e.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findBindings=function(e,t,n){return[]},e.prototype.findProviders=function(e,t,n){return[]},e=i([s.Injectable(),o("design:paramtypes",[p.NgZone])],e)}();t.Testability=h;var f=function(){function e(){this._applications=new a.Map,y.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.getTestability=function(e){return this._applications.get(e)},e.prototype.getAllTestabilities=function(){return a.MapWrapper.values(this._applications)},e.prototype.getAllRootElements=function(){return a.MapWrapper.keys(this._applications)},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),y.findTestabilityInTree(this,e,t)},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.TestabilityRegistry=f;var d=function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e=i([c.CONST(),o("design:paramtypes",[])],e)}();t.setTestabilityGetter=r;var y=c.CONST_EXPR(new d)},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(85),c=n(5),u=n(99),p=function(){function e(){}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.location.internalElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostComponent",{get:function(){return this.instance},enumerable:!0,configurable:!0}),e}();t.ComponentRef=p;var l=function(e){function t(t,n,r,i,o){e.call(this),this._dispose=o,this.location=t,this.instance=n,this.componentType=r,this.injector=i}return r(t,e),Object.defineProperty(t.prototype,"hostComponentType",{get:function(){return this.componentType},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._dispose()},t}(p);t.ComponentRef_=l;var h=function(){function e(){}return e}();t.DynamicComponentLoader=h;var f=function(e){function t(t,n){e.call(this),this._compiler=t,this._viewManager=n}return r(t,e),t.prototype.loadAsRoot=function(e,t,n,r,i){var o=this;return this._compiler.compileInHost(e).then(function(s){var a=o._viewManager.createRootHostView(s,t,n,i),u=o._viewManager.getHostElement(a),p=o._viewManager.getComponent(u),h=function(){c.isPresent(r)&&r(),o._viewManager.destroyRootHostView(a)};return new l(u,p,e,n,h)})},t.prototype.loadIntoLocation=function(e,t,n,r,i){return void 0===r&&(r=null),void 0===i&&(i=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,n),r,i)},t.prototype.loadNextToLocation=function(e,t,n,r){var i=this;return void 0===n&&(n=null),void 0===r&&(r=null),this._compiler.compileInHost(e).then(function(o){var s=i._viewManager.getViewContainer(t),a=s.createHostView(o,s.length,n,r),c=i._viewManager.getHostElement(a),u=i._viewManager.getComponent(c),p=function(){var e=s.indexOf(a);a.destroyed||-1===e||s.remove(e)};return new l(c,u,e,null,p)})},t=i([s.Injectable(),o("design:paramtypes",[a.Compiler,u.AppViewManager])],t)}(h);t.DynamicComponentLoader_=f},function(e,t,n){function r(e){return e instanceof h.HostViewFactory}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=n(6),c=n(5),u=n(14),p=n(48),l=n(17),h=n(86),f=n(95),d=function(){function e(){}return e}();t.Compiler=d;var y=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.compileInHost=function(e){var t=l.reflector.annotations(e),n=t.find(r);if(c.isBlank(n))throw new u.BaseException("No precompiled component "+c.stringify(e)+" found");return p.PromiseWrapper.resolve(new f.HostViewFactoryRef_(n))},t.prototype.clearCache=function(){},t=o([a.Injectable(),s("design:paramtypes",[])],t)}(d);t.Compiler_=y},function(e,t,n){function r(e){for(var t={},n=e;d.isPresent(n);)t=p.StringMapWrapper.merge(t,p.MapWrapper.toStringMap(n.current)),n=n.parent;return t}function i(e){return o(e,[])}function o(e,t){for(var n=0;n=0;r--){var i=n.nestedViews[r];i.rootNodesOrAppElements.length>0&&(t=s(i.rootNodesOrAppElements[i.rootNodesOrAppElements.length-1]))}}else t=e;return t}function a(e,t,n){var r=d.isPresent(n)?n.length:0;if(t>r)throw new y.BaseException("The component "+e+" has "+t+" elements,"+(" but only "+r+" slots were provided."))}var c=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=n(12),l=n(26),h=n(36),f=n(87),d=n(5),y=n(14),v=n(91),g=n(95),m=n(96),_=n(98),b=n(36);t.DebugContext=b.DebugContext;var P=n(96),C=n(88),w="ng-reflect-",R=d.CONST_EXPR(new Object),E=function(){function e(e,t,n,r,i,o,s,a){this.proto=e,this.renderer=t,this.viewManager=n,this.projectableNodes=r,this.containerAppElement=i,this.changeDetector=a,this.context=null,this.destroyed=!1,this.ref=new g.ViewRef_(this);var c=f.AppElement.getViewParentInjector(this.proto.type,i,o,s);this.parentInjector=c.injector,this.hostInjectorBoundary=c.hostInjectorBoundary;var u,p;switch(e.type){case C.ViewType.COMPONENT:u=new P.Pipes(e.protoPipes,i.getInjector()),p=i.getComponent();break;case C.ViewType.EMBEDDED:u=i.parentView.pipes,p=i.parentView.context;break;case C.ViewType.HOST:u=null,p=R}this.pipes=u,this.context=p}return e.prototype.init=function(e,t,n,r){this.rootNodesOrAppElements=e,this.allNodes=t,this.disposables=n,this.appElements=r;var i=new p.Map;p.StringMapWrapper.forEach(this.proto.templateVariableBindings,function(e,t){i.set(e,null)});for(var o=0;o=0;t--)this.appElements[t].ngAfterContentChecked()},e.prototype.notifyAfterViewChecked=function(){for(var e=this.appElements.length,t=e-1;t>=0;t--)this.appElements[t].ngAfterViewChecked()},e.prototype.getDebugContext=function(e,t,n){try{d.isBlank(e)&&t0){for(var s=p.ListWrapper.createFixedSize(r.length),a=0;a1)throw new a.BaseException("A directive injectable can contain only one of the following @Attribute or @Query.")},t.createFrom=function(e){return new t(e.key,e.optional,e.lowerBoundVisibility,e.upperBoundVisibility,e.properties,t._attributeName(e.properties),t._query(e.properties))},t._attributeName=function(e){var t=e.find(function(e){return e instanceof f.AttributeMetadata});return s.isPresent(t)?t.attributeName:null},t._query=function(e){return e.find(function(e){return e instanceof f.QueryMetadata})},t}(u.Dependency);t.DirectiveDependency=S;var A=function(e){function t(t,n,r,i,o,s,a){e.call(this,t,[new h.ResolvedFactory(n,r)],!1),this.isComponent=i,this.providers=o,this.viewProviders=s,this.queries=a}return o(t,e),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.key.displayName},enumerable:!0,configurable:!0}),t.createFromType=function(e,n){var r=new u.Provider(e,{useClass:e});s.isBlank(n)&&(n=new b.DirectiveMetadata);var i=h.resolveProvider(r),o=i.resolvedFactories[0],a=o.dependencies.map(S.createFrom),p=n instanceof b.ComponentMetadata,l=s.isPresent(n.providers)?u.Injector.resolve(n.providers):null,f=n instanceof b.ComponentMetadata&&s.isPresent(n.viewProviders)?u.Injector.resolve(n.viewProviders):null,d=[];return s.isPresent(n.queries)&&c.StringMapWrapper.forEach(n.queries,function(e,t){var n=w.reflector.setter(t);d.push(new D(n,e))}),a.forEach(function(e){s.isPresent(e.queryDecorator)&&d.push(new D(null,e.queryDecorator))}),new t(i.key,o.factory,a,p,l,f,d)},t}(h.ResolvedProvider_);t.DirectiveProvider=A;var D=function(){function e(e,t){this.setter=e,this.metadata=t}return e}();t.QueryMetadataWithSetter=D;var x=function(){function e(e,t,n,r,i,o){this.firstProviderIsComponent=e,this.index=t,this.attributes=n,this.protoQueryRefs=i,this.directiveVariableBindings=o;var s=r.length;s>0?this.protoInjector=new l.ProtoInjector(r):(this.protoInjector=null,this.protoQueryRefs=[])}return e.create=function(t,n,i,o,a){for(var u=null,h=new Map,f=new Map,d=c.ListWrapper.createGrowableSize(o.length),y=[],v=0;v0&&(this.query0=new W(t[0],e)),t.length>1&&(this.query1=new W(t[1],e)),t.length>2&&(this.query2=new W(t[2],e))}return e.prototype.setContentQueriesAsDirty=function(){s.isPresent(this.query0)&&!this.query0.isViewQuery&&(this.query0.dirty=!0),s.isPresent(this.query1)&&!this.query1.isViewQuery&&(this.query1.dirty=!0),s.isPresent(this.query2)&&!this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.setViewQueriesAsDirty=function(){s.isPresent(this.query0)&&this.query0.isViewQuery&&(this.query0.dirty=!0),s.isPresent(this.query1)&&this.query1.isViewQuery&&(this.query1.dirty=!0), s.isPresent(this.query2)&&this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.updateContentQueries=function(){s.isPresent(this.query0)&&!this.query0.isViewQuery&&this.query0.update(),s.isPresent(this.query1)&&!this.query1.isViewQuery&&this.query1.update(),s.isPresent(this.query2)&&!this.query2.isViewQuery&&this.query2.update()},e.prototype.updateViewQueries=function(){s.isPresent(this.query0)&&this.query0.isViewQuery&&this.query0.update(),s.isPresent(this.query1)&&this.query1.isViewQuery&&this.query1.update(),s.isPresent(this.query2)&&this.query2.isViewQuery&&this.query2.update()},e.prototype.findQuery=function(e){if(s.isPresent(this.query0)&&this.query0.protoQueryRef.query===e)return this.query0;if(s.isPresent(this.query1)&&this.query1.protoQueryRef.query===e)return this.query1;if(s.isPresent(this.query2)&&this.query2.protoQueryRef.query===e)return this.query2;throw new a.BaseException("Cannot find query for directive "+e+".")},e.NUMBER_OF_SUPPORTED_QUERIES=3,e}(),j=function(){function e(e){this.queries=e.proto.protoQueryRefs.map(function(t){return new W(t,e)})}return e.prototype.setContentQueriesAsDirty=function(){for(var e=0;e0?this.list.first:null):this.protoQueryRef.setter(e,this.list)}this.list.notifyOnChanges()}},e.prototype._update=function(){var e=[];if(this.protoQueryRef.query.isViewQuery){var t=this.originator.componentView;s.isPresent(t)&&this._visitView(t,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var n=e.parentView,r=e.proto.index,i=r;ir&&(s.isBlank(o.parent)||o.parent.proto.index=0;e--)this.remove(e)},Object.defineProperty(e.prototype,"length",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewContainerRef=a;var c=function(e){function t(t){e.call(this),this._element=t}return r(t,e),t.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){var e=this._element.nestedViews;return s.isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element.ref},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.createEmbeddedViewInContainer(this._element.ref,t,e)},t.prototype.createHostView=function(e,t,n,r){void 0===t&&(t=-1),void 0===n&&(n=null),void 0===r&&(r=null),-1==t&&(t=this.length);var i=this._element.parentView.viewManager;return i.createHostViewInContainer(this._element.ref,t,e,n,r)},t.prototype.insert=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.attachViewInContainer(this._element.ref,t,e)},t.prototype.indexOf=function(e){return i.ListWrapper.indexOf(this._element.nestedViews,e.internalView)},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.destroyViewInContainer(this._element.ref,e)},t.prototype.detach=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.detachViewInContainer(this._element.ref,e)},t}(a);t.ViewContainerRef_=c},function(e,t){var n=function(){function e(e,t,n){this.id=e,this.encapsulation=t,this.styles=n}return e}();t.RenderComponentType=n;var r=function(){function e(e,t,n,r){this.injector=e,this.component=t,this.providerTokens=n,this.locals=r}return e}();t.RenderDebugInfo=r;var i=function(){function e(){}return e}();t.Renderer=i;var o=function(){function e(){}return e}();t.RootRenderer=o},function(e,t){var n=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=function(){function e(){}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.TemplateRef=r;var i=function(e){function t(t){e.call(this),this._elementRef=t}return n(t,e),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._elementRef},enumerable:!0,configurable:!0}),t}(r);t.TemplateRef_=i},function(e,t,n){var r=n(12),i=n(5),o=n(48),s=function(){function e(){this._results=[],this._emitter=new o.EventEmitter}return Object.defineProperty(e.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return r.ListWrapper.first(this._results)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return r.ListWrapper.last(this._results)},enumerable:!0,configurable:!0}),e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.toArray=function(){return r.ListWrapper.clone(this._results)},e.prototype[i.getSymbolIterator()]=function(){return this._results[i.getSymbolIterator()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=e},e.prototype.notifyOnChanges=function(){this._emitter.emit(this)},e}();t.QueryList=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(13),o=n(6),s=function(e){function t(t,n,r,i,o){e.call(this,r,i,o),this.name=t,this.pure=n}return r(t,e),t.createFromType=function(e,n){var r=new o.Provider(e,{useClass:e}),s=i.resolveProvider(r);return new t(n.name,n.pure,s.key,s.resolvedFactories,s.multiProvider)},t}(i.ResolvedProvider_);t.PipeProvider=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(14),o=function(){function e(){}return Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewRef=o;var s=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}(o);t.HostViewRef=s;var a=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}(o);t.EmbeddedViewRef=a;var c=function(){function e(e){this._view=e,this._view=e}return Object.defineProperty(e.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this._view.changeDetector.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},enumerable:!0,configurable:!0}),e.prototype.setLocal=function(e,t){this._view.setLocal(e,t)},e.prototype.hasLocal=function(e){return this._view.hasLocal(e)},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._view.destroyed},enumerable:!0,configurable:!0}),e}();t.ViewRef_=c;var u=function(){function e(){}return e}();t.HostViewFactoryRef=u;var p=function(){function e(e){this._hostViewFactory=e}return Object.defineProperty(e.prototype,"internalHostViewFactory",{get:function(){return this._hostViewFactory},enumerable:!0,configurable:!0}),e}();t.HostViewFactoryRef_=p},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=n(97),a=function(){function e(e){this.config=e,this.config=e}return e.fromProviders=function(t){var n={};return t.forEach(function(e){return n[e.name]=e}),new e(n)},e.prototype.get=function(e){var t=this.config[e];if(r.isBlank(t))throw new i.BaseException("Cannot find pipe '"+e+"'.");return t},e}();t.ProtoPipes=a;var c=function(){function e(e,t){this.proto=e,this.injector=t,this._config={}}return e.prototype.get=function(e){var t=o.StringMapWrapper.get(this._config,e);if(r.isPresent(t))return t;var n=this.proto.get(e),i=this.injector.instantiateResolved(n),a=new s.SelectedPipe(i,n.pure);return n.pure&&o.StringMapWrapper.set(this._config,e,a),a},e}();t.Pipes=c},function(e,t){var n=function(){function e(e,t){this.pipe=e,this.pure=t}return e}();t.SelectedPipe=n},function(e,t,n){function r(e){return o.StringWrapper.replaceAllMapped(e,s,function(e){return"-"+e[1].toLowerCase()})}function i(e){return o.StringWrapper.replaceAllMapped(e,a,function(e){return e[1].toUpperCase()})}var o=n(5),s=/([A-Z])/g,a=/-([a-z])/g;t.camelCaseToDashCase=r,t.dashCaseToCamelCase=i},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(6),c=n(5),u=n(12),p=n(14),l=n(86),h=n(91),f=n(46),d=n(82),y=n(88),v=function(){function e(){}return e}();t.AppViewManager=v;var g=function(e){function t(t,n){e.call(this),this._renderer=t,this._appId=n,this._nextCompTypeId=0,this._createRootHostViewScope=f.wtfCreateScope("AppViewManager#createRootHostView()"),this._destroyRootHostViewScope=f.wtfCreateScope("AppViewManager#destroyRootHostView()"),this._createEmbeddedViewInContainerScope=f.wtfCreateScope("AppViewManager#createEmbeddedViewInContainer()"),this._createHostViewInContainerScope=f.wtfCreateScope("AppViewManager#createHostViewInContainer()"),this._destroyViewInContainerScope=f.wtfCreateScope("AppViewMananger#destroyViewInContainer()"),this._attachViewInContainerScope=f.wtfCreateScope("AppViewMananger#attachViewInContainer()"),this._detachViewInContainerScope=f.wtfCreateScope("AppViewMananger#detachViewInContainer()")}return r(t,e),t.prototype.getViewContainer=function(e){return e.internalElement.getViewContainerRef()},t.prototype.getHostElement=function(e){var t=e.internalView;if(t.proto.type!==y.ViewType.HOST)throw new p.BaseException("This operation is only allowed on host views");return t.appElements[0].ref},t.prototype.getNamedElementInComponentView=function(e,t){var n=e.internalElement,r=n.componentView;if(c.isBlank(r))throw new p.BaseException("There is no component directive at element "+e);for(var i=0;i0){var o=r[n-1];i=o.rootNodesOrAppElements.length>0?o.rootNodesOrAppElements[o.rootNodesOrAppElements.length-1]:null}else i=t.nativeElement;if(c.isPresent(i)){var s=l.findLastRenderNode(i);e.renderer.attachViewAfter(s,l.flattenNestedViewRenderNodes(e.rootNodesOrAppElements))}t.parentView.changeDetector.addContentChild(e.changeDetector),t.traverseAndSetQueriesAsDirty()},t.prototype._detachViewInContainer=function(e,t){var n=u.ListWrapper.removeAt(e.nestedViews,t);if(n.proto.type===y.ViewType.COMPONENT)throw new p.BaseException("Component views can't be moved!");return e.traverseAndSetQueriesAsDirty(),n.renderer.detachView(l.flattenNestedViewRenderNodes(n.rootNodesOrAppElements)),n.changeDetector.remove(),n},t=i([a.Injectable(),s(1,a.Inject(d.APP_ID)),o("design:paramtypes",[h.RootRenderer,String])],t)}(v);t.AppViewManager_=g},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(5),a=function(){function e(){}return e.prototype.log=function(e){s.print(e)},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.Console=a},function(e,t,n){var r=n(80);t.NgZone=r.NgZone,t.NgZoneError=r.NgZoneError},function(e,t,n){var r=n(91);t.RootRenderer=r.RootRenderer,t.Renderer=r.Renderer,t.RenderComponentType=r.RenderComponentType},function(e,t,n){var r=n(104);t.DirectiveResolver=r.DirectiveResolver;var i=n(105);t.ViewResolver=i.ViewResolver;var o=n(85);t.Compiler=o.Compiler;var s=n(99);t.AppViewManager=s.AppViewManager;var a=n(93);t.QueryList=a.QueryList;var c=n(84);t.DynamicComponentLoader=c.DynamicComponentLoader;var u=n(89);t.ElementRef=u.ElementRef;var p=n(92);t.TemplateRef=p.TemplateRef;var l=n(95);t.EmbeddedViewRef=l.EmbeddedViewRef,t.HostViewRef=l.HostViewRef,t.ViewRef=l.ViewRef,t.HostViewFactoryRef=l.HostViewFactoryRef;var h=n(90);t.ViewContainerRef=h.ViewContainerRef;var f=n(84);t.ComponentRef=f.ComponentRef},function(e,t,n){function r(e){return e instanceof p.DirectiveMetadata}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(14),u=n(12),p=n(3),l=n(17),h=n(19),f=function(){function e(e){a.isPresent(e)?this._reflector=e:this._reflector=l.reflector}return e.prototype.resolve=function(e){var t=this._reflector.annotations(s.resolveForwardRef(e));if(a.isPresent(t)){var n=t.find(r);if(a.isPresent(n)){var i=this._reflector.propMetadata(e);return this._mergeWithPropertyMetadata(n,i,e)}}throw new c.BaseException("No Directive annotation found on "+a.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t,n){var r=[],i=[],o={},s={};return u.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof p.InputMetadata&&(a.isPresent(e.bindingPropertyName)?r.push(t+": "+e.bindingPropertyName):r.push(t)),e instanceof p.OutputMetadata&&(a.isPresent(e.bindingPropertyName)?i.push(t+": "+e.bindingPropertyName):i.push(t)),e instanceof p.HostBindingMetadata&&(a.isPresent(e.hostPropertyName)?o["["+e.hostPropertyName+"]"]=t:o["["+t+"]"]=t),e instanceof p.HostListenerMetadata){var n=a.isPresent(e.args)?e.args.join(", "):"";o["("+e.eventName+")"]=t+"("+n+")"}e instanceof p.ContentChildrenMetadata&&(s[t]=e),e instanceof p.ViewChildrenMetadata&&(s[t]=e),e instanceof p.ContentChildMetadata&&(s[t]=e),e instanceof p.ViewChildMetadata&&(s[t]=e)})}),this._merge(e,r,i,o,s,n)},e.prototype._merge=function(e,t,n,r,i,o){var s,l=a.isPresent(e.inputs)?u.ListWrapper.concat(e.inputs,t):t;a.isPresent(e.outputs)?(e.outputs.forEach(function(e){if(u.ListWrapper.contains(n,e))throw new c.BaseException("Output event '"+e+"' defined multiple times in '"+a.stringify(o)+"'")}),s=u.ListWrapper.concat(e.outputs,n)):s=n;var h=a.isPresent(e.host)?u.StringMapWrapper.merge(e.host,r):r,f=a.isPresent(e.queries)?u.StringMapWrapper.merge(e.queries,i):i;return e instanceof p.ComponentMetadata?new p.ComponentMetadata({selector:e.selector,inputs:l,outputs:s,host:h,exportAs:e.exportAs,moduleId:e.moduleId,queries:f,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders}):new p.DirectiveMetadata({selector:e.selector,inputs:l,outputs:s,host:h,exportAs:e.exportAs,queries:f,providers:e.providers})},e=i([s.Injectable(),o("design:paramtypes",[h.ReflectorReader])],e)}();t.DirectiveResolver=f,t.CODEGEN_DIRECTIVE_RESOLVER=new f(l.reflector)},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(75),a=n(24),c=n(5),u=n(14),p=n(12),l=n(19),h=n(17),f=function(){function e(e){this._cache=new p.Map,c.isPresent(e)?this._reflector=e:this._reflector=h.reflector}return e.prototype.resolve=function(e){var t=this._cache.get(e);return c.isBlank(t)&&(t=this._resolve(e),this._cache.set(e,t)),t},e.prototype._resolve=function(e){var t,n;if(this._reflector.annotations(e).forEach(function(e){e instanceof s.ViewMetadata&&(n=e),e instanceof a.ComponentMetadata&&(t=e)}),!c.isPresent(t)){if(c.isBlank(n))throw new u.BaseException("Could not compile '"+c.stringify(e)+"' because it is not a component.");return n}if(c.isBlank(t.template)&&c.isBlank(t.templateUrl)&&c.isBlank(n))throw new u.BaseException("Component '"+c.stringify(e)+"' must have either 'template' or 'templateUrl' set.");if(c.isPresent(t.template)&&c.isPresent(n))this._throwMixingViewAndComponent("template",e);else if(c.isPresent(t.templateUrl)&&c.isPresent(n))this._throwMixingViewAndComponent("templateUrl",e);else if(c.isPresent(t.directives)&&c.isPresent(n))this._throwMixingViewAndComponent("directives",e);else if(c.isPresent(t.pipes)&&c.isPresent(n))this._throwMixingViewAndComponent("pipes",e);else if(c.isPresent(t.encapsulation)&&c.isPresent(n))this._throwMixingViewAndComponent("encapsulation",e);else if(c.isPresent(t.styles)&&c.isPresent(n))this._throwMixingViewAndComponent("styles",e);else{if(!c.isPresent(t.styleUrls)||!c.isPresent(n))return c.isPresent(n)?n:new s.ViewMetadata({templateUrl:t.templateUrl,template:t.template,directives:t.directives,pipes:t.pipes,encapsulation:t.encapsulation,styles:t.styles,styleUrls:t.styleUrls});this._throwMixingViewAndComponent("styleUrls",e)}return null},e.prototype._throwMixingViewAndComponent=function(e,t){throw new u.BaseException("Component '"+c.stringify(t)+"' cannot have both '"+e+"' and '@View' set at the same time\"")},e=r([o.Injectable(),i("design:paramtypes",[l.ReflectorReader])],e)}();t.ViewResolver=f},function(e,t,n){function r(e){return e.map(function(e){return e.nativeElement})}function i(e,t,n){e.childNodes.forEach(function(e){e instanceof y&&(t(e)&&n.push(e),i(e,t,n))})}function o(e,t,n){e instanceof y&&e.childNodes.forEach(function(e){t(e)&&n.push(e),e instanceof y&&o(e,t,n)})}function s(e){return v.get(e)}function a(){return h.MapWrapper.values(v)}function c(e){v.set(e.nativeNode,e)}function u(e){v["delete"](e.nativeNode)}var p=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},l=n(5),h=n(12),f=function(){function e(e,t){this.name=e,this.callback=t}return e}();t.EventListener=f;var d=function(){function e(e,t){this.nativeNode=e,l.isPresent(t)&&t instanceof y?t.addChild(this):this.parent=null,this.listeners=[],this.providerTokens=[]}return e.prototype.setDebugInfo=function(e){this.injector=e.injector,this.providerTokens=e.providerTokens,this.locals=e.locals,this.componentInstance=e.component},e.prototype.inject=function(e){return this.injector.get(e)},e.prototype.getLocal=function(e){return this.locals.get(e)},e}();t.DebugNode=d;var y=function(e){function t(t,n){e.call(this,t,n),this.properties=new Map,this.attributes=new Map,this.childNodes=[],this.nativeElement=t}return p(t,e),t.prototype.addChild=function(e){l.isPresent(e)&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n=this.childNodes.indexOf(e);if(-1!==n){var r=this.childNodes.slice(0,n+1),i=this.childNodes.slice(n+1);this.childNodes=h.ListWrapper.concat(h.ListWrapper.concat(r,t),i);for(var o=0;o0?t[0]:null},t.prototype.queryAll=function(e){var t=[];return i(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return o(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){var e=[];return this.childNodes.forEach(function(n){n instanceof t&&e.push(n)}),e},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(d);t.DebugElement=y,t.asNativeElements=r;var v=new Map;t.getDebugNode=s,t.getAllDebugNodes=a,t.indexDebugNode=c, t.removeDebugNodeFromIndex=u},function(e,t,n){var r=n(6),i=n(5);t.PLATFORM_DIRECTIVES=i.CONST_EXPR(new r.OpaqueToken("Platform Directives")),t.PLATFORM_PIPES=i.CONST_EXPR(new r.OpaqueToken("Platform Pipes"))},function(e,t,n){function r(){return a.reflector}var i=n(5),o=n(6),s=n(100),a=n(17),c=n(19),u=n(83);t.PLATFORM_COMMON_PROVIDERS=i.CONST_EXPR([new o.Provider(a.Reflector,{useFactory:r,deps:[]}),new o.Provider(c.ReflectorReader,{useExisting:a.Reflector}),u.TestabilityRegistry,s.Console])},function(e,t,n){var r=n(5),i=n(6),o=n(82),s=n(26),a=n(110),c=n(99),u=n(99),p=n(105),l=n(104),h=n(111),f=n(85),d=n(85),y=n(84),v=n(84);t.APPLICATION_COMMON_PROVIDERS=r.CONST_EXPR([new i.Provider(f.Compiler,{useClass:d.Compiler_}),o.APP_ID_RANDOM_PROVIDER,a.ResolvedMetadataCache,new i.Provider(c.AppViewManager,{useClass:u.AppViewManager_}),p.ViewResolver,new i.Provider(s.IterableDiffers,{useValue:s.defaultIterableDiffers}),new i.Provider(s.KeyValueDiffers,{useValue:s.defaultKeyValueDiffers}),l.DirectiveResolver,h.PipeResolver,new i.Provider(y.DynamicComponentLoader,{useClass:v.DynamicComponentLoader_})])},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(5),a=n(87),c=n(104),u=n(94),p=n(111),l=function(){function e(e,t){this._directiveResolver=e,this._pipeResolver=t,this._directiveCache=new Map,this._pipeCache=new Map}return e.prototype.getResolvedDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return s.isBlank(t)&&(t=a.DirectiveProvider.createFromType(e,this._directiveResolver.resolve(e)),this._directiveCache.set(e,t)),t},e.prototype.getResolvedPipeMetadata=function(e){var t=this._pipeCache.get(e);return s.isBlank(t)&&(t=u.PipeProvider.createFromType(e,this._pipeResolver.resolve(e)),this._pipeCache.set(e,t)),t},e=r([o.Injectable(),i("design:paramtypes",[c.DirectiveResolver,p.PipeResolver])],e)}();t.ResolvedMetadataCache=l,t.CODEGEN_RESOLVED_METADATA_CACHE=new l(c.CODEGEN_DIRECTIVE_RESOLVER,p.CODEGEN_PIPE_RESOLVER)},function(e,t,n){function r(e){return e instanceof u.PipeMetadata}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(14),u=n(3),p=n(19),l=n(17),h=function(){function e(e){a.isPresent(e)?this._reflector=e:this._reflector=l.reflector}return e.prototype.resolve=function(e){var t=this._reflector.annotations(s.resolveForwardRef(e));if(a.isPresent(t)){var n=t.find(r);if(a.isPresent(n))return n}throw new c.BaseException("No Pipe decorator found on "+a.stringify(e))},e=i([s.Injectable(),o("design:paramtypes",[p.ReflectorReader])],e)}();t.PipeResolver=h,t.CODEGEN_PIPE_RESOLVER=new h(l.reflector)},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(113)),r(n(127)),r(n(136)),r(n(160))},function(e,t,n){var r=n(114);t.AsyncPipe=r.AsyncPipe;var i=n(116);t.DatePipe=i.DatePipe;var o=n(118);t.JsonPipe=o.JsonPipe;var s=n(119);t.SlicePipe=s.SlicePipe;var a=n(120);t.LowerCasePipe=a.LowerCasePipe;var c=n(121);t.NumberPipe=c.NumberPipe,t.DecimalPipe=c.DecimalPipe,t.PercentPipe=c.PercentPipe,t.CurrencyPipe=c.CurrencyPipe;var u=n(122);t.UpperCasePipe=u.UpperCasePipe;var p=n(123);t.ReplacePipe=p.ReplacePipe;var l=n(124);t.I18nPluralPipe=l.I18nPluralPipe;var h=n(125);t.I18nSelectPipe=h.I18nSelectPipe;var f=n(126);t.COMMON_PIPES=f.COMMON_PIPES},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(48),a=n(2),c=n(115),u=function(){function e(){}return e.prototype.createSubscription=function(e,t){return s.ObservableWrapper.subscribe(e,t,function(e){throw e})},e.prototype.dispose=function(e){s.ObservableWrapper.dispose(e)},e.prototype.onDestroy=function(e){s.ObservableWrapper.dispose(e)},e}(),p=function(){function e(){}return e.prototype.createSubscription=function(e,t){return e.then(t)},e.prototype.dispose=function(e){},e.prototype.onDestroy=function(e){},e}(),l=new p,h=new u,f=function(){function e(e){this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}return e.prototype.ngOnDestroy=function(){o.isPresent(this._subscription)&&this._dispose()},e.prototype.transform=function(e,t){return o.isBlank(this._obj)?(o.isPresent(e)&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue):e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,a.WrappedValue.wrap(this._latestValue))},e.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(n){return t._updateLatestValue(e,n)})},e.prototype._selectStrategy=function(t){if(o.isPromise(t))return l;if(s.ObservableWrapper.isObservable(t))return h;throw new c.InvalidPipeArgumentException(e,t)},e.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},e.prototype._updateLatestValue=function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},e=r([a.Pipe({name:"async",pure:!1}),a.Injectable(),i("design:paramtypes",[a.ChangeDetectorRef])],e)}();t.AsyncPipe=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=function(e){function t(t,n){e.call(this,"Invalid argument '"+n+"' for pipe '"+i.stringify(t)+"'")}return r(t,e),t}(o.BaseException);t.InvalidPipeArgumentException=s},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(117),a=n(2),c=n(12),u=n(115),p="en-US",l=function(){function e(){}return e.prototype.transform=function(t,n){if(o.isBlank(t))return null;if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);var r=o.isPresent(n)&&n.length>0?n[0]:"mediumDate";return o.isNumber(t)&&(t=o.DateWrapper.fromMillis(t)),c.StringMapWrapper.contains(e._ALIASES,r)&&(r=c.StringMapWrapper.get(e._ALIASES,r)),s.DateFormatter.format(t,p,r)},e.prototype.supports=function(e){return o.isDate(e)||o.isNumber(e)},e._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},e=r([o.CONST(),a.Pipe({name:"date",pure:!0}),a.Injectable(),i("design:paramtypes",[])],e)}();t.DatePipe=l},function(e,t){function n(e){return 2==e?"2-digit":"numeric"}function r(e){return 4>e?"short":"long"}function i(e){for(var t,i={},o=0;o=3?i.month=r(s):i.month=n(s);break;case"d":i.day=n(s);break;case"E":i.weekday=r(s);break;case"j":i.hour=n(s);break;case"h":i.hour=n(s),i.hour12=!0;break;case"H":i.hour=n(s),i.hour12=!1;break;case"m":i.minute=n(s);break;case"s":i.second=n(s);break;case"z":i.timeZoneName="long";break;case"Z":i.timeZoneName="short"}o=t}return i}!function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(t.NumberFormatStyle||(t.NumberFormatStyle={}));var o=t.NumberFormatStyle,s=function(){function e(){}return e.format=function(e,t,n,r){var i=void 0===r?{}:r,s=i.minimumIntegerDigits,a=void 0===s?1:s,c=i.minimumFractionDigits,u=void 0===c?0:c,p=i.maximumFractionDigits,l=void 0===p?3:p,h=i.currency,f=i.currencyAsSymbol,d=void 0===f?!1:f,y={minimumIntegerDigits:a,minimumFractionDigits:u,maximumFractionDigits:l};return y.style=o[n].toLowerCase(),n==o.Currency&&(y.currency=h,y.currencyDisplay=d?"symbol":"code"),new Intl.NumberFormat(t,y).format(e)},e}();t.NumberFormatter=s;var a=new Map,c=function(){function e(){}return e.format=function(e,t,n){var r=t+n;if(a.has(r))return a.get(r).format(e);var o=new Intl.DateTimeFormat(t,i(n));return a.set(r,o),o.format(e)},e}();t.DateFormatter=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=null),o.Json.stringify(e)},e=r([o.CONST(),s.Pipe({name:"json",pure:!1}),s.Injectable(),i("design:paramtypes",[])],e)}();t.JsonPipe=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(2),u=n(115),p=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(n)||0==n.length)throw new s.BaseException("Slice pipe requires one argument");if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);if(o.isBlank(t))return t;var r=n[0],i=n.length>1?n[1]:null;return o.isString(t)?o.StringWrapper.slice(t,r,i):a.ListWrapper.slice(t,r,i)},e.prototype.supports=function(e){return o.isString(e)||o.isArray(e)},e=r([c.Pipe({name:"slice",pure:!1}),c.Injectable(),i("design:paramtypes",[])],e)}();t.SlicePipe=p},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(115),c=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(t))return t;if(!o.isString(t))throw new a.InvalidPipeArgumentException(e,t);return t.toLowerCase()},e=r([o.CONST(),s.Pipe({name:"lowercase"}),s.Injectable(),i("design:paramtypes",[])],e)}();t.LowerCasePipe=c},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(14),c=n(117),u=n(2),p=n(12),l=n(115),h="en-US",f=s.RegExpWrapper.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),d=function(){function e(){}return e._format=function(t,n,r,i,o){if(void 0===i&&(i=null),void 0===o&&(o=!1),s.isBlank(t))return null;if(!s.isNumber(t))throw new l.InvalidPipeArgumentException(e,t);var u=1,p=0,d=3;if(s.isPresent(r)){var y=s.RegExpWrapper.firstMatch(f,r);if(s.isBlank(y))throw new a.BaseException(r+" is not a valid digit info for number pipes");s.isPresent(y[1])&&(u=s.NumberWrapper.parseIntAutoRadix(y[1])),s.isPresent(y[3])&&(p=s.NumberWrapper.parseIntAutoRadix(y[3])),s.isPresent(y[5])&&(d=s.NumberWrapper.parseIntAutoRadix(y[5]))}return c.NumberFormatter.format(t,h,n,{minimumIntegerDigits:u,minimumFractionDigits:p,maximumFractionDigits:d,currency:i,currencyAsSymbol:o})},e=i([s.CONST(),u.Injectable(),o("design:paramtypes",[])],e)}();t.NumberPipe=d;var y=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=p.ListWrapper.first(t);return d._format(e,c.NumberFormatStyle.Decimal,n)},t=i([s.CONST(),u.Pipe({name:"number"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.DecimalPipe=y;var v=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=p.ListWrapper.first(t);return d._format(e,c.NumberFormatStyle.Percent,n)},t=i([s.CONST(),u.Pipe({name:"percent"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.PercentPipe=v;var g=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=s.isPresent(t)&&t.length>0?t[0]:"USD",r=s.isPresent(t)&&t.length>1?t[1]:!1,i=s.isPresent(t)&&t.length>2?t[2]:null;return d._format(e,c.NumberFormatStyle.Currency,i,n,r)},t=i([s.CONST(),u.Pipe({name:"currency"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.CurrencyPipe=g},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(115),c=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(t))return t;if(!o.isString(t))throw new a.InvalidPipeArgumentException(e,t);return t.toUpperCase()},e=r([o.CONST(),s.Pipe({name:"uppercase"}),s.Injectable(),i("design:paramtypes",[])],e)}();t.UpperCasePipe=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(2),c=n(115),u=function(){function e(){}return e.prototype.transform=function(t,n){if(o.isBlank(n)||2!==n.length)throw new s.BaseException("ReplacePipe requires two arguments");if(o.isBlank(t))return t;if(!this._supportedInput(t))throw new c.InvalidPipeArgumentException(e,t);var r=t.toString(),i=n[0],a=n[1];if(!this._supportedPattern(i))throw new c.InvalidPipeArgumentException(e,i);if(!this._supportedReplacement(a))throw new c.InvalidPipeArgumentException(e,a);if(o.isFunction(a)){var u=o.isString(i)?o.RegExpWrapper.create(i):i;return o.StringWrapper.replaceAllMapped(r,u,a)}return i instanceof RegExp?o.StringWrapper.replaceAll(r,i,a):o.StringWrapper.replace(r,i,a)},e.prototype._supportedInput=function(e){return o.isString(e)||o.isNumber(e)},e.prototype._supportedPattern=function(e){return o.isString(e)||e instanceof RegExp},e.prototype._supportedReplacement=function(e){return o.isString(e)||o.isFunction(e)},e=r([a.Pipe({name:"replace"}),a.Injectable(),i("design:paramtypes",[])],e)}();t.ReplacePipe=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(115),c=o.RegExpWrapper.create("#"),u=function(){function e(){}return e.prototype.transform=function(t,n){void 0===n&&(n=null);var r,i,s=n[0];if(!o.isStringMap(s))throw new a.InvalidPipeArgumentException(e,s);return r=0===t||1===t?"="+t:"other",i=o.isPresent(t)?t.toString():"",o.StringWrapper.replaceAll(s[r],c,i)},e=r([o.CONST(),s.Pipe({name:"i18nPlural",pure:!0}),s.Injectable(),i("design:paramtypes",[])],e)}();t.I18nPluralPipe=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(12),a=n(2),c=n(115),u=function(){function e(){}return e.prototype.transform=function(t,n){void 0===n&&(n=null);var r=n[0];if(!o.isStringMap(r))throw new c.InvalidPipeArgumentException(e,r);return s.StringMapWrapper.contains(r,t)?r[t]:r.other},e=r([o.CONST(),a.Pipe({name:"i18nSelect",pure:!0}),a.Injectable(),i("design:paramtypes",[])],e)}();t.I18nSelectPipe=u},function(e,t,n){var r=n(114),i=n(122),o=n(120),s=n(118),a=n(119),c=n(116),u=n(121),p=n(123),l=n(124),h=n(125),f=n(5);t.COMMON_PIPES=f.CONST_EXPR([r.AsyncPipe,i.UpperCasePipe,o.LowerCasePipe,s.JsonPipe,a.SlicePipe,u.DecimalPipe,u.PercentPipe,u.CurrencyPipe,c.DatePipe,p.ReplacePipe,l.I18nPluralPipe,h.I18nSelectPipe])},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(128);t.NgClass=i.NgClass;var o=n(129);t.NgFor=o.NgFor;var s=n(130);t.NgIf=s.NgIf;var a=n(131);t.NgStyle=a.NgStyle;var c=n(132);t.NgSwitch=c.NgSwitch,t.NgSwitchWhen=c.NgSwitchWhen,t.NgSwitchDefault=c.NgSwitchDefault;var u=n(133);t.NgPlural=u.NgPlural,t.NgPluralCase=u.NgPluralCase,t.NgLocalization=u.NgLocalization,r(n(134));var p=n(135);t.CORE_DIRECTIVES=p.CORE_DIRECTIVES},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(12),c=function(){function e(e,t,n,r){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(e.prototype,"initialClasses",{set:function(e){this._applyInitialClasses(!0),this._initialClasses=o.isPresent(e)&&o.isString(e)?e.split(" "):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawClass",{set:function(e){this._cleanupClasses(this._rawClass),o.isString(e)&&(e=e.split(" ")),this._rawClass=e,this._iterableDiffer=null,this._keyValueDiffer=null,o.isPresent(e)&&(a.isListLikeIterable(e)?this._iterableDiffer=this._iterableDiffers.find(e).create(null):this._keyValueDiffer=this._keyValueDiffers.find(e).create(null))},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(o.isPresent(this._iterableDiffer)){var e=this._iterableDiffer.diff(this._rawClass);o.isPresent(e)&&this._applyIterableChanges(e)}if(o.isPresent(this._keyValueDiffer)){var e=this._keyValueDiffer.diff(this._rawClass);o.isPresent(e)&&this._applyKeyValueChanges(e)}},e.prototype.ngOnDestroy=function(){this._cleanupClasses(this._rawClass)},e.prototype._cleanupClasses=function(e){this._applyClasses(e,!0),this._applyInitialClasses(!1)},e.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},e.prototype._applyIterableChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){t._toggleClass(e.item,!1)})},e.prototype._applyInitialClasses=function(e){var t=this;this._initialClasses.forEach(function(n){return t._toggleClass(n,!e)})},e.prototype._applyClasses=function(e,t){var n=this;o.isPresent(e)&&(o.isArray(e)?e.forEach(function(e){return n._toggleClass(e,!t)}):e instanceof Set?e.forEach(function(e){return n._toggleClass(e,!t)}):a.StringMapWrapper.forEach(e,function(e,r){o.isPresent(e)&&n._toggleClass(r,!t)}))},e.prototype._toggleClass=function(e,t){if(e=e.trim(),e.length>0)if(e.indexOf(" ")>-1)for(var n=e.split(/\s+/g),r=0,i=n.length;i>r;r++)this._renderer.setElementClass(this._ngEl.nativeElement,n[r],t);else this._renderer.setElementClass(this._ngEl.nativeElement,e,t)},e=r([s.Directive({selector:"[ngClass]",inputs:["rawClass: ngClass","initialClasses: class"]}),i("design:paramtypes",[s.IterableDiffers,s.KeyValueDiffers,s.ElementRef,s.Renderer])],e)}();t.NgClass=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=n(14),c=function(){function e(e,t,n,r){this._viewContainer=e,this._templateRef=t,this._iterableDiffers=n,this._cdr=r}return Object.defineProperty(e.prototype,"ngForOf",{set:function(e){if(this._ngForOf=e,s.isBlank(this._differ)&&s.isPresent(e))try{this._differ=this._iterableDiffers.find(e).create(this._cdr,this._ngForTrackBy)}catch(t){throw new a.BaseException("Cannot find a differ supporting object '"+e+"' of type '"+s.getTypeNameForDebugging(e)+"'. NgFor only supports binding to Iterables such as Arrays.")}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){s.isPresent(e)&&(this._templateRef=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTrackBy",{set:function(e){this._ngForTrackBy=e},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var e=this._differ.diff(this._ngForOf);s.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this,n=[];e.forEachRemovedItem(function(e){return n.push(new u(e,null))}),e.forEachMovedItem(function(e){return n.push(new u(e,null))});var r=this._bulkRemove(n);e.forEachAddedItem(function(e){return r.push(new u(e,null))}),this._bulkInsert(r);for(var i=0;ii;i++){var s=this._viewContainer.get(i);s.setLocal("last",i===o-1)}e.forEachIdentityChange(function(e){var n=t._viewContainer.get(e.currentIndex);n.setLocal("$implicit",e.item)})},e.prototype._perViewChange=function(e,t){e.setLocal("$implicit",t.item),e.setLocal("index",t.currentIndex),e.setLocal("even",t.currentIndex%2==0),e.setLocal("odd",t.currentIndex%2==1)},e.prototype._bulkRemove=function(e){e.sort(function(e,t){return e.record.previousIndex-t.record.previousIndex});for(var t=[],n=e.length-1;n>=0;n--){var r=e[n];s.isPresent(r.record.currentIndex)?(r.view=this._viewContainer.detach(r.record.previousIndex),t.push(r)):this._viewContainer.remove(r.record.previousIndex)}return t},e.prototype._bulkInsert=function(e){e.sort(function(e,t){return e.record.currentIndex-t.record.currentIndex});for(var t=0;to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=function(){function e(e,t){this._viewContainer=e,this._templateRef=t,this._prevCondition=null}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){!e||!s.isBlank(this._prevCondition)&&this._prevCondition?e||!s.isBlank(this._prevCondition)&&!this._prevCondition||(this._prevCondition=!1,this._viewContainer.clear()):(this._prevCondition=!0,this._viewContainer.createEmbeddedView(this._templateRef))},enumerable:!0,configurable:!0}),e=r([o.Directive({selector:"[ngIf]",inputs:["ngIf"]}),i("design:paramtypes",[o.ViewContainerRef,o.TemplateRef])],e)}();t.NgIf=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=function(){function e(e,t,n){this._differs=e,this._ngEl=t,this._renderer=n}return Object.defineProperty(e.prototype,"rawStyle",{set:function(e){this._rawStyle=e,s.isBlank(this._differ)&&s.isPresent(e)&&(this._differ=this._differs.find(this._rawStyle).create(null))},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var e=this._differ.diff(this._rawStyle);s.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){t._setStyle(e.key,null)})},e.prototype._setStyle=function(e,t){this._renderer.setElementStyle(this._ngEl.nativeElement,e,t)},e=r([o.Directive({selector:"[ngStyle]",inputs:["rawStyle: ngStyle"]}),i("design:paramtypes",[o.KeyValueDiffers,o.ElementRef,o.Renderer])],e)}();t.NgStyle=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(5),c=n(12),u=a.CONST_EXPR(new Object),p=function(){function e(e,t){this._viewContainerRef=e,this._templateRef=t}return e.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},e.prototype.destroy=function(){this._viewContainerRef.clear()},e}();t.SwitchView=p;var l=function(){function e(){this._useDefault=!1,this._valueViews=new c.Map,this._activeViews=[]}return Object.defineProperty(e.prototype,"ngSwitch",{set:function(e){this._emptyAllActiveViews(),this._useDefault=!1;var t=this._valueViews.get(e);a.isBlank(t)&&(this._useDefault=!0,t=a.normalizeBlank(this._valueViews.get(u))),this._activateViews(t),this._switchValue=e},enumerable:!0,configurable:!0}),e.prototype._onWhenValueChanged=function(e,t,n){this._deregisterView(e,n),this._registerView(t,n),e===this._switchValue?(n.destroy(),c.ListWrapper.remove(this._activeViews,n)):t===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),n.create(),this._activeViews.push(n)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(u)))},e.prototype._emptyAllActiveViews=function(){for(var e=this._activeViews,t=0;to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s); return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(5),c=n(12),u=n(132),p="other",l=function(){function e(){}return e}();t.NgLocalization=l;var h=function(){function e(e,t,n){this.value=e,this._view=new u.SwitchView(n,t)}return e=r([s.Directive({selector:"[ngPluralCase]"}),o(0,s.Attribute("ngPluralCase")),i("design:paramtypes",[String,s.TemplateRef,s.ViewContainerRef])],e)}();t.NgPluralCase=h;var f=function(){function e(e){this._localization=e,this._caseViews=new c.Map,this.cases=null}return Object.defineProperty(e.prototype,"ngPlural",{set:function(e){this._switchValue=e,this._updateView()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this.cases.forEach(function(t){e._caseViews.set(e._formatValue(t),t._view)}),this._updateView()},e.prototype._updateView=function(){this._clearViews();var e=this._caseViews.get(this._switchValue);a.isPresent(e)||(e=this._getCategoryView(this._switchValue)),this._activateView(e)},e.prototype._clearViews=function(){a.isPresent(this._activeView)&&this._activeView.destroy()},e.prototype._activateView=function(e){a.isPresent(e)&&(this._activeView=e,this._activeView.create())},e.prototype._getCategoryView=function(e){var t=this._localization.getPluralCategory(e),n=this._caseViews.get(t);return a.isPresent(n)?n:this._caseViews.get(p)},e.prototype._isValueView=function(e){return"="===e.value[0]},e.prototype._formatValue=function(e){return this._isValueView(e)?this._stripValue(e.value):e.value},e.prototype._stripValue=function(e){return a.NumberWrapper.parseInt(e.substring(1),10)},r([s.ContentChildren(h),i("design:type",s.QueryList)],e.prototype,"cases",void 0),r([s.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"ngPlural",null),e=r([s.Directive({selector:"[ngPlural]"}),i("design:paramtypes",[l])],e)}();t.NgPlural=f},function(e,t){},function(e,t,n){var r=n(5),i=n(128),o=n(129),s=n(130),a=n(131),c=n(132),u=n(133);t.CORE_DIRECTIVES=r.CONST_EXPR([i.NgClass,o.NgFor,s.NgIf,a.NgStyle,c.NgSwitch,c.NgSwitchWhen,c.NgSwitchDefault,u.NgPlural,u.NgPluralCase])},function(e,t,n){var r=n(137);t.AbstractControl=r.AbstractControl,t.Control=r.Control,t.ControlGroup=r.ControlGroup,t.ControlArray=r.ControlArray;var i=n(138);t.AbstractControlDirective=i.AbstractControlDirective;var o=n(139);t.ControlContainer=o.ControlContainer;var s=n(140);t.NgControlName=s.NgControlName;var a=n(151);t.NgFormControl=a.NgFormControl;var c=n(152);t.NgModel=c.NgModel;var u=n(141);t.NgControl=u.NgControl;var p=n(153);t.NgControlGroup=p.NgControlGroup;var l=n(154);t.NgFormModel=l.NgFormModel;var h=n(155);t.NgForm=h.NgForm;var f=n(142);t.NG_VALUE_ACCESSOR=f.NG_VALUE_ACCESSOR;var d=n(145);t.DefaultValueAccessor=d.DefaultValueAccessor;var y=n(156);t.NgControlStatus=y.NgControlStatus;var v=n(147);t.CheckboxControlValueAccessor=v.CheckboxControlValueAccessor;var g=n(148);t.NgSelectOption=g.NgSelectOption,t.SelectControlValueAccessor=g.SelectControlValueAccessor;var m=n(157);t.FORM_DIRECTIVES=m.FORM_DIRECTIVES,t.RadioButtonState=m.RadioButtonState;var _=n(144);t.NG_VALIDATORS=_.NG_VALIDATORS,t.NG_ASYNC_VALIDATORS=_.NG_ASYNC_VALIDATORS,t.Validators=_.Validators;var b=n(158);t.RequiredValidator=b.RequiredValidator,t.MinLengthValidator=b.MinLengthValidator,t.MaxLengthValidator=b.MaxLengthValidator,t.PatternValidator=b.PatternValidator;var P=n(159);t.FormBuilder=P.FormBuilder;var C=n(159),w=n(149),R=n(5);t.FORM_PROVIDERS=R.CONST_EXPR([C.FormBuilder,w.RadioControlRegistry]),t.FORM_BINDINGS=t.FORM_PROVIDERS},function(e,t,n){function r(e){return e instanceof l}function i(e,t){return a.isBlank(t)?null:(t instanceof Array||(t=t.split("/")),t instanceof Array&&p.ListWrapper.isEmpty(t)?null:t.reduce(function(e,t){if(e instanceof f)return a.isPresent(e.controls[t])?e.controls[t]:null;if(e instanceof d){var n=t;return a.isPresent(e.at(n))?e.at(n):null}return null},e))}function o(e){return u.PromiseWrapper.isPromise(e)?c.ObservableWrapper.fromPromise(e):e}var s=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(5),c=n(48),u=n(49),p=n(12);t.VALID="VALID",t.INVALID="INVALID",t.PENDING="PENDING",t.isControl=r;var l=function(){function e(e,t){this.validator=e,this.asyncValidator=t,this._pristine=!0,this._touched=!1}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this._status===t.VALID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this._status==t.PENDING},enumerable:!0,configurable:!0}),e.prototype.markAsTouched=function(){this._touched=!0},e.prototype.markAsDirty=function(e){var t=(void 0===e?{}:e).onlySelf;t=a.normalizeBool(t),this._pristine=!1,a.isPresent(this._parent)&&!t&&this._parent.markAsDirty({onlySelf:t})},e.prototype.markAsPending=function(e){var n=(void 0===e?{}:e).onlySelf;n=a.normalizeBool(n),this._status=t.PENDING,a.isPresent(this._parent)&&!n&&this._parent.markAsPending({onlySelf:n})},e.prototype.setParent=function(e){this._parent=e},e.prototype.updateValueAndValidity=function(e){var n=void 0===e?{}:e,r=n.onlySelf,i=n.emitEvent;r=a.normalizeBool(r),i=a.isPresent(i)?i:!0,this._updateValue(),this._errors=this._runValidator(),this._status=this._calculateStatus(),(this._status==t.VALID||this._status==t.PENDING)&&this._runAsyncValidator(i),i&&(c.ObservableWrapper.callEmit(this._valueChanges,this._value),c.ObservableWrapper.callEmit(this._statusChanges,this._status)),a.isPresent(this._parent)&&!r&&this._parent.updateValueAndValidity({onlySelf:r,emitEvent:i})},e.prototype._runValidator=function(){return a.isPresent(this.validator)?this.validator(this):null},e.prototype._runAsyncValidator=function(e){var n=this;if(a.isPresent(this.asyncValidator)){this._status=t.PENDING,this._cancelExistingSubscription();var r=o(this.asyncValidator(this));this._asyncValidationSubscription=c.ObservableWrapper.subscribe(r,function(t){return n.setErrors(t,{emitEvent:e})})}},e.prototype._cancelExistingSubscription=function(){a.isPresent(this._asyncValidationSubscription)&&c.ObservableWrapper.dispose(this._asyncValidationSubscription)},e.prototype.setErrors=function(e,t){var n=(void 0===t?{}:t).emitEvent;n=a.isPresent(n)?n:!0,this._errors=e,this._status=this._calculateStatus(),n&&c.ObservableWrapper.callEmit(this._statusChanges,this._status),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype.find=function(e){return i(this,e)},e.prototype.getError=function(e,t){void 0===t&&(t=null);var n=a.isPresent(t)&&!p.ListWrapper.isEmpty(t)?this.find(t):this;return a.isPresent(n)&&a.isPresent(n._errors)?p.StringMapWrapper.get(n._errors,e):null},e.prototype.hasError=function(e,t){return void 0===t&&(t=null),a.isPresent(this.getError(e,t))},Object.defineProperty(e.prototype,"root",{get:function(){for(var e=this;a.isPresent(e._parent);)e=e._parent;return e},enumerable:!0,configurable:!0}),e.prototype._updateControlsErrors=function(){this._status=this._calculateStatus(),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype._initObservables=function(){this._valueChanges=new c.EventEmitter,this._statusChanges=new c.EventEmitter},e.prototype._calculateStatus=function(){return a.isPresent(this._errors)?t.INVALID:this._anyControlsHaveStatus(t.PENDING)?t.PENDING:this._anyControlsHaveStatus(t.INVALID)?t.INVALID:t.VALID},e}();t.AbstractControl=l;var h=function(e){function t(t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),e.call(this,n,r),this._value=t,this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return s(t,e),t.prototype.updateValue=function(e,t){var n=void 0===t?{}:t,r=n.onlySelf,i=n.emitEvent,o=n.emitModelToViewChange;o=a.isPresent(o)?o:!0,this._value=e,a.isPresent(this._onChange)&&o&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:r,emitEvent:i})},t.prototype._updateValue=function(){},t.prototype._anyControlsHaveStatus=function(e){return!1},t.prototype.registerOnChange=function(e){this._onChange=e},t}(l);t.Control=h;var f=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),e.call(this,r,i),this.controls=t,this._optionals=a.isPresent(n)?n:{},this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(t,e),t.prototype.addControl=function(e,t){this.controls[e]=t,t.setParent(this)},t.prototype.removeControl=function(e){p.StringMapWrapper["delete"](this.controls,e)},t.prototype.include=function(e){p.StringMapWrapper.set(this._optionals,e,!0),this.updateValueAndValidity()},t.prototype.exclude=function(e){p.StringMapWrapper.set(this._optionals,e,!1),this.updateValueAndValidity()},t.prototype.contains=function(e){var t=p.StringMapWrapper.contains(this.controls,e);return t&&this._included(e)},t.prototype._setParentForControls=function(){var e=this;p.StringMapWrapper.forEach(this.controls,function(t,n){t.setParent(e)})},t.prototype._updateValue=function(){this._value=this._reduceValue()},t.prototype._anyControlsHaveStatus=function(e){var t=this,n=!1;return p.StringMapWrapper.forEach(this.controls,function(r,i){n=n||t.contains(i)&&r.status==e}),n},t.prototype._reduceValue=function(){return this._reduceChildren({},function(e,t,n){return e[n]=t.value,e})},t.prototype._reduceChildren=function(e,t){var n=this,r=e;return p.StringMapWrapper.forEach(this.controls,function(e,i){n._included(i)&&(r=t(r,e,i))}),r},t.prototype._included=function(e){var t=p.StringMapWrapper.contains(this._optionals,e);return!t||p.StringMapWrapper.get(this._optionals,e)},t}(l);t.ControlGroup=f;var d=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e.call(this,n,r),this.controls=t,this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(t,e),t.prototype.at=function(e){return this.controls[e]},t.prototype.push=function(e){this.controls.push(e),e.setParent(this),this.updateValueAndValidity()},t.prototype.insert=function(e,t){p.ListWrapper.insert(this.controls,e,t),t.setParent(this),this.updateValueAndValidity()},t.prototype.removeAt=function(e){p.ListWrapper.removeAt(this.controls,e),this.updateValueAndValidity()},Object.defineProperty(t.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),t.prototype._updateValue=function(){this._value=this.controls.map(function(e){return e.value})},t.prototype._anyControlsHaveStatus=function(e){return this.controls.some(function(t){return t.status==e})},t.prototype._setParentForControls=function(){var e=this;this.controls.forEach(function(t){t.setParent(e)})},t}(l);t.ControlArray=d},function(e,t,n){var r=n(5),i=n(14),o=function(){function e(){}return Object.defineProperty(e.prototype,"control",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return r.isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return r.isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return r.isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return r.isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return r.isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return r.isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return r.isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.AbstractControlDirective=o},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(138),o=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}(i.AbstractControlDirective);t.ControlContainer=o},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(48),u=n(2),p=n(139),l=n(141),h=n(142),f=n(143),d=n(144),y=a.CONST_EXPR(new u.Provider(l.NgControl,{useExisting:u.forwardRef(function(){return v})})),v=function(e){function t(t,n,r,i){e.call(this),this._parent=t,this._validators=n,this._asyncValidators=r,this.update=new c.EventEmitter,this._added=!1,this.valueAccessor=f.selectValueAccessor(this,i)}return r(t,e),t.prototype.ngOnChanges=function(e){this._added||(this.formDirective.addControl(this),this._added=!0),f.isPropertyUpdated(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},t.prototype.ngOnDestroy=function(){this.formDirective.removeControl(this)},t.prototype.viewToModelUpdate=function(e){this.viewModel=e,c.ObservableWrapper.callEmit(this.update,e)},Object.defineProperty(t.prototype,"path",{get:function(){return f.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return f.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return f.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControl(this)},enumerable:!0,configurable:!0}),t=i([u.Directive({selector:"[ngControl]",bindings:[y],inputs:["name: ngControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,u.Host()),s(0,u.SkipSelf()),s(1,u.Optional()),s(1,u.Self()),s(1,u.Inject(d.NG_VALIDATORS)),s(2,u.Optional()),s(2,u.Self()),s(2,u.Inject(d.NG_ASYNC_VALIDATORS)),s(3,u.Optional()),s(3,u.Self()),s(3,u.Inject(h.NG_VALUE_ACCESSOR)),o("design:paramtypes",[p.ControlContainer,Array,Array,Array])],t)}(l.NgControl);t.NgControlName=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(138),o=n(14),s=function(e){function t(){e.apply(this,arguments),this.name=null,this.valueAccessor=null}return r(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),t}(i.AbstractControlDirective);t.NgControl=s},function(e,t,n){var r=n(2),i=n(5);t.NG_VALUE_ACCESSOR=i.CONST_EXPR(new r.OpaqueToken("NgValueAccessor"))},function(e,t,n){function r(e,t){var n=l.ListWrapper.clone(t.path);return n.push(e),n}function i(e,t){h.isBlank(e)&&s(t,"Cannot find control"),h.isBlank(t.valueAccessor)&&s(t,"No value accessor for"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(n){t.viewToModelUpdate(n),e.updateValue(n,{emitModelToViewChange:!1}),e.markAsDirty()}),e.registerOnChange(function(e){return t.valueAccessor.writeValue(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function o(e,t){h.isBlank(e)&&s(t,"Cannot find control"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator])}function s(e,t){var n=e.path.join(" -> ");throw new f.BaseException(t+" '"+n+"'")}function a(e){return h.isPresent(e)?d.Validators.compose(e.map(b.normalizeValidator)):null}function c(e){return h.isPresent(e)?d.Validators.composeAsync(e.map(b.normalizeAsyncValidator)):null}function u(e,t){if(!l.StringMapWrapper.contains(e,"model"))return!1;var n=e.model;return n.isFirstChange()?!0:!h.looseIdentical(t,n.currentValue)}function p(e,t){if(h.isBlank(t))return null;var n,r,i;return t.forEach(function(t){h.hasConstructor(t,y.DefaultValueAccessor)?n=t:h.hasConstructor(t,g.CheckboxControlValueAccessor)||h.hasConstructor(t,v.NumberValueAccessor)||h.hasConstructor(t,m.SelectControlValueAccessor)||h.hasConstructor(t,_.RadioControlValueAccessor)?(h.isPresent(r)&&s(e,"More than one built-in value accessor matches"),r=t):(h.isPresent(i)&&s(e,"More than one custom value accessor matches"),i=t)}),h.isPresent(i)?i:h.isPresent(r)?r:h.isPresent(n)?n:(s(e,"No valid value accessor for"),null)}var l=n(12),h=n(5),f=n(14),d=n(144),y=n(145),v=n(146),g=n(147),m=n(148),_=n(149),b=n(150);t.controlPath=r,t.setUpControl=i,t.setUpControlGroup=o,t.composeValidators=a,t.composeAsyncValidators=c,t.isPropertyUpdated=u,t.selectValueAccessor=p},function(e,t,n){function r(e){return c.PromiseWrapper.isPromise(e)?e:u.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e,t){return t.map(function(t){return t(e)})}function s(e){var t=e.reduce(function(e,t){return a.isPresent(t)?p.StringMapWrapper.merge(e,t):e},{});return p.StringMapWrapper.isEmpty(t)?null:t}var a=n(5),c=n(49),u=n(48),p=n(12),l=n(2);t.NG_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgAsyncValidators"));var h=function(){function e(){}return e.required=function(e){return a.isBlank(e.value)||a.isString(e.value)&&""==e.value?{required:!0}:null},e.minLength=function(t){return function(n){if(a.isPresent(e.required(n)))return null;var r=n.value;return r.lengtht?{maxlength:{requiredLength:t,actualLength:r.length}}:null}},e.pattern=function(t){return function(n){if(a.isPresent(e.required(n)))return null;var r=new RegExp("^"+t+"$"),i=n.value;return r.test(i)?null:{pattern:{requiredPattern:"^"+t+"$",actualValue:i}}}},e.nullValidator=function(e){return null},e.compose=function(e){if(a.isBlank(e))return null;var t=e.filter(a.isPresent);return 0==t.length?null:function(e){return s(i(e,t))}},e.composeAsync=function(e){if(a.isBlank(e))return null;var t=e.filter(a.isPresent);return 0==t.length?null:function(e){var n=o(e,t).map(r);return c.PromiseWrapper.all(n).then(s)}},e}();t.Validators=h},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(142),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){var t=a.isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.DefaultValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(142),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(a.NumberWrapper.parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input[type=number][ngControl],input[type=number][ngFormControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.NumberValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(142),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.CheckboxControlValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(48),c=n(142),u=n(5),p=u.CONST_EXPR(new s.Provider(c.NG_VALUE_ACCESSOR,{useExisting:s.forwardRef(function(){return h}),multi:!0})),l=function(){function e(){}return e=r([s.Directive({selector:"option"}),i("design:paramtypes",[])],e)}();t.NgSelectOption=l;var h=function(){function e(e,t,n){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){},this._updateValueWhenListOfOptionsChanges(n)}return e.prototype.writeValue=function(e){this.value=e,this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._updateValueWhenListOfOptionsChanges=function(e){var t=this;a.ObservableWrapper.subscribe(e.changes,function(e){return t.writeValue(t.value)})},e=r([s.Directive({selector:"select[ngControl],select[ngFormControl],select[ngModel]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[p]}),o(2,s.Query(l,{descendants:!0})),i("design:paramtypes",[s.Renderer,s.ElementRef,s.QueryList])],e)}();t.SelectControlValueAccessor=h},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(142),a=n(141),c=n(5),u=n(12),p=c.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return f}),multi:!0})),l=function(){function e(){this._accessors=[]}return e.prototype.add=function(e,t){this._accessors.push([e,t])},e.prototype.remove=function(e){for(var t=-1,n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(12),u=n(48),p=n(2),l=n(141),h=n(144),f=n(142),d=n(143),y=a.CONST_EXPR(new p.Provider(l.NgControl,{useExisting:p.forwardRef(function(){return v})})),v=function(e){function t(t,n,r){e.call(this),this._validators=t,this._asyncValidators=n,this.update=new u.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(t,e),t.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(d.setUpControl(this.form,this),this.form.updateValueAndValidity({emitEvent:!1})),d.isPropertyUpdated(e,this.viewModel)&&(this.form.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,u.ObservableWrapper.callEmit(this.update,e)},t.prototype._isControlChanged=function(e){return c.StringMapWrapper.contains(e,"form")},t=i([p.Directive({selector:"[ngFormControl]",bindings:[y],inputs:["form: ngFormControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(h.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(h.NG_ASYNC_VALIDATORS)),s(2,p.Optional()),s(2,p.Self()),s(2,p.Inject(f.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],t)}(l.NgControl);t.NgFormControl=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){ this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(48),u=n(2),p=n(142),l=n(141),h=n(137),f=n(144),d=n(143),y=a.CONST_EXPR(new u.Provider(l.NgControl,{useExisting:u.forwardRef(function(){return v})})),v=function(e){function t(t,n,r){e.call(this),this._validators=t,this._asyncValidators=n,this._control=new h.Control,this._added=!1,this.update=new c.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(t,e),t.prototype.ngOnChanges=function(e){this._added||(d.setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1}),this._added=!0),d.isPropertyUpdated(e,this.viewModel)&&(this._control.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,c.ObservableWrapper.callEmit(this.update,e)},t=i([u.Directive({selector:"[ngModel]:not([ngControl]):not([ngFormControl])",bindings:[y],inputs:["model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,u.Optional()),s(0,u.Self()),s(0,u.Inject(f.NG_VALIDATORS)),s(1,u.Optional()),s(1,u.Self()),s(1,u.Inject(f.NG_ASYNC_VALIDATORS)),s(2,u.Optional()),s(2,u.Self()),s(2,u.Inject(p.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],t)}(l.NgControl);t.NgModel=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(5),u=n(139),p=n(143),l=n(144),h=c.CONST_EXPR(new a.Provider(u.ControlContainer,{useExisting:a.forwardRef(function(){return f})})),f=function(e){function t(t,n,r){e.call(this),this._validators=n,this._asyncValidators=r,this._parent=t}return r(t,e),t.prototype.ngOnInit=function(){this.formDirective.addControlGroup(this)},t.prototype.ngOnDestroy=function(){this.formDirective.removeControlGroup(this)},Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControlGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return p.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return p.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return p.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t=i([a.Directive({selector:"[ngControlGroup]",providers:[h],inputs:["name: ngControlGroup"],exportAs:"ngForm"}),s(0,a.Host()),s(0,a.SkipSelf()),s(1,a.Optional()),s(1,a.Self()),s(1,a.Inject(l.NG_VALIDATORS)),s(2,a.Optional()),s(2,a.Self()),s(2,a.Inject(l.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[u.ControlContainer,Array,Array])],t)}(u.ControlContainer);t.NgControlGroup=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(12),u=n(48),p=n(2),l=n(139),h=n(143),f=n(144),d=a.CONST_EXPR(new p.Provider(l.ControlContainer,{useExisting:p.forwardRef(function(){return y})})),y=function(e){function t(t,n){e.call(this),this._validators=t,this._asyncValidators=n,this.form=null,this.directives=[],this.ngSubmit=new u.EventEmitter}return r(t,e),t.prototype.ngOnChanges=function(e){if(c.StringMapWrapper.contains(e,"form")){var t=h.composeValidators(this._validators);this.form.validator=f.Validators.compose([this.form.validator,t]);var n=h.composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=f.Validators.composeAsync([this.form.asyncValidator,n]),this.form.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}this._updateDomValue()},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this.form.find(e.path);h.setUpControl(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e)},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){c.ListWrapper.remove(this.directives,e)},t.prototype.addControlGroup=function(e){var t=this.form.find(e.path);h.setUpControlGroup(t,e),t.updateValueAndValidity({emitEvent:!1})},t.prototype.removeControlGroup=function(e){},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var n=this.form.find(e.path);n.updateValue(t)},t.prototype.onSubmit=function(){return u.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var n=e.form.find(t.path);t.valueAccessor.writeValue(n.value)})},t=i([p.Directive({selector:"[ngFormModel]",bindings:[d],inputs:["form: ngFormModel"],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(f.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(f.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],t)}(l.ControlContainer);t.NgFormModel=y},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(48),c=n(12),u=n(5),p=n(2),l=n(139),h=n(137),f=n(143),d=n(144),y=u.CONST_EXPR(new p.Provider(l.ControlContainer,{useExisting:p.forwardRef(function(){return v})})),v=function(e){function t(t,n){e.call(this),this.ngSubmit=new a.EventEmitter,this.form=new h.ControlGroup({},null,f.composeValidators(t),f.composeAsyncValidators(n))}return r(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path),r=new h.Control;f.setUpControl(r,e),n.addControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path);u.isPresent(n)&&(n.removeControl(e.name),n.updateValueAndValidity({emitEvent:!1}))})},t.prototype.addControlGroup=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path),r=new h.ControlGroup({});f.setUpControlGroup(r,e),n.addControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.removeControlGroup=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path);u.isPresent(n)&&(n.removeControl(e.name),n.updateValueAndValidity({emitEvent:!1}))})},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var n=this;a.PromiseWrapper.scheduleMicrotask(function(){var r=n.form.find(e.path);r.updateValue(t)})},t.prototype.onSubmit=function(){return a.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._findContainer=function(e){return e.pop(),c.ListWrapper.isEmpty(e)?this.form:this.form.find(e)},t=i([p.Directive({selector:"form:not([ngNoForm]):not([ngFormModel]),ngForm,[ngForm]",bindings:[y],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(d.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(d.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],t)}(l.ControlContainer);t.NgForm=v},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(141),c=n(5),u=function(){function e(e){this._cd=e}return Object.defineProperty(e.prototype,"ngClassUntouched",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.untouched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassTouched",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.touched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPristine",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.pristine:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassDirty",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.dirty:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassValid",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.valid:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassInvalid",{get:function(){return c.isPresent(this._cd.control)?!this._cd.control.valid:!1},enumerable:!0,configurable:!0}),e=r([s.Directive({selector:"[ngControl],[ngModel],[ngFormControl]",host:{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),o(0,s.Self()),i("design:paramtypes",[a.NgControl])],e)}();t.NgControlStatus=u},function(e,t,n){var r=n(5),i=n(140),o=n(151),s=n(152),a=n(153),c=n(154),u=n(155),p=n(145),l=n(147),h=n(146),f=n(149),d=n(156),y=n(148),v=n(158),g=n(140);t.NgControlName=g.NgControlName;var m=n(151);t.NgFormControl=m.NgFormControl;var _=n(152);t.NgModel=_.NgModel;var b=n(153);t.NgControlGroup=b.NgControlGroup;var P=n(154);t.NgFormModel=P.NgFormModel;var C=n(155);t.NgForm=C.NgForm;var w=n(145);t.DefaultValueAccessor=w.DefaultValueAccessor;var R=n(147);t.CheckboxControlValueAccessor=R.CheckboxControlValueAccessor;var E=n(149);t.RadioControlValueAccessor=E.RadioControlValueAccessor,t.RadioButtonState=E.RadioButtonState;var O=n(146);t.NumberValueAccessor=O.NumberValueAccessor;var S=n(156);t.NgControlStatus=S.NgControlStatus;var A=n(148);t.SelectControlValueAccessor=A.SelectControlValueAccessor,t.NgSelectOption=A.NgSelectOption;var D=n(158);t.RequiredValidator=D.RequiredValidator,t.MinLengthValidator=D.MinLengthValidator,t.MaxLengthValidator=D.MaxLengthValidator,t.PatternValidator=D.PatternValidator;var x=n(141);t.NgControl=x.NgControl,t.FORM_DIRECTIVES=r.CONST_EXPR([i.NgControlName,a.NgControlGroup,o.NgFormControl,s.NgModel,c.NgFormModel,u.NgForm,y.NgSelectOption,p.DefaultValueAccessor,h.NumberValueAccessor,l.CheckboxControlValueAccessor,y.SelectControlValueAccessor,f.RadioControlValueAccessor,d.NgControlStatus,v.RequiredValidator,v.MinLengthValidator,v.MaxLengthValidator,v.PatternValidator])},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(5),c=n(144),u=n(5),p=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useValue:c.Validators.required,multi:!0})),l=function(){function e(){}return e=r([s.Directive({selector:"[required][ngControl],[required][ngFormControl],[required][ngModel]",providers:[p]}),i("design:paramtypes",[])],e)}();t.RequiredValidator=l;var h=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return f}),multi:!0})),f=function(){function e(e){this._validator=c.Validators.minLength(u.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[minlength][ngControl],[minlength][ngFormControl],[minlength][ngModel]",providers:[h]}),o(0,s.Attribute("minlength")),i("design:paramtypes",[String])],e)}();t.MinLengthValidator=f;var d=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return y}),multi:!0})),y=function(){function e(e){this._validator=c.Validators.maxLength(u.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[maxlength][ngControl],[maxlength][ngFormControl],[maxlength][ngModel]",providers:[d]}),o(0,s.Attribute("maxlength")),i("design:paramtypes",[String])],e)}();t.MaxLengthValidator=y;var v=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return g}),multi:!0})),g=function(){function e(e){this._validator=c.Validators.pattern(e)}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[pattern][ngControl],[pattern][ngFormControl],[pattern][ngModel]",providers:[v]}),o(0,s.Attribute("pattern")),i("design:paramtypes",[String])],e)}();t.PatternValidator=g},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(12),a=n(5),c=n(137),u=function(){function e(){}return e.prototype.group=function(e,t){void 0===t&&(t=null);var n=this._reduceControls(e),r=a.isPresent(t)?s.StringMapWrapper.get(t,"optionals"):null,i=a.isPresent(t)?s.StringMapWrapper.get(t,"validator"):null,o=a.isPresent(t)?s.StringMapWrapper.get(t,"asyncValidator"):null;return new c.ControlGroup(n,r,i,o)},e.prototype.control=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new c.Control(e,t,n)},e.prototype.array=function(e,t,n){var r=this;void 0===t&&(t=null),void 0===n&&(n=null);var i=e.map(function(e){return r._createControl(e)});return new c.ControlArray(i,t,n)},e.prototype._reduceControls=function(e){var t=this,n={};return s.StringMapWrapper.forEach(e,function(e,r){n[r]=t._createControl(e)}),n},e.prototype._createControl=function(e){if(e instanceof c.Control||e instanceof c.ControlGroup||e instanceof c.ControlArray)return e;if(a.isArray(e)){var t=e[0],n=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(t,n,r)}return this.control(e)},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.FormBuilder=u},function(e,t,n){var r=n(5),i=n(136),o=n(127);t.COMMON_DIRECTIVES=r.CONST_EXPR([o.CORE_DIRECTIVES,i.FORM_DIRECTIVES])},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(162)),r(n(163)),r(n(164))},function(e,t,n){function r(){return new g}function i(e){var t=s(e);return t&&t[m.Scheme]||""}function o(e,t,n,r,i,o,s){var a=[];return d.isPresent(e)&&a.push(e+":"),d.isPresent(n)&&(a.push("//"),d.isPresent(t)&&a.push(t+"@"),a.push(n),d.isPresent(r)&&a.push(":"+r)),d.isPresent(i)&&a.push(i),d.isPresent(o)&&a.push("?"+o),d.isPresent(s)&&a.push("#"+s),a.join("")}function s(e){return d.RegExpWrapper.firstMatch(_,e)}function a(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}function c(e){var t=e[m.Path];return t=d.isBlank(t)?"":a(t),e[m.Path]=t,o(e[m.Scheme],e[m.UserInfo],e[m.Domain],e[m.Port],t,e[m.QueryData],e[m.Fragment])}function u(e,t){var n=s(encodeURI(t)),r=s(e);if(d.isPresent(n[m.Scheme]))return c(n);n[m.Scheme]=r[m.Scheme];for(var i=m.Scheme;i<=m.Port;i++)d.isBlank(n[i])&&(n[i]=r[i]);if("/"==n[m.Path][0])return c(n);var o=r[m.Path];d.isBlank(o)&&(o="/");var a=o.lastIndexOf("/");return o=o.substring(0,a+1)+n[m.Path],n[m.Path]=o,c(n)}var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},f=n(6),d=n(5),y=n(82),v=n(6);t.createWithoutPackagePrefix=r,t.DEFAULT_PACKAGE_URL_PROVIDER=new v.Provider(y.PACKAGE_ROOT_URL,{useValue:"/"});var g=function(){function e(e){void 0===e&&(e=null),d.isPresent(e)&&(this._packagePrefix=d.StringWrapper.stripRight(e,"/")+"/")}return e.prototype.resolve=function(e,t){var n=t;return d.isPresent(e)&&e.length>0&&(n=u(e,n)),d.isPresent(this._packagePrefix)&&"package"==i(n)&&(n=n.replace("package:",this._packagePrefix)),n},e=p([f.Injectable(),h(0,f.Inject(y.PACKAGE_ROOT_URL)),l("design:paramtypes",[String])],e)}();t.UrlResolver=g,t.getUrlScheme=i;var m,_=d.RegExpWrapper.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(m||(m={}))},function(e,t){var n=function(){function e(){}return e.prototype.get=function(e){return null},e}();t.XHR=n},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function i(){return new C.ChangeDetectorGenConfig(l.assertionsEnabled(),!1,!0)}var o=n(165),s=n(166);t.TemplateCompiler=s.TemplateCompiler;var a=n(167);t.CompileDirectiveMetadata=a.CompileDirectiveMetadata,t.CompileTypeMetadata=a.CompileTypeMetadata,t.CompileTemplateMetadata=a.CompileTemplateMetadata;var c=n(172);t.SourceModule=c.SourceModule,t.SourceWithImports=c.SourceWithImports;var u=n(107);t.PLATFORM_DIRECTIVES=u.PLATFORM_DIRECTIVES,t.PLATFORM_PIPES=u.PLATFORM_PIPES,r(n(171));var p=n(181);t.TEMPLATE_TRANSFORMS=p.TEMPLATE_TRANSFORMS;var l=n(5),h=n(6),f=n(181),d=n(182),y=n(189),v=n(190),g=n(173),m=n(176),_=n(179),b=n(180),P=n(166),C=n(26),w=n(85),R=n(165),E=n(187),O=n(193),S=n(162),A=n(26);t.COMPILER_PROVIDERS=l.CONST_EXPR([A.Lexer,A.Parser,d.HtmlParser,f.TemplateParser,y.TemplateNormalizer,v.RuntimeMetadataResolver,S.DEFAULT_PACKAGE_URL_PROVIDER,m.StyleCompiler,b.ProtoViewCompiler,_.ViewCompiler,g.ChangeDetectionCompiler,new h.Provider(C.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),P.TemplateCompiler,new h.Provider(R.RuntimeCompiler,{useClass:o.RuntimeCompiler_}),new h.Provider(w.Compiler,{useExisting:R.RuntimeCompiler}),O.DomElementSchemaRegistry,new h.Provider(E.ElementSchemaRegistry,{useExisting:O.DomElementSchemaRegistry}),S.UrlResolver])},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(85),a=n(95),c=n(166),u=n(6),p=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(s.Compiler);t.RuntimeCompiler=p;var l=function(e){function t(t){e.call(this),this._templateCompiler=t}return r(t,e),t.prototype.compileInHost=function(e){return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return new a.HostViewFactoryRef_(e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=i([u.Injectable(),o("design:paramtypes",[c.TemplateCompiler])],t)}(s.Compiler_);t.RuntimeCompiler_=l},function(e,t,n){function r(e){if(!e.isComponent)throw new f.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}function i(e){var t=e.substring(0,e.length-x.MODULE_SUFFIX.length);return t+".template"+x.MODULE_SUFFIX}function o(e){return"hostViewFactory_"+e.name}function s(e){return _.moduleRef(i(e.type.moduleUrl))+"viewFactory_"+e.type.name+"0"}function a(e){var t={};return e.forEach(function(e){d.StringMapWrapper.forEach(e,function(e,n){t[n]=e})}),t}function c(e){var t=[];return e.forEach(function(e){var n=t.filter(function(t){return t.type.name==e.type.name&&t.type.moduleUrl==e.type.moduleUrl&&t.type.runtime==e.type.runtime}).length>0;n||t.push(e)}),t}function u(e,t){var n=new M;return g.templateVisitAll(n,e),t.filter(function(e){return d.SetWrapper.has(n.collector.pipes,e.name)})}var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=n(5),f=n(14),d=n(12),y=n(48),v=n(167),g=n(171),m=n(6),_=n(172),b=n(173),P=n(176),C=n(179),w=n(180),R=n(181),E=n(189),O=n(190),S=n(86),A=n(26),D=n(110),x=n(169);t.METADATA_CACHE_MODULE_REF=_.moduleRef("package:angular2/src/core/linker/resolved_metadata_cache"+x.MODULE_SUFFIX);var T=function(){function e(e,t,n,r,i,o,s,a,c){this._runtimeMetadataResolver=e,this._templateNormalizer=t,this._templateParser=n,this._styleCompiler=r,this._cdCompiler=i,this._protoViewCompiler=o,this._viewCompiler=s,this._resolvedMetadataCache=a,this._genConfig=c,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map}return e.prototype.normalizeDirectiveMetadata=function(e){return e.isComponent?this._templateNormalizer.normalizeTemplate(e.type,e.template).then(function(t){return new v.CompileDirectiveMetadata({type:e.type,isComponent:e.isComponent,dynamicLoadable:e.dynamicLoadable,selector:e.selector,exportAs:e.exportAs,changeDetection:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,lifecycleHooks:e.lifecycleHooks,providers:e.providers,template:t})}):y.PromiseWrapper.resolve(e)},e.prototype.compileHostComponentRuntime=function(e){var t=this._runtimeMetadataResolver.getDirectiveMetadata(e),n=this._hostCacheKeys.get(e);if(h.isBlank(n)){n=new Object,this._hostCacheKeys.set(e,n),r(t);var i=v.createHostComponentMeta(t.type,t.selector);this._compileComponentRuntime(n,i,[t],[],[])}return this._compiledTemplateDone.get(n).then(function(e){return new S.HostViewFactory(t.selector,e.viewFactory)})},e.prototype.clearCache=function(){this._styleCompiler.clearCache(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear(),this._hostCacheKeys.clear()},e.prototype.compileTemplatesCodeGen=function(e){var t=this;if(0===e.length)throw new f.BaseException("No components given");var n=[];e.forEach(function(e){var i=e.component;if(r(i),t._compileComponentCodeGen(i,e.directives,e.pipes,n),i.dynamicLoadable){var s=v.createHostComponentMeta(i.type,i.selector),a=t._compileComponentCodeGen(s,[i],[],n),c=h.IS_DART?"const":"new",u=c+" "+w.APP_VIEW_MODULE_REF+"HostViewFactory('"+i.selector+"',"+a+")",p=o(i.type);n.push(""+x.codeGenExportVariable(p)+u+";")}});var s=e[0].component.type.moduleUrl;return new _.SourceModule(""+i(s),n.join("\n"))},e.prototype.compileStylesheetCodeGen=function(e,t){return this._styleCompiler.compileStylesheetCodeGen(e,t)},e.prototype._compileComponentRuntime=function(e,t,n,r,i){var o=this,s=c(n),a=c(r),p=this._compiledTemplateCache.get(e),l=this._compiledTemplateDone.get(e);return h.isBlank(p)&&(p=new N,this._compiledTemplateCache.set(e,p),l=y.PromiseWrapper.all([this._styleCompiler.compileComponentRuntime(t.template)].concat(s.map(function(e){return o.normalizeDirectiveMetadata(e)}))).then(function(e){var n=e.slice(1),r=e[0],s=o._templateParser.parse(t.template.template,n,a,t.type.name),c=[],l=k.findUsedDirectives(s);return l.components.forEach(function(e){return o._compileNestedComponentRuntime(e,i,c)}),y.PromiseWrapper.all(c).then(function(e){var n=u(s,a);return p.init(o._createViewFactoryRuntime(t,s,l.directives,r,n)),p})}),this._compiledTemplateDone.set(e,l)),p},e.prototype._compileNestedComponentRuntime=function(e,t,n){var r=d.ListWrapper.clone(t),i=e.type.runtime,o=this._runtimeMetadataResolver.getViewDirectivesMetadata(e.type.runtime),s=this._runtimeMetadataResolver.getViewPipesMetadata(e.type.runtime),a=d.ListWrapper.contains(r,i);r.push(i),this._compileComponentRuntime(i,e,o,s,r),a||n.push(this._compiledTemplateDone.get(i))},e.prototype._createViewFactoryRuntime=function(e,t,n,r,i){var o=this;if(h.IS_DART||!this._genConfig.useJit){var s=this._cdCompiler.compileComponentRuntime(e.type,e.changeDetection,t),c=this._protoViewCompiler.compileProtoViewRuntime(this._resolvedMetadataCache,e,t,i);return this._viewCompiler.compileComponentRuntime(e,t,r,c.protoViews,s,function(e){return o._getNestedComponentViewFactory(e)})}var u=[],p=this._createViewFactoryCodeGen("resolvedMetadataCache",e,new _.SourceExpression([],"styles"),t,i,u),l={exports:{},styles:r,resolvedMetadataCache:this._resolvedMetadataCache};n.forEach(function(t){l[t.type.name]=t.type.runtime,t.isComponent&&t.type.runtime!==e.type.runtime&&(l["viewFactory_"+t.type.name+"0"]=o._getNestedComponentViewFactory(t))}),i.forEach(function(e){return l[e.type.name]=e.type.runtime});var f=_.SourceModule.getSourceWithoutImports(u.join("\n"));return h.evalExpression("viewFactory_"+e.type.name,p,f,a([l,b.CHANGE_DETECTION_JIT_IMPORTS,w.PROTO_VIEW_JIT_IMPORTS,C.VIEW_JIT_IMPORTS]))},e.prototype._getNestedComponentViewFactory=function(e){return this._compiledTemplateCache.get(e.type.runtime).viewFactory},e.prototype._compileComponentCodeGen=function(e,n,r,i){var o=c(n),s=c(r),a=this._styleCompiler.compileComponentCodeGen(e.template),p=this._templateParser.parse(e.template.template,o,s,e.type.name),l=u(p,s);return this._createViewFactoryCodeGen(t.METADATA_CACHE_MODULE_REF+"CODEGEN_RESOLVED_METADATA_CACHE",e,a,p,l,i)},e.prototype._createViewFactoryCodeGen=function(e,t,n,r,i,o){var a=this._cdCompiler.compileComponentCodeGen(t.type,t.changeDetection,r),c=this._protoViewCompiler.compileProtoViewCodeGen(new x.Expression(e),t,r,i),u=this._viewCompiler.compileComponentCodeGen(t,r,n,c.protoViews,a,s);return x.addAll(a.declarations,o),x.addAll(c.declarations,o),x.addAll(u.declarations,o),u.expression},e=p([m.Injectable(),l("design:paramtypes",[O.RuntimeMetadataResolver,E.TemplateNormalizer,R.TemplateParser,P.StyleCompiler,b.ChangeDetectionCompiler,w.ProtoViewCompiler,C.ViewCompiler,D.ResolvedMetadataCache,A.ChangeDetectorGenConfig])],e)}();t.TemplateCompiler=T;var I=function(){function e(e,t,n){this.component=e,this.directives=t,this.pipes=n}return e}();t.NormalizedComponentWithViewDirectives=I;var N=function(){function e(){this.viewFactory=null}return e.prototype.init=function(e){this.viewFactory=e},e}(),k=function(){function e(){this.directives=[],this.components=[]}return e.findUsedDirectives=function(t){var n=new e;return g.templateVisitAll(n,t),n},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){ return e.directive.isComponent&&this.components.push(e.directive),this.directives.push(e.directive),null},e.prototype.visitEvent=function(e,t){return null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),M=function(){function e(){this.collector=new R.PipeCollector}return e.prototype.visitBoundText=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return g.templateVisitAll(this,e.inputs),g.templateVisitAll(this,e.outputs),g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return g.templateVisitAll(this,e.outputs),g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return g.templateVisitAll(this,e.inputs),g.templateVisitAll(this,e.hostEvents),g.templateVisitAll(this,e.hostProperties),null},e.prototype.visitEvent=function(e,t){return e.handler.visit(this.collector),null},e.prototype.visitDirectiveProperty=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitElementProperty=function(e,t){return e.value.visit(this.collector),null},e}()},function(e,t,n){function r(e,t){var n=d.CssSelector.parse(t)[0].getMatchingElementTemplate();return S.create({type:new R({runtime:Object,name:"Host"+e.name,moduleUrl:e.moduleUrl,isHost:!0}),template:new O({template:n,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:h.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,dynamicLoadable:!1,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function i(e,t){return u.isBlank(e)?null:e.map(function(e){return s(e,t)})}function o(e){return u.isBlank(e)?null:e.map(a)}function s(e,t){return u.isString(e)||u.isBlank(e)?e:t(e)}function a(e){return u.isString(e)||u.isBlank(e)?e:e.toJson()}var c=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},u=n(5),p=n(14),l=n(12),h=n(26),f=n(75),d=n(168),y=n(169),v=n(170),g=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,m=function(){function e(){}return e.fromJson=function(e){return D[e["class"]](e)},Object.defineProperty(e.prototype,"identifier",{get:function(){return p.unimplemented()},enumerable:!0,configurable:!0}),e}();t.CompileMetadataWithIdentifier=m;var _=function(e){function t(){e.apply(this,arguments)}return c(t,e),t.fromJson=function(e){return D[e["class"]](e)},Object.defineProperty(t.prototype,"type",{get:function(){return p.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return p.unimplemented()},enumerable:!0,configurable:!0}),t}(m);t.CompileMetadataWithType=_;var b=function(){function e(e){var t=void 0===e?{}:e,n=t.runtime,r=t.name,i=t.moduleUrl,o=t.prefix,s=t.constConstructor;this.runtime=n,this.name=r,this.prefix=o,this.moduleUrl=i,this.constConstructor=s}return e.fromJson=function(t){return new e({name:t.name,prefix:t.prefix,moduleUrl:t.moduleUrl,constConstructor:t.constConstructor})},e.prototype.toJson=function(){return{"class":"Identifier",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,constConstructor:this.constConstructor}},Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),e}();t.CompileIdentifierMetadata=b;var P=function(){function e(e){var t=void 0===e?{}:e,n=t.isAttribute,r=t.isSelf,i=t.isHost,o=t.isSkipSelf,s=t.isOptional,a=t.query,c=t.viewQuery,p=t.token;this.isAttribute=u.normalizeBool(n),this.isSelf=u.normalizeBool(r),this.isHost=u.normalizeBool(i),this.isSkipSelf=u.normalizeBool(o),this.isOptional=u.normalizeBool(s),this.query=a,this.viewQuery=c,this.token=p}return e.fromJson=function(t){return new e({token:s(t.token,b.fromJson),query:s(t.query,E.fromJson),viewQuery:s(t.viewQuery,E.fromJson),isAttribute:t.isAttribute,isSelf:t.isSelf,isHost:t.isHost,isSkipSelf:t.isSkipSelf,isOptional:t.isOptional})},e.prototype.toJson=function(){return{token:a(this.token),query:a(this.query),viewQuery:a(this.viewQuery),isAttribute:this.isAttribute,isSelf:this.isSelf,isHost:this.isHost,isSkipSelf:this.isSkipSelf,isOptional:this.isOptional}},e}();t.CompileDiDependencyMetadata=P;var C=function(){function e(e){var t=e.token,n=e.useClass,r=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;this.token=t,this.useClass=n,this.useValue=r,this.useExisting=i,this.useFactory=o,this.deps=s,this.multi=a}return e.fromJson=function(t){return new e({token:s(t.token,b.fromJson),useClass:s(t.useClass,R.fromJson)})},e.prototype.toJson=function(){return{token:a(this.token),useClass:a(this.useClass)}},e}();t.CompileProviderMetadata=C;var w=function(){function e(e){var t=e.runtime,n=e.name,r=e.moduleUrl,i=e.constConstructor,o=e.diDeps;this.runtime=t,this.name=n,this.moduleUrl=r,this.diDeps=o,this.constConstructor=i}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.toJson=function(){return null},e}();t.CompileFactoryMetadata=w;var R=function(){function e(e){var t=void 0===e?{}:e,n=t.runtime,r=t.name,i=t.moduleUrl,o=t.prefix,s=t.isHost,a=t.constConstructor,c=t.diDeps;this.runtime=n,this.name=r,this.moduleUrl=i,this.prefix=o,this.isHost=u.normalizeBool(s),this.constConstructor=a,this.diDeps=u.normalizeBlank(c)}return e.fromJson=function(t){return new e({name:t.name,moduleUrl:t.moduleUrl,prefix:t.prefix,isHost:t.isHost,constConstructor:t.constConstructor,diDeps:i(t.diDeps,P.fromJson)})},Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.toJson=function(){return{"class":"Type",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,isHost:this.isHost,constConstructor:this.constConstructor,diDeps:o(this.diDeps)}},e}();t.CompileTypeMetadata=R;var E=function(){function e(e){var t=void 0===e?{}:e,n=t.selectors,r=t.descendants,i=t.first,o=t.propertyName;this.selectors=n,this.descendants=r,this.first=u.normalizeBool(i),this.propertyName=o}return e.fromJson=function(t){return new e({selectors:i(t.selectors,b.fromJson),descendants:t.descendants,first:t.first,propertyName:t.propertyName})},e.prototype.toJson=function(){return{selectors:o(this.selectors),descendants:this.descendants,first:this.first,propertyName:this.propertyName}},e}();t.CompileQueryMetadata=E;var O=function(){function e(e){var t=void 0===e?{}:e,n=t.encapsulation,r=t.template,i=t.templateUrl,o=t.styles,s=t.styleUrls,a=t.ngContentSelectors;this.encapsulation=u.isPresent(n)?n:f.ViewEncapsulation.Emulated,this.template=r,this.templateUrl=i,this.styles=u.isPresent(o)?o:[],this.styleUrls=u.isPresent(s)?s:[],this.ngContentSelectors=u.isPresent(a)?a:[]}return e.fromJson=function(t){return new e({encapsulation:u.isPresent(t.encapsulation)?f.VIEW_ENCAPSULATION_VALUES[t.encapsulation]:t.encapsulation,template:t.template,templateUrl:t.templateUrl,styles:t.styles,styleUrls:t.styleUrls,ngContentSelectors:t.ngContentSelectors})},e.prototype.toJson=function(){return{encapsulation:u.isPresent(this.encapsulation)?u.serializeEnum(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},e}();t.CompileTemplateMetadata=O;var S=function(){function e(e){var t=void 0===e?{}:e,n=t.type,r=t.isComponent,i=t.dynamicLoadable,o=t.selector,s=t.exportAs,a=t.changeDetection,c=t.inputs,p=t.outputs,l=t.hostListeners,h=t.hostProperties,f=t.hostAttributes,d=t.lifecycleHooks,y=t.providers,v=t.viewProviders,g=t.queries,m=t.viewQueries,_=t.template;this.type=n,this.isComponent=r,this.dynamicLoadable=i,this.selector=o,this.exportAs=s,this.changeDetection=a,this.inputs=c,this.outputs=p,this.hostListeners=l,this.hostProperties=h,this.hostAttributes=f,this.lifecycleHooks=d,this.providers=u.normalizeBlank(y),this.viewProviders=u.normalizeBlank(v),this.queries=g,this.viewQueries=m,this.template=_}return e.create=function(t){var n=void 0===t?{}:t,r=n.type,i=n.isComponent,o=n.dynamicLoadable,s=n.selector,a=n.exportAs,c=n.changeDetection,p=n.inputs,h=n.outputs,f=n.host,d=n.lifecycleHooks,v=n.providers,m=n.viewProviders,_=n.queries,b=n.viewQueries,P=n.template,C={},w={},R={};u.isPresent(f)&&l.StringMapWrapper.forEach(f,function(e,t){var n=u.RegExpWrapper.firstMatch(g,t);u.isBlank(n)?R[t]=e:u.isPresent(n[1])?w[n[1]]=e:u.isPresent(n[2])&&(C[n[2]]=e)});var E={};u.isPresent(p)&&p.forEach(function(e){var t=y.splitAtColon(e,[e,e]);E[t[0]]=t[1]});var O={};return u.isPresent(h)&&h.forEach(function(e){var t=y.splitAtColon(e,[e,e]);O[t[0]]=t[1]}),new e({type:r,isComponent:u.normalizeBool(i),dynamicLoadable:u.normalizeBool(o),selector:s,exportAs:a,changeDetection:c,inputs:E,outputs:O,hostListeners:C,hostProperties:w,hostAttributes:R,lifecycleHooks:u.isPresent(d)?d:[],providers:v,viewProviders:m,queries:_,viewQueries:b,template:P})},Object.defineProperty(e.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),e.fromJson=function(t){return new e({isComponent:t.isComponent,dynamicLoadable:t.dynamicLoadable,selector:t.selector,exportAs:t.exportAs,type:u.isPresent(t.type)?R.fromJson(t.type):t.type,changeDetection:u.isPresent(t.changeDetection)?h.CHANGE_DETECTION_STRATEGY_VALUES[t.changeDetection]:t.changeDetection,inputs:t.inputs,outputs:t.outputs,hostListeners:t.hostListeners,hostProperties:t.hostProperties,hostAttributes:t.hostAttributes,lifecycleHooks:t.lifecycleHooks.map(function(e){return v.LIFECYCLE_HOOKS_VALUES[e]}),template:u.isPresent(t.template)?O.fromJson(t.template):t.template,providers:i(t.providers,C.fromJson)})},e.prototype.toJson=function(){return{"class":"Directive",isComponent:this.isComponent,dynamicLoadable:this.dynamicLoadable,selector:this.selector,exportAs:this.exportAs,type:u.isPresent(this.type)?this.type.toJson():this.type,changeDetection:u.isPresent(this.changeDetection)?u.serializeEnum(this.changeDetection):this.changeDetection,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,lifecycleHooks:this.lifecycleHooks.map(function(e){return u.serializeEnum(e)}),template:u.isPresent(this.template)?this.template.toJson():this.template,providers:o(this.providers)}},e}();t.CompileDirectiveMetadata=S,t.createHostComponentMeta=r;var A=function(){function e(e){var t=void 0===e?{}:e,n=t.type,r=t.name,i=t.pure;this.type=n,this.name=r,this.pure=u.normalizeBool(i)}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),e.fromJson=function(t){return new e({type:u.isPresent(t.type)?R.fromJson(t.type):t.type,name:t.name,pure:t.pure})},e.prototype.toJson=function(){return{"class":"Pipe",type:u.isPresent(this.type)?this.type.toJson():null,name:this.name,pure:this.pure}},e}();t.CompilePipeMetadata=A;var D={Directive:S.fromJson,Pipe:A.fromJson,Type:R.fromJson,Identifier:b.fromJson}},function(e,t,n){var r=n(12),i=n(5),o=n(14),s="",a=i.RegExpWrapper.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),c=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){for(var n,s=[],c=function(e,t){t.notSelectors.length>0&&i.isBlank(t.element)&&r.ListWrapper.isEmpty(t.classNames)&&r.ListWrapper.isEmpty(t.attrs)&&(t.element="*"),e.push(t)},u=new e,p=i.RegExpWrapper.matcher(a,t),l=u,h=!1;i.isPresent(n=i.RegExpMatcherWrapper.next(p));){if(i.isPresent(n[1])){if(h)throw new o.BaseException("Nesting :not is not allowed in a selector");h=!0,l=new e,u.notSelectors.push(l)}if(i.isPresent(n[2])&&l.setElement(n[2]),i.isPresent(n[3])&&l.addClassName(n[3]),i.isPresent(n[4])&&l.addAttribute(n[4],n[5]),i.isPresent(n[6])&&(h=!1,l=u),i.isPresent(n[7])){if(h)throw new o.BaseException("Multiple selectors in :not are not supported");c(s,u),u=l=new e}}return c(s,u),s},e.prototype.isElementSelector=function(){return i.isPresent(this.element)&&r.ListWrapper.isEmpty(this.classNames)&&r.ListWrapper.isEmpty(this.attrs)&&0===this.notSelectors.length},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=i.isPresent(this.element)?this.element:"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r"},e.prototype.addAttribute=function(e,t){void 0===t&&(t=s),this.attrs.push(e),t=i.isPresent(t)?t.toLowerCase():s,this.attrs.push(t)},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e="";if(i.isPresent(this.element)&&(e+=this.element),i.isPresent(this.classNames))for(var t=0;t0&&(e+="="+r),e+="]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},e}();t.CssSelector=c;var u=function(){function e(){this._elementMap=new r.Map,this._elementPartialMap=new r.Map,this._classMap=new r.Map,this._classPartialMap=new r.Map,this._attrValueMap=new r.Map,this._attrValuePartialMap=new r.Map,this._listContexts=[]}return e.createNotMatcher=function(t){var n=new e;return n.addSelectables(t,null),n},e.prototype.addSelectables=function(e,t){var n=null;e.length>1&&(n=new p(e),this._listContexts.push(n));for(var r=0;r0&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)){var r=u.createNotMatcher(this.notSelectors);n=!r.match(e,null)}return n&&i.isPresent(t)&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)&&(i.isPresent(this.listContext)&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n},e}();t.SelectorContext=l},function(e,t,n){function r(e){return P.StringWrapper.replaceAllMapped(e,C,function(e){return"-"+e[1].toLowerCase()})}function i(e){return P.StringWrapper.replaceAllMapped(e,w,function(e){return e[1].toUpperCase()})}function o(e){return P.isBlank(e)?null:"'"+a(e,R)+"'"}function s(e){return P.isBlank(e)?null:'"'+a(e,E)+'"'}function a(e,t){return P.StringWrapper.replaceAllMapped(e,t,function(e){return"$"==e[0]?P.IS_DART?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]})}function c(e){return P.IS_DART?"const "+e+" = ":"var "+e+" = exports['"+e+"'] = "}function u(e){return P.IS_DART?"const "+e:"new "+e}function p(e,t,n){return void 0===n&&(n=""),P.IS_DART?l(e,n)+" => "+t:l(e,n)+" { return "+t+"; }"}function l(e,t){return void 0===t&&(t=""),P.IS_DART?t+"("+e.join(",")+")":"function "+t+"("+e.join(",")+")"}function h(e){return P.IS_DART?"'${"+e+"}'":e}function f(e,t){var n=P.StringWrapper.split(e.trim(),/\s*:\s*/g);return n.length>1?n:t}function d(e){return e instanceof S?e.expression:P.isString(e)?o(e):P.isBlank(e)?"null":""+e}function y(e){return"["+e.map(d).join(",")+"]"}function v(e){for(var t="([",n=!0,r=P.IS_DART?".addAll":"concat",i=0;i0||this.outputs.length>0||this.exportAsVars.length>0||this.directives.length>0},e.prototype.getComponent=function(){return this.directives.length>0&&this.directives[0].directive.isComponent?this.directives[0].directive:null},e}();t.ElementAst=l;var h=function(){function e(e,t,n,r,i,o,s){this.attrs=e,this.outputs=t,this.vars=n,this.directives=r,this.children=i,this.ngContentIndex=o,this.sourceSpan=s}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e}();t.EmbeddedTemplateAst=h;var f=function(){function e(e,t,n,r){this.directiveName=e,this.templateName=t,this.value=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},e}();t.BoundDirectivePropertyAst=f;var d=function(){function e(e,t,n,r,i,o){this.directive=e,this.inputs=t,this.hostProperties=n,this.hostEvents=r,this.exportAsVars=i,this.sourceSpan=o}return e.prototype.visit=function(e,t){return e.visitDirective(this,t)},e}();t.DirectiveAst=d;var y=function(){function e(e,t,n){this.index=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e}();t.NgContentAst=y,function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style"}(t.PropertyBindingType||(t.PropertyBindingType={}));t.PropertyBindingType;t.templateVisitAll=r},function(e,t,n){function r(e){return"#MODULE["+e+"]"}var i=n(5),o=/#MODULE\[([^\]]*)\]/g;t.moduleRef=r;var s=function(){function e(e,t){this.moduleUrl=e,this.sourceWithModuleRefs=t}return e.getSourceWithoutImports=function(e){return i.StringWrapper.replaceAllMapped(e,o,function(e){return""})},e.prototype.getSourceWithImports=function(){var e=this,t={},n=[],r=i.StringWrapper.replaceAllMapped(this.sourceWithModuleRefs,o,function(r){var o=r[1],s=t[o];return i.isBlank(s)&&(o==e.moduleUrl?s="":(s="import"+n.length,n.push([o,s])),t[o]=s),s.length>0?s+".":""});return new u(r,n)},e}();t.SourceModule=s;var a=function(){function e(e,t){this.declarations=e,this.expression=t}return e}();t.SourceExpression=a;var c=function(){function e(e,t){this.declarations=e,this.expressions=t}return e}();t.SourceExpressions=c;var u=function(){function e(e,t){this.source=e,this.imports=t}return e}();t.SourceWithImports=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(172),s=n(71),a=n(44),c=n(39),u=n(37),p=n(174),l=n(5),h=n(26),f=n(175),d=n(169),y=n(6),v="AbstractChangeDetector",g="ChangeDetectionUtil",m="ChangeDetectorState";t.CHANGE_DETECTION_JIT_IMPORTS=l.CONST_EXPR({AbstractChangeDetector:a.AbstractChangeDetector,ChangeDetectionUtil:c.ChangeDetectionUtil,ChangeDetectorState:u.ChangeDetectorState});var _=o.moduleRef("package:angular2/src/core/change_detection/abstract_change_detector"+d.MODULE_SUFFIX),b=o.moduleRef("package:angular2/src/core/change_detection/change_detection_util"+d.MODULE_SUFFIX),P=o.moduleRef("package:angular2/src/core/change_detection/pregen_proto_change_detector"+d.MODULE_SUFFIX),C=o.moduleRef("package:angular2/src/core/change_detection/constants"+d.MODULE_SUFFIX),w=function(){function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,n){var r=this,i=p.createChangeDetectorDefinitions(e,t,this._genConfig,n);return i.map(function(e){return r._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){var t=new h.DynamicProtoChangeDetector(e);return function(){return t.instantiate()}},e.prototype.compileComponentCodeGen=function(e,t,n){var r=p.createChangeDetectorDefinitions(e,t,this._genConfig,n),i=[],a=0,c=r.map(function(t){var n,r;if(l.IS_DART){n=new f.Codegen(P);var c="_"+t.id,u=0===a&&e.isHost?"dynamic":""+o.moduleRef(e.moduleUrl)+e.name;n.generate(u,c,t),i.push(c+".newChangeDetector"),r=n.toString()}else n=new s.ChangeDetectorJITGenerator(t,""+b+g,""+_+v,""+C+m),i.push("function() { return new "+n.typeName+"(); }"),r=n.generateSource();return a++,r});return new o.SourceExpressions(c,i)},e=r([y.Injectable(),i("design:paramtypes",[h.ChangeDetectorGenConfig])],e)}();t.ChangeDetectionCompiler=w},function(e,t,n){function r(e,t,n,r){var o=[],s=new h(null,o,t);return p.templateVisitAll(s,r),i(o,e,n)}function i(e,t,n){var r=o(e);return e.map(function(e){var i=t.name+"_"+e.viewIndex;return new u.ChangeDetectorDefinition(i,e.strategy,r[e.viewIndex],e.bindingRecords,e.eventRecords,e.directiveRecords,n)})}function o(e){var t=s.ListWrapper.createFixedSize(e.length);return e.forEach(function(e){var n=a.isPresent(e.parent)?t[e.parent.viewIndex]:[];t[e.viewIndex]=n.concat(e.variableNames)}),t}var s=n(12),a=n(5),c=n(17),u=n(26),p=n(171),l=n(170);t.createChangeDetectorDefinitions=r;var h=function(){function e(e,t,n){this.parent=e,this.allVisitors=t,this.strategy=n,this.nodeCount=0,this.boundElementCount=0,this.variableNames=[],this.bindingRecords=[],this.eventRecords=[],this.directiveRecords=[],this.viewIndex=t.length,t.push(this)}return e.prototype.visitEmbeddedTemplate=function(t,n){this.nodeCount++,this.boundElementCount++,p.templateVisitAll(this,t.outputs);for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(172),s=n(75),a=n(163),c=n(5),u=n(48),p=n(177),l=n(162),h=n(178),f=n(169),d=n(6),y="%COMP%",v="_nghost-"+y,g="_ngcontent-"+y,m=function(){function e(e,t){this._xhr=e,this._urlResolver=t,this._styleCache=new Map,this._shadowCss=new p.ShadowCss}return e.prototype.compileComponentRuntime=function(e){var t=e.styles,n=e.styleUrls;return this._loadStyles(t,n,e.encapsulation===s.ViewEncapsulation.Emulated)},e.prototype.compileComponentCodeGen=function(e){var t=e.encapsulation===s.ViewEncapsulation.Emulated;return this._styleCodeGen(e.styles,e.styleUrls,t)},e.prototype.compileStylesheetCodeGen=function(e,t){var n=h.extractStyleUrls(this._urlResolver,e,t);return[this._styleModule(e,!1,this._styleCodeGen([n.style],n.styleUrls,!1)),this._styleModule(e,!0,this._styleCodeGen([n.style],n.styleUrls,!0))]},e.prototype.clearCache=function(){this._styleCache.clear()},e.prototype._loadStyles=function(e,t,n){ var r=this,i=t.map(function(e){var t=""+e+(n?".shim":""),i=r._styleCache.get(t);return c.isBlank(i)&&(i=r._xhr.get(e).then(function(t){var i=h.extractStyleUrls(r._urlResolver,e,t);return r._loadStyles([i.style],i.styleUrls,n)}),r._styleCache.set(t,i)),i});return u.PromiseWrapper.all(i).then(function(t){var i=e.map(function(e){return r._shimIfNeeded(e,n)});return t.forEach(function(e){return i.push(e)}),i})},e.prototype._styleCodeGen=function(e,t,n){for(var r=this,i=c.IS_DART?"const":"",s=e.map(function(e){return f.escapeSingleQuoteString(r._shimIfNeeded(e,n))}),a=0;a0?o.push(c):(o.length>0&&(r.push(o.join("")),n.push(D),o=[]),n.push(c)),c==S&&i++}return o.length>0&&(r.push(o.join("")),n.push(D)),new T(n.join(""),r)}var s=n(12),a=n(5),c=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){return void 0===n&&(n=""),e=r(e),e=this._insertDirectives(e),this._scopeCssText(e,t,n)},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return a.StringWrapper.replaceAllMapped(e,u,function(e){return e[1]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return a.StringWrapper.replaceAllMapped(e,p,function(e){var t=e[0];return t=a.StringWrapper.replace(t,e[1],""),t=a.StringWrapper.replace(t,e[2],""),e[3]+t})},e.prototype._scopeCssText=function(e,t,n){var r=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),a.isPresent(t)&&(e=this._scopeSelectors(e,t,n)),e=e+"\n"+r,e.trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){for(var t,n="",r=a.RegExpWrapper.matcher(l,e);a.isPresent(t=a.RegExpMatcherWrapper.next(r));){var i=t[0];i=a.StringWrapper.replace(i,t[2],""),i=a.StringWrapper.replace(i,t[1],t[3]),n+=i+"\n\n"}return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,y,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,v,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return a.StringWrapper.replaceAllMapped(e,t,function(e){if(a.isPresent(e[2])){for(var t=e[2].split(","),r=[],i=0;i","+","~"],i=e,o="["+t+"]",c=0;c0&&!s.ListWrapper.contains(r,t)&&!a.StringWrapper.contains(t,o)){var n=/([^:]*)(:*)(.*)/g,i=a.RegExpWrapper.firstMatch(n,t);a.isPresent(i)&&(e=i[1]+o+i[2]+i[3])}return e}).join(u)}return i},e.prototype._insertPolyfillHostInCssText=function(e){return e=a.StringWrapper.replaceAll(e,w,f),e=a.StringWrapper.replaceAll(e,C,h)},e}();t.ShadowCss=c;var u=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,p=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,l=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,h="-shadowcsshost",f="-shadowcsscontext",d=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",y=a.RegExpWrapper.create("("+h+d,"im"),v=a.RegExpWrapper.create("("+f+d,"im"),g=h+"-no-combinator",m=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],_=/(?:>>>)|(?:\/deep\/)/g,b="([>\\s~+[.,{:][\\s\\S]*)?$",P=a.RegExpWrapper.create(h,"im"),C=/:host/gim,w=/:host-context/gim,R=/\/\*[\s\S]*?\*\//g,E=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,O=/([{}])/g,S="{",A="}",D="%BLOCK%",x=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=x,t.processRules=i;var T=function(){function e(e,t){this.escapedString=e,this.blocks=t}return e}()},function(e,t,n){function r(e){if(o.isBlank(e)||0===e.length||"/"==e[0])return!1;var t=o.RegExpWrapper.firstMatch(c,e);return o.isBlank(t)||"package"==t[1]||"asset"==t[1]}function i(e,t,n){var i=[],c=o.StringWrapper.replaceAllMapped(n,a,function(n){var s=o.isPresent(n[1])?n[1]:n[2];return r(s)?(i.push(e.resolve(t,s)),""):n[0]});return new s(c,i)}var o=n(5),s=function(){function e(e,t){this.style=e,this.styleUrls=t}return e}();t.StyleWithImports=s,t.isStyleUrlResolvable=r,t.extractStyleUrls=i;var a=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,c=/^([a-zA-Z\-\+\.]+):/g},function(e,t,n){function r(e,t,n){return v.codeGenValueFn(["event"],e.expression+".triggerEventHandlers("+v.escapeValue(n)+", event, "+t+")")}function i(e,t){return"viewFactory_"+e.type.name+t}function o(e){return c.IS_DART?""+m.METADATA_MODULE_REF+e:""+e}var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(12),p=n(171),l=n(172),h=n(86),f=n(88),d=n(87),y=n(75),v=n(169),g=n(6),m=n(180);t.VIEW_JIT_IMPORTS=c.CONST_EXPR({AppView:h.AppView,AppElement:d.AppElement,flattenNestedViewRenderNodes:h.flattenNestedViewRenderNodes,checkSlotCount:h.checkSlotCount});var _=function(){function e(){}return e.prototype.compileComponentRuntime=function(e,t,n,r,i,o){var s=new P(e,n,r,i,o);return s.createViewFactory(t,0,[])},e.prototype.compileComponentCodeGen=function(e,t,n,r,i,o){var s=new b(e,n,r,i,o),a=[],c=s.createViewFactory(t,0,a);return new l.SourceExpression(a.map(function(e){return e.statement}),c.expression)},e=s([g.Injectable(),a("design:paramtypes",[])],e)}();t.ViewCompiler=_;var b=function(){function e(e,t,n,r,i){this.component=e,this.styles=t,this.protoViews=n,this.changeDetectorExpressions=r,this.componentViewFactory=i,this._nextVarId=0}return e.prototype._nextVar=function(e){return""+e+this._nextVarId++ +"_"+this.component.type.name},e.prototype._nextRenderVar=function(){return this._nextVar("render")},e.prototype._nextAppVar=function(){return this._nextVar("app")},e.prototype._nextDisposableVar=function(){return"disposable"+this._nextVarId++ +"_"+this.component.type.name},e.prototype.createText=function(e,t,n,r){var i=this._nextRenderVar(),o="var "+i+" = "+e.expression+".createText("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+");";return r.push(new v.Statement(o)),new v.Expression(i)},e.prototype.createElement=function(e,t,n,r,i){var o,s=this._nextRenderVar();o=c.isPresent(r)?r.expression+" == null ?\n "+e.expression+".createElement("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+") :\n "+e.expression+".selectRootElement("+r.expression+");":e.expression+".createElement("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+")";var a="var "+s+" = "+o+";";return i.push(new v.Statement(a)),new v.Expression(s)},e.prototype.createTemplateAnchor=function(e,t,n){var r=this._nextRenderVar(),i=e.expression+".createTemplateAnchor("+(c.isPresent(t)?t.expression:null)+");";return n.push(new v.Statement("var "+r+" = "+i)),new v.Expression(r)},e.prototype.createGlobalEventListener=function(e,t,n,i,o){var s=this._nextDisposableVar(),a=r(t,n,i.fullName);return o.push(new v.Statement("var "+s+" = "+e.expression+".listenGlobal("+v.escapeValue(i.target)+", "+v.escapeValue(i.name)+", "+a+");")),new v.Expression(s)},e.prototype.createElementEventListener=function(e,t,n,i,o,s){var a=this._nextDisposableVar(),c=r(t,n,o.fullName);return s.push(new v.Statement("var "+a+" = "+e.expression+".listen("+i.expression+", "+v.escapeValue(o.name)+", "+c+");")),new v.Expression(a)},e.prototype.setElementAttribute=function(e,t,n,r,i){i.push(new v.Statement(e.expression+".setElementAttribute("+t.expression+", "+v.escapeSingleQuoteString(n)+", "+v.escapeSingleQuoteString(r)+");"))},e.prototype.createAppElement=function(e,t,n,r,i,o){var s=this._nextAppVar(),a="new "+m.APP_EL_MODULE_REF+"AppElement("+e.expression+", "+t.expression+",\n "+(c.isPresent(r)?r.expression:null)+", "+n.expression+", "+(c.isPresent(i)?i.expression:null)+")";return o.push(new v.Statement("var "+s+" = "+a+";")),new v.Expression(s)},e.prototype.createAndSetComponentView=function(e,t,n,r,i,o,s){var a;a=this.component.type.isHost?n.expression+".projectableNodes":"["+o.map(function(e){return v.codeGenFlatArray(e)}).join(",")+"]",s.push(new v.Statement(this.componentViewFactory(i)+"("+e.expression+", "+t.expression+", "+r.expression+", "+a+", null, null, null);"))},e.prototype.getProjectedNodes=function(e,t){return new v.Expression(e.expression+"["+t+"]",!0)},e.prototype.appendProjectedNodes=function(e,t,n,r){r.push(new v.Statement(e.expression+".projectNodes("+t.expression+", "+m.APP_VIEW_MODULE_REF+"flattenNestedViewRenderNodes("+n.expression+"));"))},e.prototype.createViewFactory=function(e,t,n){var r=this.protoViews[t],s=this.component.type.isHost,a=0===t&&!s,c=new w(new v.Expression("renderer"),new v.Expression("viewManager"),new v.Expression("projectableNodes"),s?new v.Expression("rootSelector"):null,new v.Expression("view"),r,n,this);p.templateVisitAll(c,e,new C(a?new v.Expression("parentRenderNode"):null,null,null));var u=r.protoView.expression,l=i(this.component,t),h=this.changeDetectorExpressions.expressions[t],f=["parentRenderer","viewManager","containerEl","projectableNodes","rootSelector","dynamicallyCreatedProviders","rootInjector"],d=[],y="parentRenderer";if(0===t){var g=this._nextVar("renderType");n.push(new v.Statement("var "+g+" = null;"));var _=this._nextVar("styles");n.push(new v.Statement(v.CONST_VAR+" "+_+" = "+this.styles.expression+";"));var b=this.component.template.encapsulation;d.push("if ("+g+" == null) {\n "+g+" = viewManager.createRenderComponentType("+o(b)+", "+_+");\n }"),y="parentRenderer.renderComponent("+g+")"}var P="\n"+v.codeGenFnHeader(f,l)+"{\n "+d.join("\n")+"\n var renderer = "+y+";\n var view = new "+m.APP_VIEW_MODULE_REF+"AppView(\n "+u+", renderer, viewManager,\n projectableNodes,\n containerEl,\n dynamicallyCreatedProviders, rootInjector,\n "+h+"()\n );\n "+m.APP_VIEW_MODULE_REF+"checkSlotCount("+v.escapeValue(this.component.type.name)+", "+this.component.template.ngContentSelectors.length+", projectableNodes);\n "+(a?"var parentRenderNode = renderer.createViewRoot(view.containerAppElement.nativeElement);":"")+"\n "+c.renderStmts.map(function(e){return e.statement}).join("\n")+"\n "+c.appStmts.map(function(e){return e.statement}).join("\n")+"\n\n view.init("+v.codeGenFlatArray(c.rootNodesOrAppElements)+", "+v.codeGenArray(c.renderNodes)+", "+v.codeGenArray(c.appDisposables)+",\n "+v.codeGenArray(c.appElements)+");\n return view;\n}";return n.push(new v.Statement(P)),new v.Expression(l)},e}(),P=function(){function e(e,t,n,r,i){this.component=e,this.styles=t,this.protoViews=n,this.changeDetectorFactories=r,this.componentViewFactory=i}return e.prototype.createText=function(e,t,n,r){return e.createText(t,n)},e.prototype.createElement=function(e,t,n,r,i){var o;return o=c.isPresent(r)?e.selectRootElement(r):e.createElement(t,n)},e.prototype.createTemplateAnchor=function(e,t,n){return e.createTemplateAnchor(t)},e.prototype.createGlobalEventListener=function(e,t,n,r,i){return e.listenGlobal(r.target,r.name,function(e){return t.triggerEventHandlers(r.fullName,e,n)})},e.prototype.createElementEventListener=function(e,t,n,r,i,o){return e.listen(r,i.name,function(e){return t.triggerEventHandlers(i.fullName,e,n)})},e.prototype.setElementAttribute=function(e,t,n,r,i){e.setElementAttribute(t,n,r)},e.prototype.createAppElement=function(e,t,n,r,i,o){return new d.AppElement(e,t,r,n,i)},e.prototype.createAndSetComponentView=function(e,t,n,r,i,o,s){var a;if(this.component.type.isHost)a=n.projectableNodes;else{a=u.ListWrapper.createFixedSize(o.length);for(var c=0;c0?b.ViewType.EMBEDDED:e.type.isHost?b.ViewType.HOST:b.ViewType.COMPONENT}var h=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},f=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},y=n(5),v=n(12),g=n(171),m=n(172),_=n(86),b=n(88),P=n(87),C=n(169),w=n(6);t.PROTO_VIEW_JIT_IMPORTS=y.CONST_EXPR({AppProtoView:_.AppProtoView,AppProtoElement:P.AppProtoElement,ViewType:b.ViewType}),t.APP_VIEW_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/view"+C.MODULE_SUFFIX),t.VIEW_TYPE_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/view_type"+C.MODULE_SUFFIX),t.APP_EL_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/element"+C.MODULE_SUFFIX),t.METADATA_MODULE_REF=m.moduleRef("package:angular2/src/core/metadata/view"+C.MODULE_SUFFIX);var R="$implicit",E="class",O="style",S=function(){function e(){}return e.prototype.compileProtoViewRuntime=function(e,t,n,r){var i=new N(e,t,r),o=[];return i.createCompileProtoView(n,[],[],o),new A([],o)},e.prototype.compileProtoViewCodeGen=function(e,t,n,r){var i=new I(e,t,r),o=[],s=[];return i.createCompileProtoView(n,[],s,o),new A(s.map(function(e){return e.statement}),o)},e=f([w.Injectable(),d("design:paramtypes",[])],e)}();t.ProtoViewCompiler=S;var A=function(){function e(e,t){this.declarations=e,this.protoViews=t}return e}();t.CompileProtoViews=A;var D=function(){function e(e,t,n){this.embeddedTemplateIndex=e,this.protoElements=t,this.protoView=n}return e}();t.CompileProtoView=D;var x=function(){function e(e,t,n,r,i,o,s){this.boundElementIndex=e,this.attrNameAndValues=t,this.variableNameAndValues=n,this.renderEvents=r,this.directives=i,this.embeddedTemplateIndex=o,this.appProtoEl=s}return e}();t.CompileProtoElement=x;var T=function(){function e(e){this.component=e}return e.prototype.createCompileProtoView=function(e,t,n,r){var i=r.length;r.push(null);var o=new k(this,n,r);g.templateVisitAll(o,e);var s=l(this.component,i),a=this.createAppProtoView(i,s,t,n),c=new D(i,o.protoElements,a);return r[i]=c,c},e}(),I=function(e){function n(t,n,r){e.call(this,n),this.resolvedMetadataCacheExpr=t,this.pipes=r,this._nextVarId=0}return h(n,e),n.prototype._nextProtoViewVar=function(e){return"appProtoView"+this._nextVarId++ +"_"+this.component.type.name+e},n.prototype.createAppProtoView=function(e,n,r,i){var o=this._nextProtoViewVar(e),s=u(n),a=0===e?c(this.pipes.map(function(e){return e.type})):null,p="var "+o+" = "+t.APP_VIEW_MODULE_REF+"AppProtoView.create("+this.resolvedMetadataCacheExpr.expression+", "+s+", "+a+", "+C.codeGenStringMap(r)+");";return i.push(new C.Statement(p)),new C.Expression(o)},n.prototype.createAppProtoElement=function(e,n,r,i,o){var s="appProtoEl"+this._nextVarId++ +"_"+this.component.type.name,c=t.APP_EL_MODULE_REF+"AppProtoElement.create(\n "+this.resolvedMetadataCacheExpr.expression+",\n "+e+",\n "+C.codeGenStringMap(n)+",\n "+a(i)+",\n "+C.codeGenStringMap(r)+"\n )",u="var "+s+" = "+c+";";return o.push(new C.Statement(u)),new C.Expression(s)},n}(T),N=function(e){function t(t,n,r){e.call(this,n),this.metadataCache=t,this.pipes=r}return h(t,e),t.prototype.createAppProtoView=function(e,t,n,r){var i=0===e?this.pipes.map(function(e){return e.type.runtime}):[],o=s(n);return _.AppProtoView.create(this.metadataCache,t,i,o)},t.prototype.createAppProtoElement=function(e,t,n,r,i){var o=s(t);return P.AppProtoElement.create(this.metadataCache,e,o,r.map(function(e){return e.type.runtime}),s(n))},t}(T),k=function(){function e(e,t,n){this.factory=e,this.allStatements=t,this.allProtoViews=n,this.protoElements=[],this.boundElementCount=0}return e.prototype._readAttrNameAndValues=function(e,t){var n=r(this,t,{});return e.forEach(function(e){v.StringMapWrapper.forEach(e.hostAttributes,function(e,t){var r=n[t];n[t]=y.isPresent(r)?o(t,r,e):e})}),i(n)},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,i=null;e.isBound()&&(i=this.boundElementCount++);var o=e.getComponent(),s=[];y.isBlank(o)&&e.exportAsVars.forEach(function(e){s.push([e.name,null])});var a=[],c=r(this,e.outputs,new Map);v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,i,c,s,a))});var u=[];c.forEach(function(e,t){return u.push(e)});var p=this._readAttrNameAndValues(a,e.attrs);return this._addProtoElement(e.isBound(),i,p,s,u,a,null),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){var n=this,r=this.boundElementCount++,i=[];v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,r,new Map,[],i))});var o=this._readAttrNameAndValues(i,e.attrs),s=e.vars.map(function(e){return[e.value.length>0?e.value:R,e.name]}),a=this.factory.createCompileProtoView(e.children,s,this.allStatements,this.allProtoViews);return this._addProtoElement(!0,r,o,[],[],i,a.embeddedTemplateIndex),null},e.prototype._addProtoElement=function(e,t,n,r,i,o,s){var a=null;e&&(a=this.factory.createAppProtoElement(t,n,r,o,this.allStatements));var c=new x(t,n,r,i,o,s,a);this.protoElements.push(c)},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t[e.name]=e.value,null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),g.templateVisitAll(this,e.hostEvents,t.hostEventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push([e.name,t.index])}),null},e.prototype.visitEvent=function(e,t){return t.set(e.fullName,e),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),M=function(){function e(e,t,n,r,i){this.index=e,this.boundElementIndex=t,this.hostEventTargetAndNames=n,this.targetVariableNameAndValues=r,this.targetDirectives=i}return e}()},function(e,t,n){function r(e){return p.StringWrapper.split(e.trim(),/\s+/g)}function i(e,t){var n=new b.CssSelector,i=v.splitNsName(e)[1];n.setElement(i);for(var o=0;oo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},u=n(12),p=n(5),l=n(2),h=n(5),f=n(14),d=n(26),y=n(182),v=n(186),g=n(185),m=n(31),_=n(171),b=n(168),P=n(187),C=n(188),w=n(178),R=n(183),E=n(169),O=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,S="template",A="template",D="*",x="class",T=".",I="attr",N="class",k="style",M=b.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new l.OpaqueToken("TemplateTransforms"));var V=function(e){function t(t,n){e.call(this,n,t)}return o(t,e),t}(g.ParseError);t.TemplateParseError=V;var j=function(){function e(e,t,n,r){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=n,this.transforms=r}return e.prototype.parse=function(e,t,n,r){var i=new B(t,n,this._exprParser,this._schemaRegistry),o=this._htmlParser.parse(e,r),s=R.htmlVisitAll(i,o.rootNodes,U),a=o.errors.concat(i.errors);if(a.length>0){var c=a.join("\n");throw new f.BaseException("Template parse errors:\n"+c)}return p.isPresent(this.transforms)&&this.transforms.forEach(function(e){s=_.templateVisitAll(e,s)}),s},e=s([l.Injectable(),c(3,l.Optional()),c(3,l.Inject(t.TEMPLATE_TRANSFORMS)),a("design:paramtypes",[d.Parser,P.ElementSchemaRegistry,y.HtmlParser,Array])],e)}();t.TemplateParser=j;var B=function(){function e(e,t,n,r){var i=this;this._exprParser=n,this._schemaRegistry=r,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new b.SelectorMatcher,u.ListWrapper.forEachWithIndex(e,function(e,t){var n=b.CssSelector.parse(e.selector);i.selectorMatcher.addSelectables(n,e),i.directivesIndex.set(e,t)}),this.pipesByName=new Map,t.forEach(function(e){return i.pipesByName.set(e.name,e)})}return e.prototype._reportError=function(e,t){this.errors.push(new V(e,t))},e.prototype._parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseAction=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseAction(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseBinding=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseBinding(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseTemplateBindings=function(e,t){var n=this,r=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,r);return i.forEach(function(e){p.isPresent(e.expression)&&n._checkPipes(e.expression,t)}),i}catch(o){return this._reportError(""+o,t),[]}},e.prototype._checkPipes=function(e,t){var n=this;if(p.isPresent(e)){var r=new q;e.visit(r),r.pipes.forEach(function(e){n.pipesByName.has(e)||n._reportError("The pipe '"+e+"' could not be found",t)})}},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(M),r=this._parseInterpolation(e.value,e.sourceSpan);return p.isPresent(r)?new _.BoundTextAst(r,n,e.sourceSpan):new _.TextAst(e.value,n,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new _.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,r=e.name,o=C.preparseElement(e);if(o.type===C.PreparsedElementType.SCRIPT||o.type===C.PreparsedElementType.STYLE)return null;if(o.type===C.PreparsedElementType.STYLESHEET&&w.isStyleUrlResolvable(o.hrefAttr))return null;var s=[],a=[],c=[],u=[],l=[],h=[],f=[],d=!1,y=[];e.attrs.forEach(function(e){var t=n._parseAttr(e,s,a,u,c),r=n._parseInlineTemplateBinding(e,f,l,h);t||r||(y.push(n.visitAttr(e,null)),s.push([e.name,e.value])),r&&(d=!0)});var g,m=v.splitNsName(r.toLowerCase())[1],P=m==S,E=i(r,s),O=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,E),a,P?[]:c,e.sourceSpan),A=this._createElementPropertyAsts(e.name,a,O),D=R.htmlVisitAll(o.nonBindable?H:this,e.children,W.create(O)),x=p.isPresent(o.projectAs)?b.CssSelector.parse(o.projectAs)[0]:E,T=t.findNgContentIndex(x); if(o.type===C.PreparsedElementType.NG_CONTENT)p.isPresent(e.children)&&e.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",e.sourceSpan),g=new _.NgContentAst(this.ngContentCount++,d?null:T,e.sourceSpan);else if(P)this._assertAllEventsPublishedByDirectives(O,u),this._assertNoComponentsNorElementBindingsOnTemplate(O,A,e.sourceSpan),g=new _.EmbeddedTemplateAst(y,u,c,O,D,d?null:T,e.sourceSpan);else{this._assertOnlyOneComponent(O,e.sourceSpan);var I=c.filter(function(e){return 0===e.value.length}),N=d?null:t.findNgContentIndex(x);g=new _.ElementAst(r,y,A,u,I,O,D,d?null:N,e.sourceSpan)}if(d){var k=i(S,f),M=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,k),l,[],e.sourceSpan),V=this._createElementPropertyAsts(e.name,l,M);this._assertNoComponentsNorElementBindingsOnTemplate(M,V,e.sourceSpan),g=new _.EmbeddedTemplateAst([],[],h,M,[g],T,e.sourceSpan)}return g},e.prototype._parseInlineTemplateBinding=function(e,t,n,r){var i=null;if(e.name==A)i=e.value;else if(e.name.startsWith(D)){var o=e.name.substring(D.length);i=0==e.value.length?o:o+" "+e.value}if(p.isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new _.VariableAst(e,t,n))},e.prototype._parseProperty=function(e,t,n,r,i){this._parsePropertyAst(e,this._parseBinding(t,n),n,r,i)},e.prototype._parsePropertyInterpolation=function(e,t,n,r,i){var o=this._parseInterpolation(t,n);return p.isPresent(o)?(this._parsePropertyAst(e,o,n,r,i),!0):!1},e.prototype._parsePropertyAst=function(e,t,n,r,i){r.push([e,t.source]),i.push(new F(e,t,!1,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i){this._parseEvent(e+"Change",t+"=$event",n,r,i)},e.prototype._parseEvent=function(e,t,n,r,i){var o=E.splitAtColon(e,[null,e]),s=o[0],a=o[1],c=this._parseAction(t,n);r.push([e,c.source]),i.push(new _.BoundEventAst(a,s,c,n))},e.prototype._parseLiteralAttr=function(e,t,n,r){r.push(new F(e,this._exprParser.wrapLiteralPrimitive(t,""),!0,n))},e.prototype._parseDirectives=function(e,t){var n=this,r=[];return e.match(t,function(e,t){r.push(t)}),u.ListWrapper.sort(r,function(e,t){var r=e.isComponent,i=t.isComponent;return r&&!i?-1:!r&&i?1:n.directivesIndex.get(e)-n.directivesIndex.get(t)}),r},e.prototype._createDirectiveAsts=function(e,t,n,r,i){var o=this,s=new Set,a=t.map(function(t){var a=[],c=[],u=[];o._createDirectiveHostPropertyAsts(e,t.hostProperties,i,a),o._createDirectiveHostEventAsts(t.hostListeners,i,c),o._createDirectivePropertyAsts(t.inputs,n,u);var p=[];return r.forEach(function(e){(0===e.value.length&&t.isComponent||t.exportAs==e.value)&&(p.push(e),s.add(e.name))}),new _.DirectiveAst(t,u,a,c,p,i)});return r.forEach(function(e){e.value.length>0&&!u.SetWrapper.has(s,e.name)&&o._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan)}),a},e.prototype._createDirectiveHostPropertyAsts=function(e,t,n,r){var i=this;p.isPresent(t)&&u.StringMapWrapper.forEach(t,function(t,o){var s=i._parseBinding(t,n);r.push(i._createElementPropertyAst(e,o,s,n))})},e.prototype._createDirectiveHostEventAsts=function(e,t,n){var r=this;p.isPresent(e)&&u.StringMapWrapper.forEach(e,function(e,i){r._parseEvent(i,e,t,[],n)})},e.prototype._createDirectivePropertyAsts=function(e,t,n){if(p.isPresent(e)){var r=new Map;t.forEach(function(e){var t=r.get(e.name);(p.isBlank(t)||t.isLiteral)&&r.set(e.name,e)}),u.StringMapWrapper.forEach(e,function(e,t){var i=r.get(e);p.isPresent(i)&&n.push(new _.BoundDirectivePropertyAst(t,i.name,i.expression,i.sourceSpan))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[],o=new Map;return n.forEach(function(e){e.inputs.forEach(function(e){o.set(e.templateName,e)})}),t.forEach(function(t){!t.isLiteral&&p.isBlank(o.get(t.name))&&i.push(r._createElementPropertyAst(e,t.name,t.expression,t.sourceSpan))}),i},e.prototype._createElementPropertyAst=function(e,t,n,r){var i,o,s=null,a=t.split(T);if(1===a.length)o=this._schemaRegistry.getMappedPropName(a[0]),i=_.PropertyBindingType.Property,this._schemaRegistry.hasProperty(e,o)||this._reportError("Can't bind to '"+o+"' since it isn't a known native property",r);else if(a[0]==I){o=a[1];var c=o.indexOf(":");if(c>-1){var u=o.substring(0,c),p=o.substring(c+1);o=v.mergeNsAndName(u,p)}i=_.PropertyBindingType.Attribute}else a[0]==N?(o=a[1],i=_.PropertyBindingType.Class):a[0]==k?(s=a.length>2?a[2]:null,o=a[1],i=_.PropertyBindingType.Style):(this._reportError("Invalid property name '"+t+"'",r),i=null);return new _.BoundElementPropertyAst(o,i,n,s,r)},e.prototype._findComponentDirectiveNames=function(e){var t=[];return e.forEach(function(e){var n=e.directive.type.name;e.directive.isComponent&&t.push(n)}),t},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component: "+n.join(","),t)},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+" not used by any directive on an embedded template",n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){u.StringMapWrapper.forEach(e.directive.outputs,function(e,t){r.add(e)})}),t.forEach(function(e){(p.isPresent(e.target)||!u.SetWrapper.has(r,e.name))&&n._reportError("Event binding "+e.fullName+" not emitted by any directive on an embedded template",e.sourceSpan)})},e}(),L=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=C.preparseElement(e);if(n.type===C.PreparsedElementType.SCRIPT||n.type===C.PreparsedElementType.STYLE||n.type===C.PreparsedElementType.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),o=i(e.name,r),s=t.findNgContentIndex(o),a=R.htmlVisitAll(this,e.children,U);return new _.ElementAst(e.name,R.htmlVisitAll(this,e.attrs),[],[],[],[],a,s,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttr=function(e,t){return new _.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(M);return new _.TextAst(e.value,n,e.sourceSpan)},e}(),F=function(){function e(e,t,n,r){this.name=e,this.expression=t,this.isLiteral=n,this.sourceSpan=r}return e}();t.splitClasses=r;var W=function(){function e(e,t){this.ngContentIndexMatcher=e,this.wildcardNgContentIndex=t}return e.create=function(t){if(0===t.length||!t[0].directive.isComponent)return U;for(var n=new b.SelectorMatcher,r=t[0].directive.template.ngContentSelectors,i=null,o=0;o0?t[0]:null},e}(),U=new W(new b.SelectorMatcher,null),H=new L,q=function(e){function t(){e.apply(this,arguments),this.pipes=new Set}return o(t,e),t.prototype.visitPipe=function(e){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args),null},t}(m.RecursiveAstVisitor);t.PipeCollector=q},function(e,t,n){function r(e,t,n){return a.isBlank(e)&&(e=f.getHtmlTagDefinition(t).implicitNamespacePrefix,a.isBlank(e)&&a.isPresent(n)&&(e=f.getNsPrefix(n.name))),f.mergeNsAndName(e,t)}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=n(5),c=n(12),u=n(183),p=n(6),l=n(184),h=n(185),f=n(186),d=function(e){function t(t,n,r){e.call(this,n,r),this.elementName=t}return i(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(h.ParseError);t.HtmlTreeError=d;var y=function(){function e(e,t){this.rootNodes=e,this.errors=t}return e}();t.HtmlParseTreeResult=y;var v=function(){function e(){}return e.prototype.parse=function(e,t){var n=l.tokenizeHtml(e,t),r=new g(n.tokens).build();return new y(r.rootNodes,n.errors.concat(r.errors))},e=o([p.Injectable(),s("design:paramtypes",[])],e)}();t.HtmlParser=v;var g=function(){function e(e){this.tokens=e,this.index=-1,this.rootNodes=[],this.errors=[],this.elementStack=[],this._advance()}return e.prototype.build=function(){for(;this.peek.type!==l.HtmlTokenType.EOF;)this.peek.type===l.HtmlTokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===l.HtmlTokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===l.HtmlTokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===l.HtmlTokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===l.HtmlTokenType.TEXT||this.peek.type===l.HtmlTokenType.RAW_TEXT||this.peek.type===l.HtmlTokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._advance();return new y(this.rootNodes,this.errors)},e.prototype._advance=function(){var e=this.peek;return this.index0&&"\n"==t[0]){var n=this._getParentElement();a.isPresent(n)&&0==n.children.length&&f.getHtmlTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new u.HtmlTextAst(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var e=c.ListWrapper.last(this.elementStack);f.getHtmlTagDefinition(e.name).isVoid&&this.elementStack.pop()}},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],i=[];this.peek.type===l.HtmlTokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var o=r(t,n,this._getParentElement()),s=!1;this.peek.type===l.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),s=!0,null!=f.getNsPrefix(o)||f.getHtmlTagDefinition(o).isVoid||this.errors.push(d.create(o,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))):this.peek.type===l.HtmlTokenType.TAG_OPEN_END&&(this._advance(),s=!1);var a=this.peek.sourceSpan.start,c=new h.ParseSourceSpan(e.sourceSpan.start,a),p=new u.HtmlElementAst(o,i,[],c,c,null);this._pushElement(p),s&&(this._popElement(o),p.endSourceSpan=c)},e.prototype._pushElement=function(e){if(this.elementStack.length>0){var t=c.ListWrapper.last(this.elementStack);f.getHtmlTagDefinition(t.name).isClosedByChild(e.name)&&this.elementStack.pop()}var n=f.getHtmlTagDefinition(e.name),t=this._getParentElement();if(n.requireExtraParent(a.isPresent(t)?t.name:null)){var r=new u.HtmlElementAst(n.parentToAdd,[],[e],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._addToParent(r),this.elementStack.push(r),this.elementStack.push(e)}else this._addToParent(e),this.elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=r(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement().endSourceSpan=e.sourceSpan,f.getHtmlTagDefinition(t).isVoid?this.errors.push(d.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this.errors.push(d.create(t,e.sourceSpan,'Unexpected closing tag "'+e.parts[1]+'"'))},e.prototype._popElement=function(e){for(var t=this.elementStack.length-1;t>=0;t--){var n=this.elementStack[t];if(n.name==e)return c.ListWrapper.splice(this.elementStack,t,this.elementStack.length-t),!0;if(!f.getHtmlTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=f.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="";if(this.peek.type===l.HtmlTokenType.ATTR_VALUE){var i=this._advance();r=i.parts[0],n=i.sourceSpan.end}return new u.HtmlAttrAst(t,r,new h.ParseSourceSpan(e.sourceSpan.start,n))},e.prototype._getParentElement=function(){return this.elementStack.length>0?c.ListWrapper.last(this.elementStack):null},e.prototype._addToParent=function(e){var t=this._getParentElement();a.isPresent(t)?t.children.push(e):this.rootNodes.push(e)},e}()},function(e,t,n){function r(e,t,n){void 0===n&&(n=null);var r=[];return t.forEach(function(t){var o=t.visit(e,n);i.isPresent(o)&&r.push(o)}),r}var i=n(5),o=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}();t.HtmlTextAst=o;var s=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}();t.HtmlAttrAst=s;var a=function(){function e(e,t,n,r,i,o){this.name=e,this.attrs=t,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}();t.HtmlElementAst=a;var c=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitComment(this,t)},e}();t.HtmlCommentAst=c,t.htmlVisitAll=r},function(e,t,n){function r(e,t){return new oe(new P.ParseSourceFile(e,t)).tokenize()}function i(e){var t=e===S?"EOF":_.StringWrapper.fromCharCode(e);return'Unexpected character "'+t+'"'}function o(e){return'Unknown entity "'+e+'" - use the "&#;" or "&#x;" syntax'}function s(e){return!a(e)||e===S}function a(e){return e>=A&&T>=e||e===ne}function c(e){return a(e)||e===G||e===B||e===V||e===N||e===q}function u(e){return(Z>e||e>ee)&&($>e||e>J)&&(L>e||e>W)}function p(e){return e==F||e==S||!d(e)}function l(e){return e==F||e==S||!f(e)}function h(e){return e===H||e===S}function f(e){return e>=Z&&ee>=e||e>=$&&J>=e}function d(e){return e>=Z&&Y>=e||e>=$&&X>=e||e>=L&&W>=e}function y(e,t){return v(e)==v(t)}function v(e){return e>=Z&&ee>=e?e-Z+$:e}function g(e){for(var t,n=[],r=0;r=this.length)throw this._createError(i(S),this._getSpan());this.peek===D?(this.line++,this.column=0):this.peek!==D&&this.peek!==x&&this.column++,this.index++,this.peek=this.index>=this.length?S:_.StringWrapper.charCodeAt(this.input,this.index)},e.prototype._attemptCharCode=function(e){return this.peek===e?(this._advance(),!0):!1},e.prototype._attemptCharCodeCaseInsensitive=function(e){return y(this.peek,e)?(this._advance(),!0):!1},e.prototype._requireCharCode=function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(i(this.peek),this._getSpan(t,t))},e.prototype._attemptStr=function(e){for(var t=0;tr.offset&&o.push(this.input.substring(r.offset,this.index));this.peek!==t;)o.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(o.join(""))],r)},e.prototype._consumeComment=function(e){var t=this;this._beginToken(w.COMMENT_START,e),this._requireCharCode(j),this._endToken([]);var n=this._consumeRawText(!1,j,function(){return t._attemptStr("->")});this._beginToken(w.COMMENT_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(w.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,K,function(){return t._attemptStr("]>")});this._beginToken(w.CDATA_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(w.DOC_TYPE,e),this._attemptUntilChar(G),this._advance(),this._endToken([this.input.substring(e.offset+2,this.index-1)])},e.prototype._consumePrefixAndName=function(){for(var e=this.index,t=null;this.peek!==U&&!u(this.peek);)this._advance();var n;this.peek===U?(this._advance(),t=this.input.substring(e,this.index-1),n=this.index):n=e,this._requireCharCodeUntilFn(c,this.index===n?1:0);var r=this.input.substring(n,this.index);return[t,r]},e.prototype._consumeTagOpen=function(e){var t,n=this._savePosition();try{if(!f(this.peek))throw this._createError(i(this.peek),this._getSpan());var r=this.index;for(this._consumeTagOpenStart(e),t=this.input.substring(r,this.index).toLowerCase(),this._attemptCharCodeUntilFn(s);this.peek!==B&&this.peek!==G;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(s),this._attemptCharCode(q)&&(this._attemptCharCodeUntilFn(s),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(s);this._consumeTagOpenEnd()}catch(o){if(o instanceof ie)return this._restorePosition(n),this._beginToken(w.TEXT,e),void this._endToken(["<"]);throw o}var a=C.getHtmlTagDefinition(t).contentType;a===C.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(t,!1):a===C.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t){var n=this,r=this._consumeRawText(t,H,function(){return n._attemptCharCode(B)?(n._attemptCharCodeUntilFn(s),n._attemptStrCaseInsensitive(e)?(n._attemptCharCodeUntilFn(s),n._attemptCharCode(G)?!0:!1):!1):!1});this._beginToken(w.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,e])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(w.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeName=function(){this._beginToken(w.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},e.prototype._consumeAttributeValue=function(){this._beginToken(w.ATTR_VALUE);var e;if(this.peek===V||this.peek===N){var t=this.peek;this._advance();for(var n=[];this.peek!==t;)n.push(this._readChar(!0));e=n.join(""),this._advance()}else{var r=this.index;this._requireCharCodeUntilFn(c,1),e=this.input.substring(r,this.index)}this._endToken([this._processCarriageReturns(e)])},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(B)?w.TAG_OPEN_END_VOID:w.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(G),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(w.TAG_CLOSE,e),this._attemptCharCodeUntilFn(s);var t;t=this._consumePrefixAndName(),this._attemptCharCodeUntilFn(s),this._requireCharCode(G),this._endToken(t)},e.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(w.TEXT,e);for(var t=[this._readChar(!0)];!h(this.peek);)t.push(this._readChar(!0));this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._savePosition=function(){return[this.peek,this.index,this.column,this.line,this.tokens.length]},e.prototype._restorePosition=function(e){this.peek=e[0],this.index=e[1],this.column=e[2],this.line=e[3];var t=e[4];te.length-1&&(t=e.length-1);for(var n=t,r=0,i=0;100>r&&t>0&&(t--,r++,"\n"!=e[t]||3!=++i););for(r=0,i=0;100>r&&n]"+e.substring(this.span.start.offset,n+1);return this.msg+' ("'+o+'"): '+this.span.start},e}();t.ParseError=o},function(e,t,n){function r(e){var t=p[e.toLowerCase()];return a.isPresent(t)?t:l}function i(e){if("@"!=e[0])return[null,e];var t=a.RegExpWrapper.firstMatch(h,e);return[t[1],t[2]]}function o(e){return i(e)[0]}function s(e,t){return a.isPresent(e)?"@"+e+":"+t:t}var a=n(5);t.NAMED_ENTITIES=a.CONST_EXPR({Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"}),function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(t.HtmlTagContentType||(t.HtmlTagContentType={}));var c=t.HtmlTagContentType,u=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChildren,i=n.requiredParents,o=n.implicitNamespacePrefix,s=n.contentType,u=n.closedByParent,p=n.isVoid,l=n.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,a.isPresent(r)&&r.length>0&&r.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=a.normalizeBool(p),this.closedByParent=a.normalizeBool(u)||this.isVoid,a.isPresent(i)&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=o,this.contentType=a.isPresent(s)?s:c.PARSABLE_DATA,this.ignoreFirstLf=a.normalizeBool(l)}return e.prototype.requireExtraParent=function(e){if(a.isBlank(this.requiredParents))return!1;if(a.isBlank(e))return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},e.prototype.isClosedByChild=function(e){return this.isVoid||a.normalizeBool(this.closedByChildren[e.toLowerCase()])},e}();t.HtmlTagDefinition=u;var p={base:new u({isVoid:!0}),meta:new u({isVoid:!0}),area:new u({isVoid:!0}),embed:new u({isVoid:!0}),link:new u({isVoid:!0}),img:new u({isVoid:!0}),input:new u({isVoid:!0}),param:new u({isVoid:!0}),hr:new u({isVoid:!0}),br:new u({isVoid:!0}),source:new u({isVoid:!0}),track:new u({isVoid:!0}),wbr:new u({isVoid:!0}),p:new u({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new u({closedByChildren:["tbody","tfoot"]}),tbody:new u({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new u({closedByChildren:["tbody"],closedByParent:!0}),tr:new u({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new u({closedByChildren:["td","th"],closedByParent:!0}),th:new u({closedByChildren:["td","th"],closedByParent:!0}),col:new u({requiredParents:["colgroup"],isVoid:!0}),svg:new u({implicitNamespacePrefix:"svg"}),math:new u({implicitNamespacePrefix:"math"}),li:new u({closedByChildren:["li"],closedByParent:!0}),dt:new u({closedByChildren:["dt","dd"]}),dd:new u({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new u({closedByChildren:["rb","rt","rtc","rp"], closedByParent:!0}),rt:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new u({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new u({closedByChildren:["optgroup"],closedByParent:!0}),option:new u({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new u({ignoreFirstLf:!0}),listing:new u({ignoreFirstLf:!0}),style:new u({contentType:c.RAW_TEXT}),script:new u({contentType:c.RAW_TEXT}),title:new u({contentType:c.ESCAPABLE_RAW_TEXT}),textarea:new u({contentType:c.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},l=new u;t.getHtmlTagDefinition=r;var h=/^@([^:]+):(.+)/g;t.splitNsName=i,t.getNsPrefix=o,t.mergeNsAndName=s},function(e,t){var n=function(){function e(){}return e.prototype.hasProperty=function(e,t){return!0},e.prototype.getMappedPropName=function(e){return e},e}();t.ElementSchemaRegistry=n},function(e,t,n){function r(e){var t=null,n=null,r=null,o=!1,_=null;e.attrs.forEach(function(e){var i=e.name.toLowerCase();i==a?t=e.value:i==l?n=e.value:i==p?r=e.value:e.name==y?o=!0:e.name==v&&e.value.length>0&&(_=e.value)}),t=i(t);var b=e.name.toLowerCase(),P=g.OTHER;return s.splitNsName(b)[1]==c?P=g.NG_CONTENT:b==f?P=g.STYLE:b==d?P=g.SCRIPT:b==u&&r==h&&(P=g.STYLESHEET),new m(P,t,n,o,_)}function i(e){return o.isBlank(e)||0===e.length?"*":e}var o=n(5),s=n(186),a="select",c="ng-content",u="link",p="rel",l="href",h="stylesheet",f="style",d="script",y="ngNonBindable",v="ngProjectAs";t.preparseElement=r,function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(t.PreparsedElementType||(t.PreparsedElementType={}));var g=t.PreparsedElementType,m=function(){function e(e,t,n,r,i){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i}return e}();t.PreparsedElement=m},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(167),s=n(5),a=n(14),c=n(48),u=n(163),p=n(162),l=n(178),h=n(6),f=n(75),d=n(183),y=n(182),v=n(188),g=function(){function e(e,t,n){this._xhr=e,this._urlResolver=t,this._htmlParser=n}return e.prototype.normalizeTemplate=function(e,t){var n=this;if(s.isPresent(t.template))return c.PromiseWrapper.resolve(this.normalizeLoadedTemplate(e,t,t.template,e.moduleUrl));if(s.isPresent(t.templateUrl)){var r=this._urlResolver.resolve(e.moduleUrl,t.templateUrl);return this._xhr.get(r).then(function(i){return n.normalizeLoadedTemplate(e,t,i,r)})}throw new a.BaseException("No template specified for component "+e.name)},e.prototype.normalizeLoadedTemplate=function(e,t,n,r){var i=this,s=this._htmlParser.parse(n,e.name);if(s.errors.length>0){var c=s.errors.join("\n");throw new a.BaseException("Template parse errors:\n"+c)}var u=new m;d.htmlVisitAll(u,s.rootNodes);var p=t.styles.concat(u.styles),h=u.styleUrls.filter(l.isStyleUrlResolvable).map(function(e){return i._urlResolver.resolve(r,e)}).concat(t.styleUrls.filter(l.isStyleUrlResolvable).map(function(t){return i._urlResolver.resolve(e.moduleUrl,t)})),y=p.map(function(e){var t=l.extractStyleUrls(i._urlResolver,r,e);return t.styleUrls.forEach(function(e){return h.push(e)}),t.style}),v=t.encapsulation;return v===f.ViewEncapsulation.Emulated&&0===y.length&&0===h.length&&(v=f.ViewEncapsulation.None),new o.CompileTemplateMetadata({encapsulation:v,template:n,templateUrl:r,styles:y,styleUrls:h,ngContentSelectors:u.ngContentSelectors})},e=r([h.Injectable(),i("design:paramtypes",[u.XHR,p.UrlResolver,y.HtmlParser])],e)}();t.TemplateNormalizer=g;var m=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var n=v.preparseElement(e);switch(n.type){case v.PreparsedElementType.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case v.PreparsedElementType.STYLE:var r="";e.children.forEach(function(e){e instanceof d.HtmlTextAst&&(r+=e.value)}),this.styles.push(r);break;case v.PreparsedElementType.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,d.htmlVisitAll(this,e.children),n.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}()},function(e,t,n){function r(e,t){var n=[];return h.isPresent(t)&&o(t,n),h.isPresent(e.directives)&&o(e.directives,n),n}function i(e,t){var n=[];return h.isPresent(t)&&o(t,n),h.isPresent(e.pipes)&&o(e.pipes,n),n}function o(e,t){for(var n=0;n0?n:"package:"+n+R.MODULE_SUFFIX}return P.reflector.importUri(e)}var c=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},l=n(6),h=n(5),f=n(14),d=n(167),y=n(24),v=n(104),g=n(111),m=n(105),_=n(191),b=n(170),P=n(17),C=n(6),w=n(107),R=n(169),E=n(192),O=n(162),S=function(){function e(e,t,n,r,i){this._directiveResolver=e,this._pipeResolver=t,this._viewResolver=n,this._platformDirectives=r,this._platformPipes=i,this._directiveCache=new Map,this._pipeCache=new Map,this._anonymousTypes=new Map,this._anonymousTypeIndex=0}return e.prototype.sanitizeName=function(e){var t=h.stringify(e);if(t.indexOf("(")<0)return t;var n=this._anonymousTypes.get(e);return n||(this._anonymousTypes.set(e,this._anonymousTypeIndex++),n=this._anonymousTypes.get(e)),"anonymous_type_"+n+"_"},e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);if(h.isBlank(t)){var n=this._directiveResolver.resolve(e),r=null,i=null,o=null;if(n instanceof y.ComponentMetadata){E.assertArrayOfStrings("styles",n.styles);var s=n;r=a(e,s);var c=this._viewResolver.resolve(e);E.assertArrayOfStrings("styles",c.styles),i=new d.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=s.changeDetection}t=d.CompileDirectiveMetadata.create({selector:n.selector,exportAs:n.exportAs,isComponent:h.isPresent(i),dynamicLoadable:!0,type:new d.CompileTypeMetadata({name:this.sanitizeName(e),moduleUrl:r,runtime:e}),template:i,changeDetection:o,inputs:n.inputs,outputs:n.outputs,host:n.host,lifecycleHooks:b.LIFECYCLE_HOOKS_VALUES.filter(function(t){return _.hasLifecycleHook(t,e)})}),this._directiveCache.set(e,t)}return t},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);if(h.isBlank(t)){var n=this._pipeResolver.resolve(e),r=P.reflector.importUri(e);t=new d.CompilePipeMetadata({type:new d.CompileTypeMetadata({name:this.sanitizeName(e),moduleUrl:r,runtime:e}),name:n.name,pure:n.pure}),this._pipeCache.set(e,t)}return t},e.prototype.getViewDirectivesMetadata=function(e){for(var t=this,n=this._viewResolver.resolve(e),i=r(n,this._platformDirectives),o=0;oo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(12),u=n(194),p=n(186),l=n(187),h=a.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),f=function(e){function t(){e.apply(this,arguments),this._protoElements=new Map}return r(t,e),t.prototype._getProtoElement=function(e){var t=this._protoElements.get(e);if(a.isBlank(t)){var n=p.splitNsName(e);t=a.isPresent(n[0])?u.DOM.createElementNS(h[n[0]],n[1]):u.DOM.createElement(n[1]),this._protoElements.set(e,t)}return t},t.prototype.hasProperty=function(e,t){if(-1!==e.indexOf("-"))return!0;var n=this._getProtoElement(e);return u.DOM.hasProperty(n,t)},t.prototype.getMappedPropName=function(e){var t=c.StringMapWrapper.get(u.DOM.attrToPropMap,e);return a.isPresent(t)?t:e},t=i([s.Injectable(),o("design:paramtypes",[])],t)}(l.ElementSchemaRegistry);t.DomElementSchemaRegistry=f},function(e,t,n){function r(e){i.isBlank(t.DOM)&&(t.DOM=e)}var i=n(5);t.DOM=null,t.setRootDomAdapter=r;var o=function(){function e(){}return Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),e}();t.DomAdapter=o},function(e,t,n){function r(e,n){u.reflector.reflectionCapabilities=new p.ReflectionCapabilities;var r=s.isPresent(n)?[t.BROWSER_APP_PROVIDERS,n]:t.BROWSER_APP_PROVIDERS;return u.platform(a.BROWSER_PROVIDERS).application(r).bootstrap(e)}var i=n(196);t.AngularEntrypoint=i.AngularEntrypoint;var o=n(197);t.BROWSER_PROVIDERS=o.BROWSER_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS=o.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=o.ELEMENT_PROBE_PROVIDERS_PROD_MODE,t.inspectNativeElement=o.inspectNativeElement,t.BrowserDomAdapter=o.BrowserDomAdapter,t.By=o.By,t.Title=o.Title,t.DOCUMENT=o.DOCUMENT,t.enableDebugTools=o.enableDebugTools,t.disableDebugTools=o.disableDebugTools;var s=n(5),a=n(197),c=n(161),u=n(2),p=n(20),l=n(215),h=n(161),f=n(6);t.BROWSER_APP_PROVIDERS=s.CONST_EXPR([a.BROWSER_APP_COMMON_PROVIDERS,c.COMPILER_PROVIDERS,new f.Provider(h.XHR,{useClass:l.XHRImpl})]),t.bootstrap=r},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.name=e}return e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.AngularEntrypoint=s},function(e,t,n){function r(){return new c.ExceptionHandler(l.DOM,!s.IS_DART)}function i(){return l.DOM.defaultDoc()}function o(){P.BrowserDomAdapter.makeCurrent(),w.wtfInit(),C.BrowserGetTestability.init()}var s=n(5),a=n(6),c=n(2),u=n(112),p=n(83),l=n(194),h=n(198),f=n(200),d=n(201),y=n(203),v=n(204),g=n(212),m=n(212),_=n(211),b=n(205),P=n(213),C=n(216),w=n(217),R=n(199),E=n(218),O=n(203);t.DOCUMENT=O.DOCUMENT;var S=n(222);t.Title=S.Title;var A=n(218);t.ELEMENT_PROBE_PROVIDERS=A.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=A.ELEMENT_PROBE_PROVIDERS_PROD_MODE,t.inspectNativeElement=A.inspectNativeElement,t.By=A.By;var D=n(213);t.BrowserDomAdapter=D.BrowserDomAdapter;var x=n(223);t.enableDebugTools=x.enableDebugTools,t.disableDebugTools=x.disableDebugTools,t.BROWSER_PROVIDERS=s.CONST_EXPR([c.PLATFORM_COMMON_PROVIDERS,new a.Provider(c.PLATFORM_INITIALIZER,{useValue:o,multi:!0})]),t.BROWSER_APP_COMMON_PROVIDERS=s.CONST_EXPR([c.APPLICATION_COMMON_PROVIDERS,u.FORM_PROVIDERS,new a.Provider(c.PLATFORM_PIPES,{useValue:u.COMMON_PIPES,multi:!0}),new a.Provider(c.PLATFORM_DIRECTIVES,{useValue:u.COMMON_DIRECTIVES,multi:!0}),new a.Provider(c.ExceptionHandler,{useFactory:r,deps:[]}),new a.Provider(y.DOCUMENT,{useFactory:i,deps:[]}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:h.DomEventsPlugin,multi:!0}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:f.KeyEventsPlugin,multi:!0}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:d.HammerGesturesPlugin,multi:!0}),new a.Provider(v.DomRootRenderer,{useClass:v.DomRootRenderer_}),new a.Provider(c.RootRenderer,{useExisting:v.DomRootRenderer}),new a.Provider(m.SharedStylesHost,{useExisting:g.DomSharedStylesHost}),g.DomSharedStylesHost,p.Testability,_.BrowserDetails,b.AnimationBuilder,R.EventManager,E.ELEMENT_PROBE_PROVIDERS]),t.initDomAdapter=o},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(194),a=n(2),c=n(199),u=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.supports=function(e){return!0},t.prototype.addEventListener=function(e,t,n){var r=this.manager.getZone(),i=function(e){return r.run(function(){return n(e)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(e,t,i)})},t.prototype.addGlobalEventListener=function(e,t,n){var r=s.DOM.getGlobalEventTarget(e),i=this.manager.getZone(),o=function(e){return i.run(function(){return n(e)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(r,t,o)})},t=i([a.Injectable(),o("design:paramtypes",[])],t)}(c.EventManagerPlugin);t.DomEventsPlugin=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(5),a=n(14),c=n(6),u=n(80),p=n(12);t.EVENT_MANAGER_PLUGINS=s.CONST_EXPR(new c.OpaqueToken("EventManagerPlugins"));var l=function(){function e(e,t){var n=this;this._zone=t,e.forEach(function(e){return e.manager=n}),this._plugins=p.ListWrapper.reversed(e)}return e.prototype.addEventListener=function(e,t,n){var r=this._findPluginFor(t);return r.addEventListener(e,t,n)},e.prototype.addGlobalEventListener=function(e,t,n){var r=this._findPluginFor(t);return r.addGlobalEventListener(e,t,n)},e.prototype.getZone=function(){return this._zone},e.prototype._findPluginFor=function(e){for(var t=this._plugins,n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(194),a=n(5),c=n(12),u=n(199),p=n(6),l=["alt","control","meta","shift"],h={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},f=function(e){function t(){e.call(this)}return r(t,e),t.prototype.supports=function(e){return a.isPresent(t.parseEventName(e))},t.prototype.addEventListener=function(e,n,r){var i=t.parseEventName(n),o=t.eventCallback(e,c.StringMapWrapper.get(i,"fullKey"),r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(e,c.StringMapWrapper.get(i,"domEventName"),o)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||!a.StringWrapper.equals(r,"keydown")&&!a.StringWrapper.equals(r,"keyup"))return null;var i=t._normalizeKey(n.pop()),o="";if(l.forEach(function(e){c.ListWrapper.contains(n,e)&&(c.ListWrapper.remove(n,e),o+=e+".")}),o+=i,0!=n.length||0===i.length)return null;var s=c.StringMapWrapper.create();return c.StringMapWrapper.set(s,"domEventName",r),c.StringMapWrapper.set(s,"fullKey",o),s},t.getEventFullKey=function(e){var t="",n=s.DOM.getEventKey(e);return n=n.toLowerCase(),a.StringWrapper.equals(n," ")?n="space":a.StringWrapper.equals(n,".")&&(n="dot"),l.forEach(function(r){if(r!=n){var i=c.StringMapWrapper.get(h,r);i(e)&&(t+=r+".")}}),t+=n},t.eventCallback=function(e,n,r,i){return function(e){a.StringWrapper.equals(t.getEventFullKey(e),n)&&i.run(function(){return r(e)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t=i([p.Injectable(),o("design:paramtypes",[])],t)}(u.EventManagerPlugin);t.KeyEventsPlugin=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(202),a=n(5),c=n(14),u=n(6),p=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.supports=function(t){if(!e.prototype.supports.call(this,t))return!1;if(!a.isPresent(window.Hammer))throw new c.BaseException("Hammer.js is not loaded, can not bind "+t+" event");return!0},t.prototype.addEventListener=function(e,t,n){var r=this.manager.getZone();return t=t.toLowerCase(),r.runOutsideAngular(function(){var i=new Hammer(e);i.get("pinch").set({enable:!0}),i.get("rotate").set({enable:!0});var o=function(e){r.run(function(){n(e)})};return i.on(t,o),function(){i.off(t,o)}})},t=i([u.Injectable(),o("design:paramtypes",[])],t)}(s.HammerGesturesPluginCommon);t.HammerGesturesPlugin=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(199),o=n(12),s={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},a=function(e){function t(){e.call(this)}return r(t,e),t.prototype.supports=function(e){return e=e.toLowerCase(),o.StringMapWrapper.contains(s,e)},t}(i.EventManagerPlugin);t.HammerGesturesPluginCommon=a},function(e,t,n){var r=n(6),i=n(5);t.DOCUMENT=i.CONST_EXPR(new r.OpaqueToken("DocumentToken"))},function(e,t,n){function r(e,t){var n=C.DOM.parentElement(e);if(t.length>0&&v.isPresent(n)){var r=C.DOM.nextSibling(e);if(v.isPresent(r))for(var i=0;io?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},d=n(6),y=n(205),v=n(5),g=n(14),m=n(212),_=n(199),b=n(203),P=n(3),C=n(194),w=n(210),R=v.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),E="template bindings={}",O=/^template bindings=(.*)$/g,S=function(){function e(e,t,n,r){this.document=e,this.eventManager=t,this.sharedStylesHost=n,this.animate=r,this._registeredComponents=new Map}return e.prototype.renderComponent=function(e){var t=this._registeredComponents.get(e.id);return v.isBlank(t)&&(t=new D(this,e),this._registeredComponents.set(e.id,t)),t},e}();t.DomRootRenderer=S;var A=function(e){function t(t,n,r,i){e.call(this,t,n,r,i)}return p(t,e),t=l([d.Injectable(),f(0,d.Inject(b.DOCUMENT)),h("design:paramtypes",[Object,_.EventManager,m.DomSharedStylesHost,y.AnimationBuilder])],t)}(S);t.DomRootRenderer_=A;var D=function(){function e(e,t){this._rootRenderer=e,this.componentProto=t,this._styles=c(t.id,t.styles,[]),t.encapsulation!==P.ViewEncapsulation.Native&&this._rootRenderer.sharedStylesHost.addStyles(this._styles),this.componentProto.encapsulation===P.ViewEncapsulation.Emulated?(this._contentAttr=s(t.id),this._hostAttr=a(t.id)):(this._contentAttr=null,this._hostAttr=null)}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=C.DOM.querySelector(this._rootRenderer.document,e);if(v.isBlank(t))throw new g.BaseException('The selector "'+e+'" did not match any elements');return C.DOM.clearNodes(t),t},e.prototype.createElement=function(e,t){var n=u(t),r=v.isPresent(n[0])?C.DOM.createElementNS(R[n[0]],n[1]):C.DOM.createElement(n[1]);return v.isPresent(this._contentAttr)&&C.DOM.setAttribute(r,this._contentAttr,""),v.isPresent(e)&&C.DOM.appendChild(e,r),r},e.prototype.createViewRoot=function(e){var t;if(this.componentProto.encapsulation===P.ViewEncapsulation.Native){t=C.DOM.createShadowRoot(e),this._rootRenderer.sharedStylesHost.addHost(t);for(var n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(206),a=n(211),c=function(){function e(e){this.browserDetails=e}return e.prototype.css=function(){return new s.CssAnimationBuilder(this.browserDetails)},e=r([o.Injectable(),i("design:paramtypes",[a.BrowserDetails])],e)}();t.AnimationBuilder=c},function(e,t,n){var r=n(207),i=n(208),o=function(){function e(e){this.browserDetails=e,this.data=new r.CssAnimationOptions}return e.prototype.addAnimationClass=function(e){return this.data.animationClasses.push(e),this},e.prototype.addClass=function(e){return this.data.classesToAdd.push(e),this},e.prototype.removeClass=function(e){return this.data.classesToRemove.push(e),this},e.prototype.setDuration=function(e){return this.data.duration=e,this},e.prototype.setDelay=function(e){return this.data.delay=e,this},e.prototype.setStyles=function(e,t){return this.setFromStyles(e).setToStyles(t)},e.prototype.setFromStyles=function(e){return this.data.fromStyles=e,this},e.prototype.setToStyles=function(e){return this.data.toStyles=e,this},e.prototype.start=function(e){return new i.Animation(e,this.data,this.browserDetails)},e}();t.CssAnimationBuilder=o},function(e,t){var n=function(){function e(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return e}();t.CssAnimationOptions=n},function(e,t,n){var r=n(5),i=n(209),o=n(210),s=n(12),a=n(194),c=function(){function e(e,t,n){var i=this;this.element=e,this.data=t,this.browserDetails=n,this.callbacks=[],this.eventClearFunctions=[],this.completed=!1,this._stringPrefix="",this.startTime=r.DateWrapper.toMillis(r.DateWrapper.now()),this._stringPrefix=a.DOM.getAnimationPrefix(),this.setup(),this.wait(function(e){return i.start()})}return Object.defineProperty(e.prototype,"totalTime",{get:function(){var e=null!=this.computedDelay?this.computedDelay:0,t=null!=this.computedDuration?this.computedDuration:0;return e+t},enumerable:!0,configurable:!0}),e.prototype.wait=function(e){this.browserDetails.raf(e,2)},e.prototype.setup=function(){null!=this.data.fromStyles&&this.applyStyles(this.data.fromStyles),null!=this.data.duration&&this.applyStyles({transitionDuration:this.data.duration.toString()+"ms"}),null!=this.data.delay&&this.applyStyles({transitionDelay:this.data.delay.toString()+"ms"})},e.prototype.start=function(){this.addClasses(this.data.classesToAdd),this.addClasses(this.data.animationClasses),this.removeClasses(this.data.classesToRemove),null!=this.data.toStyles&&this.applyStyles(this.data.toStyles);var e=a.DOM.getComputedStyle(this.element);this.computedDelay=i.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-delay")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-delay"))), this.computedDuration=i.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-duration")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-duration"))),this.addEvents()},e.prototype.applyStyles=function(e){var t=this;s.StringMapWrapper.forEach(e,function(e,n){var i=o.camelCaseToDashCase(n);r.isPresent(a.DOM.getStyle(t.element,i))?a.DOM.setStyle(t.element,i,e.toString()):a.DOM.setStyle(t.element,t._stringPrefix+i,e.toString())})},e.prototype.addClasses=function(e){for(var t=0,n=e.length;n>t;t++)a.DOM.addClass(this.element,e[t])},e.prototype.removeClasses=function(e){for(var t=0,n=e.length;n>t;t++)a.DOM.removeClass(this.element,e[t])},e.prototype.addEvents=function(){var e=this;this.totalTime>0?this.eventClearFunctions.push(a.DOM.onAndCancel(this.element,a.DOM.getTransitionEnd(),function(t){return e.handleAnimationEvent(t)})):this.handleAnimationCompleted()},e.prototype.handleAnimationEvent=function(e){var t=i.Math.round(1e3*e.elapsedTime);this.browserDetails.elapsedTimeIncludesDelay||(t+=this.computedDelay),e.stopPropagation(),t>=this.totalTime&&this.handleAnimationCompleted()},e.prototype.handleAnimationCompleted=function(){this.removeClasses(this.data.animationClasses),this.callbacks.forEach(function(e){return e()}),this.callbacks=[],this.eventClearFunctions.forEach(function(e){return e()}),this.eventClearFunctions=[],this.completed=!0},e.prototype.onComplete=function(e){return this.completed?e():this.callbacks.push(e),this},e.prototype.parseDurationString=function(e){var t=0;if(null==e||e.length<2)return t;if("ms"==e.substring(e.length-2)){var n=r.NumberWrapper.parseInt(this.stripLetters(e),10);n>t&&(t=n)}else if("s"==e.substring(e.length-1)){var o=1e3*r.NumberWrapper.parseFloat(this.stripLetters(e)),n=i.Math.floor(o);n>t&&(t=n)}return t},e.prototype.stripLetters=function(e){return r.StringWrapper.replaceAll(e,r.RegExpWrapper.create("[^0-9]+$",""),"")},e}();t.Animation=c},function(e,t,n){var r=n(5);t.Math=r.global.Math,t.NaN=typeof t.NaN},function(e,t,n){function r(e){return o.StringWrapper.replaceAllMapped(e,s,function(e){return"-"+e[1].toLowerCase()})}function i(e){return o.StringWrapper.replaceAllMapped(e,a,function(e){return e[1].toUpperCase()})}var o=n(5),s=/([A-Z])/g,a=/-([a-z])/g;t.camelCaseToDashCase=r,t.dashCaseToCamelCase=i},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(209),a=n(194),c=function(){function e(){this.elapsedTimeIncludesDelay=!1,this.doesElapsedTimeIncludesDelay()}return e.prototype.doesElapsedTimeIncludesDelay=function(){var e=this,t=a.DOM.createElement("div");a.DOM.setAttribute(t,"style","position: absolute; top: -9999px; left: -9999px; width: 1px;\n height: 1px; transition: all 1ms linear 1ms;"),this.raf(function(n){a.DOM.on(t,"transitionend",function(n){var r=s.Math.round(1e3*n.elapsedTime);e.elapsedTimeIncludesDelay=2==r,a.DOM.remove(t)}),a.DOM.setStyle(t,"width","2px")},2)},e.prototype.raf=function(e,t){void 0===t&&(t=1);var n=new u(e,t);return function(){return n.cancel()}},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.BrowserDetails=c;var u=function(){function e(e,t){this.callback=e,this.frames=t,this._raf()}return e.prototype._raf=function(){var e=this;this.currentFrameId=a.DOM.requestAnimationFrame(function(t){return e._nextFrame(t)})},e.prototype._nextFrame=function(e){this.frames--,this.frames>0?this._raf():this.callback(e)},e.prototype.cancel=function(){a.DOM.cancelAnimationFrame(this.currentFrameId),this.currentFrameId=null},e}()},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(194),c=n(6),u=n(12),p=n(203),l=function(){function e(){this._styles=[],this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=[];e.forEach(function(e){u.SetWrapper.has(t._stylesSet,e)||(t._stylesSet.add(e),t._styles.push(e),n.push(e))}),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return this._styles},e=i([c.Injectable(),o("design:paramtypes",[])],e)}();t.SharedStylesHost=l;var h=function(e){function t(t){e.call(this),this._hostNodes=new Set,this._hostNodes.add(t.head)}return r(t,e),t.prototype._addStylesToHost=function(e,t){for(var n=0;n0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r=200&&300>=i?t.resolve(r):t.reject("Failed to load "+e,null)},n.onerror=function(){t.reject("Failed to load "+e,null)},n.send(),t.promise},t}(s.XHR);t.XHRImpl=a},function(e,t,n){var r=n(12),i=n(5),o=n(194),s=n(2),a=function(){function e(e){this._testability=e}return e.prototype.isStable=function(){return this._testability.isStable()},e.prototype.whenStable=function(e){this._testability.whenStable(e)},e.prototype.findBindings=function(e,t,n){return this.findProviders(e,t,n)},e.prototype.findProviders=function(e,t,n){return this._testability.findBindings(e,t,n)},e}(),c=function(){function e(){}return e.init=function(){s.setTestabilityGetter(new e)},e.prototype.addToWindow=function(e){i.global.getAngularTestability=function(t,n){void 0===n&&(n=!0);var r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return new a(r)},i.global.getAllAngularTestabilities=function(){var t=e.getAllTestabilities();return t.map(function(e){return new a(e)})},i.global.getAllAngularRootElements=function(){return e.getAllRootElements()};var t=function(e){var t=i.global.getAllAngularTestabilities(),n=t.length,r=!1,o=function(t){r=r||t,n--,0==n&&e(r)};t.forEach(function(e){e.whenStable(o)})};i.global.frameworkStabilizers||(i.global.frameworkStabilizers=r.ListWrapper.createGrowableSize(0)),i.global.frameworkStabilizers.push(t)},e.prototype.findTestabilityInTree=function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return i.isPresent(r)?r:n?o.DOM.isShadowRoot(t)?this.findTestabilityInTree(e,o.DOM.getHost(t),!0):this.findTestabilityInTree(e,o.DOM.parentElement(t),!0):null},e}();t.BrowserGetTestability=c},function(e,t){function n(){}t.wtfInit=n},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(194);t.DOM=i.DOM,t.setRootDomAdapter=i.setRootDomAdapter,t.DomAdapter=i.DomAdapter;var o=n(204);t.DomRenderer=o.DomRenderer;var s=n(203);t.DOCUMENT=s.DOCUMENT;var a=n(212);t.SharedStylesHost=a.SharedStylesHost,t.DomSharedStylesHost=a.DomSharedStylesHost;var c=n(198);t.DomEventsPlugin=c.DomEventsPlugin;var u=n(199);t.EVENT_MANAGER_PLUGINS=u.EVENT_MANAGER_PLUGINS,t.EventManager=u.EventManager,t.EventManagerPlugin=u.EventManagerPlugin,r(n(219)),r(n(220))},function(e,t,n){var r=n(5),i=n(194),o=function(){function e(){}return e.all=function(){return function(e){return!0}},e.css=function(e){return function(t){return r.isPresent(t.nativeElement)?i.DOM.elementMatches(t.nativeElement,e):!1}},e.directive=function(e){return function(t){return-1!==t.providerTokens.indexOf(e)}},e}();t.By=o},function(e,t,n){function r(e){return u.getDebugNode(e)}function i(e){return s.assertionsEnabled()?o(e):e}function o(e){return c.DOM.setGlobalVar(d,r),c.DOM.setGlobalVar(y,f),new h.DebugDomRootRenderer(e)}var s=n(5),a=n(6),c=n(194),u=n(106),p=n(204),l=n(2),h=n(221),f=s.CONST_EXPR({ApplicationRef:l.ApplicationRef,NgZone:l.NgZone}),d="ng.probe",y="ng.coreTokens";t.inspectNativeElement=r,t.ELEMENT_PROBE_PROVIDERS=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:i,deps:[p.DomRootRenderer]})]),t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:o,deps:[p.DomRootRenderer]})])},function(e,t,n){var r=n(5),i=n(106),o=function(){function e(e){this._delegate=e}return e.prototype.renderComponent=function(e){return new s(this,this._delegate.renderComponent(e))},e}();t.DebugDomRootRenderer=o;var s=function(){function e(e,t){this._rootRenderer=e,this._delegate=t}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=this._delegate.selectRootElement(e),n=new i.DebugElement(t,null);return i.indexDebugNode(n),t},e.prototype.createElement=function(e,t){var n=this._delegate.createElement(e,t),r=new i.DebugElement(n,i.getDebugNode(e));return r.name=t,i.indexDebugNode(r),n},e.prototype.createViewRoot=function(e){return this._delegate.createViewRoot(e)},e.prototype.createTemplateAnchor=function(e){var t=this._delegate.createTemplateAnchor(e),n=new i.DebugNode(t,i.getDebugNode(e));return i.indexDebugNode(n),t},e.prototype.createText=function(e,t){var n=this._delegate.createText(e,t),r=new i.DebugNode(n,i.getDebugNode(e));return i.indexDebugNode(r),n},e.prototype.projectNodes=function(e,t){var n=i.getDebugNode(e);return r.isPresent(n)&&n instanceof i.DebugElement&&t.forEach(function(e){n.addChild(i.getDebugNode(e))}),this._delegate.projectNodes(e,t)},e.prototype.attachViewAfter=function(e,t){var n=i.getDebugNode(e);if(r.isPresent(n)){var o=n.parent;if(t.length>0&&r.isPresent(o)){var s=[];t.forEach(function(e){return s.push(i.getDebugNode(e))}),o.insertChildrenAfter(n,s)}}return this._delegate.attachViewAfter(e,t)},e.prototype.detachView=function(e){return e.forEach(function(e){var t=i.getDebugNode(e);r.isPresent(t)&&r.isPresent(t.parent)&&t.parent.removeChild(t)}),this._delegate.detachView(e)},e.prototype.destroyView=function(e,t){return t.forEach(function(e){i.removeDebugNodeFromIndex(i.getDebugNode(e))}),this._delegate.destroyView(e,t)},e.prototype.listen=function(e,t,n){var o=i.getDebugNode(e);return r.isPresent(o)&&o.listeners.push(new i.EventListener(t,n)),this._delegate.listen(e,t,n)},e.prototype.listenGlobal=function(e,t,n){return this._delegate.listenGlobal(e,t,n)},e.prototype.setElementProperty=function(e,t,n){var o=i.getDebugNode(e);return r.isPresent(o)&&o instanceof i.DebugElement&&o.properties.set(t,n),this._delegate.setElementProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var o=i.getDebugNode(e);return r.isPresent(o)&&o instanceof i.DebugElement&&o.attributes.set(t,n),this._delegate.setElementAttribute(e,t,n)},e.prototype.setBindingDebugInfo=function(e,t,n){return this._delegate.setBindingDebugInfo(e,t,n)},e.prototype.setElementDebugInfo=function(e,t){var n=i.getDebugNode(e);return n.setDebugInfo(t),this._delegate.setElementDebugInfo(e,t)},e.prototype.setElementClass=function(e,t,n){return this._delegate.setElementClass(e,t,n)},e.prototype.setElementStyle=function(e,t,n){return this._delegate.setElementStyle(e,t,n)},e.prototype.invokeElementMethod=function(e,t,n){return this._delegate.invokeElementMethod(e,t,n)},e.prototype.setText=function(e,t){return this._delegate.setText(e,t)},e}();t.DebugDomRenderer=s},function(e,t,n){var r=n(194),i=function(){function e(){}return e.prototype.getTitle=function(){return r.DOM.getTitle()},e.prototype.setTitle=function(e){r.DOM.setTitle(e)},e}();t.Title=i},function(e,t,n){function r(e){a.ng=new s.AngularTools(e)}function i(){delete a.ng}var o=n(5),s=n(224),a=o.global;t.enableDebugTools=r,t.disableDebugTools=i},function(e,t,n){var r=n(79),i=n(5),o=n(225),s=n(194),a=function(){function e(e){this.profiler=new c(e)}return e}();t.AngularTools=a;var c=function(){function e(e){this.appRef=e.injector.get(r.ApplicationRef)}return e.prototype.timeChangeDetection=function(e){var t=i.isPresent(e)&&e.record,n="Change Detection",r=i.isPresent(o.window.console.profile);t&&r&&o.window.console.profile(n);for(var a=s.DOM.performanceNow(),c=0;5>c||s.DOM.performanceNow()-a<500;)this.appRef.tick(),c++;var u=s.DOM.performanceNow();t&&r&&o.window.console.profileEnd(n);var p=(u-a)/c;o.window.console.log("ran "+c+" change detection cycles"),o.window.console.log(i.NumberWrapper.toFixed(p,2)+" ms per check")},e}();t.AngularProfiler=c},function(e,t){var n=window;t.window=n,t.document=window.document,t.location=window.location,t.gc=window.gc?function(){return window.gc()}:function(){return null},t.performance=window.performance?window.performance:null,t.Event=window.Event,t.MouseEvent=window.MouseEvent,t.KeyboardEvent=window.KeyboardEvent,t.EventTarget=window.EventTarget,t.History=window.History,t.Location=window.Location,t.EventListener=window.EventListener},function(e,t,n){var r=n(2),i=n(227),o=n(235),s=n(239),a=n(238),c=n(240),u=n(233),p=n(237),l=n(229);t.Request=l.Request;var h=n(236);t.Response=h.Response;var f=n(228);t.Connection=f.Connection,t.ConnectionBackend=f.ConnectionBackend;var d=n(238);t.BrowserXhr=d.BrowserXhr;var y=n(233);t.BaseRequestOptions=y.BaseRequestOptions,t.RequestOptions=y.RequestOptions;var v=n(237);t.BaseResponseOptions=v.BaseResponseOptions,t.ResponseOptions=v.ResponseOptions;var g=n(235);t.XHRBackend=g.XHRBackend,t.XHRConnection=g.XHRConnection;var m=n(239);t.JSONPBackend=m.JSONPBackend,t.JSONPConnection=m.JSONPConnection;var _=n(227);t.Http=_.Http,t.Jsonp=_.Jsonp;var b=n(230);t.Headers=b.Headers;var P=n(232);t.ResponseType=P.ResponseType,t.ReadyState=P.ReadyState,t.RequestMethod=P.RequestMethod;var C=n(234);t.URLSearchParams=C.URLSearchParams,t.HTTP_PROVIDERS=[r.provide(i.Http,{useFactory:function(e,t){return new i.Http(e,t)},deps:[o.XHRBackend,u.RequestOptions]}),a.BrowserXhr,r.provide(u.RequestOptions,{useClass:u.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),o.XHRBackend],t.HTTP_BINDINGS=t.HTTP_PROVIDERS,t.JSONP_PROVIDERS=[r.provide(i.Jsonp,{useFactory:function(e,t){return new i.Jsonp(e,t)},deps:[s.JSONPBackend,u.RequestOptions]}),c.BrowserJsonp,r.provide(u.RequestOptions,{useClass:u.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),r.provide(s.JSONPBackend,{useClass:s.JSONPBackend_})],t.JSON_BINDINGS=t.JSONP_PROVIDERS},function(e,t,n){function r(e,t){return e.createConnection(t).response}function i(e,t,n,r){var i=e;return c.isPresent(t)?i.merge(new f.RequestOptions({method:t.method||n,url:t.url||r,search:t.search,headers:t.headers,body:t.body})):c.isPresent(n)?i.merge(new f.RequestOptions({method:n,url:r})):i.merge(new f.RequestOptions({url:r}))}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(14),p=n(2),l=n(228),h=n(229),f=n(233),d=n(232),y=function(){function e(e,t){this._backend=e,this._defaultOptions=t}return e.prototype.request=function(e,t){var n;if(c.isString(e))n=r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)));else{if(!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");n=r(this._backend,e)}return n},e.prototype.get=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)))},e.prototype.post=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Post,e)))},e.prototype.put=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Put,e)))},e.prototype["delete"]=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Delete,e)))},e.prototype.patch=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Patch,e)))},e.prototype.head=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Head,e)))},e=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],e)}();t.Http=y;var v=function(e){function t(t,n){e.call(this,t,n)}return o(t,e),t.prototype.request=function(e,t){var n;if(c.isString(e)&&(e=new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e))),!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");return e.method!==d.RequestMethod.Get&&u.makeTypeError("JSONP requests must use GET request method."),n=r(this._backend,e)},t=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],t)}(y);t.Jsonp=v},function(e,t){var n=function(){function e(){}return e}();t.ConnectionBackend=n;var r=function(){function e(){}return e}();t.Connection=r},function(e,t,n){var r=n(230),i=n(231),o=n(5),s=function(){function e(e){var t=e.url;if(this.url=e.url,o.isPresent(e.search)){var n=e.search.toString();if(n.length>0){var s="?";o.StringWrapper.contains(this.url,"?")&&(s="&"==this.url[this.url.length-1]?"":"&"),this.url=t+s+n}}this._body=e.body,this.method=i.normalizeMethodName(e.method),this.headers=new r.Headers(e.headers)}return e.prototype.text=function(){return o.isPresent(this._body)?this._body.toString():""},e}();t.Request=s},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=function(){function e(t){var n=this;return t instanceof e?void(this._headersMap=t._headersMap):(this._headersMap=new o.Map,void(r.isBlank(t)||o.StringMapWrapper.forEach(t,function(e,t){n._headersMap.set(t,o.isListLikeIterable(e)?e:[e])})))}return e.fromResponseHeaderString=function(t){return t.trim().split("\n").map(function(e){return e.split(":")}).map(function(e){var t=e[0],n=e.slice(1);return[t.trim(),n.join(":").trim()]}).reduce(function(e,t){var n=t[0],r=t[1];return!e.set(n,r)&&e},new e)},e.prototype.append=function(e,t){var n=this._headersMap.get(e),r=o.isListLikeIterable(n)?n:[];r.push(t),this._headersMap.set(e,r)},e.prototype["delete"]=function(e){this._headersMap["delete"](e)},e.prototype.forEach=function(e){this._headersMap.forEach(e)},e.prototype.get=function(e){return o.ListWrapper.first(this._headersMap.get(e))},e.prototype.has=function(e){return this._headersMap.has(e)},e.prototype.keys=function(){return o.MapWrapper.keys(this._headersMap)},e.prototype.set=function(e,t){var n=[];if(o.isListLikeIterable(t)){var r=t.join(",");n.push(r)}else n.push(t);this._headersMap.set(e,n)},e.prototype.values=function(){return o.MapWrapper.values(this._headersMap)},e.prototype.toJSON=function(){var e={};return this._headersMap.forEach(function(t,n){var r=[];o.iterateListLike(t,function(e){return r=o.ListWrapper.concat(r,e.split(","))}),e[n]=r}),e},e.prototype.getAll=function(e){var t=this._headersMap.get(e);return o.isListLikeIterable(t)?t:[]},e.prototype.entries=function(){throw new i.BaseException('"entries" method is not implemented on Headers class'); },e}();t.Headers=s},function(e,t,n){function r(e){if(o.isString(e)){var t=e;if(e=e.replace(/(\w)(\w*)/g,function(e,t,n){return t.toUpperCase()+n.toLowerCase()}),e=s.RequestMethod[e],"number"!=typeof e)throw a.makeTypeError('Invalid request method. The method "'+t+'" is not supported.')}return e}function i(e){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var o=n(5),s=n(232),a=n(14);t.normalizeMethodName=r,t.isSuccess=function(e){return e>=200&&300>e},t.getResponseURL=i;var c=n(5);t.isJsObject=c.isJsObject},function(e,t){!function(e){e[e.Get=0]="Get",e[e.Post=1]="Post",e[e.Put=2]="Put",e[e.Delete=3]="Delete",e[e.Options=4]="Options",e[e.Head=5]="Head",e[e.Patch=6]="Patch"}(t.RequestMethod||(t.RequestMethod={}));t.RequestMethod;!function(e){e[e.Unsent=0]="Unsent",e[e.Open=1]="Open",e[e.HeadersReceived=2]="HeadersReceived",e[e.Loading=3]="Loading",e[e.Done=4]="Done",e[e.Cancelled=5]="Cancelled"}(t.ReadyState||(t.ReadyState={}));t.ReadyState;!function(e){e[e.Basic=0]="Basic",e[e.Cors=1]="Cors",e[e.Default=2]="Default",e[e.Error=3]="Error",e[e.Opaque=4]="Opaque"}(t.ResponseType||(t.ResponseType={}));t.ResponseType},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(230),c=n(232),u=n(2),p=n(234),l=n(231),h=function(){function e(e){var t=void 0===e?{}:e,n=t.method,r=t.headers,i=t.body,o=t.url,a=t.search;this.method=s.isPresent(n)?l.normalizeMethodName(n):null,this.headers=s.isPresent(r)?r:null,this.body=s.isPresent(i)?i:null,this.url=s.isPresent(o)?o:null,this.search=s.isPresent(a)?s.isString(a)?new p.URLSearchParams(a):a:null}return e.prototype.merge=function(t){return new e({method:s.isPresent(t)&&s.isPresent(t.method)?t.method:this.method,headers:s.isPresent(t)&&s.isPresent(t.headers)?t.headers:this.headers,body:s.isPresent(t)&&s.isPresent(t.body)?t.body:this.body,url:s.isPresent(t)&&s.isPresent(t.url)?t.url:this.url,search:s.isPresent(t)&&s.isPresent(t.search)?s.isString(t.search)?new p.URLSearchParams(t.search):t.search.clone():this.search})},e}();t.RequestOptions=h;var f=function(e){function t(){e.call(this,{method:c.RequestMethod.Get,headers:new a.Headers})}return r(t,e),t=i([u.Injectable(),o("design:paramtypes",[])],t)}(h);t.BaseRequestOptions=f},function(e,t,n){function r(e){void 0===e&&(e="");var t=new o.Map;if(e.length>0){var n=e.split("&");n.forEach(function(e){var n=e.split("="),r=n[0],o=n[1],s=i.isPresent(t.get(r))?t.get(r):[];s.push(o),t.set(r,s)})}return t}var i=n(5),o=n(12),s=function(){function e(e){void 0===e&&(e=""),this.rawParams=e,this.paramsMap=r(e)}return e.prototype.clone=function(){var t=new e;return t.appendAll(this),t},e.prototype.has=function(e){return this.paramsMap.has(e)},e.prototype.get=function(e){var t=this.paramsMap.get(e);return o.isListLikeIterable(t)?o.ListWrapper.first(t):null},e.prototype.getAll=function(e){var t=this.paramsMap.get(e);return i.isPresent(t)?t:[]},e.prototype.set=function(e,t){var n=this.paramsMap.get(e),r=i.isPresent(n)?n:[];o.ListWrapper.clear(r),r.push(t),this.paramsMap.set(e,r)},e.prototype.setAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){var r=t.paramsMap.get(n),s=i.isPresent(r)?r:[];o.ListWrapper.clear(s),s.push(e[0]),t.paramsMap.set(n,s)})},e.prototype.append=function(e,t){var n=this.paramsMap.get(e),r=i.isPresent(n)?n:[];r.push(t),this.paramsMap.set(e,r)},e.prototype.appendAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){for(var r=t.paramsMap.get(n),o=i.isPresent(r)?r:[],s=0;so?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(232),s=n(236),a=n(230),c=n(237),u=n(2),p=n(238),l=n(5),h=n(50),f=n(231),d=function(){function e(e,t,n){var r=this;this.request=e,this.response=new h.Observable(function(i){var u=t.build();u.open(o.RequestMethod[e.method].toUpperCase(),e.url);var p=function(){var e=l.isPresent(u.response)?u.response:u.responseText,t=a.Headers.fromResponseHeaderString(u.getAllResponseHeaders()),r=f.getResponseURL(u),o=1223===u.status?204:u.status;0===o&&(o=e?200:0);var p=new c.ResponseOptions({body:e,status:o,headers:t,url:r});l.isPresent(n)&&(p=n.merge(p));var h=new s.Response(p);return f.isSuccess(o)?(i.next(h),void i.complete()):void i.error(h)},h=function(e){var t=new c.ResponseOptions({body:e,type:o.ResponseType.Error});l.isPresent(n)&&(t=n.merge(t)),i.error(new s.Response(t))};return l.isPresent(e.headers)&&e.headers.forEach(function(e,t){return u.setRequestHeader(t,e.join(","))}),u.addEventListener("load",p),u.addEventListener("error",h),u.send(r.request.text()),function(){u.removeEventListener("load",p),u.removeEventListener("error",h),u.abort()}})}return e}();t.XHRConnection=d;var y=function(){function e(e,t){this._browserXHR=e,this._baseResponseOptions=t}return e.prototype.createConnection=function(e){return new d(e,this._browserXHR,this._baseResponseOptions)},e=r([u.Injectable(),i("design:paramtypes",[p.BrowserXhr,c.ResponseOptions])],e)}();t.XHRBackend=y},function(e,t,n){var r=n(5),i=n(14),o=n(231),s=function(){function e(e){this._body=e.body,this.status=e.status,this.statusText=e.statusText,this.headers=e.headers,this.type=e.type,this.url=e.url}return e.prototype.blob=function(){throw new i.BaseException('"blob()" method not implemented on Response superclass')},e.prototype.json=function(){var e;return o.isJsObject(this._body)?e=this._body:r.isString(this._body)&&(e=r.Json.parse(this._body)),e},e.prototype.text=function(){return this._body.toString()},e.prototype.arrayBuffer=function(){throw new i.BaseException('"arrayBuffer()" method not implemented on Response superclass')},e}();t.Response=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(2),a=n(5),c=n(230),u=n(232),p=function(){function e(e){var t=void 0===e?{}:e,n=t.body,r=t.status,i=t.headers,o=t.statusText,s=t.type,c=t.url;this.body=a.isPresent(n)?n:null,this.status=a.isPresent(r)?r:null,this.headers=a.isPresent(i)?i:null,this.statusText=a.isPresent(o)?o:null,this.type=a.isPresent(s)?s:null,this.url=a.isPresent(c)?c:null}return e.prototype.merge=function(t){return new e({body:a.isPresent(t)&&a.isPresent(t.body)?t.body:this.body,status:a.isPresent(t)&&a.isPresent(t.status)?t.status:this.status,headers:a.isPresent(t)&&a.isPresent(t.headers)?t.headers:this.headers,statusText:a.isPresent(t)&&a.isPresent(t.statusText)?t.statusText:this.statusText,type:a.isPresent(t)&&a.isPresent(t.type)?t.type:this.type,url:a.isPresent(t)&&a.isPresent(t.url)?t.url:this.url})},e}();t.ResponseOptions=p;var l=function(e){function t(){e.call(this,{status:200,statusText:"Ok",type:u.ResponseType.Default,headers:new c.Headers})}return r(t,e),t=i([s.Injectable(),o("design:paramtypes",[])],t)}(p);t.BaseResponseOptions=l},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=function(){function e(){}return e.prototype.build=function(){return new XMLHttpRequest},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.BrowserXhr=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(228),a=n(232),c=n(236),u=n(237),p=n(2),l=n(240),h=n(14),f=n(5),d=n(50),y="JSONP injected script did not invoke callback.",v="JSONP requests must use GET request method.",g=function(){function e(){}return e}();t.JSONPConnection=g;var m=function(e){function t(t,n,r){var i=this;if(e.call(this),this._dom=n,this.baseResponseOptions=r,this._finished=!1,t.method!==a.RequestMethod.Get)throw h.makeTypeError(v);this.request=t,this.response=new d.Observable(function(e){i.readyState=a.ReadyState.Loading;var o=i._id=n.nextRequestID();n.exposeConnection(o,i);var s=n.requestCallback(i._id),p=t.url;p.indexOf("=JSONP_CALLBACK&")>-1?p=f.StringWrapper.replace(p,"=JSONP_CALLBACK&","="+s+"&"):p.lastIndexOf("=JSONP_CALLBACK")===p.length-"=JSONP_CALLBACK".length&&(p=p.substring(0,p.length-"=JSONP_CALLBACK".length)+("="+s));var l=i._script=n.build(p),h=function(t){if(i.readyState!==a.ReadyState.Cancelled){if(i.readyState=a.ReadyState.Done,n.cleanup(l),!i._finished){var o=new u.ResponseOptions({body:y,type:a.ResponseType.Error,url:p});return f.isPresent(r)&&(o=r.merge(o)),void e.error(new c.Response(o))}var s=new u.ResponseOptions({body:i._responseData,url:p});f.isPresent(i.baseResponseOptions)&&(s=i.baseResponseOptions.merge(s)),e.next(new c.Response(s)),e.complete()}},d=function(t){if(i.readyState!==a.ReadyState.Cancelled){i.readyState=a.ReadyState.Done,n.cleanup(l);var o=new u.ResponseOptions({body:t.message,type:a.ResponseType.Error});f.isPresent(r)&&(o=r.merge(o)),e.error(new c.Response(o))}};return l.addEventListener("load",h),l.addEventListener("error",d),n.send(l),function(){i.readyState=a.ReadyState.Cancelled,l.removeEventListener("load",h),l.removeEventListener("error",d),f.isPresent(l)&&i._dom.cleanup(l)}})}return r(t,e),t.prototype.finished=function(e){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==a.ReadyState.Cancelled&&(this._responseData=e)},t}(g);t.JSONPConnection_=m;var _=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(s.ConnectionBackend);t.JSONPBackend=_;var b=function(e){function t(t,n){e.call(this),this._browserJSONP=t,this._baseResponseOptions=n}return r(t,e),t.prototype.createConnection=function(e){return new m(e,this._browserJSONP,this._baseResponseOptions)},t=i([p.Injectable(),o("design:paramtypes",[l.BrowserJsonp,u.ResponseOptions])],t)}(_);t.JSONPBackend_=b},function(e,t,n){function r(){return null===u&&(u=a.global[t.JSONP_HOME]={}),u}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(2),a=n(5),c=0;t.JSONP_HOME="__ng_jsonp__";var u=null,p=function(){function e(){}return e.prototype.build=function(e){var t=document.createElement("script");return t.src=e,t},e.prototype.nextRequestID=function(){return"__req"+c++},e.prototype.requestCallback=function(e){return t.JSONP_HOME+"."+e+".finished"},e.prototype.exposeConnection=function(e,t){var n=r();n[e]=t},e.prototype.removeConnection=function(e){var t=r();t[e]=null},e.prototype.send=function(e){document.body.appendChild(e)},e.prototype.cleanup=function(e){e.parentNode&&e.parentNode.removeChild(e)},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.BrowserJsonp=p},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(242);t.Router=i.Router;var o=n(261);t.RouterOutlet=o.RouterOutlet;var s=n(263);t.RouterLink=s.RouterLink;var a=n(247);t.RouteParams=a.RouteParams,t.RouteData=a.RouteData;var c=n(264);t.PlatformLocation=c.PlatformLocation;var u=n(243);t.RouteRegistry=u.RouteRegistry,t.ROUTER_PRIMARY_COMPONENT=u.ROUTER_PRIMARY_COMPONENT;var p=n(258);t.LocationStrategy=p.LocationStrategy,t.APP_BASE_HREF=p.APP_BASE_HREF;var l=n(265);t.HashLocationStrategy=l.HashLocationStrategy;var h=n(266);t.PathLocationStrategy=h.PathLocationStrategy;var f=n(257);t.Location=f.Location,r(n(256)),r(n(267));var d=n(262);t.CanActivate=d.CanActivate;var y=n(247);t.Instruction=y.Instruction,t.ComponentInstruction=y.ComponentInstruction;var v=n(2);t.OpaqueToken=v.OpaqueToken;var g=n(268);t.ROUTER_PROVIDERS_COMMON=g.ROUTER_PROVIDERS_COMMON;var m=n(269);t.ROUTER_PROVIDERS=m.ROUTER_PROVIDERS,t.ROUTER_BINDINGS=m.ROUTER_BINDINGS;var _=n(261),b=n(263),P=n(5);t.ROUTER_DIRECTIVES=P.CONST_EXPR([_.RouterOutlet,b.RouterLink])},function(e,t,n){function r(e,t){var n=v;return p.isBlank(e.component)?n:(p.isPresent(e.child)&&(n=r(e.child,p.isPresent(t)?t.child:null)),n.then(function(n){if(0==n)return!1;if(e.component.reuse)return!0;var r=y.getCanActivateHook(e.component.componentType);return p.isPresent(r)?r(e.component,p.isPresent(t)?t.component:null):!0}))}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},c=n(48),u=n(12),p=n(5),l=n(14),h=n(2),f=n(243),d=n(257),y=n(259),v=c.PromiseWrapper.resolve(!0),g=c.PromiseWrapper.resolve(!1),m=function(){function e(e,t,n,r){this.registry=e,this.parent=t,this.hostComponent=n,this.root=r,this.navigating=!1,this.currentInstruction=null,this._currentNavigation=v,this._outlet=null,this._auxRouters=new u.Map,this._subject=new c.EventEmitter}return e.prototype.childRouter=function(e){return this._childRouter=new b(this,e)},e.prototype.auxRouter=function(e){return new b(this,e)},e.prototype.registerPrimaryOutlet=function(e){if(p.isPresent(e.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");if(p.isPresent(this._outlet))throw new l.BaseException("Primary outlet is already registered.");return this._outlet=e,p.isPresent(this.currentInstruction)?this.commit(this.currentInstruction,!1):v},e.prototype.unregisterPrimaryOutlet=function(e){if(p.isPresent(e.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");this._outlet=null},e.prototype.registerAuxOutlet=function(e){var t=e.name;if(p.isBlank(t))throw new l.BaseException("registerAuxOutlet expects to be called with an outlet with a name.");var n=this.auxRouter(this.hostComponent);this._auxRouters.set(t,n),n._outlet=e;var r;return p.isPresent(this.currentInstruction)&&p.isPresent(r=this.currentInstruction.auxInstruction[t])?n.commit(r):v},e.prototype.isRouteActive=function(e){for(var t=this;p.isPresent(t.parent)&&p.isPresent(e.child);)t=t.parent,e=e.child;return p.isPresent(this.currentInstruction)&&this.currentInstruction.component==e.component},e.prototype.config=function(e){var t=this;return e.forEach(function(e){t.registry.config(t.hostComponent,e)}),this.renavigate()},e.prototype.navigate=function(e){var t=this.generate(e);return this.navigateByInstruction(t,!1)},e.prototype.navigateByUrl=function(e,t){var n=this;return void 0===t&&(t=!1),this._currentNavigation=this._currentNavigation.then(function(r){return n.lastNavigationAttempt=e,n._startNavigating(),n._afterPromiseFinishNavigating(n.recognize(e).then(function(e){return p.isBlank(e)?!1:n._navigate(e,t)}))})},e.prototype.navigateByInstruction=function(e,t){var n=this;return void 0===t&&(t=!1),p.isBlank(e)?g:this._currentNavigation=this._currentNavigation.then(function(r){return n._startNavigating(),n._afterPromiseFinishNavigating(n._navigate(e,t))})},e.prototype._settleInstruction=function(e){var t=this;return e.resolveComponent().then(function(n){var r=[];return p.isPresent(e.component)&&(e.component.reuse=!1),p.isPresent(e.child)&&r.push(t._settleInstruction(e.child)),u.StringMapWrapper.forEach(e.auxInstruction,function(e,n){r.push(t._settleInstruction(e))}),c.PromiseWrapper.all(r)})},e.prototype._navigate=function(e,t){var n=this;return this._settleInstruction(e).then(function(t){return n._routerCanReuse(e)}).then(function(t){return n._canActivate(e)}).then(function(r){return r?n._routerCanDeactivate(e).then(function(r){return r?n.commit(e,t).then(function(t){return n._emitNavigationFinish(e.toRootUrl()),!0}):void 0}):!1})},e.prototype._emitNavigationFinish=function(e){c.ObservableWrapper.callEmit(this._subject,e)},e.prototype._emitNavigationFail=function(e){c.ObservableWrapper.callError(this._subject,e)},e.prototype._afterPromiseFinishNavigating=function(e){var t=this;return c.PromiseWrapper.catchError(e.then(function(e){return t._finishNavigating()}),function(e){throw t._finishNavigating(),e})},e.prototype._routerCanReuse=function(e){var t=this;return p.isBlank(this._outlet)?g:p.isBlank(e.component)?v:this._outlet.routerCanReuse(e.component).then(function(n){return e.component.reuse=n,n&&p.isPresent(t._childRouter)&&p.isPresent(e.child)?t._childRouter._routerCanReuse(e.child):void 0})},e.prototype._canActivate=function(e){return r(e,this.currentInstruction)},e.prototype._routerCanDeactivate=function(e){var t=this;if(p.isBlank(this._outlet))return v;var n,r=null,i=!1,o=null;return p.isPresent(e)&&(r=e.child,o=e.component,i=p.isBlank(e.component)||e.component.reuse),n=i?v:this._outlet.routerCanDeactivate(o),n.then(function(e){return 0==e?!1:p.isPresent(t._childRouter)?t._childRouter._routerCanDeactivate(r):!0})},e.prototype.commit=function(e,t){var n=this;void 0===t&&(t=!1),this.currentInstruction=e;var r=v;if(p.isPresent(this._outlet)&&p.isPresent(e.component)){var i=e.component;r=i.reuse?this._outlet.reuse(i):this.deactivate(e).then(function(e){return n._outlet.activate(i)}),p.isPresent(e.child)&&(r=r.then(function(t){return p.isPresent(n._childRouter)?n._childRouter.commit(e.child):void 0}))}var o=[];return this._auxRouters.forEach(function(t,n){p.isPresent(e.auxInstruction[n])&&o.push(t.commit(e.auxInstruction[n]))}),r.then(function(e){return c.PromiseWrapper.all(o)})},e.prototype._startNavigating=function(){this.navigating=!0},e.prototype._finishNavigating=function(){this.navigating=!1},e.prototype.subscribe=function(e,t){return c.ObservableWrapper.subscribe(this._subject,e,t)},e.prototype.deactivate=function(e){var t=this,n=null,r=null;p.isPresent(e)&&(n=e.child,r=e.component);var i=v;return p.isPresent(this._childRouter)&&(i=this._childRouter.deactivate(n)),p.isPresent(this._outlet)&&(i=i.then(function(e){return t._outlet.deactivate(r)})),i},e.prototype.recognize=function(e){var t=this._getAncestorInstructions();return this.registry.recognize(e,t)},e.prototype._getAncestorInstructions=function(){for(var e=[this.currentInstruction],t=this;p.isPresent(t=t.parent);)e.unshift(t.currentInstruction);return e},e.prototype.renavigate=function(){return p.isBlank(this.lastNavigationAttempt)?this._currentNavigation:this.navigateByUrl(this.lastNavigationAttempt)},e.prototype.generate=function(e){var t=this._getAncestorInstructions();return this.registry.generate(e,t)},e=o([h.Injectable(),s("design:paramtypes",[f.RouteRegistry,e,Object,e])],e)}();t.Router=m;var _=function(e){function t(t,n,r){var i=this;e.call(this,t,null,r),this.root=this,this._location=n,this._locationSub=this._location.subscribe(function(e){i.recognize(e.url).then(function(t){p.isPresent(t)?i.navigateByInstruction(t,p.isPresent(e.pop)).then(function(n){if(!p.isPresent(e.pop)||"hashchange"==e.type){var r=t.toUrlPath(),o=t.toUrlQuery();r.length>0&&"/"!=r[0]&&(r="/"+r),"hashchange"==e.type?t.toRootUrl()!=i._location.path()&&i._location.replaceState(r,o):i._location.go(r,o)}}):i._emitNavigationFail(e.url)})}),this.registry.configFromComponent(r),this.navigateByUrl(n.path())}return i(t,e),t.prototype.commit=function(t,n){var r=this;void 0===n&&(n=!1);var i=t.toUrlPath(),o=t.toUrlQuery();i.length>0&&"/"!=i[0]&&(i="/"+i);var s=e.prototype.commit.call(this,t);return n||(s=s.then(function(e){r._location.go(i,o)})),s},t.prototype.dispose=function(){p.isPresent(this._locationSub)&&(c.ObservableWrapper.dispose(this._locationSub),this._locationSub=null)},t=o([h.Injectable(),a(2,h.Inject(f.ROUTER_PRIMARY_COMPONENT)),s("design:paramtypes",[f.RouteRegistry,d.Location,p.Type])],t)}(m);t.RootRouter=_;var b=function(e){function t(t,n){e.call(this,t.registry,t,n,t.root),this.parent=t}return i(t,e),t.prototype.navigateByUrl=function(e,t){return void 0===t&&(t=!1),this.parent.navigateByUrl(e,t)},t.prototype.navigateByInstruction=function(e,t){return void 0===t&&(t=!1),this.parent.navigateByInstruction(e,t)},t}(m)},function(e,t,n){function r(e){var t=[];return e.forEach(function(e){if(h.isString(e)){var n=e;t=t.concat(n.split("/"))}else t.push(e)}),t}function i(e){if(e=e.filter(function(e){return h.isPresent(e)}),0==e.length)return null;if(1==e.length)return e[0];var t=e[0],n=e.slice(1);return n.reduce(function(e,t){return-1==o(t.specificity,e.specificity)?t:e},t)}function o(e,t){for(var n=h.Math.min(e.length,t.length),r=0;n>r;r+=1){var i=h.StringWrapper.charCodeAt(e,r),o=h.StringWrapper.charCodeAt(t,r),s=o-i;if(0!=s)return s}return e.length-t.length}function s(e,t){if(h.isType(e)){var n=d.reflector.annotations(e);if(h.isPresent(n))for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},p=n(12),l=n(48),h=n(5),f=n(14),d=n(17),y=n(2),v=n(244),g=n(245),m=n(248),_=n(247),b=n(255),P=n(246),C=l.PromiseWrapper.resolve(null);t.ROUTER_PRIMARY_COMPONENT=h.CONST_EXPR(new y.OpaqueToken("RouterPrimaryComponent"));var w=function(){function e(e){this._rootComponent=e,this._rules=new p.Map}return e.prototype.config=function(e,t){t=b.normalizeRouteConfig(t,this),t instanceof v.Route?b.assertComponentExists(t.component,t.path):t instanceof v.AuxRoute&&b.assertComponentExists(t.component,t.path);var n=this._rules.get(e);h.isBlank(n)&&(n=new m.RuleSet,this._rules.set(e,n));var r=n.config(t);t instanceof v.Route&&(r?s(t.component,t.path):this.configFromComponent(t.component))},e.prototype.configFromComponent=function(e){var t=this;if(h.isType(e)&&!this._rules.has(e)){var n=d.reflector.annotations(e);if(h.isPresent(n))for(var r=0;r0?[p.ListWrapper.last(t)]:[],i=r._auxRoutesToUnresolved(e.remainingAux,n),o=new _.ResolvedInstruction(e.instruction,null,i);if(h.isBlank(e.instruction)||e.instruction.terminal)return o;var s=t.concat([o]);return r._recognize(e.remaining,s).then(function(e){return h.isBlank(e)?null:e instanceof _.RedirectInstruction?e:(o.child=e,o)})}if(e instanceof g.RedirectMatch){var o=r.generate(e.redirectTo,t.concat([null]));return new _.RedirectInstruction(o.component,o.child,o.auxInstruction,e.specificity)}})});return!h.isBlank(e)&&""!=e.path||0!=c.length?l.PromiseWrapper.all(u).then(i):l.PromiseWrapper.resolve(this.generateDefault(s))},e.prototype._auxRoutesToUnresolved=function(e,t){var n=this,r={};return e.forEach(function(e){r[e.path]=new _.UnresolvedInstruction(function(){return n._recognize(e,t,!0)})}),r},e.prototype.generate=function(e,t,n){void 0===n&&(n=!1);var i,o=r(e);if(""==p.ListWrapper.first(o))o.shift(),i=p.ListWrapper.first(t),t=[];else if(i=t.length>0?t.pop():null,"."==p.ListWrapper.first(o))o.shift();else if(".."==p.ListWrapper.first(o))for(;".."==p.ListWrapper.first(o);){if(t.length<=0)throw new f.BaseException('Link "'+p.ListWrapper.toJSON(e)+'" has too many "../" segments.');i=t.pop(),o=p.ListWrapper.slice(o,1)}else{var s=p.ListWrapper.first(o),a=this._rootComponent,c=null;if(t.length>1){var u=t[t.length-1],l=t[t.length-2];a=u.component.componentType,c=l.component.componentType}else 1==t.length&&(a=t[0].component.componentType,c=this._rootComponent);var d=this.hasRoute(s,a),y=h.isPresent(c)&&this.hasRoute(s,c);if(y&&d){var v='Link "'+p.ListWrapper.toJSON(e)+'" is ambiguous, use "./" or "../" to disambiguate.';throw new f.BaseException(v)}y&&(i=t.pop())}if(""==o[o.length-1]&&o.pop(),o.length>0&&""==o[0]&&o.shift(),o.length<1){var v='Link "'+p.ListWrapper.toJSON(e)+'" must include a route name.';throw new f.BaseException(v)}for(var g=this._generate(o,t,i,n,e),m=t.length-1;m>=0;m--){var _=t[m];if(h.isBlank(_))break;g=_.replaceChild(g)}return g},e.prototype._generate=function(e,t,n,r,i){var o=this;void 0===r&&(r=!1);var s=this._rootComponent,a=null,c={},u=p.ListWrapper.last(t);if(h.isPresent(u)&&h.isPresent(u.component)&&(s=u.component.componentType),0==e.length){var l=this.generateDefault(s);if(h.isBlank(l))throw new f.BaseException('Link "'+p.ListWrapper.toJSON(i)+'" does not resolve to a terminal instruction.');return l}h.isPresent(n)&&!r&&(c=p.StringMapWrapper.merge(n.auxInstruction,c),a=n.component);var d=this._rules.get(s);if(h.isBlank(d))throw new f.BaseException('Component "'+h.getTypeNameForDebugging(s)+'" has no route config.');var y=0,v={};if(y=e.length;else{var S=t.concat([E]),A=e.slice(y);O=this._generate(A,S,null,!1,i)}E.child=O}return E},e.prototype.hasRoute=function(e,t){var n=this._rules.get(t);return h.isBlank(n)?!1:n.hasRoute(e)},e.prototype.generateDefault=function(e){var t=this;if(h.isBlank(e))return null;var n=this._rules.get(e);if(h.isBlank(n)||h.isBlank(n.defaultRule))return null;var r=null;if(h.isPresent(n.defaultRule.handler.componentType)){var i=n.defaultRule.generate({});return n.defaultRule.terminal||(r=this.generateDefault(n.defaultRule.handler.componentType)),new _.DefaultInstruction(i,r)}return new _.UnresolvedInstruction(function(){return n.defaultRule.handler.resolveComponentType().then(function(n){return t.generateDefault(e)})})},e=a([y.Injectable(),u(0,y.Inject(t.ROUTER_PRIMARY_COMPONENT)),c("design:paramtypes",[h.Type])],e)}();t.RouteRegistry=w},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=function(){function e(e){this.configs=e}return e=i([s.CONST(),o("design:paramtypes",[Array])],e)}();t.RouteConfig=a;var c=function(){function e(e){var t=e.name,n=e.useAsDefault,r=e.path,i=e.regex,o=e.serializer,s=e.data;this.name=t,this.useAsDefault=n,this.path=r,this.regex=i,this.serializer=o,this.data=s}return e=i([s.CONST(),o("design:paramtypes",[Object])],e)}();t.AbstractRoute=c;var u=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.component;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.component=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.Route=u;var p=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.component;e.call(this,{name:n, useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.component=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.AuxRoute=p;var l=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.loader;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.loader=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.AsyncRoute=l;var h=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.redirectTo;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.redirectTo=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.Redirect=h},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(49),a=n(12),c=n(246),u=n(247),p=function(){function e(){}return e}();t.RouteMatch=p;var l=function(e){function t(t,n,r){e.call(this),this.instruction=t,this.remaining=n,this.remainingAux=r}return r(t,e),t}(p);t.PathMatch=l;var h=function(e){function t(t,n){e.call(this),this.redirectTo=t,this.specificity=n}return r(t,e),t}(p);t.RedirectMatch=h;var f=function(){function e(e,t){this._pathRecognizer=e,this.redirectTo=t,this.hash=this._pathRecognizer.hash}return Object.defineProperty(e.prototype,"path",{get:function(){return this._pathRecognizer.toString()},set:function(e){throw new o.BaseException("you cannot set the path of a RedirectRule directly")},enumerable:!0,configurable:!0}),e.prototype.recognize=function(e){var t=null;return i.isPresent(this._pathRecognizer.matchUrl(e))&&(t=new h(this.redirectTo,this._pathRecognizer.specificity)),s.PromiseWrapper.resolve(t)},e.prototype.generate=function(e){throw new o.BaseException("Tried to generate a redirect.")},e}();t.RedirectRule=f;var d=function(){function e(e,t){this._routePath=e,this.handler=t,this._cache=new a.Map,this.specificity=this._routePath.specificity,this.hash=this._routePath.hash,this.terminal=this._routePath.terminal}return Object.defineProperty(e.prototype,"path",{get:function(){return this._routePath.toString()},set:function(e){throw new o.BaseException("you cannot set the path of a RouteRule directly")},enumerable:!0,configurable:!0}),e.prototype.recognize=function(e){var t=this,n=this._routePath.matchUrl(e);return i.isBlank(n)?null:this.handler.resolveComponentType().then(function(e){var r=t._getInstruction(n.urlPath,n.urlParams,n.allParams);return new l(r,n.rest,n.auxiliary)})},e.prototype.generate=function(e){var t=this._routePath.generateUrl(e),n=t.urlPath,r=t.urlParams;return this._getInstruction(n,c.convertUrlParamsToArray(r),e)},e.prototype.generateComponentPathValues=function(e){return this._routePath.generateUrl(e)},e.prototype._getInstruction=function(e,t,n){if(i.isBlank(this.handler.componentType))throw new o.BaseException("Tried to get instruction before the type was loaded.");var r=e+"?"+t.join("&");if(this._cache.has(r))return this._cache.get(r);var s=new u.ComponentInstruction(e,t,this.handler.data,this.handler.componentType,this.terminal,this.specificity,n);return this._cache.set(r,s),s},e}();t.RouteRule=d},function(e,t,n){function r(e){var t=[];return u.isBlank(e)?[]:(c.StringMapWrapper.forEach(e,function(e,n){t.push(e===!0?n:n+"="+e)}),t)}function i(e,t){return void 0===t&&(t="&"),r(e).join(t)}function o(e){for(var t=new l(e[e.length-1]),n=e.length-2;n>=0;n-=1)t=new l(e[n],t);return t}function s(e){var t=u.RegExpWrapper.firstMatch(f,e);return u.isPresent(t)?t[0]:""}var a=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},c=n(12),u=n(5),p=n(14);t.convertUrlParamsToArray=r,t.serializeParams=i;var l=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=u.CONST_EXPR([])),void 0===r&&(r=u.CONST_EXPR({})),this.path=e,this.child=t,this.auxiliary=n,this.params=r}return e.prototype.toString=function(){return this.path+this._matrixParamsToString()+this._auxToString()+this._childString()},e.prototype.segmentToString=function(){return this.path+this._matrixParamsToString()},e.prototype._auxToString=function(){return this.auxiliary.length>0?"("+this.auxiliary.map(function(e){return e.toString()}).join("//")+")":""},e.prototype._matrixParamsToString=function(){var e=i(this.params,";");return e.length>0?";"+e:""},e.prototype._childString=function(){return u.isPresent(this.child)?"/"+this.child.toString():""},e}();t.Url=l;var h=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=u.CONST_EXPR([])),void 0===i&&(i=null),e.call(this,t,n,r,i)}return a(t,e),t.prototype.toString=function(){return this.path+this._auxToString()+this._childString()+this._queryParamsToString()},t.prototype.segmentToString=function(){return this.path+this._queryParamsToString()},t.prototype._queryParamsToString=function(){return u.isBlank(this.params)?"":"?"+i(this.params)},t}(l);t.RootUrl=h,t.pathSegmentsToUrl=o;var f=u.RegExpWrapper.create("^[^\\/\\(\\)\\?;=&#]+"),d=function(){function e(){}return e.prototype.peekStartsWith=function(e){return this._remaining.startsWith(e)},e.prototype.capture=function(e){if(!this._remaining.startsWith(e))throw new p.BaseException('Expected "'+e+'".');this._remaining=this._remaining.substring(e.length)},e.prototype.parse=function(e){return this._remaining=e,""==e||"/"==e?new l(""):this.parseRoot()},e.prototype.parseRoot=function(){this.peekStartsWith("/")&&this.capture("/");var e=s(this._remaining);this.capture(e);var t=[];this.peekStartsWith("(")&&(t=this.parseAuxiliaryRoutes()),this.peekStartsWith(";")&&this.parseMatrixParams();var n=null;this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),n=this.parseSegment());var r=null;return this.peekStartsWith("?")&&(r=this.parseQueryParams()),new h(e,n,t,r)},e.prototype.parseSegment=function(){if(0==this._remaining.length)return null;this.peekStartsWith("/")&&this.capture("/");var e=s(this._remaining);this.capture(e);var t=null;this.peekStartsWith(";")&&(t=this.parseMatrixParams());var n=[];this.peekStartsWith("(")&&(n=this.parseAuxiliaryRoutes());var r=null;return this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),r=this.parseSegment()),new l(e,r,n,t)},e.prototype.parseQueryParams=function(){var e={};for(this.capture("?"),this.parseParam(e);this._remaining.length>0&&this.peekStartsWith("&");)this.capture("&"),this.parseParam(e);return e},e.prototype.parseMatrixParams=function(){for(var e={};this._remaining.length>0&&this.peekStartsWith(";");)this.capture(";"),this.parseParam(e);return e},e.prototype.parseParam=function(e){var t=s(this._remaining);if(!u.isBlank(t)){this.capture(t);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=s(this._remaining);u.isPresent(r)&&(n=r,this.capture(n))}e[t]=n}},e.prototype.parseAuxiliaryRoutes=function(){var e=[];for(this.capture("(");!this.peekStartsWith(")")&&this._remaining.length>0;)e.push(this.parseSegment()),this.peekStartsWith("//")&&this.capture("//");return this.capture(")"),e},e}();t.UrlParser=d,t.parser=new d},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=n(5),s=n(48),a=function(){function e(e){this.params=e}return e.prototype.get=function(e){return o.normalizeBlank(i.StringMapWrapper.get(this.params,e))},e}();t.RouteParams=a;var c=function(){function e(e){void 0===e&&(e=o.CONST_EXPR({})),this.data=e}return e.prototype.get=function(e){return o.normalizeBlank(i.StringMapWrapper.get(this.data,e))},e}();t.RouteData=c,t.BLANK_ROUTE_DATA=new c;var u=function(){function e(e,t,n){this.component=e,this.child=t,this.auxInstruction=n}return Object.defineProperty(e.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specificity",{get:function(){var e="";return o.isPresent(this.component)&&(e+=this.component.specificity),o.isPresent(this.child)&&(e+=this.child.specificity),e},enumerable:!0,configurable:!0}),e.prototype.toRootUrl=function(){return this.toUrlPath()+this.toUrlQuery()},e.prototype._toNonRootUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},e.prototype.toUrlQuery=function(){return this.urlParams.length>0?"?"+this.urlParams.join("&"):""},e.prototype.replaceChild=function(e){return new p(this.component,e,this.auxInstruction)},e.prototype.toUrlPath=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},e.prototype.toLinkUrl=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toLinkUrl():"")+this.toUrlQuery()},e.prototype._toLinkUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toLinkUrl():"")},e.prototype._stringifyPathMatrixAuxPrefixed=function(){var e=this._stringifyPathMatrixAux();return e.length>0&&(e="/"+e),e},e.prototype._stringifyMatrixParams=function(){return this.urlParams.length>0?";"+this.urlParams.join(";"):""},e.prototype._stringifyPathMatrixAux=function(){return o.isBlank(this.component)?"":this.urlPath+this._stringifyMatrixParams()+this._stringifyAux()},e.prototype._stringifyAux=function(){var e=[];return i.StringMapWrapper.forEach(this.auxInstruction,function(t,n){e.push(t._stringifyPathMatrixAux())}),e.length>0?"("+e.join("//")+")":""},e}();t.Instruction=u;var p=function(e){function t(t,n,r){e.call(this,t,n,r)}return r(t,e),t.prototype.resolveComponent=function(){return s.PromiseWrapper.resolve(this.component)},t}(u);t.ResolvedInstruction=p;var l=function(e){function t(t,n){e.call(this,t,n,{})}return r(t,e),t.prototype.toLinkUrl=function(){return""},t.prototype._toLinkUrl=function(){return""},t}(p);t.DefaultInstruction=l;var h=function(e){function t(t,n,r){void 0===n&&(n=""),void 0===r&&(r=o.CONST_EXPR([])),e.call(this,null,null,{}),this._resolver=t,this._urlPath=n,this._urlParams=r}return r(t,e),Object.defineProperty(t.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:o.isPresent(this._urlPath)?this._urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:o.isPresent(this._urlParams)?this._urlParams:[]},enumerable:!0,configurable:!0}),t.prototype.resolveComponent=function(){var e=this;return o.isPresent(this.component)?s.PromiseWrapper.resolve(this.component):this._resolver().then(function(t){return e.child=o.isPresent(t)?t.child:null,e.component=o.isPresent(t)?t.component:null})},t}(u);t.UnresolvedInstruction=h;var f=function(e){function t(t,n,r,i){e.call(this,t,n,r),this._specificity=i}return r(t,e),Object.defineProperty(t.prototype,"specificity",{get:function(){return this._specificity},enumerable:!0,configurable:!0}),t}(p);t.RedirectInstruction=f;var d=function(){function e(e,n,r,i,s,a,c){void 0===c&&(c=null),this.urlPath=e,this.urlParams=n,this.componentType=i,this.terminal=s,this.specificity=a,this.params=c,this.reuse=!1,this.routeData=o.isPresent(r)?r:t.BLANK_ROUTE_DATA}return e}();t.ComponentInstruction=d},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=n(48),a=n(245),c=n(244),u=n(249),p=n(250),l=n(251),h=n(254),f=function(){function e(){this.rulesByName=new o.Map,this.auxRulesByName=new o.Map,this.auxRulesByPath=new o.Map,this.rules=[],this.defaultRule=null}return e.prototype.config=function(e){var t;if(r.isPresent(e.name)&&e.name[0].toUpperCase()!=e.name[0]){var n=e.name[0].toUpperCase()+e.name.substring(1);throw new i.BaseException('Route "'+e.path+'" with name "'+e.name+'" does not begin with an uppercase letter. Route names should be CamelCase like "'+n+'".')}if(e instanceof c.AuxRoute){t=new p.SyncRouteHandler(e.component,e.data);var o=this._getRoutePath(e),s=new a.RouteRule(o,t);return this.auxRulesByPath.set(o.toString(),s),r.isPresent(e.name)&&this.auxRulesByName.set(e.name,s),s.terminal}var l=!1;if(e instanceof c.Redirect){var h=this._getRoutePath(e),f=new a.RedirectRule(h,e.redirectTo);return this._assertNoHashCollision(f.hash,e.path),this.rules.push(f),!0}e instanceof c.Route?(t=new p.SyncRouteHandler(e.component,e.data),l=r.isPresent(e.useAsDefault)&&e.useAsDefault):e instanceof c.AsyncRoute&&(t=new u.AsyncRouteHandler(e.loader,e.data),l=r.isPresent(e.useAsDefault)&&e.useAsDefault);var d=this._getRoutePath(e),y=new a.RouteRule(d,t);if(this._assertNoHashCollision(y.hash,e.path),l){if(r.isPresent(this.defaultRule))throw new i.BaseException("Only one route can be default");this.defaultRule=y}return this.rules.push(y),r.isPresent(e.name)&&this.rulesByName.set(e.name,y),y.terminal},e.prototype.recognize=function(e){var t=[];return this.rules.forEach(function(n){var i=n.recognize(e);r.isPresent(i)&&t.push(i)}),0==t.length&&r.isPresent(e)&&e.auxiliary.length>0?[s.PromiseWrapper.resolve(new a.PathMatch(null,null,e.auxiliary))]:t},e.prototype.recognizeAuxiliary=function(e){var t=this.auxRulesByPath.get(e.path);return r.isPresent(t)?[t.recognize(e)]:[s.PromiseWrapper.resolve(null)]},e.prototype.hasRoute=function(e){return this.rulesByName.has(e)},e.prototype.componentLoaded=function(e){return this.hasRoute(e)&&r.isPresent(this.rulesByName.get(e).handler.componentType)},e.prototype.loadComponent=function(e){return this.rulesByName.get(e).handler.resolveComponentType()},e.prototype.generate=function(e,t){var n=this.rulesByName.get(e);return r.isBlank(n)?null:n.generate(t)},e.prototype.generateAuxiliary=function(e,t){var n=this.auxRulesByName.get(e);return r.isBlank(n)?null:n.generate(t)},e.prototype._assertNoHashCollision=function(e,t){this.rules.forEach(function(n){if(e==n.hash)throw new i.BaseException("Configuration '"+t+"' conflicts with existing route '"+n.path+"'")})},e.prototype._getRoutePath=function(e){if(r.isPresent(e.regex)){if(r.isFunction(e.serializer))return new h.RegexRoutePath(e.regex,e.serializer);throw new i.BaseException("Route provides a regex property, '"+e.regex+"', but no serializer property")}if(r.isPresent(e.path)){var t=e instanceof c.AuxRoute&&e.path.startsWith("/")?e.path.substring(1):e.path;return new l.ParamRoutePath(t)}throw new i.BaseException("Route must provide either a path or regex property")},e}();t.RuleSet=f},function(e,t,n){var r=n(5),i=n(247),o=function(){function e(e,t){void 0===t&&(t=null),this._loader=e,this._resolvedComponent=null,this.data=r.isPresent(t)?new i.RouteData(t):i.BLANK_ROUTE_DATA}return e.prototype.resolveComponentType=function(){var e=this;return r.isPresent(this._resolvedComponent)?this._resolvedComponent:this._resolvedComponent=this._loader().then(function(t){return e.componentType=t,t})},e}();t.AsyncRouteHandler=o},function(e,t,n){var r=n(48),i=n(5),o=n(247),s=function(){function e(e,t){this.componentType=e,this._resolvedComponent=null,this._resolvedComponent=r.PromiseWrapper.resolve(e),this.data=i.isPresent(t)?new o.RouteData(t):o.BLANK_ROUTE_DATA}return e.prototype.resolveComponentType=function(){return this._resolvedComponent},e}();t.SyncRouteHandler=s},function(e,t,n){function r(e){return o.isBlank(e)?null:(e=o.StringWrapper.replaceAll(e,v,"%25"),e=o.StringWrapper.replaceAll(e,g,"%2F"),e=o.StringWrapper.replaceAll(e,m,"%28"),e=o.StringWrapper.replaceAll(e,_,"%29"),e=o.StringWrapper.replaceAll(e,b,"%3B"))}function i(e){return o.isBlank(e)?null:(e=o.StringWrapper.replaceAll(e,P,";"),e=o.StringWrapper.replaceAll(e,C,")"),e=o.StringWrapper.replaceAll(e,w,"("),e=o.StringWrapper.replaceAll(e,R,"/"),e=o.StringWrapper.replaceAll(e,E,"%"))}var o=n(5),s=n(14),a=n(12),c=n(252),u=n(246),p=n(253),l=function(){function e(){this.name="",this.specificity="",this.hash="..."}return e.prototype.generate=function(e){return""},e.prototype.match=function(e){return!0},e}(),h=function(){function e(e){this.path=e,this.name="",this.specificity="2",this.hash=e}return e.prototype.match=function(e){return e==this.path},e.prototype.generate=function(e){return this.path},e}(),f=function(){function e(e){this.name=e,this.specificity="1",this.hash=":"}return e.prototype.match=function(e){return e.length>0},e.prototype.generate=function(e){if(!a.StringMapWrapper.contains(e.map,this.name))throw new s.BaseException("Route generator for '"+this.name+"' was not included in parameters passed.");return r(c.normalizeString(e.get(this.name)))},e.paramMatcher=/^:([^\/]+)$/g,e}(),d=function(){function e(e){this.name=e,this.specificity="0",this.hash="*"}return e.prototype.match=function(e){return!0},e.prototype.generate=function(e){return c.normalizeString(e.get(this.name))},e.wildcardMatcher=/^\*([^\/]+)$/g,e}(),y=function(){function e(e){this.routePath=e,this.terminal=!0,this._assertValidPath(e),this._parsePathString(e),this.specificity=this._calculateSpecificity(),this.hash=this._calculateHash();var t=this._segments[this._segments.length-1];this.terminal=!(t instanceof l)}return e.prototype.matchUrl=function(e){for(var t,n=e,r={},s=[],c=0;c=r;r++){var i,a=t[r];if(o.isPresent(i=o.RegExpWrapper.firstMatch(f.paramMatcher,a)))this._segments.push(new f(i[1]));else if(o.isPresent(i=o.RegExpWrapper.firstMatch(d.wildcardMatcher,a)))this._segments.push(new d(i[1]));else if("..."==a){if(n>r)throw new s.BaseException('Unexpected "..." before the end of the path for "'+e+'".');this._segments.push(new l)}else this._segments.push(new h(a))}},e.prototype._calculateSpecificity=function(){var e,t,n=this._segments.length;if(0==n)t+="2";else for(t="",e=0;n>e;e++)t+=this._segments[e].specificity;return t},e.prototype._calculateHash=function(){var e,t=this._segments.length,n=[];for(e=0;t>e;e++)n.push(this._segments[e].hash);return n.join("/")},e.prototype._assertValidPath=function(t){if(o.StringWrapper.contains(t,"#"))throw new s.BaseException('Path "'+t+'" should not include "#". Use "HashLocationStrategy" instead.');var n=o.RegExpWrapper.firstMatch(e.RESERVED_CHARS,t);if(o.isPresent(n))throw new s.BaseException('Path "'+t+'" contains "'+n[0]+'" which is not allowed in a route config.')},e.RESERVED_CHARS=o.RegExpWrapper.create("//|\\(|\\)|;|\\?|="),e}();t.ParamRoutePath=y;var v=/%/g,g=/\//g,m=/\(/g,_=/\)/g,b=/;/g,P=/%3B/gi,C=/%29/gi,w=/%28/gi,R=/%2F/gi,E=/%25/gi},function(e,t,n){function r(e){return i.isBlank(e)?null:e.toString()}var i=n(5),o=n(12),s=function(){function e(e){var t=this;this.map={},this.keys={},i.isPresent(e)&&o.StringMapWrapper.forEach(e,function(e,n){t.map[n]=i.isPresent(e)?e.toString():null,t.keys[n]=!0})}return e.prototype.get=function(e){return o.StringMapWrapper["delete"](this.keys,e),this.map[e]},e.prototype.getUnused=function(){var e=this,t={},n=o.StringMapWrapper.keys(this.keys);return n.forEach(function(n){return t[n]=o.StringMapWrapper.get(e.map,n)}),t},e}();t.TouchMap=s,t.normalizeString=r},function(e,t){var n=function(){function e(e,t,n,r,i){this.urlPath=e,this.urlParams=t,this.allParams=n,this.auxiliary=r,this.rest=i}return e}();t.MatchedUrl=n;var r=function(){function e(e,t){this.urlPath=e,this.urlParams=t}return e}();t.GeneratedUrl=r},function(e,t,n){var r=n(5),i=n(253),o=function(){function e(e,t){this._reString=e,this._serializer=t,this.terminal=!0,this.specificity="2",this.hash=this._reString,this._regex=r.RegExpWrapper.create(this._reString)}return e.prototype.matchUrl=function(e){var t=e.toString(),n={},o=r.RegExpWrapper.matcher(this._regex,t),s=r.RegExpMatcherWrapper.next(o);if(r.isBlank(s))return null;for(var a=0;a0&&t.startsWith(e)?t.substring(e.length):t}function i(e){return/\/index.html$/g.test(e)?e.substring(0,e.length-11):e}function o(e){return/\/$/g.test(e)&&(e=e.substring(0,e.length-1)),e}var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(258),u=n(48),p=n(2),l=function(){function e(e){var t=this;this.platformStrategy=e,this._subject=new u.EventEmitter;var n=this.platformStrategy.getBaseHref();this._baseHref=o(i(n)),this.platformStrategy.onPopState(function(e){u.ObservableWrapper.callEmit(t._subject,{url:t.path(),pop:!0,type:e.type})})}return e.prototype.path=function(){return this.normalize(this.platformStrategy.path())},e.prototype.normalize=function(e){return o(r(this._baseHref,i(e)))},e.prototype.prepareExternalUrl=function(e){return e.length>0&&!e.startsWith("/")&&(e="/"+e),this.platformStrategy.prepareExternalUrl(e)},e.prototype.go=function(e,t){void 0===t&&(t=""),this.platformStrategy.pushState(null,"",e,t)},e.prototype.replaceState=function(e,t){void 0===t&&(t=""),this.platformStrategy.replaceState(null,"",e,t)},e.prototype.forward=function(){this.platformStrategy.forward()},e.prototype.back=function(){this.platformStrategy.back()},e.prototype.subscribe=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),u.ObservableWrapper.subscribe(this._subject,e,t,n)},e=s([p.Injectable(),a("design:paramtypes",[c.LocationStrategy])],e)}();t.Location=l},function(e,t,n){function r(e){return e.length>0&&"?"!=e.substring(0,1)?"?"+e:e}function i(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}var o=n(5),s=n(2),a=function(){function e(){}return e}();t.LocationStrategy=a,t.APP_BASE_HREF=o.CONST_EXPR(new s.OpaqueToken("appBaseHref")),t.normalizeQueryParams=r,t.joinWithSlash=i},function(e,t,n){function r(e,t){return t instanceof o.Type?e.name in t.prototype:!1}function i(e){for(var t=a.reflector.annotations(e),n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.name=e}return e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.RouteLifecycleHook=s;var a=function(){function e(e){this.fn=e}return e=r([o.CONST(),i("design:paramtypes",[Function])],e)}();t.CanActivate=a,t.routerCanReuse=o.CONST_EXPR(new s("routerCanReuse")),t.routerCanDeactivate=o.CONST_EXPR(new s("routerCanDeactivate")),t.routerOnActivate=o.CONST_EXPR(new s("routerOnActivate")),t.routerOnReuse=o.CONST_EXPR(new s("routerOnReuse")),t.routerOnDeactivate=o.CONST_EXPR(new s("routerOnDeactivate"))},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(48),a=n(12),c=n(5),u=n(2),p=n(242),l=n(247),h=n(262),f=n(259),d=s.PromiseWrapper.resolve(!0),y=function(){function e(e,t,n,r){this._elementRef=e,this._loader=t,this._parentRouter=n,this.name=null,this._componentRef=null,this._currentInstruction=null,c.isPresent(r)?(this.name=r,this._parentRouter.registerAuxOutlet(this)):this._parentRouter.registerPrimaryOutlet(this)}return e.prototype.activate=function(e){var t=this,n=this._currentInstruction;this._currentInstruction=e;var r=e.componentType,i=this._parentRouter.childRouter(r),o=u.Injector.resolve([u.provide(l.RouteData,{useValue:e.routeData}),u.provide(l.RouteParams,{useValue:new l.RouteParams(e.params)}),u.provide(p.Router,{useValue:i})]);return this._componentRef=this._loader.loadNextToLocation(r,this._elementRef,o),this._componentRef.then(function(i){return f.hasLifecycleHook(h.routerOnActivate,r)?t._componentRef.then(function(t){return t.instance.routerOnActivate(e,n)}):i})},e.prototype.reuse=function(e){var t=this._currentInstruction;return this._currentInstruction=e,c.isBlank(this._componentRef)?this.activate(e):s.PromiseWrapper.resolve(f.hasLifecycleHook(h.routerOnReuse,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerOnReuse(e,t)}):!0)},e.prototype.deactivate=function(e){var t=this,n=d;return c.isPresent(this._componentRef)&&c.isPresent(this._currentInstruction)&&f.hasLifecycleHook(h.routerOnDeactivate,this._currentInstruction.componentType)&&(n=this._componentRef.then(function(n){return n.instance.routerOnDeactivate(e,t._currentInstruction)})),n.then(function(e){if(c.isPresent(t._componentRef)){var n=t._componentRef.then(function(e){return e.dispose()});return t._componentRef=null,n}})},e.prototype.routerCanDeactivate=function(e){var t=this;return c.isBlank(this._currentInstruction)?d:f.hasLifecycleHook(h.routerCanDeactivate,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerCanDeactivate(e,t._currentInstruction)}):d},e.prototype.routerCanReuse=function(e){var t,n=this;return t=c.isBlank(this._currentInstruction)||this._currentInstruction.componentType!=e.componentType?!1:f.hasLifecycleHook(h.routerCanReuse,this._currentInstruction.componentType)?this._componentRef.then(function(t){return t.instance.routerCanReuse(e,n._currentInstruction)}):e==this._currentInstruction||c.isPresent(e.params)&&c.isPresent(this._currentInstruction.params)&&a.StringMapWrapper.equals(e.params,this._currentInstruction.params),s.PromiseWrapper.resolve(t)},e.prototype.ngOnDestroy=function(){this._parentRouter.unregisterPrimaryOutlet(this)},e=r([u.Directive({selector:"router-outlet"}),o(3,u.Attribute("name")),i("design:paramtypes",[u.ElementRef,u.DynamicComponentLoader,p.Router,String])],e)}();t.RouterOutlet=y},function(e,t,n){var r=n(9),i=n(260),o=n(260);t.routerCanReuse=o.routerCanReuse,t.routerCanDeactivate=o.routerCanDeactivate,t.routerOnActivate=o.routerOnActivate,t.routerOnReuse=o.routerOnReuse,t.routerOnDeactivate=o.routerOnDeactivate,t.CanActivate=r.makeDecorator(i.CanActivate)},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=n(242),c=n(257),u=function(){function e(e,t){var n=this;this._router=e,this._location=t,this._router.subscribe(function(e){return n._updateLink()})}return e.prototype._updateLink=function(){this._navigationInstruction=this._router.generate(this._routeParams);var e=this._navigationInstruction.toLinkUrl();this.visibleHref=this._location.prepareExternalUrl(e)},Object.defineProperty(e.prototype,"isRouteActive",{get:function(){return this._router.isRouteActive(this._navigationInstruction)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeParams",{set:function(e){this._routeParams=e,this._updateLink()},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){return s.isString(this.target)&&"_self"!=this.target?!0:(this._router.navigateByInstruction(this._navigationInstruction),!1)},e=r([o.Directive({selector:"[routerLink]",inputs:["routeParams: routerLink","target: target"],host:{"(click)":"onClick()","[attr.href]":"visibleHref","[class.router-link-active]":"isRouteActive"}}),i("design:paramtypes",[a.Router,c.Location])],e)}();t.RouterLink=u},function(e,t){var n=function(){function e(){}return Object.defineProperty(e.prototype,"pathname",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{ get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.PlatformLocation=n},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(258),u=n(5),p=n(264),l=function(e){function t(t,n){e.call(this),this._platformLocation=t,this._baseHref="",u.isPresent(n)&&(this._baseHref=n)}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.path=function(){var e=this._platformLocation.hash;return u.isPresent(e)||(e="#"),e.length>0?e.substring(1):e},t.prototype.prepareExternalUrl=function(e){var t=c.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(c.APP_BASE_HREF)),o("design:paramtypes",[p.PlatformLocation,String])],t)}(c.LocationStrategy);t.HashLocationStrategy=l},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(5),u=n(14),p=n(258),l=n(264),h=function(e){function t(t,n){if(e.call(this),this._platformLocation=t,c.isBlank(n)&&(n=this._platformLocation.getBaseHrefFromDOM()),c.isBlank(n))throw new u.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=n}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.prepareExternalUrl=function(e){return p.joinWithSlash(this._baseHref,e)},t.prototype.path=function(){return this._platformLocation.pathname+p.normalizeQueryParams(this._platformLocation.search)},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(p.APP_BASE_HREF)),o("design:paramtypes",[l.PlatformLocation,String])],t)}(p.LocationStrategy);t.PathLocationStrategy=h},function(e,t){},function(e,t,n){function r(e,t,n,r){var i=new a.RootRouter(e,t,n);return r.registerDisposeListener(function(){return i.dispose()}),i}function i(e){if(0==e.componentTypes.length)throw new h.BaseException("Bootstrap at least one component before injecting Router.");return e.componentTypes[0]}var o=n(258),s=n(266),a=n(242),c=n(243),u=n(257),p=n(5),l=n(2),h=n(14);t.ROUTER_PROVIDERS_COMMON=p.CONST_EXPR([c.RouteRegistry,p.CONST_EXPR(new l.Provider(o.LocationStrategy,{useClass:s.PathLocationStrategy})),u.Location,p.CONST_EXPR(new l.Provider(a.Router,{useFactory:r,deps:p.CONST_EXPR([c.RouteRegistry,u.Location,c.ROUTER_PRIMARY_COMPONENT,l.ApplicationRef])})),p.CONST_EXPR(new l.Provider(c.ROUTER_PRIMARY_COMPONENT,{useFactory:i,deps:p.CONST_EXPR([l.ApplicationRef])}))])},function(e,t,n){var r=n(268),i=n(2),o=n(5),s=n(270),a=n(264);t.ROUTER_PROVIDERS=o.CONST_EXPR([r.ROUTER_PROVIDERS_COMMON,o.CONST_EXPR(new i.Provider(a.PlatformLocation,{useClass:s.BrowserPlatformLocation}))]),t.ROUTER_BINDINGS=t.ROUTER_PROVIDERS},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(2),a=n(264),c=n(194),u=function(e){function t(){e.call(this),this._init()}return r(t,e),t.prototype._init=function(){this._location=c.DOM.getLocation(),this._history=c.DOM.getHistory()},Object.defineProperty(t.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),t.prototype.getBaseHrefFromDOM=function(){return c.DOM.getBaseHref()},t.prototype.onPopState=function(e){c.DOM.getGlobalEventTarget("window").addEventListener("popstate",e,!1)},t.prototype.onHashChange=function(e){c.DOM.getGlobalEventTarget("window").addEventListener("hashchange",e,!1)},Object.defineProperty(t.prototype,"pathname",{get:function(){return this._location.pathname},set:function(e){this._location.pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),t.prototype.pushState=function(e,t,n){this._history.pushState(e,t,n)},t.prototype.replaceState=function(e,t,n){this._history.replaceState(e,t,n)},t.prototype.forward=function(){this._history.forward()},t.prototype.back=function(){this._history.back()},t=i([s.Injectable(),o("design:paramtypes",[])],t)}(a.PlatformLocation);t.BrowserPlatformLocation=u},function(e,t,n){var r=n(161),i=n(2),o=n(272),s=n(5),a=n(272);t.RouterLinkTransform=a.RouterLinkTransform,t.ROUTER_LINK_DSL_PROVIDER=s.CONST_EXPR(new i.Provider(r.TEMPLATE_TRANSFORMS,{useClass:o.RouterLinkTransform,multi:!0}))},function(e,t,n){function r(e,t){var n=new v(e,t.trim()).tokenize();return new g(n).generate()}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=n(161),c=n(31),u=n(14),p=n(2),l=n(33),h=function(){function e(e){this.value=e}return e}(),f=function(){function e(){}return e}(),d=function(){function e(){}return e}(),y=function(){function e(e){this.ast=e}return e}(),v=function(){function e(e,t){this.parser=e,this.exp=t,this.index=0}return e.prototype.tokenize=function(){for(var e=[];this.indexn;n++)t.insertBefore(e[n],this.contentInsertionPoint)},e.prototype.setupOutputs=function(){for(var e=this,t=this.attrs,n=this.info.outputs,r=0;r1)throw new Error("Only support single directive definition for: "+this.name);var n=t[0];n.replace&&this.notSupported("replace"),n.terminal&&this.notSupported("terminal");var r=n.link;return"object"==typeof r&&r.post&&this.notSupported("link.post"),n},e.prototype.notSupported=function(e){throw new Error("Upgraded directive '"+this.name+"' does not support '"+e+"'.")},e.prototype.extractBindings=function(){var e="object"==typeof this.directive.bindToController;if(e&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var t=e?this.directive.bindToController:this.directive.scope;if("object"==typeof t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],i=r.charAt(0);r=r.substr(1)||n;var o="output_"+n,s=o+": "+n,a=o+": "+n+"Change",c="input_"+n,u=c+": "+n;switch(i){case"=":this.propertyOutputs.push(o),this.checkProperties.push(r),this.outputs.push(o),this.outputsRename.push(a),this.propertyMap[o]=r;case"@":this.inputs.push(c),this.inputsRename.push(u),this.propertyMap[c]=r;break;case"&":this.outputs.push(o),this.outputsRename.push(s),this.propertyMap[o]=r;break;default:var p=JSON.stringify(t);throw new Error("Unexpected mapping '"+i+"' in '"+p+"' in '"+this.name+"' directive.")}}},e.prototype.compileTemplate=function(e,t,n){function r(t){var n=document.createElement("div");return n.innerHTML=t,e(n.childNodes)}var i=this;if(void 0!==this.directive.template)this.linkFn=r(this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var o=this.directive.templateUrl,s=t.get(o);if(void 0===s)return new Promise(function(e,s){n("GET",o,null,function(n,a){200==n?e(i.linkFn=r(t.put(o,a))):s("GET "+o+" returned "+n+": "+a)})});this.linkFn=r(s)}return null},e.resolve=function(e,t){var n=[],r=t.get(i.NG1_COMPILE),o=t.get(i.NG1_TEMPLATE_CACHE),s=t.get(i.NG1_HTTP_BACKEND),a=t.get(i.NG1_CONTROLLER);for(var c in e)if(e.hasOwnProperty(c)){var u=e[c];u.directive=u.extractDirective(t),u.$controller=a,u.extractBindings();var p=u.compileTemplate(r,o,s);p&&n.push(p)}return Promise.all(n)},e}();t.UpgradeNg1ComponentAdapterBuilder=p;var l=function(){function e(e,t,n,i,a,p,l,h,f,d){this.directive=n,this.inputs=p,this.outputs=l,this.propOuts=h,this.checkProperties=f,this.propertyMap=d,this.destinationObj=null,this.checkLastValues=[];for(var y,v=i.nativeElement,g=[];y=v.firstChild;)v.removeChild(y),g.push(y);var m=t.$new(!!n.scope),_=s.element(v),b=n.controller,P=null;if(b){var C={$scope:m,$element:_};P=a(b,C,null,n.controllerAs),_.data(o.controllerKey(n.name),P)}var w=n.link;if("object"==typeof w&&(w=w.pre),w){var R=u,E=u,O=this.resolveRequired(_,n.require);n.link(m,_,R,O,E)}this.destinationObj=n.bindToController&&P?P:m,e(m,function(e,t){for(var n=0,r=e.length;r>n;n++)v.appendChild(e[n])},{parentBoundTranscludeFn:function(e,t){t(g)}});for(var S=0;S