/** * @license Angular v4.2.3 * (c) 2010-2017 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"),require("@angular/animations/browser"),require("@angular/common"),require("@angular/compiler"),require("@angular/http"),require("@angular/platform-browser/animations"),require("rxjs/Observable"),require("rxjs/Subject"),require("url"),require("rxjs/operator/filter"),require("rxjs/operator/first"),require("rxjs/operator/toPromise")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","@angular/animations/browser","@angular/common","@angular/compiler","@angular/http","@angular/platform-browser/animations","rxjs/Observable","rxjs/Subject","url","rxjs/operator/filter","rxjs/operator/first","rxjs/operator/toPromise"],factory):factory((global.ng=global.ng||{},global.ng.platformServer=global.ng.platformServer||{}),global.ng.core,global.ng.platformBrowser,global._angular_animations_browser,global.ng.common,global.ng.compiler,global._angular_http,global._angular_platformBrowser_animations,global.Rx,global.Rx,global.url,global.Rx.Observable.prototype,global.Rx.Observable.prototype,global.Rx.Observable.prototype)}(this,function(exports,_angular_core,_angular_platformBrowser,_angular_animations_browser,_angular_common,_angular_compiler,_angular_http,_angular_platformBrowser_animations,rxjs_Observable,rxjs_Subject,url,rxjs_operator_filter,rxjs_operator_first,rxjs_operator_toPromise){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function validateRequestUrl(url$$1){if(!isAbsoluteUrl.test(url$$1))throw new Error("URLs requested via Http on the server must be absolute. URL: "+url$$1)}function httpFactory(xhrBackend,options){var macroBackend=new ZoneMacroTaskBackend(xhrBackend);return new _angular_http.Http(macroBackend,options)}/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function parseUrl(urlStr){var parsedUrl=url.parse(urlStr);return{pathname:parsedUrl.pathname||"",search:parsedUrl.search||"",hash:parsedUrl.hash||""}}function scheduleMicroTask(fn){Zone.current.scheduleMicroTask("scheduleMicrotask",fn)}function _notImplemented(methodName){return new Error("This method is not implemented in Parse5DomAdapter: "+methodName)}function _getElement(el,name){for(var i=0;i-1&&list.splice(index,1)}function checkNoSyntheticProp(name,nameKind){if(name.charCodeAt(0)===AT_CHARCODE)throw new Error("Found the synthetic "+nameKind+" "+name+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}function initParse5Adapter(injector){return function(){Parse5DomAdapter.makeCurrent()}}function instantiateServerRendererFactory(renderer,engine,zone){return new _angular_platformBrowser_animations.ɵAnimationRendererFactory(renderer,engine,zone)}function _document(injector){var config=injector.get(INITIAL_CONFIG,null);return config&&config.document?parseDocument(config.document):_angular_platformBrowser.ɵgetDOM().createHtmlDocument()}function _getPlatform(platformFactory,options){var extraProviders=options.extraProviders?options.extraProviders:[];return platformFactory([{provide:INITIAL_CONFIG,useValue:{document:options.document,url:options.url}},extraProviders])}function _render(platform,moduleRefPromise){return moduleRefPromise.then(function(moduleRef){var transitionId=moduleRef.injector.get(_angular_platformBrowser.ɵTRANSITION_ID,null);if(!transitionId)throw new Error("renderModule[Factory]() requires the use of BrowserModule.withServerTransition() to ensure\nthe server-rendered app can be properly bootstrapped into a client app.");var applicationRef=moduleRef.injector.get(_angular_core.ApplicationRef);return rxjs_operator_toPromise.toPromise.call(rxjs_operator_first.first.call(rxjs_operator_filter.filter.call(applicationRef.isStable,function(isStable){return isStable}))).then(function(){var output=platform.injector.get(PlatformState).renderToString();return platform.destroy(),output})})}function renderModule(module,options){var platform=_getPlatform(platformDynamicServer,options);return _render(platform,platform.bootstrapModule(module))}function renderModuleFactory(moduleFactory,options){var platform=_getPlatform(platformServer,options);return _render(platform,platform.bootstrapModuleFactory(moduleFactory))}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},PlatformState=(require("parse5"),function(){function PlatformState(_doc){this._doc=_doc}return PlatformState.prototype.renderToString=function(){return _angular_platformBrowser.ɵgetDOM().getInnerHTML(this._doc)},PlatformState.prototype.getDocument=function(){return this._doc},PlatformState}());PlatformState.decorators=[{type:_angular_core.Injectable}],PlatformState.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_platformBrowser.DOCUMENT]}]}]};/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var xhr2=require("xhr2"),isAbsoluteUrl=/^[a-zA-Z\-\+.]+:\/\//,ServerXhr=function(){function ServerXhr(){}return ServerXhr.prototype.build=function(){return new xhr2.XMLHttpRequest},ServerXhr}();ServerXhr.decorators=[{type:_angular_core.Injectable}],ServerXhr.ctorParameters=function(){return[]};var ServerXsrfStrategy=function(){function ServerXsrfStrategy(){}return ServerXsrfStrategy.prototype.configureRequest=function(req){},ServerXsrfStrategy}();ServerXsrfStrategy.decorators=[{type:_angular_core.Injectable}],ServerXsrfStrategy.ctorParameters=function(){return[]};var ZoneMacroTaskConnection=function(){function ZoneMacroTaskConnection(request,backend){var _this=this;this.request=request,validateRequestUrl(request.url),this.response=new rxjs_Observable.Observable(function(observer){var task=null,scheduled=!1,sub=null,savedResult=null,savedError=null,scheduleTask=function(_task){task=_task,scheduled=!0,_this.lastConnection=backend.createConnection(request),sub=_this.lastConnection.response.subscribe(function(res){return savedResult=res},function(err){if(!scheduled)throw new Error("invoke twice");savedError=err,scheduled=!1,task.invoke()},function(){if(!scheduled)throw new Error("invoke twice");scheduled=!1,task.invoke()})},cancelTask=function(_task){scheduled&&(scheduled=!1,sub&&(sub.unsubscribe(),sub=null))},onComplete=function(){null!==savedError?observer.error(savedError):(observer.next(savedResult),observer.complete())},_task=Zone.current.scheduleMacroTask("ZoneMacroTaskConnection.subscribe",onComplete,{},function(){return null},cancelTask);return scheduleTask(_task),function(){scheduled&&task&&(task.zone.cancelTask(task),scheduled=!1),sub&&(sub.unsubscribe(),sub=null)}})}return Object.defineProperty(ZoneMacroTaskConnection.prototype,"readyState",{get:function(){return this.lastConnection?this.lastConnection.readyState:_angular_http.ReadyState.Unsent},enumerable:!0,configurable:!0}),ZoneMacroTaskConnection}(),ZoneMacroTaskBackend=function(){function ZoneMacroTaskBackend(backend){this.backend=backend}return ZoneMacroTaskBackend.prototype.createConnection=function(request){return new ZoneMacroTaskConnection(request,this.backend)},ZoneMacroTaskBackend}(),SERVER_HTTP_PROVIDERS=[{provide:_angular_http.Http,useFactory:httpFactory,deps:[_angular_http.XHRBackend,_angular_http.RequestOptions]},{provide:_angular_http.BrowserXhr,useClass:ServerXhr},{provide:_angular_http.XSRFStrategy,useClass:ServerXsrfStrategy}],INITIAL_CONFIG=new _angular_core.InjectionToken("Server.INITIAL_CONFIG"),ServerPlatformLocation=function(){function ServerPlatformLocation(_doc,_config){this._doc=_doc,this._path="/",this._search="",this._hash="",this._hashUpdate=new rxjs_Subject.Subject;var config=_config;if(config&&config.url){var parsedUrl=parseUrl(config.url);this._path=parsedUrl.pathname,this._search=parsedUrl.search,this._hash=parsedUrl.hash}}return ServerPlatformLocation.prototype.getBaseHrefFromDOM=function(){return _angular_platformBrowser.ɵgetDOM().getBaseHref(this._doc)},ServerPlatformLocation.prototype.onPopState=function(fn){},ServerPlatformLocation.prototype.onHashChange=function(fn){this._hashUpdate.subscribe(fn)},Object.defineProperty(ServerPlatformLocation.prototype,"pathname",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(ServerPlatformLocation.prototype,"search",{get:function(){return this._search},enumerable:!0,configurable:!0}),Object.defineProperty(ServerPlatformLocation.prototype,"hash",{get:function(){return this._hash},enumerable:!0,configurable:!0}),Object.defineProperty(ServerPlatformLocation.prototype,"url",{get:function(){return""+this.pathname+this.search+this.hash},enumerable:!0,configurable:!0}),ServerPlatformLocation.prototype.setHash=function(value,oldUrl){var _this=this;if(this._hash!==value){this._hash=value;var newUrl=this.url;scheduleMicroTask(function(){return _this._hashUpdate.next({type:"hashchange",oldUrl:oldUrl,newUrl:newUrl})})}},ServerPlatformLocation.prototype.replaceState=function(state,title,newUrl){var oldUrl=this.url,parsedUrl=parseUrl(newUrl);this._path=parsedUrl.pathname,this._search=parsedUrl.search,this.setHash(parsedUrl.hash,oldUrl)},ServerPlatformLocation.prototype.pushState=function(state,title,newUrl){this.replaceState(state,title,newUrl)},ServerPlatformLocation.prototype.forward=function(){throw new Error("Not implemented")},ServerPlatformLocation.prototype.back=function(){throw new Error("Not implemented")},ServerPlatformLocation}();ServerPlatformLocation.decorators=[{type:_angular_core.Injectable}],ServerPlatformLocation.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_platformBrowser.DOCUMENT]}]},{type:void 0,decorators:[{type:_angular_core.Optional},{type:_angular_core.Inject,args:[INITIAL_CONFIG]}]}]};/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var treeAdapter,parse5$1=require("parse5"),_attrToPropMap={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},mapProps=["attribs","x-attribsNamespace","x-attribsPrefix"],Parse5DomAdapter=function(_super){function Parse5DomAdapter(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(Parse5DomAdapter,_super),Parse5DomAdapter.makeCurrent=function(){treeAdapter=parse5$1.treeAdapters.htmlparser2,_angular_platformBrowser.ɵsetRootDomAdapter(new Parse5DomAdapter)},Parse5DomAdapter.prototype.contains=function(nodeA,nodeB){for(var inner=nodeB;inner;){if(inner===nodeA)return!0;inner=inner.parent}return!1},Parse5DomAdapter.prototype.hasProperty=function(element,name){return _HTMLElementPropertyList.indexOf(name)>-1},Parse5DomAdapter.prototype.setProperty=function(el,name,value){"innerHTML"===name?this.setInnerHTML(el,value):"innerText"===name?this.setText(el,value):"className"===name?el.attribs.class=el.className=value:el[name]=value},Parse5DomAdapter.prototype.getProperty=function(el,name){return el[name]},Parse5DomAdapter.prototype.logError=function(error){console.error(error)},Parse5DomAdapter.prototype.log=function(error){console.log(error)},Parse5DomAdapter.prototype.logGroup=function(error){console.error(error)},Parse5DomAdapter.prototype.logGroupEnd=function(){},Object.defineProperty(Parse5DomAdapter.prototype,"attrToPropMap",{get:function(){return _attrToPropMap},enumerable:!0,configurable:!0}),Parse5DomAdapter.prototype.querySelector=function(el,selector){return this.querySelectorAll(el,selector)[0]||null},Parse5DomAdapter.prototype.querySelectorAll=function(el,selector){var _this=this,res=[],_recursive=function(result,node,selector,matcher){var cNodes=node.childNodes;if(cNodes&&cNodes.length>0)for(var i=0;i0;)this.remove(el.childNodes[0])},Parse5DomAdapter.prototype.appendChild=function(el,node){this.remove(node),treeAdapter.appendChild(this.templateAwareRoot(el),node)},Parse5DomAdapter.prototype.removeChild=function(el,node){el.childNodes.indexOf(node)>-1&&this.remove(node)},Parse5DomAdapter.prototype.remove=function(el){var parent=el.parent;if(parent){var index=parent.childNodes.indexOf(el);parent.childNodes.splice(index,1)}var prev=el.previousSibling,next=el.nextSibling;return prev&&(prev.next=next),next&&(next.prev=prev),el.prev=null,el.next=null,el.parent=null,el},Parse5DomAdapter.prototype.insertBefore=function(parent,ref,newNode){this.remove(newNode),ref?treeAdapter.insertBefore(parent,newNode,ref):this.appendChild(parent,newNode)},Parse5DomAdapter.prototype.insertAllBefore=function(parent,ref,nodes){var _this=this;nodes.forEach(function(n){return _this.insertBefore(parent,ref,n)})},Parse5DomAdapter.prototype.insertAfter=function(parent,ref,node){ref.nextSibling?this.insertBefore(parent,ref.nextSibling,node):this.appendChild(parent,node)},Parse5DomAdapter.prototype.setInnerHTML=function(el,value){this.clearNodes(el);for(var content=parse5$1.parseFragment(value,{treeAdapter:treeAdapter}),i=0;i0&&(childNodeClone.prev=cNodesClone[i-1],cNodesClone[i-1].next=childNodeClone),childNodeClone.parent=nodeClone}nodeClone.children=cNodesClone}return nodeClone};return _recursive(node)},Parse5DomAdapter.prototype.getElementsByClassName=function(element,name){return this.querySelectorAll(element,"."+name)},Parse5DomAdapter.prototype.getElementsByTagName=function(element,name){return this.querySelectorAll(element,name)},Parse5DomAdapter.prototype.classList=function(element){var classAttrValue=null,attributes=element.attribs;return attributes&&null!=attributes.class&&(classAttrValue=attributes.class),classAttrValue?classAttrValue.trim().split(/\s+/g):[]},Parse5DomAdapter.prototype.addClass=function(element,className){var classList=this.classList(element),index=classList.indexOf(className);index==-1&&(classList.push(className),element.attribs.class=element.className=classList.join(" "))},Parse5DomAdapter.prototype.removeClass=function(element,className){var classList=this.classList(element),index=classList.indexOf(className);index>-1&&(classList.splice(index,1),element.attribs.class=element.className=classList.join(" "))},Parse5DomAdapter.prototype.hasClass=function(element,className){return this.classList(element).indexOf(className)>-1},Parse5DomAdapter.prototype.hasStyle=function(element,styleName,styleValue){var value=this.getStyle(element,styleName)||"";return styleValue?value==styleValue:value.length>0},Parse5DomAdapter.prototype._readStyleAttribute=function(element){var styleMap={},attributes=element.attribs;if(attributes&&null!=attributes.style)for(var styleAttrValue=attributes.style,styleList=styleAttrValue.split(/;+/g),i=0;i0){var style=styleList[i],colon=style.indexOf(":");if(colon===-1)throw new Error("Invalid CSS style: "+style);styleMap[style.substr(0,colon).trim()]=style.substr(colon+1).trim()}return styleMap},Parse5DomAdapter.prototype._writeStyleAttribute=function(element,styleMap){var styleAttrValue="";for(var key in styleMap){var newValue=styleMap[key];newValue&&(styleAttrValue+=key+":"+styleMap[key]+";")}element.attribs.style=styleAttrValue},Parse5DomAdapter.prototype.setStyle=function(element,styleName,styleValue){var styleMap=this._readStyleAttribute(element);styleMap[styleName]=styleValue,this._writeStyleAttribute(element,styleMap)},Parse5DomAdapter.prototype.removeStyle=function(element,styleName){this.setStyle(element,styleName,null)},Parse5DomAdapter.prototype.getStyle=function(element,styleName){var styleMap=this._readStyleAttribute(element);return styleMap.hasOwnProperty(styleName)?styleMap[styleName]:""},Parse5DomAdapter.prototype.tagName=function(element){return"style"==element.tagName?"STYLE":element.tagName},Parse5DomAdapter.prototype.attributeMap=function(element){for(var res=new Map,elAttrs=treeAdapter.getAttrList(element),i=0;i\s*/g," > ").replace(/\[(\w+)=(\w+)\]/g,'[$1="$2"]')),null==parsedRule.declarations)continue;for(var j=0;j