Socket
Socket
Sign inDemoInstall

@angular/upgrade

Package Overview
Dependencies
4
Maintainers
1
Versions
813
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.2.2

src/aot/component_info.metadata.json

7

bundles/upgrade-static.umd.js
/**
* @license Angular v2.2.1
* @license Angular v2.2.2
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -906,5 +906,4 @@ * License: MIT

var injector = _this.injector;
// Cannot use arrow function below because we need to grab the context
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
var whenStableContext = this;
originalWhenStable.call(this, function () {

@@ -916,3 +915,3 @@ var ng2Testability = injector.get(_angular_core.Testability);

else {
ng2Testability.whenStable(newWhenStable.bind(whenStableContext, callback));
ng2Testability.whenStable(newWhenStable.bind(this, callback));
}

@@ -919,0 +918,0 @@ });

/**
* @license Angular v2.2.1
* @license Angular v2.2.2
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -13,2 +13,2 @@ * License: MIT

*/
var UPGRADE_MODULE_NAME="$$UpgradeModule",INJECTOR_KEY="$$angularInjector",$INJECTOR="$injector",$PARSE="$parse",$SCOPE="$scope",$PROVIDE="$provide",$DELEGATE="$delegate",$$TESTABILITY="$$testability",$COMPILE="$compile",$TEMPLATE_CACHE="$templateCache",$HTTP_BACKEND="$httpBackend",$CONTROLLER="$controller",PropertyBinding=function(){function PropertyBinding(binding){this.binding=binding,this.parseBinding()}return PropertyBinding.prototype.parseBinding=function(){var parts=this.binding.split(":");this.prop=parts[0].trim(),this.attr=(parts[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var capitalAttr=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+capitalAttr,this.bindAttr="bind"+capitalAttr,this.bindonAttr="bindon"+capitalAttr},PropertyBinding}(),INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(id,info,element,attrs,scope,parentInjector,parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.parentInjector=parentInjector,this.parse=parse,this.componentFactory=componentFactory,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=id,this.componentScope=scope.$new(),this.childNodes=element.contents()}return DowngradeComponentAdapter.prototype.createComponent=function(){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.componentRef=this.componentFactory.create(childInjector,[[this.contentInsertionPoint]],this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance},DowngradeComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=new PropertyBinding(inputs[i]),expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(value){null!==_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(value,prevValue===INITIAL_VALUE?value:prevValue),prevValue=value),_this.component[prop]=value}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(value,prevValue){null!=_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(prevValue,value)),_this.component[prop]=value}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.component.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeComponentAdapter.prototype.projectContent=function(){var childNodes=this.childNodes,parent=this.contentInsertionPoint.parentNode;if(parent)for(var i=0,ii=childNodes.length;i<ii;i++)parent.insertBefore(childNodes[i],this.contentInsertionPoint)},DowngradeComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=new PropertyBinding(outputs[j]),expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+this.info.component+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeComponentAdapter}(),Ng1Change=function(){function Ng1Change(previousValue,currentValue){this.previousValue=previousValue,this.currentValue=currentValue}return Ng1Change.prototype.isFirstChange=function(){return this.previousValue===this.currentValue},Ng1Change}(),downgradeCount=0,angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var tempInjectorRef,bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,REQUIRE_PREFIX_RE=/^(\^\^?)?(\?)?(\^\^?)?/,NOT_SUPPORTED="NOT_SUPPORTED",INITIAL_VALUE$1={__UNINITIALIZED__:!0},Bindings=function(){function Bindings(){this.twoWayBoundProperties=[],this.twoWayBoundLastValues=[],this.expressionBoundProperties=[],this.propertyToOutputMap={}}return Bindings}(),UpgradeComponent=function(){function UpgradeComponent(name,elementRef,injector){this.name=name,this.elementRef=elementRef,this.injector=injector,this.controllerInstance=null,this.bindingDestination=null,this.$injector=injector.get($INJECTOR),this.$compile=this.$injector.get($COMPILE),this.$templateCache=this.$injector.get($TEMPLATE_CACHE),this.$httpBackend=this.$injector.get($HTTP_BACKEND),this.$controller=this.$injector.get($CONTROLLER),this.element=elementRef.nativeElement,this.$element=element(this.element),this.directive=this.getDirective(name),this.bindings=this.initializeBindings(this.directive),this.linkFn=this.compileTemplate(this.directive);var $parentScope=injector.get($SCOPE);this.$componentScope=$parentScope.$new(!!this.directive.scope);var controllerType=this.directive.controller,bindToController=this.directive.bindToController;if(controllerType)this.controllerInstance=this.buildController(controllerType,this.$componentScope,this.$element,this.directive.controllerAs);else if(bindToController)throw new Error("Upgraded directive '"+name+"' specifies 'bindToController' but no controller.");this.bindingDestination=bindToController?this.controllerInstance:this.$componentScope,this.setupOutputs()}return UpgradeComponent.prototype.ngOnInit=function(){var _this=this,attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,directiveRequire=this.getDirectiveRequire(this.directive),requiredControllers=this.resolveRequire(this.directive.name,this.$element,directiveRequire);if(this.directive.bindToController&&isMap(directiveRequire)){var requiredControllersMap_1=requiredControllers;Object.keys(requiredControllersMap_1).forEach(function(key){_this.controllerInstance[key]=requiredControllersMap_1[key]})}this.callLifecycleHook("$onInit",this.controllerInstance);var link=this.directive.link,preLink="object"==typeof link&&link.pre,postLink="object"==typeof link?link.post:link;preLink&&preLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn);for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);var attachElement=function(clonedElements,scope){_this.$element.append(clonedElements)},attachChildNodes=function(scope,cloneAttach){return cloneAttach(childNodes)};this.linkFn(this.$componentScope,attachElement,{parentBoundTranscludeFn:attachChildNodes}),postLink&&postLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn),this.callLifecycleHook("$postLink",this.controllerInstance)},UpgradeComponent.prototype.ngOnChanges=function(changes){var _this=this;Object.keys(changes).forEach(function(propName){return _this.bindingDestination[propName]=changes[propName].currentValue}),this.callLifecycleHook("$onChanges",this.bindingDestination,changes)},UpgradeComponent.prototype.ngDoCheck=function(){var _this=this,twoWayBoundProperties=this.bindings.twoWayBoundProperties,twoWayBoundLastValues=this.bindings.twoWayBoundLastValues,propertyToOutputMap=this.bindings.propertyToOutputMap;twoWayBoundProperties.forEach(function(propName,idx){var newValue=_this.bindingDestination[propName],oldValue=twoWayBoundLastValues[idx];if(!looseIdentical(newValue,oldValue)){var outputName=propertyToOutputMap[propName],eventEmitter=_this[outputName];eventEmitter.emit(newValue),twoWayBoundLastValues[idx]=newValue}})},UpgradeComponent.prototype.ngOnDestroy=function(){this.callLifecycleHook("$onDestroy",this.controllerInstance),this.$componentScope.$destroy()},UpgradeComponent.prototype.callLifecycleHook=function(method,context,arg){context&&"function"==typeof context[method]&&context[method](arg)},UpgradeComponent.prototype.getDirective=function(name){var directives=this.$injector.get(name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal"),directive.compile&&this.notSupported("compile");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeComponent.prototype.getDirectiveRequire=function(directive){var require=directive.require||directive.controller&&directive.name;return isMap(require)&&Object.keys(require).forEach(function(key){var value=require[key],match=value.match(REQUIRE_PREFIX_RE),name=value.substring(match[0].length);name||(require[key]=match[0]+key)}),require},UpgradeComponent.prototype.initializeBindings=function(directive){var _this=this,btcIsObject="object"==typeof directive.bindToController;if(btcIsObject&&Object.keys(directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time is not supported.");var context=btcIsObject?directive.bindToController:directive.scope,bindings=new Bindings;return"object"==typeof context&&Object.keys(context).forEach(function(propName){var definition=context[propName],bindingType=definition.charAt(0);switch(bindingType){case"@":case"<":break;case"=":bindings.twoWayBoundProperties.push(propName),bindings.twoWayBoundLastValues.push(INITIAL_VALUE$1),bindings.propertyToOutputMap[propName]=propName+"Change";break;case"&":bindings.expressionBoundProperties.push(propName),bindings.propertyToOutputMap[propName]=propName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+bindingType+"' in '"+json+"' in '"+_this.name+"' directive.")}}),bindings},UpgradeComponent.prototype.compileTemplate=function(directive){if(void 0!==this.directive.template)return this.compileHtml(getOrCall(this.directive.template));if(this.directive.templateUrl){var url=getOrCall(this.directive.templateUrl),html=this.$templateCache.get(url);if(void 0!==html)return this.compileHtml(html);throw new Error("loading directive templates asynchronously is not supported")}throw new Error("Directive '"+this.name+"' is not a component, it is missing template.")},UpgradeComponent.prototype.buildController=function(controllerType,$scope,$element,controllerAs){var locals={$scope:$scope,$element:$element},controller=this.$controller(controllerType,locals,null,controllerAs);return $element.data(controllerKey(this.directive.name),controller),controller},UpgradeComponent.prototype.resolveRequire=function(directiveName,$element,require){var _this=this;if(require){if(Array.isArray(require))return require.map(function(req){return _this.resolveRequire(directiveName,$element,req)});if("object"==typeof require){var value_1={};return Object.keys(require).forEach(function(key){return value_1[key]=_this.resolveRequire(directiveName,$element,require[key])}),value_1}if("string"==typeof require){var match=require.match(REQUIRE_PREFIX_RE),inheritType=match[1]||match[3],name_1=require.substring(match[0].length),isOptional=!!match[2],searchParents=!!inheritType,startOnParent="^^"===inheritType,ctrlKey=controllerKey(name_1);startOnParent&&($element=$element.parent());var value=searchParents?$element.inheritedData(ctrlKey):$element.data(ctrlKey);if(!value&&!isOptional)throw new Error("Unable to find required '"+require+"' in upgraded directive '"+directiveName+"'.");return value}throw new Error("Unrecognized require syntax on upgraded directive '"+directiveName+"': "+require)}return null},UpgradeComponent.prototype.setupOutputs=function(){var _this=this;this.bindings.twoWayBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName];_this[outputName]=new _angular_core.EventEmitter}),this.bindings.expressionBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName],emitter=_this[outputName]=new _angular_core.EventEmitter;_this.bindingDestination[propName]=function(value){return emitter.emit(value)}})},UpgradeComponent.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' contains unsupported feature: '"+feature+"'.")},UpgradeComponent.prototype.compileHtml=function(html){var div=document.createElement("div");return div.innerHTML=html,this.$compile(div.childNodes)},UpgradeComponent}(),angular1Providers=[{provide:"$injector",useFactory:injectorFactory},{provide:"$rootScope",useFactory:rootScopeFactory,deps:["$injector"]},{provide:"$compile",useFactory:compileFactory,deps:["$injector"]},{provide:"$parse",useFactory:parseFactory,deps:["$injector"]}],UpgradeModule=function(){function UpgradeModule(injector,ngZone){this.injector=injector,this.ngZone=ngZone}return UpgradeModule.prototype.bootstrap=function(element$$,modules,config){var _this=this;void 0===modules&&(modules=[]);var upgradeModule=module$1(UPGRADE_MODULE_NAME,modules).value(INJECTOR_KEY,this.injector).config([$PROVIDE,$INJECTOR,function($provide,$injector){$injector.has($$TESTABILITY)&&$provide.decorator($$TESTABILITY,[$DELEGATE,function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,injector=_this.injector,newWhenStable=function(callback){var whenStableContext=this;originalWhenStable.call(this,function(){var ng2Testability=injector.get(_angular_core.Testability);ng2Testability.isStable()?callback.apply(this,arguments):ng2Testability.whenStable(newWhenStable.bind(whenStableContext,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]).run([$INJECTOR,function($injector){_this.$injector=$injector,setTempInjectorRef($injector),_this.injector.get($INJECTOR),element(element$$).data(controllerKey(INJECTOR_KEY),_this.injector);var $rootScope=$injector.get("$rootScope");_this.ngZone.onMicrotaskEmpty.subscribe(function(){return _this.ngZone.runOutsideAngular(function(){return $rootScope.$evalAsync()})})}]),windowAngular=window.angular;if(windowAngular.resumeBootstrap=void 0,this.ngZone.run(function(){bootstrap(element$$,[upgradeModule.name],config)}),windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap,ngZone_1=this.ngZone;windowAngular.resumeBootstrap=function(){var _this=this,args=arguments;windowAngular.resumeBootstrap=originalResumeBootstrap_1,ngZone_1.run(function(){windowAngular.resumeBootstrap.apply(_this,args)})}}},UpgradeModule.decorators=[{type:_angular_core.NgModule,args:[{providers:angular1Providers}]}],UpgradeModule.ctorParameters=[{type:_angular_core.Injector},{type:_angular_core.NgZone}],UpgradeModule}();exports.downgradeComponent=downgradeComponent,exports.downgradeInjectable=downgradeInjectable,exports.UpgradeComponent=UpgradeComponent,exports.UpgradeModule=UpgradeModule});
var UPGRADE_MODULE_NAME="$$UpgradeModule",INJECTOR_KEY="$$angularInjector",$INJECTOR="$injector",$PARSE="$parse",$SCOPE="$scope",$PROVIDE="$provide",$DELEGATE="$delegate",$$TESTABILITY="$$testability",$COMPILE="$compile",$TEMPLATE_CACHE="$templateCache",$HTTP_BACKEND="$httpBackend",$CONTROLLER="$controller",PropertyBinding=function(){function PropertyBinding(binding){this.binding=binding,this.parseBinding()}return PropertyBinding.prototype.parseBinding=function(){var parts=this.binding.split(":");this.prop=parts[0].trim(),this.attr=(parts[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var capitalAttr=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+capitalAttr,this.bindAttr="bind"+capitalAttr,this.bindonAttr="bindon"+capitalAttr},PropertyBinding}(),INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(id,info,element,attrs,scope,parentInjector,parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.parentInjector=parentInjector,this.parse=parse,this.componentFactory=componentFactory,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=id,this.componentScope=scope.$new(),this.childNodes=element.contents()}return DowngradeComponentAdapter.prototype.createComponent=function(){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.componentRef=this.componentFactory.create(childInjector,[[this.contentInsertionPoint]],this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance},DowngradeComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=new PropertyBinding(inputs[i]),expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(value){null!==_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(value,prevValue===INITIAL_VALUE?value:prevValue),prevValue=value),_this.component[prop]=value}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(value,prevValue){null!=_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(prevValue,value)),_this.component[prop]=value}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.component.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeComponentAdapter.prototype.projectContent=function(){var childNodes=this.childNodes,parent=this.contentInsertionPoint.parentNode;if(parent)for(var i=0,ii=childNodes.length;i<ii;i++)parent.insertBefore(childNodes[i],this.contentInsertionPoint)},DowngradeComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=new PropertyBinding(outputs[j]),expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+this.info.component+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeComponentAdapter}(),Ng1Change=function(){function Ng1Change(previousValue,currentValue){this.previousValue=previousValue,this.currentValue=currentValue}return Ng1Change.prototype.isFirstChange=function(){return this.previousValue===this.currentValue},Ng1Change}(),downgradeCount=0,angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var tempInjectorRef,bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,REQUIRE_PREFIX_RE=/^(\^\^?)?(\?)?(\^\^?)?/,NOT_SUPPORTED="NOT_SUPPORTED",INITIAL_VALUE$1={__UNINITIALIZED__:!0},Bindings=function(){function Bindings(){this.twoWayBoundProperties=[],this.twoWayBoundLastValues=[],this.expressionBoundProperties=[],this.propertyToOutputMap={}}return Bindings}(),UpgradeComponent=function(){function UpgradeComponent(name,elementRef,injector){this.name=name,this.elementRef=elementRef,this.injector=injector,this.controllerInstance=null,this.bindingDestination=null,this.$injector=injector.get($INJECTOR),this.$compile=this.$injector.get($COMPILE),this.$templateCache=this.$injector.get($TEMPLATE_CACHE),this.$httpBackend=this.$injector.get($HTTP_BACKEND),this.$controller=this.$injector.get($CONTROLLER),this.element=elementRef.nativeElement,this.$element=element(this.element),this.directive=this.getDirective(name),this.bindings=this.initializeBindings(this.directive),this.linkFn=this.compileTemplate(this.directive);var $parentScope=injector.get($SCOPE);this.$componentScope=$parentScope.$new(!!this.directive.scope);var controllerType=this.directive.controller,bindToController=this.directive.bindToController;if(controllerType)this.controllerInstance=this.buildController(controllerType,this.$componentScope,this.$element,this.directive.controllerAs);else if(bindToController)throw new Error("Upgraded directive '"+name+"' specifies 'bindToController' but no controller.");this.bindingDestination=bindToController?this.controllerInstance:this.$componentScope,this.setupOutputs()}return UpgradeComponent.prototype.ngOnInit=function(){var _this=this,attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,directiveRequire=this.getDirectiveRequire(this.directive),requiredControllers=this.resolveRequire(this.directive.name,this.$element,directiveRequire);if(this.directive.bindToController&&isMap(directiveRequire)){var requiredControllersMap_1=requiredControllers;Object.keys(requiredControllersMap_1).forEach(function(key){_this.controllerInstance[key]=requiredControllersMap_1[key]})}this.callLifecycleHook("$onInit",this.controllerInstance);var link=this.directive.link,preLink="object"==typeof link&&link.pre,postLink="object"==typeof link?link.post:link;preLink&&preLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn);for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);var attachElement=function(clonedElements,scope){_this.$element.append(clonedElements)},attachChildNodes=function(scope,cloneAttach){return cloneAttach(childNodes)};this.linkFn(this.$componentScope,attachElement,{parentBoundTranscludeFn:attachChildNodes}),postLink&&postLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn),this.callLifecycleHook("$postLink",this.controllerInstance)},UpgradeComponent.prototype.ngOnChanges=function(changes){var _this=this;Object.keys(changes).forEach(function(propName){return _this.bindingDestination[propName]=changes[propName].currentValue}),this.callLifecycleHook("$onChanges",this.bindingDestination,changes)},UpgradeComponent.prototype.ngDoCheck=function(){var _this=this,twoWayBoundProperties=this.bindings.twoWayBoundProperties,twoWayBoundLastValues=this.bindings.twoWayBoundLastValues,propertyToOutputMap=this.bindings.propertyToOutputMap;twoWayBoundProperties.forEach(function(propName,idx){var newValue=_this.bindingDestination[propName],oldValue=twoWayBoundLastValues[idx];if(!looseIdentical(newValue,oldValue)){var outputName=propertyToOutputMap[propName],eventEmitter=_this[outputName];eventEmitter.emit(newValue),twoWayBoundLastValues[idx]=newValue}})},UpgradeComponent.prototype.ngOnDestroy=function(){this.callLifecycleHook("$onDestroy",this.controllerInstance),this.$componentScope.$destroy()},UpgradeComponent.prototype.callLifecycleHook=function(method,context,arg){context&&"function"==typeof context[method]&&context[method](arg)},UpgradeComponent.prototype.getDirective=function(name){var directives=this.$injector.get(name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal"),directive.compile&&this.notSupported("compile");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeComponent.prototype.getDirectiveRequire=function(directive){var require=directive.require||directive.controller&&directive.name;return isMap(require)&&Object.keys(require).forEach(function(key){var value=require[key],match=value.match(REQUIRE_PREFIX_RE),name=value.substring(match[0].length);name||(require[key]=match[0]+key)}),require},UpgradeComponent.prototype.initializeBindings=function(directive){var _this=this,btcIsObject="object"==typeof directive.bindToController;if(btcIsObject&&Object.keys(directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time is not supported.");var context=btcIsObject?directive.bindToController:directive.scope,bindings=new Bindings;return"object"==typeof context&&Object.keys(context).forEach(function(propName){var definition=context[propName],bindingType=definition.charAt(0);switch(bindingType){case"@":case"<":break;case"=":bindings.twoWayBoundProperties.push(propName),bindings.twoWayBoundLastValues.push(INITIAL_VALUE$1),bindings.propertyToOutputMap[propName]=propName+"Change";break;case"&":bindings.expressionBoundProperties.push(propName),bindings.propertyToOutputMap[propName]=propName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+bindingType+"' in '"+json+"' in '"+_this.name+"' directive.")}}),bindings},UpgradeComponent.prototype.compileTemplate=function(directive){if(void 0!==this.directive.template)return this.compileHtml(getOrCall(this.directive.template));if(this.directive.templateUrl){var url=getOrCall(this.directive.templateUrl),html=this.$templateCache.get(url);if(void 0!==html)return this.compileHtml(html);throw new Error("loading directive templates asynchronously is not supported")}throw new Error("Directive '"+this.name+"' is not a component, it is missing template.")},UpgradeComponent.prototype.buildController=function(controllerType,$scope,$element,controllerAs){var locals={$scope:$scope,$element:$element},controller=this.$controller(controllerType,locals,null,controllerAs);return $element.data(controllerKey(this.directive.name),controller),controller},UpgradeComponent.prototype.resolveRequire=function(directiveName,$element,require){var _this=this;if(require){if(Array.isArray(require))return require.map(function(req){return _this.resolveRequire(directiveName,$element,req)});if("object"==typeof require){var value_1={};return Object.keys(require).forEach(function(key){return value_1[key]=_this.resolveRequire(directiveName,$element,require[key])}),value_1}if("string"==typeof require){var match=require.match(REQUIRE_PREFIX_RE),inheritType=match[1]||match[3],name_1=require.substring(match[0].length),isOptional=!!match[2],searchParents=!!inheritType,startOnParent="^^"===inheritType,ctrlKey=controllerKey(name_1);startOnParent&&($element=$element.parent());var value=searchParents?$element.inheritedData(ctrlKey):$element.data(ctrlKey);if(!value&&!isOptional)throw new Error("Unable to find required '"+require+"' in upgraded directive '"+directiveName+"'.");return value}throw new Error("Unrecognized require syntax on upgraded directive '"+directiveName+"': "+require)}return null},UpgradeComponent.prototype.setupOutputs=function(){var _this=this;this.bindings.twoWayBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName];_this[outputName]=new _angular_core.EventEmitter}),this.bindings.expressionBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName],emitter=_this[outputName]=new _angular_core.EventEmitter;_this.bindingDestination[propName]=function(value){return emitter.emit(value)}})},UpgradeComponent.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' contains unsupported feature: '"+feature+"'.")},UpgradeComponent.prototype.compileHtml=function(html){var div=document.createElement("div");return div.innerHTML=html,this.$compile(div.childNodes)},UpgradeComponent}(),angular1Providers=[{provide:"$injector",useFactory:injectorFactory},{provide:"$rootScope",useFactory:rootScopeFactory,deps:["$injector"]},{provide:"$compile",useFactory:compileFactory,deps:["$injector"]},{provide:"$parse",useFactory:parseFactory,deps:["$injector"]}],UpgradeModule=function(){function UpgradeModule(injector,ngZone){this.injector=injector,this.ngZone=ngZone}return UpgradeModule.prototype.bootstrap=function(element$$,modules,config){var _this=this;void 0===modules&&(modules=[]);var upgradeModule=module$1(UPGRADE_MODULE_NAME,modules).value(INJECTOR_KEY,this.injector).config([$PROVIDE,$INJECTOR,function($provide,$injector){$injector.has($$TESTABILITY)&&$provide.decorator($$TESTABILITY,[$DELEGATE,function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,injector=_this.injector,newWhenStable=function(callback){originalWhenStable.call(this,function(){var ng2Testability=injector.get(_angular_core.Testability);ng2Testability.isStable()?callback.apply(this,arguments):ng2Testability.whenStable(newWhenStable.bind(this,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]).run([$INJECTOR,function($injector){_this.$injector=$injector,setTempInjectorRef($injector),_this.injector.get($INJECTOR),element(element$$).data(controllerKey(INJECTOR_KEY),_this.injector);var $rootScope=$injector.get("$rootScope");_this.ngZone.onMicrotaskEmpty.subscribe(function(){return _this.ngZone.runOutsideAngular(function(){return $rootScope.$evalAsync()})})}]),windowAngular=window.angular;if(windowAngular.resumeBootstrap=void 0,this.ngZone.run(function(){bootstrap(element$$,[upgradeModule.name],config)}),windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap,ngZone_1=this.ngZone;windowAngular.resumeBootstrap=function(){var _this=this,args=arguments;windowAngular.resumeBootstrap=originalResumeBootstrap_1,ngZone_1.run(function(){windowAngular.resumeBootstrap.apply(_this,args)})}}},UpgradeModule.decorators=[{type:_angular_core.NgModule,args:[{providers:angular1Providers}]}],UpgradeModule.ctorParameters=[{type:_angular_core.Injector},{type:_angular_core.NgZone}],UpgradeModule}();exports.downgradeComponent=downgradeComponent,exports.downgradeInjectable=downgradeInjectable,exports.UpgradeComponent=UpgradeComponent,exports.UpgradeModule=UpgradeModule});
/**
* @license Angular v2.2.1
* @license Angular v2.2.2
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -308,3 +308,4 @@ * License: MIT

ngOnChanges: function () { },
ngDoCheck: function () { }
ngDoCheck: function () { },
ngOnDestroy: function () { },
});

@@ -511,11 +512,14 @@ }

UpgradeNg1ComponentAdapter.prototype.ngOnChanges = function (changes) {
for (var name_3 in changes) {
if (changes.hasOwnProperty(name_3)) {
var change = changes[name_3];
this.setComponentProperty(name_3, change.currentValue);
}
var _this = this;
var ng1Changes = {};
Object.keys(changes).forEach(function (name) {
var change = changes[name];
_this.setComponentProperty(name, change.currentValue);
ng1Changes[_this.propertyMap[name]] = change;
});
if (this.destinationObj.$onChanges) {
this.destinationObj.$onChanges(ng1Changes);
}
};
UpgradeNg1ComponentAdapter.prototype.ngDoCheck = function () {
var count = 0;
var destinationObj = this.destinationObj;

@@ -536,4 +540,11 @@ var lastValues = this.checkLastValues;

}
return count;
if (this.destinationObj.$doCheck && this.directive.controller) {
this.destinationObj.$doCheck();
}
};
UpgradeNg1ComponentAdapter.prototype.ngOnDestroy = function () {
if (this.destinationObj.$onDestroy && this.directive.controller) {
this.destinationObj.$onDestroy();
}
};
UpgradeNg1ComponentAdapter.prototype.setComponentProperty = function (name, value) {

@@ -553,19 +564,19 @@ this.destinationObj[this.propertyMap[name]] = value;

else if (typeof require == 'string') {
var name_4 = require;
var name_3 = require;
var isOptional = false;
var startParent = false;
var searchParents = false;
if (name_4.charAt(0) == '?') {
if (name_3.charAt(0) == '?') {
isOptional = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
if (name_4.charAt(0) == '^') {
if (name_3.charAt(0) == '^') {
searchParents = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
if (name_4.charAt(0) == '^') {
if (name_3.charAt(0) == '^') {
startParent = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
var key = controllerKey(name_4);
var key = controllerKey(name_3);
if (startParent)

@@ -925,7 +936,6 @@ $element = $element.parent();

function (testabilityDelegate) {
var _this = this;
var originalWhenStable = testabilityDelegate.whenStable;
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
var whenStableContext = _this;
originalWhenStable.call(_this, function () {
originalWhenStable.call(this, function () {
var ng2Testability = moduleRef.injector.get(_angular_core.Testability);

@@ -936,3 +946,3 @@ if (ng2Testability.isStable()) {

else {
ng2Testability.whenStable(newWhenStable.bind(whenStableContext, callback));
ng2Testability.whenStable(newWhenStable.bind(this, callback));
}

@@ -999,4 +1009,6 @@ });

windowAngular.resumeBootstrap = function () {
var _this = this;
var args = arguments;
windowAngular.resumeBootstrap = originalResumeBootstrap_1;
windowAngular.resumeBootstrap.apply(this, arguments);
ngZone.run(function () { windowAngular.resumeBootstrap.apply(_this, args); });
resolve();

@@ -1003,0 +1015,0 @@ };

/**
* @license Angular v2.2.1
* @license Angular v2.2.2
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/platform-browser-dynamic"),require("@angular/compiler")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser-dynamic","@angular/compiler"],factory):factory((global.ng=global.ng||{},global.ng.upgrade=global.ng.upgrade||{}),global.ng.core,global.ng.platformBrowserDynamic,global.ng.compiler)}(this,function(exports,_angular_core,_angular_platformBrowserDynamic,_angular_compiler){"use strict";function noNg(){throw new Error("AngularJS v1.x is not loaded!")}function getComponentInfo(type){var resolvedMetadata=directiveResolver.resolve(type),selector=resolvedMetadata.selector;if(!selector.match(COMPONENT_SELECTOR))throw new Error("Only selectors matching element names are supported, got: "+selector);return selector=selector.replace(SKEWER_CASE,function(all,letter){return letter.toUpperCase()}),{type:type,selector:selector,inputs:parseFields(resolvedMetadata.inputs),outputs:parseFields(resolvedMetadata.outputs)}}function parseFields(names){var attrProps=[];if(names)for(var i=0;i<names.length;i++){var parts=names[i].split(":"),prop=parts[0].trim(),attr=(parts[1]||parts[0]).trim(),capitalAttr=attr.charAt(0).toUpperCase()+attr.substr(1);attrProps.push({prop:prop,attr:attr,bracketAttr:"["+attr+"]",parenAttr:"("+attr+")",bracketParenAttr:"[("+attr+")]",onAttr:"on"+capitalAttr,bindAttr:"bind"+capitalAttr,bindonAttr:"bindon"+capitalAttr})}return attrProps}function onError(e){throw console.log(e,e.stack),e}function controllerKey(name){return"$"+name+"Controller"}function ng1ComponentDirective(info,idPrefix){function directiveFactory(ng1Injector,componentFactoryRefMap,parse){var idCount=0;return{restrict:"E",require:REQUIRE_INJECTOR,link:{post:function(scope,element,attrs,parentInjector,transclude){var componentFactory=componentFactoryRefMap[info.selector];if(!componentFactory)throw new Error("Expecting ComponentFactory for: "+info.selector);null===parentInjector&&(parentInjector=ng1Injector.get(NG2_INJECTOR));var facade=new DowngradeNg2ComponentAdapter(idPrefix+idCount++,info,element,attrs,scope,parentInjector,parse,componentFactory);facade.setupInputs(),facade.bootstrapNg2(),facade.projectContent(),facade.setupOutputs(),facade.registerCleanup()}}}}return directiveFactory.$inject=[NG1_INJECTOR,NG2_COMPONENT_FACTORY_REF_MAP,NG1_PARSE],directiveFactory}var angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,NG2_COMPILER="ng2.Compiler",NG2_INJECTOR="ng2.Injector",NG2_COMPONENT_FACTORY_REF_MAP="ng2.ComponentFactoryRefMap",NG2_ZONE="ng2.NgZone",NG1_CONTROLLER="$controller",NG1_SCOPE="$scope",NG1_ROOT_SCOPE="$rootScope",NG1_COMPILE="$compile",NG1_HTTP_BACKEND="$httpBackend",NG1_INJECTOR="$injector",NG1_PARSE="$parse",NG1_TEMPLATE_CACHE="$templateCache",NG1_TESTABILITY="$$testability",REQUIRE_INJECTOR="?^"+NG2_INJECTOR,INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeNg2ComponentAdapter=function(){function DowngradeNg2ComponentAdapter(id,info,element,attrs,scope,parentInjector,parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.parentInjector=parentInjector,this.parse=parse,this.componentFactory=componentFactory,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=id,this.componentScope=scope.$new(),this.childNodes=element.contents()}return DowngradeNg2ComponentAdapter.prototype.bootstrapNg2=function(){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:NG1_SCOPE,useValue:this.componentScope}],this.parentInjector);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.componentRef=this.componentFactory.create(childInjector,[[this.contentInsertionPoint]],this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance},DowngradeNg2ComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=inputs[i],expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(value){null!==_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(value,prevValue===INITIAL_VALUE?value:prevValue),prevValue=value),_this.component[prop]=value}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(value,prevValue){null!=_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(prevValue,value)),_this.component[prop]=value}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.type.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeNg2ComponentAdapter.prototype.projectContent=function(){var childNodes=this.childNodes,parent=this.contentInsertionPoint.parentNode;if(parent)for(var i=0,ii=childNodes.length;i<ii;i++)parent.insertBefore(childNodes[i],this.contentInsertionPoint)},DowngradeNg2ComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=outputs[j],expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+this.info.selector+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeNg2ComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeNg2ComponentAdapter}(),Ng1Change=function(){function Ng1Change(previousValue,currentValue){this.previousValue=previousValue,this.currentValue=currentValue}return Ng1Change.prototype.isFirstChange=function(){return this.previousValue===this.currentValue},Ng1Change}(),COMPONENT_SELECTOR=/^[\w|-]*$/,SKEWER_CASE=/-(\w)/g,directiveResolver=new _angular_compiler.DirectiveResolver,CAMEL_CASE=/([A-Z])/g,INITIAL_VALUE$1={__UNINITIALIZED__:!0},NOT_SUPPORTED="NOT_SUPPORTED",UpgradeNg1ComponentAdapterBuilder=function(){function UpgradeNg1ComponentAdapterBuilder(name){this.name=name,this.inputs=[],this.inputsRename=[],this.outputs=[],this.outputsRename=[],this.propertyOutputs=[],this.checkProperties=[],this.propertyMap={},this.linkFn=null,this.directive=null,this.$controller=null;var selector=name.replace(CAMEL_CASE,function(all,next){return"-"+next.toLowerCase()}),self=this;this.type=_angular_core.Directive({selector:selector,inputs:this.inputsRename,outputs:this.outputsRename}).Class({constructor:[new _angular_core.Inject(NG1_SCOPE),_angular_core.ElementRef,function(scope,elementRef){return new UpgradeNg1ComponentAdapter(self.linkFn,scope,self.directive,elementRef,self.$controller,self.inputs,self.outputs,self.propertyOutputs,self.checkProperties,self.propertyMap)}],ngOnInit:function(){},ngOnChanges:function(){},ngDoCheck:function(){}})}return UpgradeNg1ComponentAdapterBuilder.prototype.extractDirective=function(injector){var directives=injector.get(this.name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeNg1ComponentAdapterBuilder.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' does not support '"+feature+"'.")},UpgradeNg1ComponentAdapterBuilder.prototype.extractBindings=function(){var btcIsObject="object"==typeof this.directive.bindToController;if(btcIsObject&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var context=btcIsObject?this.directive.bindToController:this.directive.scope;if("object"==typeof context)for(var name_1 in context)if(context.hasOwnProperty(name_1)){var localName=context[name_1],type=localName.charAt(0),typeOptions=localName.charAt(1);localName="?"===typeOptions?localName.substr(2):localName.substr(1),localName=localName||name_1;var outputName="output_"+name_1,outputNameRename=outputName+": "+name_1,outputNameRenameChange=outputName+": "+name_1+"Change",inputName="input_"+name_1,inputNameRename=inputName+": "+name_1;switch(type){case"=":this.propertyOutputs.push(outputName),this.checkProperties.push(localName),this.outputs.push(outputName),this.outputsRename.push(outputNameRenameChange),this.propertyMap[outputName]=localName,this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"@":case"<":this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"&":this.outputs.push(outputName),this.outputsRename.push(outputNameRename),this.propertyMap[outputName]=localName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+type+"' in '"+json+"' in '"+this.name+"' directive.")}}},UpgradeNg1ComponentAdapterBuilder.prototype.compileTemplate=function(compile,templateCache,httpBackend){function compileHtml(html){var div=document.createElement("div");return div.innerHTML=html,compile(div.childNodes)}var _this=this;if(void 0!==this.directive.template)this.linkFn=compileHtml("function"==typeof this.directive.template?this.directive.template():this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var url_1="function"==typeof this.directive.templateUrl?this.directive.templateUrl():this.directive.templateUrl,html=templateCache.get(url_1);if(void 0===html)return new Promise(function(resolve,err){httpBackend("GET",url_1,null,function(status,response){200==status?resolve(_this.linkFn=compileHtml(templateCache.put(url_1,response))):err("GET "+url_1+" returned "+status+": "+response)})});this.linkFn=compileHtml(html)}return null},UpgradeNg1ComponentAdapterBuilder.resolve=function(exportedComponents,injector){var promises=[],compile=injector.get(NG1_COMPILE),templateCache=injector.get(NG1_TEMPLATE_CACHE),httpBackend=injector.get(NG1_HTTP_BACKEND),$controller=injector.get(NG1_CONTROLLER);for(var name_2 in exportedComponents)if(exportedComponents.hasOwnProperty(name_2)){var exportedComponent=exportedComponents[name_2];exportedComponent.directive=exportedComponent.extractDirective(injector),exportedComponent.$controller=$controller,exportedComponent.extractBindings();var promise=exportedComponent.compileTemplate(compile,templateCache,httpBackend);promise&&promises.push(promise)}return Promise.all(promises)},UpgradeNg1ComponentAdapterBuilder}(),UpgradeNg1ComponentAdapter=function(){function UpgradeNg1ComponentAdapter(linkFn,scope,directive,elementRef,$controller,inputs,outputs,propOuts,checkProperties,propertyMap){this.linkFn=linkFn,this.directive=directive,this.$controller=$controller,this.inputs=inputs,this.outputs=outputs,this.propOuts=propOuts,this.checkProperties=checkProperties,this.propertyMap=propertyMap,this.destinationObj=null,this.checkLastValues=[],this.$element=null,this.element=elementRef.nativeElement,this.componentScope=scope.$new(!!directive.scope),this.$element=element(this.element);var controllerType=directive.controller;directive.bindToController&&controllerType?this.destinationObj=this.buildController(controllerType):this.destinationObj=this.componentScope;for(var i=0;i<inputs.length;i++)this[inputs[i]]=null;for(var j=0;j<outputs.length;j++){var emitter=this[outputs[j]]=new _angular_core.EventEmitter;this.setComponentProperty(outputs[j],function(emitter){return function(value){return emitter.emit(value)}}(emitter))}for(var k=0;k<propOuts.length;k++)this[propOuts[k]]=new _angular_core.EventEmitter,this.checkLastValues.push(INITIAL_VALUE$1)}return UpgradeNg1ComponentAdapter.prototype.ngOnInit=function(){var _this=this;!this.directive.bindToController&&this.directive.controller&&this.buildController(this.directive.controller);var link=this.directive.link;if("object"==typeof link&&(link=link.pre),link){var attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,linkController=this.resolveRequired(this.$element,this.directive.require);this.directive.link(this.componentScope,this.$element,attrs,linkController,transcludeFn)}for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);this.linkFn(this.componentScope,function(clonedElement,scope){for(var i=0,ii=clonedElement.length;i<ii;i++)_this.element.appendChild(clonedElement[i])},{parentBoundTranscludeFn:function(scope,cloneAttach){cloneAttach(childNodes)}}),this.destinationObj.$onInit&&this.destinationObj.$onInit()},UpgradeNg1ComponentAdapter.prototype.ngOnChanges=function(changes){for(var name_3 in changes)if(changes.hasOwnProperty(name_3)){var change=changes[name_3];this.setComponentProperty(name_3,change.currentValue)}},UpgradeNg1ComponentAdapter.prototype.ngDoCheck=function(){for(var count=0,destinationObj=this.destinationObj,lastValues=this.checkLastValues,checkProperties=this.checkProperties,i=0;i<checkProperties.length;i++){var value=destinationObj[checkProperties[i]],last=lastValues[i];if(value!==last)if("number"==typeof value&&isNaN(value)&&"number"==typeof last&&isNaN(last));else{var eventEmitter=this[this.propOuts[i]];eventEmitter.emit(lastValues[i]=value)}}return count},UpgradeNg1ComponentAdapter.prototype.setComponentProperty=function(name,value){this.destinationObj[this.propertyMap[name]]=value},UpgradeNg1ComponentAdapter.prototype.buildController=function(controllerType){var locals={$scope:this.componentScope,$element:this.$element},controller=this.$controller(controllerType,locals,null,this.directive.controllerAs);return this.$element.data(controllerKey(this.directive.name),controller),controller},UpgradeNg1ComponentAdapter.prototype.resolveRequired=function($element,require){if(require){if("string"==typeof require){var name_4=require,isOptional=!1,startParent=!1,searchParents=!1;"?"==name_4.charAt(0)&&(isOptional=!0,name_4=name_4.substr(1)),"^"==name_4.charAt(0)&&(searchParents=!0,name_4=name_4.substr(1)),"^"==name_4.charAt(0)&&(startParent=!0,name_4=name_4.substr(1));var key=controllerKey(name_4);startParent&&($element=$element.parent());var dep=searchParents?$element.inheritedData(key):$element.data(key);if(!dep&&!isOptional)throw new Error("Can not locate '"+require+"' in '"+this.directive.name+"'.");return dep}if(require instanceof Array){for(var deps=[],i=0;i<require.length;i++)deps.push(this.resolveRequired($element,require[i]));return deps}throw new Error("Directive '"+this.directive.name+"' require syntax unrecognized: "+this.directive.require)}},UpgradeNg1ComponentAdapter}(),upgradeCount=0,UpgradeAdapter=function(){function UpgradeAdapter(ng2AppModule,compilerOptions){if(this.ng2AppModule=ng2AppModule,this.compilerOptions=compilerOptions,this.idPrefix="NG2_UPGRADE_"+upgradeCount++ +"_",this.upgradedComponents=[],this.ng1ComponentsToBeUpgraded={},this.providers=[],!ng2AppModule)throw new Error("UpgradeAdapter cannot be instantiated without an NgModule of the Angular 2 app.")}return UpgradeAdapter.prototype.downgradeNg2Component=function(type){this.upgradedComponents.push(type);var info=getComponentInfo(type);return ng1ComponentDirective(info,""+this.idPrefix+info.selector+"_c")},UpgradeAdapter.prototype.upgradeNg1Component=function(name){return this.ng1ComponentsToBeUpgraded.hasOwnProperty(name)?this.ng1ComponentsToBeUpgraded[name].type:(this.ng1ComponentsToBeUpgraded[name]=new UpgradeNg1ComponentAdapterBuilder(name)).type},UpgradeAdapter.prototype.bootstrap=function(element$$,modules,config){var original$applyFn,rootScopePrototype,rootScope,ng1BootstrapPromise,ng1compilePromise,_this=this,ngZone=new _angular_core.NgZone({enableLongStackTrace:Zone.hasOwnProperty("longStackTraceZoneSpec")}),upgrade=new UpgradeAdapterRef,ng1Injector=null,moduleRef=null,delayApplyExps=[],componentFactoryRefMap={},ng1Module=module$1(this.idPrefix,modules);ng1Module.factory(NG2_INJECTOR,function(){return moduleRef.injector.get(_angular_core.Injector)}).value(NG2_ZONE,ngZone).factory(NG2_COMPILER,function(){return moduleRef.injector.get(_angular_core.Compiler)}).value(NG2_COMPONENT_FACTORY_REF_MAP,componentFactoryRefMap).config(["$provide","$injector",function(provide,ng1Injector){provide.decorator(NG1_ROOT_SCOPE,["$delegate",function(rootScopeDelegate){if(rootScopePrototype=rootScopeDelegate.constructor.prototype,!rootScopePrototype.hasOwnProperty("$apply"))throw new Error("Failed to find '$apply' on '$rootScope'!");return original$applyFn=rootScopePrototype.$apply,rootScopePrototype.$apply=function(exp){return delayApplyExps.push(exp)},rootScope=rootScopeDelegate}]),ng1Injector.has(NG1_TESTABILITY)&&provide.decorator(NG1_TESTABILITY,["$delegate",function(testabilityDelegate){var _this=this,originalWhenStable=testabilityDelegate.whenStable,newWhenStable=function(callback){var whenStableContext=_this;originalWhenStable.call(_this,function(){var ng2Testability=moduleRef.injector.get(_angular_core.Testability);ng2Testability.isStable()?callback.apply(this,arguments):ng2Testability.whenStable(newWhenStable.bind(whenStableContext,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]),ng1compilePromise=new Promise(function(resolve,reject){ng1Module.run(["$injector","$rootScope",function(injector,rootScope){ng1Injector=injector,UpgradeNg1ComponentAdapterBuilder.resolve(_this.ng1ComponentsToBeUpgraded,injector).then(function(){var DynamicNgUpgradeModule=_angular_core.NgModule({providers:[{provide:NG1_INJECTOR,useFactory:function(){return ng1Injector}},{provide:NG1_COMPILE,useFactory:function(){return ng1Injector.get(NG1_COMPILE)}},_this.providers],imports:[_this.ng2AppModule]}).Class({constructor:function(){},ngDoBootstrap:function(){}});_angular_platformBrowserDynamic.platformBrowserDynamic()._bootstrapModuleWithZone(DynamicNgUpgradeModule,_this.compilerOptions,ngZone,function(componentFactories){componentFactories.forEach(function(componentFactory){var type=componentFactory.componentType;_this.upgradedComponents.indexOf(type)!==-1&&(componentFactoryRefMap[getComponentInfo(type).selector]=componentFactory)})}).then(function(ref){moduleRef=ref,element(element$$).data(controllerKey(NG2_INJECTOR),moduleRef.injector),ngZone.onMicrotaskEmpty.subscribe({next:function(_){return ngZone.runOutsideAngular(function(){return rootScope.$evalAsync()})}})}).then(resolve,reject)}).catch(reject)}])});var windowAngular=window.angular;return windowAngular.resumeBootstrap=void 0,ngZone.run(function(){bootstrap(element$$,[_this.idPrefix],config)}),ng1BootstrapPromise=new Promise(function(resolve){if(windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap;windowAngular.resumeBootstrap=function(){windowAngular.resumeBootstrap=originalResumeBootstrap_1,windowAngular.resumeBootstrap.apply(this,arguments),resolve()}}else resolve()}),Promise.all([ng1BootstrapPromise,ng1compilePromise]).then(function(){moduleRef.injector.get(_angular_core.NgZone).run(function(){if(rootScopePrototype){for(rootScopePrototype.$apply=original$applyFn;delayApplyExps.length;)rootScope.$apply(delayApplyExps.shift());upgrade._bootstrapDone(moduleRef,ng1Injector),rootScopePrototype=null}})},onError),upgrade},UpgradeAdapter.prototype.upgradeNg1Provider=function(name,options){var token=options&&options.asToken||name;this.providers.push({provide:token,useFactory:function(ng1Injector){return ng1Injector.get(name)},deps:[NG1_INJECTOR]})},UpgradeAdapter.prototype.downgradeNg2Provider=function(token){var factory=function(injector){return injector.get(token)};return factory.$inject=[NG2_INJECTOR],factory},UpgradeAdapter}(),UpgradeAdapterRef=function(){function UpgradeAdapterRef(){this._readyFn=null,this.ng1RootScope=null,this.ng1Injector=null,this.ng2ModuleRef=null,this.ng2Injector=null}return UpgradeAdapterRef.prototype._bootstrapDone=function(ngModuleRef,ng1Injector){this.ng2ModuleRef=ngModuleRef,this.ng2Injector=ngModuleRef.injector,this.ng1Injector=ng1Injector,this.ng1RootScope=ng1Injector.get(NG1_ROOT_SCOPE),this._readyFn&&this._readyFn(this)},UpgradeAdapterRef.prototype.ready=function(fn){this._readyFn=fn},UpgradeAdapterRef.prototype.dispose=function(){this.ng1Injector.get(NG1_ROOT_SCOPE).$destroy(),this.ng2ModuleRef.destroy()},UpgradeAdapterRef}();exports.UpgradeAdapter=UpgradeAdapter,exports.UpgradeAdapterRef=UpgradeAdapterRef});
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/platform-browser-dynamic"),require("@angular/compiler")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser-dynamic","@angular/compiler"],factory):factory((global.ng=global.ng||{},global.ng.upgrade=global.ng.upgrade||{}),global.ng.core,global.ng.platformBrowserDynamic,global.ng.compiler)}(this,function(exports,_angular_core,_angular_platformBrowserDynamic,_angular_compiler){"use strict";function noNg(){throw new Error("AngularJS v1.x is not loaded!")}function getComponentInfo(type){var resolvedMetadata=directiveResolver.resolve(type),selector=resolvedMetadata.selector;if(!selector.match(COMPONENT_SELECTOR))throw new Error("Only selectors matching element names are supported, got: "+selector);return selector=selector.replace(SKEWER_CASE,function(all,letter){return letter.toUpperCase()}),{type:type,selector:selector,inputs:parseFields(resolvedMetadata.inputs),outputs:parseFields(resolvedMetadata.outputs)}}function parseFields(names){var attrProps=[];if(names)for(var i=0;i<names.length;i++){var parts=names[i].split(":"),prop=parts[0].trim(),attr=(parts[1]||parts[0]).trim(),capitalAttr=attr.charAt(0).toUpperCase()+attr.substr(1);attrProps.push({prop:prop,attr:attr,bracketAttr:"["+attr+"]",parenAttr:"("+attr+")",bracketParenAttr:"[("+attr+")]",onAttr:"on"+capitalAttr,bindAttr:"bind"+capitalAttr,bindonAttr:"bindon"+capitalAttr})}return attrProps}function onError(e){throw console.log(e,e.stack),e}function controllerKey(name){return"$"+name+"Controller"}function ng1ComponentDirective(info,idPrefix){function directiveFactory(ng1Injector,componentFactoryRefMap,parse){var idCount=0;return{restrict:"E",require:REQUIRE_INJECTOR,link:{post:function(scope,element,attrs,parentInjector,transclude){var componentFactory=componentFactoryRefMap[info.selector];if(!componentFactory)throw new Error("Expecting ComponentFactory for: "+info.selector);null===parentInjector&&(parentInjector=ng1Injector.get(NG2_INJECTOR));var facade=new DowngradeNg2ComponentAdapter(idPrefix+idCount++,info,element,attrs,scope,parentInjector,parse,componentFactory);facade.setupInputs(),facade.bootstrapNg2(),facade.projectContent(),facade.setupOutputs(),facade.registerCleanup()}}}}return directiveFactory.$inject=[NG1_INJECTOR,NG2_COMPONENT_FACTORY_REF_MAP,NG1_PARSE],directiveFactory}var angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,NG2_COMPILER="ng2.Compiler",NG2_INJECTOR="ng2.Injector",NG2_COMPONENT_FACTORY_REF_MAP="ng2.ComponentFactoryRefMap",NG2_ZONE="ng2.NgZone",NG1_CONTROLLER="$controller",NG1_SCOPE="$scope",NG1_ROOT_SCOPE="$rootScope",NG1_COMPILE="$compile",NG1_HTTP_BACKEND="$httpBackend",NG1_INJECTOR="$injector",NG1_PARSE="$parse",NG1_TEMPLATE_CACHE="$templateCache",NG1_TESTABILITY="$$testability",REQUIRE_INJECTOR="?^"+NG2_INJECTOR,INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeNg2ComponentAdapter=function(){function DowngradeNg2ComponentAdapter(id,info,element,attrs,scope,parentInjector,parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.parentInjector=parentInjector,this.parse=parse,this.componentFactory=componentFactory,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=id,this.componentScope=scope.$new(),this.childNodes=element.contents()}return DowngradeNg2ComponentAdapter.prototype.bootstrapNg2=function(){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:NG1_SCOPE,useValue:this.componentScope}],this.parentInjector);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.componentRef=this.componentFactory.create(childInjector,[[this.contentInsertionPoint]],this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance},DowngradeNg2ComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=inputs[i],expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(value){null!==_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(value,prevValue===INITIAL_VALUE?value:prevValue),prevValue=value),_this.component[prop]=value}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(value,prevValue){null!=_this.inputChanges&&(_this.inputChangeCount++,_this.inputChanges[prop]=new Ng1Change(prevValue,value)),_this.component[prop]=value}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.type.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeNg2ComponentAdapter.prototype.projectContent=function(){var childNodes=this.childNodes,parent=this.contentInsertionPoint.parentNode;if(parent)for(var i=0,ii=childNodes.length;i<ii;i++)parent.insertBefore(childNodes[i],this.contentInsertionPoint)},DowngradeNg2ComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=outputs[j],expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+this.info.selector+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeNg2ComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeNg2ComponentAdapter}(),Ng1Change=function(){function Ng1Change(previousValue,currentValue){this.previousValue=previousValue,this.currentValue=currentValue}return Ng1Change.prototype.isFirstChange=function(){return this.previousValue===this.currentValue},Ng1Change}(),COMPONENT_SELECTOR=/^[\w|-]*$/,SKEWER_CASE=/-(\w)/g,directiveResolver=new _angular_compiler.DirectiveResolver,CAMEL_CASE=/([A-Z])/g,INITIAL_VALUE$1={__UNINITIALIZED__:!0},NOT_SUPPORTED="NOT_SUPPORTED",UpgradeNg1ComponentAdapterBuilder=function(){function UpgradeNg1ComponentAdapterBuilder(name){this.name=name,this.inputs=[],this.inputsRename=[],this.outputs=[],this.outputsRename=[],this.propertyOutputs=[],this.checkProperties=[],this.propertyMap={},this.linkFn=null,this.directive=null,this.$controller=null;var selector=name.replace(CAMEL_CASE,function(all,next){return"-"+next.toLowerCase()}),self=this;this.type=_angular_core.Directive({selector:selector,inputs:this.inputsRename,outputs:this.outputsRename}).Class({constructor:[new _angular_core.Inject(NG1_SCOPE),_angular_core.ElementRef,function(scope,elementRef){return new UpgradeNg1ComponentAdapter(self.linkFn,scope,self.directive,elementRef,self.$controller,self.inputs,self.outputs,self.propertyOutputs,self.checkProperties,self.propertyMap)}],ngOnInit:function(){},ngOnChanges:function(){},ngDoCheck:function(){},ngOnDestroy:function(){}})}return UpgradeNg1ComponentAdapterBuilder.prototype.extractDirective=function(injector){var directives=injector.get(this.name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeNg1ComponentAdapterBuilder.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' does not support '"+feature+"'.")},UpgradeNg1ComponentAdapterBuilder.prototype.extractBindings=function(){var btcIsObject="object"==typeof this.directive.bindToController;if(btcIsObject&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var context=btcIsObject?this.directive.bindToController:this.directive.scope;if("object"==typeof context)for(var name_1 in context)if(context.hasOwnProperty(name_1)){var localName=context[name_1],type=localName.charAt(0),typeOptions=localName.charAt(1);localName="?"===typeOptions?localName.substr(2):localName.substr(1),localName=localName||name_1;var outputName="output_"+name_1,outputNameRename=outputName+": "+name_1,outputNameRenameChange=outputName+": "+name_1+"Change",inputName="input_"+name_1,inputNameRename=inputName+": "+name_1;switch(type){case"=":this.propertyOutputs.push(outputName),this.checkProperties.push(localName),this.outputs.push(outputName),this.outputsRename.push(outputNameRenameChange),this.propertyMap[outputName]=localName,this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"@":case"<":this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"&":this.outputs.push(outputName),this.outputsRename.push(outputNameRename),this.propertyMap[outputName]=localName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+type+"' in '"+json+"' in '"+this.name+"' directive.")}}},UpgradeNg1ComponentAdapterBuilder.prototype.compileTemplate=function(compile,templateCache,httpBackend){function compileHtml(html){var div=document.createElement("div");return div.innerHTML=html,compile(div.childNodes)}var _this=this;if(void 0!==this.directive.template)this.linkFn=compileHtml("function"==typeof this.directive.template?this.directive.template():this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var url_1="function"==typeof this.directive.templateUrl?this.directive.templateUrl():this.directive.templateUrl,html=templateCache.get(url_1);if(void 0===html)return new Promise(function(resolve,err){httpBackend("GET",url_1,null,function(status,response){200==status?resolve(_this.linkFn=compileHtml(templateCache.put(url_1,response))):err("GET "+url_1+" returned "+status+": "+response)})});this.linkFn=compileHtml(html)}return null},UpgradeNg1ComponentAdapterBuilder.resolve=function(exportedComponents,injector){var promises=[],compile=injector.get(NG1_COMPILE),templateCache=injector.get(NG1_TEMPLATE_CACHE),httpBackend=injector.get(NG1_HTTP_BACKEND),$controller=injector.get(NG1_CONTROLLER);for(var name_2 in exportedComponents)if(exportedComponents.hasOwnProperty(name_2)){var exportedComponent=exportedComponents[name_2];exportedComponent.directive=exportedComponent.extractDirective(injector),exportedComponent.$controller=$controller,exportedComponent.extractBindings();var promise=exportedComponent.compileTemplate(compile,templateCache,httpBackend);promise&&promises.push(promise)}return Promise.all(promises)},UpgradeNg1ComponentAdapterBuilder}(),UpgradeNg1ComponentAdapter=function(){function UpgradeNg1ComponentAdapter(linkFn,scope,directive,elementRef,$controller,inputs,outputs,propOuts,checkProperties,propertyMap){this.linkFn=linkFn,this.directive=directive,this.$controller=$controller,this.inputs=inputs,this.outputs=outputs,this.propOuts=propOuts,this.checkProperties=checkProperties,this.propertyMap=propertyMap,this.destinationObj=null,this.checkLastValues=[],this.$element=null,this.element=elementRef.nativeElement,this.componentScope=scope.$new(!!directive.scope),this.$element=element(this.element);var controllerType=directive.controller;directive.bindToController&&controllerType?this.destinationObj=this.buildController(controllerType):this.destinationObj=this.componentScope;for(var i=0;i<inputs.length;i++)this[inputs[i]]=null;for(var j=0;j<outputs.length;j++){var emitter=this[outputs[j]]=new _angular_core.EventEmitter;this.setComponentProperty(outputs[j],function(emitter){return function(value){return emitter.emit(value)}}(emitter))}for(var k=0;k<propOuts.length;k++)this[propOuts[k]]=new _angular_core.EventEmitter,this.checkLastValues.push(INITIAL_VALUE$1)}return UpgradeNg1ComponentAdapter.prototype.ngOnInit=function(){var _this=this;!this.directive.bindToController&&this.directive.controller&&this.buildController(this.directive.controller);var link=this.directive.link;if("object"==typeof link&&(link=link.pre),link){var attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,linkController=this.resolveRequired(this.$element,this.directive.require);this.directive.link(this.componentScope,this.$element,attrs,linkController,transcludeFn)}for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);this.linkFn(this.componentScope,function(clonedElement,scope){for(var i=0,ii=clonedElement.length;i<ii;i++)_this.element.appendChild(clonedElement[i])},{parentBoundTranscludeFn:function(scope,cloneAttach){cloneAttach(childNodes)}}),this.destinationObj.$onInit&&this.destinationObj.$onInit()},UpgradeNg1ComponentAdapter.prototype.ngOnChanges=function(changes){var _this=this,ng1Changes={};Object.keys(changes).forEach(function(name){var change=changes[name];_this.setComponentProperty(name,change.currentValue),ng1Changes[_this.propertyMap[name]]=change}),this.destinationObj.$onChanges&&this.destinationObj.$onChanges(ng1Changes)},UpgradeNg1ComponentAdapter.prototype.ngDoCheck=function(){for(var destinationObj=this.destinationObj,lastValues=this.checkLastValues,checkProperties=this.checkProperties,i=0;i<checkProperties.length;i++){var value=destinationObj[checkProperties[i]],last=lastValues[i];if(value!==last)if("number"==typeof value&&isNaN(value)&&"number"==typeof last&&isNaN(last));else{var eventEmitter=this[this.propOuts[i]];eventEmitter.emit(lastValues[i]=value)}}this.destinationObj.$doCheck&&this.directive.controller&&this.destinationObj.$doCheck()},UpgradeNg1ComponentAdapter.prototype.ngOnDestroy=function(){this.destinationObj.$onDestroy&&this.directive.controller&&this.destinationObj.$onDestroy()},UpgradeNg1ComponentAdapter.prototype.setComponentProperty=function(name,value){this.destinationObj[this.propertyMap[name]]=value},UpgradeNg1ComponentAdapter.prototype.buildController=function(controllerType){var locals={$scope:this.componentScope,$element:this.$element},controller=this.$controller(controllerType,locals,null,this.directive.controllerAs);return this.$element.data(controllerKey(this.directive.name),controller),controller},UpgradeNg1ComponentAdapter.prototype.resolveRequired=function($element,require){if(require){if("string"==typeof require){var name_3=require,isOptional=!1,startParent=!1,searchParents=!1;"?"==name_3.charAt(0)&&(isOptional=!0,name_3=name_3.substr(1)),"^"==name_3.charAt(0)&&(searchParents=!0,name_3=name_3.substr(1)),"^"==name_3.charAt(0)&&(startParent=!0,name_3=name_3.substr(1));var key=controllerKey(name_3);startParent&&($element=$element.parent());var dep=searchParents?$element.inheritedData(key):$element.data(key);if(!dep&&!isOptional)throw new Error("Can not locate '"+require+"' in '"+this.directive.name+"'.");return dep}if(require instanceof Array){for(var deps=[],i=0;i<require.length;i++)deps.push(this.resolveRequired($element,require[i]));return deps}throw new Error("Directive '"+this.directive.name+"' require syntax unrecognized: "+this.directive.require)}},UpgradeNg1ComponentAdapter}(),upgradeCount=0,UpgradeAdapter=function(){function UpgradeAdapter(ng2AppModule,compilerOptions){if(this.ng2AppModule=ng2AppModule,this.compilerOptions=compilerOptions,this.idPrefix="NG2_UPGRADE_"+upgradeCount++ +"_",this.upgradedComponents=[],this.ng1ComponentsToBeUpgraded={},this.providers=[],!ng2AppModule)throw new Error("UpgradeAdapter cannot be instantiated without an NgModule of the Angular 2 app.")}return UpgradeAdapter.prototype.downgradeNg2Component=function(type){this.upgradedComponents.push(type);var info=getComponentInfo(type);return ng1ComponentDirective(info,""+this.idPrefix+info.selector+"_c")},UpgradeAdapter.prototype.upgradeNg1Component=function(name){return this.ng1ComponentsToBeUpgraded.hasOwnProperty(name)?this.ng1ComponentsToBeUpgraded[name].type:(this.ng1ComponentsToBeUpgraded[name]=new UpgradeNg1ComponentAdapterBuilder(name)).type},UpgradeAdapter.prototype.bootstrap=function(element$$,modules,config){var original$applyFn,rootScopePrototype,rootScope,ng1BootstrapPromise,ng1compilePromise,_this=this,ngZone=new _angular_core.NgZone({enableLongStackTrace:Zone.hasOwnProperty("longStackTraceZoneSpec")}),upgrade=new UpgradeAdapterRef,ng1Injector=null,moduleRef=null,delayApplyExps=[],componentFactoryRefMap={},ng1Module=module$1(this.idPrefix,modules);ng1Module.factory(NG2_INJECTOR,function(){return moduleRef.injector.get(_angular_core.Injector)}).value(NG2_ZONE,ngZone).factory(NG2_COMPILER,function(){return moduleRef.injector.get(_angular_core.Compiler)}).value(NG2_COMPONENT_FACTORY_REF_MAP,componentFactoryRefMap).config(["$provide","$injector",function(provide,ng1Injector){provide.decorator(NG1_ROOT_SCOPE,["$delegate",function(rootScopeDelegate){if(rootScopePrototype=rootScopeDelegate.constructor.prototype,!rootScopePrototype.hasOwnProperty("$apply"))throw new Error("Failed to find '$apply' on '$rootScope'!");return original$applyFn=rootScopePrototype.$apply,rootScopePrototype.$apply=function(exp){return delayApplyExps.push(exp)},rootScope=rootScopeDelegate}]),ng1Injector.has(NG1_TESTABILITY)&&provide.decorator(NG1_TESTABILITY,["$delegate",function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,newWhenStable=function(callback){originalWhenStable.call(this,function(){var ng2Testability=moduleRef.injector.get(_angular_core.Testability);ng2Testability.isStable()?callback.apply(this,arguments):ng2Testability.whenStable(newWhenStable.bind(this,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]),ng1compilePromise=new Promise(function(resolve,reject){ng1Module.run(["$injector","$rootScope",function(injector,rootScope){ng1Injector=injector,UpgradeNg1ComponentAdapterBuilder.resolve(_this.ng1ComponentsToBeUpgraded,injector).then(function(){var DynamicNgUpgradeModule=_angular_core.NgModule({providers:[{provide:NG1_INJECTOR,useFactory:function(){return ng1Injector}},{provide:NG1_COMPILE,useFactory:function(){return ng1Injector.get(NG1_COMPILE)}},_this.providers],imports:[_this.ng2AppModule]}).Class({constructor:function(){},ngDoBootstrap:function(){}});_angular_platformBrowserDynamic.platformBrowserDynamic()._bootstrapModuleWithZone(DynamicNgUpgradeModule,_this.compilerOptions,ngZone,function(componentFactories){componentFactories.forEach(function(componentFactory){var type=componentFactory.componentType;_this.upgradedComponents.indexOf(type)!==-1&&(componentFactoryRefMap[getComponentInfo(type).selector]=componentFactory)})}).then(function(ref){moduleRef=ref,element(element$$).data(controllerKey(NG2_INJECTOR),moduleRef.injector),ngZone.onMicrotaskEmpty.subscribe({next:function(_){return ngZone.runOutsideAngular(function(){return rootScope.$evalAsync()})}})}).then(resolve,reject)}).catch(reject)}])});var windowAngular=window.angular;return windowAngular.resumeBootstrap=void 0,ngZone.run(function(){bootstrap(element$$,[_this.idPrefix],config)}),ng1BootstrapPromise=new Promise(function(resolve){if(windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap;windowAngular.resumeBootstrap=function(){var _this=this,args=arguments;windowAngular.resumeBootstrap=originalResumeBootstrap_1,ngZone.run(function(){windowAngular.resumeBootstrap.apply(_this,args)}),resolve()}}else resolve()}),Promise.all([ng1BootstrapPromise,ng1compilePromise]).then(function(){moduleRef.injector.get(_angular_core.NgZone).run(function(){if(rootScopePrototype){for(rootScopePrototype.$apply=original$applyFn;delayApplyExps.length;)rootScope.$apply(delayApplyExps.shift());upgrade._bootstrapDone(moduleRef,ng1Injector),rootScopePrototype=null}})},onError),upgrade},UpgradeAdapter.prototype.upgradeNg1Provider=function(name,options){var token=options&&options.asToken||name;this.providers.push({provide:token,useFactory:function(ng1Injector){return ng1Injector.get(name)},deps:[NG1_INJECTOR]})},UpgradeAdapter.prototype.downgradeNg2Provider=function(token){var factory=function(injector){return injector.get(token)};return factory.$inject=[NG2_INJECTOR],factory},UpgradeAdapter}(),UpgradeAdapterRef=function(){function UpgradeAdapterRef(){this._readyFn=null,this.ng1RootScope=null,this.ng1Injector=null,this.ng2ModuleRef=null,this.ng2Injector=null}return UpgradeAdapterRef.prototype._bootstrapDone=function(ngModuleRef,ng1Injector){this.ng2ModuleRef=ngModuleRef,this.ng2Injector=ngModuleRef.injector,this.ng1Injector=ng1Injector,this.ng1RootScope=ng1Injector.get(NG1_ROOT_SCOPE),this._readyFn&&this._readyFn(this)},UpgradeAdapterRef.prototype.ready=function(fn){this._readyFn=fn},UpgradeAdapterRef.prototype.dispose=function(){this.ng1Injector.get(NG1_ROOT_SCOPE).$destroy(),this.ng2ModuleRef.destroy()},UpgradeAdapterRef}();exports.UpgradeAdapter=UpgradeAdapter,exports.UpgradeAdapterRef=UpgradeAdapterRef});

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/upgrade"}]}
{"__symbolic":"module","version":2,"metadata":{},"exports":[{"from":"./src/upgrade"}]}
{
"name": "@angular/upgrade",
"version": "2.2.1",
"version": "2.2.2",
"description": "Angular - the library for easing update from v1 to v2",

@@ -11,6 +11,6 @@ "main": "bundles/upgrade.umd.js",

"peerDependencies": {
"@angular/core": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1"
"@angular/core": "2.2.2",
"@angular/compiler": "2.2.2",
"@angular/platform-browser": "2.2.2",
"@angular/platform-browser-dynamic": "2.2.2"
},

@@ -17,0 +17,0 @@ "repository": {

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"bootstrap":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"module":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"element":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"version":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"resumeBootstrap":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"getTestability":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}}}}
{"__symbolic":"module","version":2,"metadata":{"bootstrap":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"module":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"element":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"version":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"resumeBootstrap":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}},"getTestability":{"__symbolic":"error","message":"Reference to a local symbol","line":164,"character":4,"context":{"name":"angular"}}}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"rootScopeFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$rootScope"]}},"compileFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$compile"]}},"parseFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$parse"]}},"angular1Providers":[{"provide":"$injector","useFactory":{"__symbolic":"reference","name":"injectorFactory"}},{"provide":"$rootScope","useFactory":{"__symbolic":"reference","name":"rootScopeFactory"},"deps":["$injector"]},{"provide":"$compile","useFactory":{"__symbolic":"reference","name":"compileFactory"},"deps":["$injector"]},{"provide":"$parse","useFactory":{"__symbolic":"reference","name":"parseFactory"},"deps":["$injector"]}]}}
{"__symbolic":"module","version":2,"metadata":{"setTempInjectorRef":{"__symbolic":"function"},"injectorFactory":{"__symbolic":"function"},"rootScopeFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$rootScope"]}},"compileFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$compile"]}},"parseFactory":{"__symbolic":"function","parameters":["i"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"i"},"member":"get"},"arguments":["$parse"]}},"angular1Providers":[{"provide":"$injector","useFactory":{"__symbolic":"reference","name":"injectorFactory"}},{"provide":"$rootScope","useFactory":{"__symbolic":"reference","name":"rootScopeFactory"},"deps":["$injector"]},{"provide":"$compile","useFactory":{"__symbolic":"reference","name":"compileFactory"},"deps":["$injector"]},{"provide":"$parse","useFactory":{"__symbolic":"reference","name":"parseFactory"},"deps":["$injector"]}]}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"UPGRADE_MODULE_NAME":"$$UpgradeModule","INJECTOR_KEY":"$$angularInjector","$INJECTOR":"$injector","$PARSE":"$parse","$ROOT_SCOPE":"$rootScope","$SCOPE":"$scope","$PROVIDE":"$provide","$DELEGATE":"$delegate","$$TESTABILITY":"$$testability","$COMPILE":"$compile","$TEMPLATE_CACHE":"$templateCache","$HTTP_BACKEND":"$httpBackend","$CONTROLLER":"$controller"}}
{"__symbolic":"module","version":2,"metadata":{"UPGRADE_MODULE_NAME":"$$UpgradeModule","INJECTOR_KEY":"$$angularInjector","$INJECTOR":"$injector","$PARSE":"$parse","$ROOT_SCOPE":"$rootScope","$SCOPE":"$scope","$PROVIDE":"$provide","$DELEGATE":"$delegate","$$TESTABILITY":"$$testability","$COMPILE":"$compile","$TEMPLATE_CACHE":"$templateCache","$HTTP_BACKEND":"$httpBackend","$CONTROLLER":"$controller"}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"downgradeInjectable":{"__symbolic":"function","parameters":["token"],"value":{"__symbolic":"error","message":"Function call not supported","line":54,"character":24}}}}
{"__symbolic":"module","version":2,"metadata":{"downgradeInjectable":{"__symbolic":"function","parameters":["token"],"value":{"__symbolic":"error","message":"Function call not supported","line":54,"character":24}}}}

@@ -157,5 +157,4 @@ /**

var injector = _this.injector;
// Cannot use arrow function below because we need to grab the context
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
var whenStableContext = this;
originalWhenStable.call(this, function () {

@@ -167,3 +166,3 @@ var ng2Testability = injector.get(Testability);

else {
ng2Testability.whenStable(newWhenStable.bind(whenStableContext, callback));
ng2Testability.whenStable(newWhenStable.bind(this, callback));
}

@@ -170,0 +169,0 @@ });

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"UpgradeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"providers":{"__symbolic":"reference","module":"./angular1_providers","name":"angular1Providers"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"}]}],"bootstrap":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"UpgradeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"providers":{"__symbolic":"reference","module":"./angular1_providers","name":"angular1Providers"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"}]}],"bootstrap":[{"__symbolic":"method"}]}}}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"NG2_COMPILER":"ng2.Compiler","NG2_INJECTOR":"ng2.Injector","NG2_COMPONENT_FACTORY_REF_MAP":"ng2.ComponentFactoryRefMap","NG2_ZONE":"ng2.NgZone","NG1_PROVIDE":"$provide","NG1_CONTROLLER":"$controller","NG1_SCOPE":"$scope","NG1_ROOT_SCOPE":"$rootScope","NG1_COMPILE":"$compile","NG1_HTTP_BACKEND":"$httpBackend","NG1_INJECTOR":"$injector","NG1_PARSE":"$parse","NG1_TEMPLATE_CACHE":"$templateCache","NG1_TESTABILITY":"$$testability","REQUIRE_INJECTOR":"?^ng2.Injector"}}
{"__symbolic":"module","version":2,"metadata":{"NG2_COMPILER":"ng2.Compiler","NG2_INJECTOR":"ng2.Injector","NG2_COMPONENT_FACTORY_REF_MAP":"ng2.ComponentFactoryRefMap","NG2_ZONE":"ng2.NgZone","NG1_PROVIDE":"$provide","NG1_CONTROLLER":"$controller","NG1_SCOPE":"$scope","NG1_ROOT_SCOPE":"$rootScope","NG1_COMPILE":"$compile","NG1_HTTP_BACKEND":"$httpBackend","NG1_INJECTOR":"$injector","NG1_PARSE":"$parse","NG1_TEMPLATE_CACHE":"$templateCache","NG1_TESTABILITY":"$$testability","REQUIRE_INJECTOR":"?^ng2.Injector"}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":60,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"!=","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":182,"character":19}}}}
{"__symbolic":"module","version":2,"metadata":{"scheduleMicroTask":{"__symbolic":"function"},"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":60,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"!=","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"stringify":{"__symbolic":"function"},"NumberWrapper":{"__symbolic":"class"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":51},"right":"object"}}}},"print":{"__symbolic":"function"},"warn":{"__symbolic":"function"},"setValueOnPath":{"__symbolic":"function"},"getSymbolIterator":{"__symbolic":"function"},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":182,"character":19}}}}

@@ -350,7 +350,6 @@ /**

function (testabilityDelegate) {
var _this = this;
var originalWhenStable = testabilityDelegate.whenStable;
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
var whenStableContext = _this;
originalWhenStable.call(_this, function () {
originalWhenStable.call(this, function () {
var ng2Testability = moduleRef.injector.get(Testability);

@@ -361,3 +360,3 @@ if (ng2Testability.isStable()) {

else {
ng2Testability.whenStable(newWhenStable.bind(whenStableContext, callback));
ng2Testability.whenStable(newWhenStable.bind(this, callback));
}

@@ -424,4 +423,6 @@ });

windowAngular.resumeBootstrap = function () {
var _this = this;
var args = arguments;
windowAngular.resumeBootstrap = originalResumeBootstrap_1;
windowAngular.resumeBootstrap.apply(this, arguments);
ngZone.run(function () { windowAngular.resumeBootstrap.apply(_this, args); });
resolve();

@@ -428,0 +429,0 @@ };

@@ -43,3 +43,4 @@ /**

ngOnChanges: function () { },
ngDoCheck: function () { }
ngDoCheck: function () { },
ngOnDestroy: function () { },
});

@@ -246,11 +247,14 @@ }

UpgradeNg1ComponentAdapter.prototype.ngOnChanges = function (changes) {
for (var name_3 in changes) {
if (changes.hasOwnProperty(name_3)) {
var change = changes[name_3];
this.setComponentProperty(name_3, change.currentValue);
}
var _this = this;
var ng1Changes = {};
Object.keys(changes).forEach(function (name) {
var change = changes[name];
_this.setComponentProperty(name, change.currentValue);
ng1Changes[_this.propertyMap[name]] = change;
});
if (this.destinationObj.$onChanges) {
this.destinationObj.$onChanges(ng1Changes);
}
};
UpgradeNg1ComponentAdapter.prototype.ngDoCheck = function () {
var count = 0;
var destinationObj = this.destinationObj;

@@ -271,4 +275,11 @@ var lastValues = this.checkLastValues;

}
return count;
if (this.destinationObj.$doCheck && this.directive.controller) {
this.destinationObj.$doCheck();
}
};
UpgradeNg1ComponentAdapter.prototype.ngOnDestroy = function () {
if (this.destinationObj.$onDestroy && this.directive.controller) {
this.destinationObj.$onDestroy();
}
};
UpgradeNg1ComponentAdapter.prototype.setComponentProperty = function (name, value) {

@@ -288,19 +299,19 @@ this.destinationObj[this.propertyMap[name]] = value;

else if (typeof require == 'string') {
var name_4 = require;
var name_3 = require;
var isOptional = false;
var startParent = false;
var searchParents = false;
if (name_4.charAt(0) == '?') {
if (name_3.charAt(0) == '?') {
isOptional = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
if (name_4.charAt(0) == '^') {
if (name_3.charAt(0) == '^') {
searchParents = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
if (name_4.charAt(0) == '^') {
if (name_3.charAt(0) == '^') {
startParent = true;
name_4 = name_4.substr(1);
name_3 = name_3.substr(1);
}
var key = controllerKey(name_4);
var key = controllerKey(name_3);
if (startParent)

@@ -307,0 +318,0 @@ $element = $element.parent();

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./upgrade_adapter","export":["UpgradeAdapter","UpgradeAdapterRef"]}]}
{"__symbolic":"module","version":2,"metadata":{},"exports":[{"from":"./upgrade_adapter","export":["UpgradeAdapter","UpgradeAdapterRef"]}]}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"controllerKey":{"__symbolic":"function","parameters":["name"],"value":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"$","right":{"__symbolic":"reference","name":"name"}},"right":"Controller"}}}}
{"__symbolic":"module","version":2,"metadata":{"stringify":{"__symbolic":"function"},"onError":{"__symbolic":"function"},"controllerKey":{"__symbolic":"function","parameters":["name"],"value":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"$","right":{"__symbolic":"reference","name":"name"}},"right":"Controller"}}}}

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/aot/downgrade_component","export":["downgradeComponent"]},{"from":"./src/aot/downgrade_injectable","export":["downgradeInjectable"]},{"from":"./src/aot/upgrade_component","export":["UpgradeComponent"]},{"from":"./src/aot/upgrade_module","export":["UpgradeModule"]}]}
{"__symbolic":"module","version":2,"metadata":{},"exports":[{"from":"./src/aot/downgrade_component","export":["downgradeComponent"]},{"from":"./src/aot/downgrade_injectable","export":["downgradeInjectable"]},{"from":"./src/aot/upgrade_component","export":["UpgradeComponent"]},{"from":"./src/aot/upgrade_module","export":["UpgradeModule"]}]}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc