diff --git a/go/vt/workflow/long_polling_test.go b/go/vt/workflow/long_polling_test.go index 53da9f4731..3bb4e16e40 100644 --- a/go/vt/workflow/long_polling_test.go +++ b/go/vt/workflow/long_polling_test.go @@ -68,7 +68,8 @@ func TestLongPolling(t *testing.T) { if err != nil { t.Fatalf("/poll/1 reading failed: %v", err) } - if string(tree) != `{"nodes":[{"name":"name","path":"/uuid1","children":[],"lastChanged":143,"actions":null}]}` { + if !strings.Contains(string(tree), `"name":"name"`) || + !strings.Contains(string(tree), `"path":"/uuid1"`) { t.Errorf("unexpected first result: %v", string(tree)) } diff --git a/go/vt/workflow/node.go b/go/vt/workflow/node.go index 9a950ecb3a..61703d2db4 100644 --- a/go/vt/workflow/node.go +++ b/go/vt/workflow/node.go @@ -27,47 +27,56 @@ import ( type NodeDisplay int const ( + // NodeDisplayUnknown is an unknown value and should never be set. + NodeDisplayUnknown NodeDisplay = 0 + // NodeDisplayIndeterminate is a progress bar that doesn't have // a current value, but just shows movement. - NodeDisplayIndeterminate NodeDisplay = 0 + NodeDisplayIndeterminate NodeDisplay = 1 // NodeDisplayDeterminate is a progress bar driven by the // Progress field. - NodeDisplayDeterminate NodeDisplay = 1 + NodeDisplayDeterminate NodeDisplay = 2 // NodeDisplayNone shows no progress bar or status. - NodeDisplayNone NodeDisplay = 2 + NodeDisplayNone NodeDisplay = 3 ) // ActionState constants need to match node.ts.ActionState. type ActionState int const ( + // ActionStateUnknown is an unknown value and should never be set. + ActionStateUnknown ActionState = 0 + // ActionStateEnabled is for when the action is enabled. - ActionStateEnabled ActionState = 0 + ActionStateEnabled ActionState = 1 // ActionStateDisabled is for when the action is disabled. - ActionStateDisabled ActionState = 1 + ActionStateDisabled ActionState = 2 ) // ActionStyle constants need to match node.ts.ActionStyle. type ActionStyle int const ( + // ActionStyleUnknown is an unknown value and should never be set. + ActionStyleUnknown ActionStyle = 0 + // ActionStyleNormal will just trigger the action. - ActionStyleNormal ActionStyle = 0 + ActionStyleNormal ActionStyle = 1 // ActionStyleWarning will display a warning dialog to confirm // action with Action.Message. - ActionStyleWarning ActionStyle = 1 + ActionStyleWarning ActionStyle = 2 // ActionStyleWaiting highlights to the user that the process // is waiting on the execution of the action. - ActionStyleWaiting ActionStyle = 2 + ActionStyleWaiting ActionStyle = 3 // ActionStyleTriggered is a state where the button is greyed // out and cannot be pressed. - ActionStyleTriggered ActionStyle = 3 + ActionStyleTriggered ActionStyle = 4 ) // Node is the UI representation of a Workflow toplevel object, or of @@ -102,24 +111,24 @@ type Node struct { Name string `json:"name"` Path string `json:"path"` - Children []*Node `json:"children"` + Children []*Node `json:"children,omitempty"` LastChanged int64 `json:"lastChanged"` - Progress int `json:"progress,omitempty"` - ProgressMessage string `json:"progressMsg,omitempty"` - State workflowpb.WorkflowState `json:"state,omitempty"` + Progress int `json:"progress"` + ProgressMessage string `json:"progressMsg"` + State workflowpb.WorkflowState `json:"state"` Display NodeDisplay `json:"display,omitempty"` - Message string `json:"message,omitempty"` - Log string `json:"log,omitempty"` - Disabled bool `json:"disabled,omitempty"` + Message string `json:"message"` + Log string `json:"log"` + Disabled bool `json:"disabled"` Actions []*Action `json:"actions"` } // Action must match node.ts Action. type Action struct { - Name string `json:"name,omitempty"` + Name string `json:"name"` State ActionState `json:"state,omitempty"` Style ActionStyle `json:"style,omitempty"` - Message string `json:"message,omitempty"` + Message string `json:"message"` } // Update is the data structure we send on the websocket or on the diff --git a/go/vt/workflow/node_test.go b/go/vt/workflow/node_test.go index c85b3e4818..ac6d37b958 100644 --- a/go/vt/workflow/node_test.go +++ b/go/vt/workflow/node_test.go @@ -73,7 +73,7 @@ func TestNodeManagerWithRoot(t *testing.T) { result, ok = <-notifications if !ok || !strings.Contains(string(result), `"name":"name2"`) || - !strings.Contains(string(result), `"children":[]`) || // FIXME(alainjobart) this should be true, we're not changing the children. + strings.Contains(string(result), `"children":[]`) || strings.Contains(string(result), `"fullUpdate":true`) { t.Errorf("unexpected notification: %v %v", ok, string(result)) } diff --git a/go/vt/workflow/websocket_test.go b/go/vt/workflow/websocket_test.go index a24f58aaf6..6d6972fc5c 100644 --- a/go/vt/workflow/websocket_test.go +++ b/go/vt/workflow/websocket_test.go @@ -61,7 +61,8 @@ func TestWebSocket(t *testing.T) { if err != nil { t.Fatalf("WebSocket first read failed: %v", err) } - if string(tree) != `{"nodes":[{"name":"name","path":"/uuid1","children":[],"lastChanged":143,"actions":null}]}` { + if !strings.Contains(string(tree), `"name":"name"`) || + !strings.Contains(string(tree), `"path":"/uuid1"`) { t.Errorf("unexpected first result: %v", string(tree)) } diff --git a/web/vtctld2/app/index.html b/web/vtctld2/app/index.html index 70e442cd3f..0147162f14 100644 --- a/web/vtctld2/app/index.html +++ b/web/vtctld2/app/index.html @@ -28,5 +28,5 @@ Loading... - + diff --git a/web/vtctld2/app/inline.js b/web/vtctld2/app/inline.js index b9e7a6f218..b3b7593724 100644 --- a/web/vtctld2/app/inline.js +++ b/web/vtctld2/app/inline.js @@ -1 +1 @@ -!function(e){function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,o,c){for(var _,a,i,u=0,p=[];u=200&&this.status<=299,this.statusText=t.statusText,this.headers=t.headers,this.type=t.type,this.url=t.url}return r(Response,e),Response.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},Response}(i.Body);t.Response=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(0),o=n(23),s=n(93),a=function(e){function DomEventsPlugin(){e.apply(this,arguments)}return r(DomEventsPlugin,e),DomEventsPlugin.prototype.supports=function(e){return!0},DomEventsPlugin.prototype.addEventListener=function(e,t,n){var r=this.manager.getZone(),i=function(e){return r.runGuarded(function(){return n(e)})};return this.manager.getZone().runOutsideAngular(function(){return o.getDOM().onAndCancel(e,t,i)})},DomEventsPlugin.prototype.addGlobalEventListener=function(e,t,n){var r=o.getDOM().getGlobalEventTarget(e),i=this.manager.getZone(),s=function(e){return i.runGuarded(function(){return n(e)})};return this.manager.getZone().runOutsideAngular(function(){return o.getDOM().onAndCancel(r,t,s)})},DomEventsPlugin.decorators=[{type:i.Injectable}],DomEventsPlugin}(s.EventManagerPlugin);t.DomEventsPlugin=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(0),o=n(75),s=n(15),a=n(655);t.HAMMER_GESTURE_CONFIG=new i.OpaqueToken("HammerGestureConfig");var l=function(){function HammerGestureConfig(){this.events=[],this.overrides={}}return HammerGestureConfig.prototype.buildHammer=function(e){var t=new Hammer(e);t.get("pinch").set({enable:!0}),t.get("rotate").set({enable:!0});for(var n in this.overrides)t.get(n).set(this.overrides[n]);return t},HammerGestureConfig.decorators=[{type:i.Injectable}],HammerGestureConfig}();t.HammerGestureConfig=l;var c=function(e){function HammerGesturesPlugin(t){e.call(this),this._config=t}return r(HammerGesturesPlugin,e),HammerGesturesPlugin.prototype.supports=function(t){if(!e.prototype.supports.call(this,t)&&!this.isCustomEvent(t))return!1;if(!s.isPresent(window.Hammer))throw new o.BaseException("Hammer.js is not loaded, can not bind "+t+" event");return!0},HammerGesturesPlugin.prototype.addEventListener=function(e,t,n){var r=this,i=this.manager.getZone();return t=t.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(e),s=function(e){i.runGuarded(function(){n(e)})};return o.on(t,s),function(){o.off(t,s)}})},HammerGesturesPlugin.prototype.isCustomEvent=function(e){return this._config.events.indexOf(e)>-1},HammerGesturesPlugin.decorators=[{type:i.Injectable}],HammerGesturesPlugin.ctorParameters=[{type:l,decorators:[{type:i.Inject,args:[t.HAMMER_GESTURE_CONFIG]}]}],HammerGesturesPlugin}(a.HammerGesturesPluginCommon);t.HammerGesturesPlugin=c},function(e,t,n){"use strict";function sanitizeUrl(e){return e=String(e),e.match(o)||e.match(s)?e:(r.isDevMode()&&i.getDOM().log("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}function sanitizeSrcset(e){return e=String(e),e.split(",").map(function(e){return sanitizeUrl(e.trim())}).join(", ")}var r=n(0),i=n(23),o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,s=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;t.sanitizeUrl=sanitizeUrl,t.sanitizeSrcset=sanitizeSrcset},function(e,t){"use strict";var n=function(){function LocationType(e,t,n,r,i,o,s,a,l){this.href=e,this.protocol=t,this.host=n,this.hostname=r,this.port=i,this.pathname=o,this.search=s,this.hash=a,this.origin=l}return LocationType}();t.LocationType=n},function(e,t,n){"use strict";function setupRouter(e,t,n,r,i,s,a,l,c){if(void 0===c&&(c={}),0==e.componentTypes.length)throw new Error("Bootstrap at least one component before injecting Router.");var p=e.componentTypes[0],d=new o.Router(p,t,n,r,i,s,a,u.flatten(l));return c.enableTracing&&d.events.subscribe(function(e){console.group("Router Event: "+e.constructor.name),console.log(e.toString()),console.log(e),console.groupEnd()}),d}function rootRoute(e){return e.routerState.root}function initialRouterNavigation(e){return function(){e.initialNavigation()}}function provideRouter(e,n){return void 0===n&&(n={}),[provideRoutes(e),{provide:t.ROUTER_CONFIGURATION,useValue:n},r.Location,{provide:r.LocationStrategy,useClass:r.PathLocationStrategy},{provide:c.UrlSerializer,useClass:c.DefaultUrlSerializer},{provide:o.Router,useFactory:setupRouter,deps:[i.ApplicationRef,i.ComponentResolver,c.UrlSerializer,a.RouterOutletMap,r.Location,i.Injector,i.NgModuleFactoryLoader,s.ROUTES,t.ROUTER_CONFIGURATION]},a.RouterOutletMap,{provide:l.ActivatedRoute,useFactory:rootRoute,deps:[o.Router]},provideRouterInitializer(),{provide:i.NgModuleFactoryLoader,useClass:i.SystemJsNgModuleLoader}]}function provideRouterInitializer(){return{provide:i.APP_BOOTSTRAP_LISTENER,multi:!0,useFactory:initialRouterNavigation,deps:[o.Router]}}function provideRoutes(e){return[{provide:i.ANALYZE_FOR_ENTRY_COMPONENTS,multi:!0,useValue:e},{provide:s.ROUTES,multi:!0,useValue:e}]}function provideRouterConfig(e){return{provide:t.ROUTER_CONFIGURATION,useValue:e}}var r=n(3),i=n(0),o=n(129),s=n(189),a=n(130),l=n(94),c=n(76),u=n(77);t.ROUTER_CONFIGURATION=new i.OpaqueToken("ROUTER_CONFIGURATION"),t.setupRouter=setupRouter,t.rootRoute=rootRoute,t.initialRouterNavigation=initialRouterNavigation,t.provideRouter=provideRouter,t.provideRouterInitializer=provideRouterInitializer,t.provideRoutes=provideRoutes,t.provideRouterConfig=provideRouterConfig},function(e,t,n){"use strict";function toBool(e){return""===e||!!e}var r=n(3),i=n(0),o=n(129),s=n(94),a=function(){function RouterLink(e,t,n){this.router=e,this.route=t,this.locationStrategy=n,this.commands=[]}return Object.defineProperty(RouterLink.prototype,"routerLink",{set:function(e){Array.isArray(e)?this.commands=e:this.commands=[e]},enumerable:!0,configurable:!0}),RouterLink.prototype.onClick=function(e,t,n){return!(0===e&&!t&&!n)||(this.router.navigateByUrl(this.urlTree),!1)},Object.defineProperty(RouterLink.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:toBool(this.preserveQueryParams),preserveFragment:toBool(this.preserveFragment)})},enumerable:!0,configurable:!0}),RouterLink.decorators=[{type:i.Directive,args:[{selector:":not(a)[routerLink]"}]}],RouterLink.ctorParameters=[{type:o.Router},{type:s.ActivatedRoute},{type:r.LocationStrategy}],RouterLink.propDecorators={queryParams:[{type:i.Input}],fragment:[{type:i.Input}],preserveQueryParams:[{type:i.Input}],preserveFragment:[{type:i.Input}],routerLink:[{type:i.Input}],onClick:[{type:i.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]},RouterLink}();t.RouterLink=a;var l=function(){function RouterLinkWithHref(e,t,n){var r=this;this.router=e,this.route=t,this.locationStrategy=n,this.commands=[],this.subscription=e.events.subscribe(function(e){e instanceof o.NavigationEnd&&r.updateTargetUrlAndHref()})}return Object.defineProperty(RouterLinkWithHref.prototype,"routerLink",{set:function(e){Array.isArray(e)?this.commands=e:this.commands=[e]},enumerable:!0,configurable:!0}),RouterLinkWithHref.prototype.ngOnChanges=function(e){this.updateTargetUrlAndHref()},RouterLinkWithHref.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},RouterLinkWithHref.prototype.onClick=function(e,t,n){return!(0===e&&!t&&!n)||("string"==typeof this.target&&"_self"!=this.target||(this.router.navigateByUrl(this.urlTree),!1))},RouterLinkWithHref.prototype.updateTargetUrlAndHref=function(){this.urlTree=this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:toBool(this.preserveQueryParams),preserveFragment:toBool(this.preserveFragment)}),this.urlTree&&(this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)))},RouterLinkWithHref.decorators=[{type:i.Directive,args:[{selector:"a[routerLink]"}]}],RouterLinkWithHref.ctorParameters=[{type:o.Router},{type:s.ActivatedRoute},{type:r.LocationStrategy}],RouterLinkWithHref.propDecorators={target:[{type:i.Input}],queryParams:[{type:i.Input}],fragment:[{type:i.Input}],routerLinkOptions:[{type:i.Input}],preserveQueryParams:[{type:i.Input}],preserveFragment:[{type:i.Input}],href:[{type:i.HostBinding}],routerLink:[{type:i.Input}],onClick:[{type:i.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]},RouterLinkWithHref}();t.RouterLinkWithHref=l},function(e,t){"use strict";function findNode(e,t){if(e===t.value)return t;for(var n=0,r=t.children;n0)return a}return[]}var n=function(){function Tree(e){this._root=e}return Object.defineProperty(Tree.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),Tree.prototype.parent=function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null},Tree.prototype.children=function(e){var t=findNode(e,this._root);return t?t.children.map(function(e){return e.value}):[]},Tree.prototype.firstChild=function(e){var t=findNode(e,this._root);return t&&t.children.length>0?t.children[0].value:null},Tree.prototype.siblings=function(e){var t=findPath(e,this._root,[]);if(t.length<2)return[];var n=t[t.length-2].children.map(function(e){return e.value});return n.filter(function(t){return t!==e})},Tree.prototype.pathFromRoot=function(e){return findPath(e,this._root,[]).map(function(e){return e.value})},Tree}();t.Tree=n;var r=function(){function TreeNode(e,t){this.value=e,this.children=t}return TreeNode.prototype.toString=function(){return"TreeNode("+this.value+")"},TreeNode}();t.TreeNode=r},function(e,t){"use strict";function booleanFieldValueFactory(){return function(e,t){var n=e[t],r="__md_private_symbol_"+t;e[r]=n,Object.defineProperty(e,t,{get:function(){return this[r]},set:function(e){this[r]=null!=e&&""+e!="false"}})}}t.BooleanFieldValue=booleanFieldValueFactory},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var r=n(26),i=n(2),o=n(40),s=n(296),a=n(78),l=n(192),c=n(284),u=n(17),p=n(14),d=n(461),h=n(195),f=n(289);e.exports=function(e,t,n,m,y,v){var g=r[e],b=g,_=y?"set":"add",S=b&&b.prototype,w={},C=function(e){var t=S[e];o(S,e,"delete"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(v||S.forEach&&!p(function(){(new b).entries().next()}))){var E=new b,T=E[_](v?{}:-0,1)!=E,R=p(function(){E.has(1)}),P=d(function(e){new b(e)}),x=!v&&p(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});P||(b=t(function(t,n){c(t,b,e);var r=f(new g,t,b);return void 0!=n&&l(n,y,r[_],r),r}),b.prototype=S,S.constructor=b),(R||x)&&(C("delete"),C("has"),y&&C("get")),(x||T)&&C(_),v&&S.clear&&delete S.clear}else b=m.getConstructor(t,e,y,_),s(b.prototype,n),a.NEED=!0;return h(b,e),w[e]=b,i(i.G+i.W+i.F*(b!=g),w),v||m.setStrong(b,e,y),b}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(24)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,n){"use strict";var r=n(8);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(17),i=n(297).set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(96);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(17),i=n(96),o=n(24)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(293),i=n(2),o=n(40),s=n(66),a=n(39),l=n(133),c=n(460),u=n(195),p=n(68),d=n(24)("iterator"),h=!([].keys&&"next"in[].keys()),f="@@iterator",m="keys",y="values",v=function(){return this};e.exports=function(e,t,n,g,b,_,S){c(n,t,g);var w,C,E,T=function(e){if(!h&&e in M)return M[e];switch(e){case m:return function(){return new n(this,e)};case y:return function(){return new n(this,e)}}return function(){return new n(this,e)}},R=t+" Iterator",P=b==y,x=!1,M=e.prototype,A=M[d]||M[f]||b&&M[b],I=A||T(b),k=b?P?T("entries"):I:void 0,O="Array"==t?M.entries||A:A;if(O&&(E=p(O.call(new e)),E!==Object.prototype&&(u(E,R,!0),r||a(E,d)||s(E,d,v))),P&&A&&A.name!==y&&(x=!0,I=function(){return A.call(this)}),r&&!S||!h&&!x&&M[d]||s(M,d,I),l[t]=I,l[R]=v,b)if(w={values:P?I:T(y),keys:_?I:T(m),entries:k},S)for(C in w)C in M||o(M,C,w[C]);else i(i.P+i.F*(h||x),t,w);return w}},function(e,t){e.exports=!1},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(40);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){var r=n(17),i=n(8),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(107)(Function.call,n(79).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(26),i=n(30),o=n(35),s=n(24)("species");e.exports=function(e){var t=r[e];o&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(196)("keys"),i=n(136);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(291),i=n(65);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t){e.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){"use strict";function __export(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}__export(n(19)),__export(n(844)),__export(n(845)),__export(n(846)),__export(n(137)),__export(n(847)),__export(n(848)),__export(n(851)),__export(n(852)),__export(n(849)),__export(n(850)),__export(n(853)),__export(n(854)),__export(n(855)),__export(n(856)),__export(n(857)),__export(n(858)),__export(n(859)),__export(n(860)),__export(n(861)),__export(n(862)),__export(n(863)),__export(n(864)),__export(n(865)),__export(n(866)),__export(n(200)),__export(n(867)),__export(n(868)),__export(n(869)),__export(n(870)),__export(n(871)),__export(n(872)),__export(n(873)),__export(n(874)),__export(n(875)),__export(n(876)),__export(n(201)),__export(n(877)),__export(n(878)),__export(n(879)),__export(n(880)),__export(n(881)),__export(n(882)),__export(n(883)),__export(n(884)),__export(n(885)),__export(n(886)),__export(n(887)),__export(n(888)),__export(n(889)),__export(n(891)),__export(n(890)),__export(n(892)),__export(n(893)),__export(n(894)),__export(n(895)),__export(n(896)),__export(n(897)),__export(n(898))},function(e,t,n){"use strict";var r=n(1),i=n(1023);r.Observable.prototype.concatAll=i.concatAll},function(e,t,n){"use strict";var r=n(1),i=n(208);r.Observable.prototype.mergeAll=i.mergeAll},function(e,t,n){"use strict";var r=n(1),i=n(1065);r.Observable.prototype.switchMap=i.switchMap},function(e,t,n){"use strict";var r=n(1),i=n(312);r.Observable.prototype.toPromise=i.toPromise},function(e,t,n){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(1),o=function(e){function ScalarObservable(t,n){e.call(this),this.value=t,this.scheduler=n,this._isScalar=!0}return r(ScalarObservable,e),ScalarObservable.create=function(e,t){return new ScalarObservable(e,t)},ScalarObservable.dispatch=function(e){var t=e.done,n=e.value,r=e.subscriber;return t?void r.complete():(r.next(n),void(r.isUnsubscribed||(e.done=!0,this.schedule(e))))},ScalarObservable.prototype._subscribe=function(e){var t=this.value,n=this.scheduler;return n?n.schedule(ScalarObservable.dispatch,0,{done:!1,value:t,subscriber:e}):(e.next(t),void(e.isUnsubscribed||e.complete()))},ScalarObservable}(i.Observable);t.ScalarObservable=o},function(e,t,n){"use strict";var r=n(992);t.from=r.FromObservable.create},function(e,t,n){"use strict";function combineLatest(){for(var e=[],t=0;t0){var a=s.indexOf(n);a!==-1&&s.splice(a,1)}0===s.length&&(this.project?this._tryProject(o):this.destination.next(o))},CombineLatestSubscriber.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},CombineLatestSubscriber}(a.OuterSubscriber);t.CombineLatestSubscriber=u},function(e,t,n){"use strict";function concat(){for(var e=[],t=0;tthis.index},StaticArrayIterator.prototype.hasCompleted=function(){return this.array.length===this.index},StaticArrayIterator}(),f=function(e){function ZipBufferIterator(t,n,r,i){e.call(this,t),this.parent=n,this.observable=r,this.index=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return r(ZipBufferIterator,e),ZipBufferIterator.prototype[c.$$iterator]=function(){return this},ZipBufferIterator.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{done:!0}:{value:e.shift(),done:!1}},ZipBufferIterator.prototype.hasValue=function(){return this.buffer.length>0},ZipBufferIterator.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},ZipBufferIterator.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},ZipBufferIterator.prototype.notifyNext=function(e,t,n,r,i){this.buffer.push(t),this.parent.checkIterators()},ZipBufferIterator.prototype.subscribe=function(e,t){return l.subscribeToResult(this,this.observable,this,t)},ZipBufferIterator}(a.OuterSubscriber)},function(e,t,n){"use strict";var r=n(1086),i=n(209),o=function(){function QueueScheduler(){this.active=!1,this.actions=[],this.scheduledId=null}return QueueScheduler.prototype.now=function(){return Date.now()},QueueScheduler.prototype.flush=function(){if(!this.active&&!this.scheduledId){this.active=!0;for(var e=this.actions,t=null;t=e.shift();)if(t.execute(),t.error)throw this.active=!1,t.error;this.active=!1}},QueueScheduler.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),t<=0?this.scheduleNow(e,n):this.scheduleLater(e,t,n)},QueueScheduler.prototype.scheduleNow=function(e,t){return new r.QueueAction(this,e).schedule(t)},QueueScheduler.prototype.scheduleLater=function(e,t,n){return new i.FutureAction(this,e).schedule(n,t)},QueueScheduler}();t.QueueScheduler=o},function(e,t){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},r=function(e){function ArgumentOutOfRangeError(){e.call(this,"argument out of range"),this.name="ArgumentOutOfRangeError"}return n(ArgumentOutOfRangeError,e),ArgumentOutOfRangeError}(Error);t.ArgumentOutOfRangeError=r},function(e,t){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},r=function(e){function ObjectUnsubscribedError(){e.call(this,"object unsubscribed"),this.name="ObjectUnsubscribedError"}return n(ObjectUnsubscribedError,e),ObjectUnsubscribedError}(Error);t.ObjectUnsubscribedError=r},function(e,t,n){"use strict";function isNumeric(e){return!r.isArray(e)&&e-parseFloat(e)+1>=0}var r=n(82);t.isNumeric=isNumeric},function(e,t,n){"use strict";var r=n(48),i=(n.n(r),n(0)),o=(n.n(i),n(1));n.n(o);n.d(t,"a",function(){return l});var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(){function TopoDataService(e){this.http=e,this.apiUrl="../api/topodata/"}return TopoDataService.prototype.getNode=function(e){return this.http.get(this.apiUrl+e).map(function(e){return e.json()}).catch(this.handleError)},TopoDataService.prototype.handleError=function(e){var t=e.message?e.message:e.status?e.status+" - "+e.statusText:"Server error";return console.error(t),o.Observable.throw(t)},TopoDataService=s([n.i(i.Injectable)(),a("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.Http&&r.Http)&&e||Object])],TopoDataService);var e}()},function(e,t,n){"use strict";var r=n(48),i=(n.n(r),n(0));n.n(i);n.d(t,"a",function(){return a});var o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function TopologyInfoService(e){this.http=e}return TopologyInfoService.prototype.getCombinedTopologyInfo=function(e,t){var n=new r.URLSearchParams;return n.set("keyspace",e),n.set("cell",t),this.http.get("../api/topology_info/",{search:n}).map(function(e){return e.json()})},TopologyInfoService.prototype.getMetrics=function(){var e=["lag","qps","health"];return e},TopologyInfoService=o([n.i(i.Injectable)(),s("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.Http&&r.Http)&&e||Object])],TopologyInfoService);var e}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(48)),o=(n.n(i),n(485));n.n(o);n.d(t,"a",function(){return l});var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(){function WorkflowService(e){this.http=e,this.useWebSocket=!1,this.subject=new o.ReplaySubject(100),this.stopped=!1,this.ws=null,this.id=0,this.useWebSocket?this.connectWebSocket():this.connectHttp()}return WorkflowService.prototype.connectWebSocket=function(){if(!this.stopped){var e=this,t=new WebSocket("ws://"+window.location.hostname+":"+window.location.port+"/api/workflow");t.onopen=function(n){e.ws=t},t.onmessage=function(t){return e.subject.next(JSON.parse(t.data))},t.onclose=function(t){console.log("Disconnected from server, trying again in 3s."),e.ws=null,setTimeout(function(){e.connectWebSocket()},3e3)}}},WorkflowService.prototype.connectHttp=function(){if(!this.stopped){var e=this;this.http.get("../api/workflow/create").subscribe(function(t){var n=t.json();e.subject.next(n),"index"in n?(e.id=n.index,e.pollHttp()):setTimeout(function(){e.connectHttp()},3e3)},function(t){console.log("Workflow service create error, will try again in 3s: %s",t),setTimeout(function(){e.connectHttp()},3e3)})}},WorkflowService.prototype.pollHttp=function(){if(!this.stopped){var e=this;this.http.get("../api/workflow/poll/"+this.id).subscribe(function(t){e.subject.next(t.json()),e.pollHttp()},function(t){console.log("Workflow service poll error, will try again in 3s: %s",t),e.id=0,setTimeout(function(){e.connectHttp()},3e3)})}},WorkflowService.prototype.updates=function(){return this.subject},WorkflowService.prototype.sendAction=function(e,t){var n={path:e,name:t},r=JSON.stringify(n);this.useWebSocket?this.sendActionWebSocket(r):this.sendActionHttp(r)},WorkflowService.prototype.sendActionWebSocket=function(e){return null===this.ws?void alert("Not connected to vtctld via WebSocket, cannot send command."):void this.ws.send(e)},WorkflowService.prototype.sendActionHttp=function(e){if(0===this.id)return void alert("Not connected to vtctld via HTTP, cannot send command.");var t=new i.Headers({"Content-Type":"application/json; charset=utf-8"}),n=new i.RequestOptions({headers:t});this.http.post("../api/workflow/action/"+this.id,e,n).subscribe(function(e){},function(e){alert("Error posting action to server: "+e)})},WorkflowService.prototype.stop=function(){this.stopped=!0,null!==this.ws&&this.ws.close()},WorkflowService=s([n.i(r.Injectable)(),a("design:paramtypes",["function"==typeof(e="undefined"!=typeof i.Http&&i.Http)&&e||Object])],WorkflowService);var e}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(525));n.n(i);n.d(t,"a",function(){return a});var o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function AppComponent(){this.title="Vitess Control Panel"}return AppComponent=o([n.i(r.Component)({selector:"vt-app-root",template:n(551),styles:[n(538)]}),s("design:paramtypes",[])],AppComponent)}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(29)),o=(n.n(i),n(327)),s=n(84),a=n(85),l=n(112),c=n(83),u=n(145);n.d(t,"a",function(){return h});var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},h=function(){function DashboardComponent(e,t,n){this.keyspaceService=e,this.router=t,this.vtctlService=n,this.keyspaces=[],this.keyspacesReady=!1}return DashboardComponent.prototype.ngOnInit=function(){var e=this;this.getKeyspaces(),this.dialogContent=new s.a,this.dialogSettings=new a.a,this.actions=[{label:"Validate",command:function(t){e.openValidateDialog()}}],this.keyspaceActions=[{label:"Edit",command:function(t){e.openEditDialog()}},{label:"Delete",command:function(t){e.openDeleteDialog()}}]},DashboardComponent.prototype.getKeyspaces=function(){var e=this;this.keyspaces=[],this.keyspaceService.getKeyspaces().subscribe(function(t){t.subscribe(function(t){e.keyspaces.push(t),e.keyspaces.sort(e.cmp)})})},DashboardComponent.prototype.cmp=function(e,t){var n=e.name.toLowerCase(),r=t.name.toLowerCase();return n>r?1:r>n?-1:0},DashboardComponent.prototype.setSelectedKeyspace=function(e){this.selectedKeyspace=e},DashboardComponent.prototype.openEditDialog=function(e){void 0===e&&(e=this.selectedKeyspace),this.dialogSettings=new a.a("Edit","Edit "+e.name,"","There was a problem editing {{keyspace_name}}:"),this.dialogSettings.setMessage("Edited {{keyspace_name}}"),this.dialogSettings.onCloseFunction=this.getKeyspaces.bind(this);var t=new o.a(e).flags;this.dialogContent=new s.a("keyspace_name",t,{},this.prepareEdit.bind(this),"SetKeyspaceShardingInfo"),this.dialogSettings.toggleModal()},DashboardComponent.prototype.openNewDialog=function(){this.dialogSettings=new a.a("Create","Create a new Keyspace","","There was a problem creating {{keyspace_name}}:"),this.dialogSettings.setMessage("Created {{keyspace_name}}"),this.dialogSettings.onCloseFunction=this.getKeyspaces.bind(this);var e=(new o.b).flags;this.dialogContent=new s.a("keyspace_name",e,{keyspace_name:!0},this.prepareNew.bind(this),"CreateKeyspace"),this.dialogSettings.toggleModal()},DashboardComponent.prototype.openDeleteDialog=function(e){void 0===e&&(e=this.selectedKeyspace),this.dialogSettings=new a.a("Delete","Delete "+e.name,"Are you sure you want to delete "+e.name+"?","There was a problem deleting {{keyspace_name}}:"),this.dialogSettings.setMessage("Deleted {{keyspace_name}}"),this.dialogSettings.onCloseFunction=this.getKeyspaces.bind(this);var t=new o.c(e.name).flags;this.dialogContent=new s.a("keyspace_name",t,{},(void 0),"DeleteKeyspace"),this.dialogSettings.toggleModal()},DashboardComponent.prototype.openValidateDialog=function(){this.dialogSettings=new a.a("Validate","Validate all nodes","","There was a problem validating all nodes:"),this.dialogSettings.setMessage("Validated"),this.dialogSettings.onCloseFunction=this.getKeyspaces.bind(this);var e=(new o.d).flags;this.dialogContent=new s.a("",e,{},(void 0),"Validate"),this.dialogSettings.toggleModal()},DashboardComponent.prototype.prepareNew=function(e){for(var t=(new o.b).flags,n=0,r=Object.keys(e);n=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=function(){function KeyspaceComponent(e,t,n){this.route=e,this.keyspaceService=t,this.vtctlService=n,this.shardsReady=!1,this.keyspace={}}return KeyspaceComponent.prototype.ngOnInit=function(){var e=this;this.dialogContent=new o.a,this.dialogSettings=new s.a,this.actions=[{label:"Validate",command:function(t){e.openValidateKeyspaceDialog()}},{label:"Validate Schema",command:function(t){e.openValidateSchemaDialog()}},{label:"Validate Version",command:function(t){e.openValidateVersionDialog()}},{label:"Rebuild Keyspace Graph",command:function(t){e.openRebuildKeyspaceGraphDialog()}},{label:"Remove Keyspace Cell",command:function(t){e.openRemoveKeyspaceCellDialog()}}],this.routeSub=this.route.queryParams.subscribe(function(t){var n=t.keyspace;n&&(e.keyspaceName=n,e.getKeyspace(e.keyspaceName))})},KeyspaceComponent.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe()},KeyspaceComponent.prototype.getKeyspace=function(e){var t=this;this.keyspaceService.getKeyspace(e).subscribe(function(e){e.subscribe(function(e){t.keyspace=e})})},KeyspaceComponent.prototype.openNewShardDialog=function(){this.dialogSettings=new s.a("Create","Create a new Shard","","There was a problem creating {{shard_ref}}:"),this.dialogSettings.setMessage("Created {{shard_ref}}"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new a.a(this.keyspaceName).flags;this.dialogContent=new o.a("shard_ref",e,{},this.prepareShard.bind(this)),this.dialogContent=new o.a("shard_ref",e,{},this.prepareShard.bind(this),"CreateShard"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.openValidateKeyspaceDialog=function(){this.dialogSettings=new s.a("Validate","Validate "+this.keyspaceName,"","There was a problem validating {{keyspace_name}}:"),this.dialogSettings.setMessage("Validated {{keyspace_name}}"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new u.e(this.keyspaceName).flags;this.dialogContent=new o.a("keyspace_name",e,{},(void 0),"ValidateKeyspace"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.openValidateSchemaDialog=function(){this.dialogSettings=new s.a("Validate","Validate "+this.keyspaceName+"'s Schema","","There was a problem validating {{keyspace_name}}'s Schema:"),this.dialogSettings.setMessage("Validated {{keyspace_name}}'s Schema"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new u.f(this.keyspaceName).flags;this.dialogContent=new o.a("keyspace_name",e,{},(void 0),"ValidateSchemaKeyspace"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.openValidateVersionDialog=function(){this.dialogSettings=new s.a("Validate","Validate "+this.keyspaceName+"'s Version","","There was a problem validating {{keyspace_name}}'s Version:"),this.dialogSettings.setMessage("Validated {{keyspace_name}}'s Version"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new u.g(this.keyspaceName).flags;this.dialogContent=new o.a("keyspace_name",e,{},(void 0),"ValidateVersionKeyspace"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.openRebuildKeyspaceGraphDialog=function(){this.dialogSettings=new s.a("Rebuild","Rebuild "+this.keyspaceName,"","There was a problem rebuilding {{keyspace_name}}:"),this.dialogSettings.setMessage("Rebuilt {{keyspace_name}}"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new u.h(this.keyspaceName).flags;this.dialogContent=new o.a("keyspace_name",e,{},(void 0),"RebuildKeyspaceGraph"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.openRemoveKeyspaceCellDialog=function(){this.dialogSettings=new s.a("Remove","Remove a cell from "+this.keyspaceName,"","There was a problem removing {{cell_name}}:"),this.dialogSettings.setMessage("Removed {{cell_name}}"),this.dialogSettings.onCloseFunction=this.refreshKeyspaceView.bind(this);var e=new u.i(this.keyspaceName).flags;this.dialogContent=new o.a("cell_name",e,{},(void 0),"RemoveKeyspaceCell"),this.dialogSettings.toggleModal()},KeyspaceComponent.prototype.refreshKeyspaceView=function(){this.getKeyspace(this.keyspaceName)},KeyspaceComponent.prototype.prepareShard=function(e){var t={};t.shard_ref=e.shard_ref;var n=this.getName(e.lower_bound.getStrValue(),e.upper_bound.getStrValue());return t.shard_ref.setValue(e.keyspace_name.getStrValue()+"/"+n),new c.a((!0),t)},KeyspaceComponent.prototype.getName=function(e,t){return this.dialogContent.setName(e+"-"+t),this.dialogContent.getName()},KeyspaceComponent.prototype.canDeactivate=function(){return!this.dialogSettings.pending},KeyspaceComponent.prototype.noShards=function(){return void 0!==this.keyspace&&(void 0!==this.keyspace.servingShards&&void 0!==this.keyspace.nonservingShards&&(0===this.keyspace.servingShards.length&&0===this.keyspace.nonservingShards.length))},KeyspaceComponent=d([n.i(i.Component)({selector:"vt-keyspace-view",template:n(553),styles:[n(69)]}),h("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.ActivatedRoute&&r.ActivatedRoute)&&e||Object,"function"==typeof(t="undefined"!=typeof l.a&&l.a)&&t||Object,"function"==typeof(f="undefined"!=typeof p.a&&p.a)&&f||Object])],KeyspaceComponent);var e,t,f}()},function(e,t,n){"use strict";var r=n(29),i=(n.n(r),n(0)),o=(n.n(i),n(84)),s=n(85),a=n(328),l=n(329),c=n(112),u=n(143),p=n(83);n.d(t,"a",function(){return f});var d=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=function(){function ShardComponent(e,t,n,r,i){this.route=e,this.router=t,this.keyspaceService=n,this.tabletService=r,this.vtctlService=i,this.keyspace={},this.tablets=[],this.tabletsReady=!1,this.selectedTablet=void 0}return ShardComponent.prototype.ngOnInit=function(){var e=this;this.dialogContent=new o.a,this.dialogSettings=new s.a,this.actions=[{label:"Delete",command:function(t){e.openDeleteShardDialog()}},{label:"Validate",command:function(t){e.openValidateShardDialog()}},{label:"Initialize Shard Master",command:function(t){e.openInitShardMasterDialog()}},{label:"Externally Reparent Tablet",command:function(t){e.openTabExtRepDialog()}},{label:"Planned Reparent",command:function(t){e.openPlanRepShardDialog()}},{label:"Emergency Reparent",command:function(t){e.openEmergencyRepShardDialog()}},{label:"Shard Replication Positions",command:function(t){e.openShardReplicationPosDialog()}},{label:"Validate Version",command:function(t){e.openValidateVerShardDialog()}}],this.tabletActions=this.getTabletActions(),this.routeSub=this.route.queryParams.subscribe(function(t){var n=t.keyspace,r=t.shard;n&&r&&(e.keyspaceName=n,e.shardName=r,e.getKeyspace(e.keyspaceName))})},ShardComponent.prototype.getTabletActions=function(){var e=this;return[{label:"Delete",command:function(t){e.openDeleteTabletDialog()}},{label:"Ping",command:function(t){e.openPingTabletDialog()}},{label:"Refresh State",command:function(t){e.openRefreshTabletDialog()}},{label:"Set ReadOnly",command:function(t){e.openSetReadOnlyDialog()}},{label:"Set ReadWrite",command:function(t){e.openSetReadWriteDialog()}},{label:"Start Slave",command:function(t){e.openStartSlaveDialog()}},{label:"Stop Slave",command:function(t){e.openStopSlaveDialog()}},{label:"Run Health Check",command:function(t){e.openRunHealthCheckDialog()}},{label:"Ignore Health Error",command:function(t){e.openIgnoreHealthErrorDialog()}},{label:"Demote Master",command:function(t){e.openDemoteMasterDialog()}},{label:"Reparent Tablet",command:function(t){e.openReparentTabletDialog()}}]},ShardComponent.prototype.portNames=function(e){return Object.keys(e.port_map)},ShardComponent.prototype.getUrl=function(e){return"http://"+e.hostname+":"+e.port_map.vt},ShardComponent.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe()},ShardComponent.prototype.getTabletList=function(e,t){var n=this;this.tablets=[],this.tabletsReady=!0;var r=e+"/"+t;this.tabletService.getTabletList(r).subscribe(function(e){for(var t=0,r=e;t=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},h=function(){function TabletComponent(e,t,n,r,i){this.route=e,this.router=t,this.tabletService=n,this.vtctlService=r,this.sanitizer=i,this.tabletReady=!1}return TabletComponent.prototype.ngOnInit=function(){var e=this;this.dialogContent=new s.a,this.dialogSettings=new a.a,this.routeSub=this.route.queryParams.subscribe(function(t){var n=t.keyspace,r=t.shard,i=t.tablet;n&&r&&i&&(e.keyspaceName=n,e.shardName=r,e.tabletRef=i,e.getTablet(i))})},TabletComponent.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe()},TabletComponent.prototype.getTablet=function(e){var t=this;this.tabletService.getTablet(e).subscribe(function(e){t.tablet=e,t.tabletUrl=t.sanitizer.bypassSecurityTrustResourceUrl("http://"+e.hostname+":"+e.port_map.vt),t.tabletReady=!0})},TabletComponent.prototype.openDeleteTabletDialog=function(){this.dialogSettings=new a.a("Delete","Delete "+this.tablet.label,"Are you sure you want to delete "+this.tablet.label+"?","There was a problem deleting "+this.tablet.label+":"),this.dialogSettings.setMessage("Deleted "+this.tablet.label),this.dialogSettings.onCloseFunction=this.navigateToShard.bind(this);var e=new l.a(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"DeleteTablet"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openRefreshTabletDialog=function(){this.dialogSettings=new a.a("Refresh","Refresh "+this.tablet.label,"","There was a problem refreshing "+this.tablet.label+":"),this.dialogSettings.setMessage("Refreshed "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.b(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"RefreshState"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openPingTabletDialog=function(){this.dialogSettings=new a.a("Ping","Ping "+this.tablet.label,"","There was a problem pinging "+this.tablet.label+":"),this.dialogSettings.setMessage("Pinged "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"Ping"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openSetReadOnlyDialog=function(){this.dialogSettings=new a.a("Set","Set "+this.tablet.label+" to Read Only","","There was a problem setting "+this.tablet.label+" to Read Only:"),this.dialogSettings.setMessage("Set "+this.tablet.label+" to Read Only"),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"SetReadOnly"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openSetReadWriteDialog=function(){this.dialogSettings=new a.a("Set","Set "+this.tablet.label+" to Read/Write","","There was a problem setting "+this.tablet.label+" to Read/Write:"),this.dialogSettings.setMessage("Set "+this.tablet.label+" to Read/Write"),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"SetReadWrite"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openStartSlaveDialog=function(){this.dialogSettings=new a.a("Start","Start Slave, "+this.tablet.label,"","There was a problem starting slave, "+this.tablet.label+":"),this.dialogSettings.setMessage("Started Slave, "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"StartSlave"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openStopSlaveDialog=function(){this.dialogSettings=new a.a("Stop","Stop Slave, "+this.tablet.label,"","There was a problem stopping slave, "+this.tablet.label+":"),this.dialogSettings.setMessage("Stopped Slave, "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"StopSlave"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openRunHealthCheckDialog=function(){this.dialogSettings=new a.a("Run","Run Health Check on "+this.tablet.label,"","There was a problem running Health Check on "+this.tablet.label+":"),this.dialogSettings.setMessage("Ran Health Check on "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"RunHealthCheck"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openIgnoreHealthErrorDialog=function(){this.dialogSettings=new a.a("Ignore","Ignore Health Check for "+this.tablet.label,"","There was a problem ignoring the Health Check for "+this.tablet.label+":"),this.dialogSettings.setMessage("Ignored "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"IgnoreHealthError"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openDemoteMasterDialog=function(){this.dialogSettings=new a.a("Demote","Demote "+this.tablet.label,"","There was a problem demoting "+this.tablet.label+":"),this.dialogSettings.setMessage("Demoted "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"DemoteMaster"),this.dialogSettings.toggleModal()},TabletComponent.prototype.openReparentTabletDialog=function(){this.dialogSettings=new a.a("Reparent","Reparent "+this.tablet.label,"","There was a problem reparenting "+this.tablet.label+":"),this.dialogSettings.setMessage("Reparented "+this.tablet.label),this.dialogSettings.onCloseFunction=this.refreshTabletView.bind(this);var e=new l.c(this.tablet.ref).flags;this.dialogContent=new s.a("tablet_alias",e,{},(void 0),"ReparentTablet"),this.dialogSettings.toggleModal()},TabletComponent.prototype.refreshTabletView=function(){this.getTablet(this.tabletRef),this.tabletUrl=this.tabletUrl},TabletComponent.prototype.navigateToShard=function(e){this.router.navigate(["/shard"],{queryParams:{keyspace:this.keyspaceName,shard:this.shardName}})},TabletComponent.prototype.canDeactivate=function(){return!this.dialogSettings.pending},TabletComponent=p([n.i(i.Component)({selector:"vt-tablet-view",template:n(555),styles:[n(541),n(69)]}),d("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.ActivatedRoute&&r.ActivatedRoute)&&e||Object,"function"==typeof(t="undefined"!=typeof r.Router&&r.Router)&&t||Object,"function"==typeof(h="undefined"!=typeof c.a&&c.a)&&h||Object,"function"==typeof(f="undefined"!=typeof u.a&&u.a)&&f||Object,"function"==typeof(m="undefined"!=typeof o.DomSanitizationService&&o.DomSanitizationService)&&m||Object])],TabletComponent);var e,t,h,f,m}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(112)),o=n(214),s=n(143),a=n(83);n.d(t,"a",function(){return u});var l=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(){function SchemaComponent(e,t,n,r){this.keyspaceService=e,this.shardService=t,this.tabletService=n,this.vtctlService=r,this.dialog=!1,this.keyspaces=[],this.shards=[],this.tablets=[],this.schemas=[],this.vSchemas=[]}return SchemaComponent.prototype.ngOnInit=function(){this.getKeyspaceNames()},SchemaComponent.prototype.getKeyspaceNames=function(){var e=this;this.resetSchemas(),this.resetVSchemas(),this.keyspaceService.getKeyspaceNames().subscribe(function(t){e.keyspaces=t.map(function(e){return{label:e,value:e}}),e.keyspaces.sort(e.cmp),e.keyspaces.length>0&&(e.selectedKeyspace=e.keyspaces[0].value,e.getShards(e.selectedKeyspace))})},SchemaComponent.prototype.cmp=function(e,t){var n=e.label.toLowerCase(),r=t.label.toLowerCase();return n>r?1:r>n?-1:0},SchemaComponent.prototype.getShards=function(e){var t=this;return this.resetSchemas(),e&&this.shardService.getShards(e).subscribe(function(e){t.shards=e.map(function(e){return{label:e,value:e}}),t.shards.length>0&&(t.selectedShard=t.shards[0].value,t.getTablets(t.selectedKeyspace,t.selectedShard))}),[]},SchemaComponent.prototype.getTablets=function(e,t){var n=this;this.resetSchemas(),this.tabletService.getTabletList(e+"/"+t).subscribe(function(e){n.tablets=e.map(function(e){var t=e.cell+"-"+e.uid;return{label:t,value:t}}),n.tablets.length>0&&(n.selectedTablet=n.tablets[0].value,n.fetchSchema(n.selectedKeyspace,n.selectedTablet))})},SchemaComponent.prototype.fetchSchema=function(e,t){var n=this;this.resetSchemas(),this.resetVSchemas();var r=this.vtctlService.runCommand(["GetSchema",t]),i=this.vtctlService.runCommand(["GetVSchema",e]),o=r.combineLatest(i);o.subscribe(function(e){var t=e[0],r=e[1];if(!r.Error){r=JSON.parse(r.Output);var i=Object.keys(r.vindexes).map(function(e){var t=r.vindexes[e].type,n=r.vindexes[e].params?r.vindexes[e].params:"",i=r.vindexes[e].owner?r.vindexes[e].owner:"";return{name:e,type:t,params:n,owner:i}});n.vSchemas=i}if(!t.Error)if(t=JSON.parse(t.Output),r.Error)n.schemas=t.table_definitions.map(function(e){return n.parseColumns(e)});else{var o=n.createVindexMap(r.tables);n.schemas=t.table_definitions.map(function(e){return n.parseColumns(e,o)})}})},SchemaComponent.prototype.resetSchemas=function(){this.schemas=[],this.selectedSchema=void 0},SchemaComponent.prototype.resetVSchemas=function(){this.vSchemas=[],this.selectedVSchema=void 0},SchemaComponent.prototype.createVindexMap=function(e){for(var t={},n=0,r=Object.keys(e);n=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function HeatmapComponent(e,t){this.zone=e,this.tabletService=t,this.heatmapHeight=0,this.heatmapWidth=0,this.dataMin=0,this.dataMax=0,this.showPopup=!0,this.clicked=!1}return HeatmapComponent.prototype.getRowHeight=function(){return 20},HeatmapComponent.prototype.getXLabelsRowHeight=function(){return 50},HeatmapComponent.prototype.getTotalRows=function(){ -return this.heatmap.KeyspaceLabel.Rowspan},HeatmapComponent.prototype.getRemainingRows=function(e){for(var t=[],n=1;n=0;n--)if(t+=this.yLabels[n].CellLabel.Rowspan,e=0;n--){if(null==this.yLabels[n].TypeLabels)return"all";for(var r=this.yLabels[n].TypeLabels.length-1;r>=0;r--)if(t+=this.yLabels[n].TypeLabels[r].Rowspan,et?e:t}),n=0===t?1:1/(1+t);this.colorscaleValue=[[0,"#000000"],[n,"#FFFFFF"],[1,"#A22417"]],this.dataMin=-1,this.dataMax=t}},HeatmapComponent.prototype.drawHeatmap=function(e){this.setupColorscale(e);var t=[{z:this.data,zmin:this.dataMin,zmax:this.dataMax,x:this.xLabels,colorscale:this.colorscaleValue,type:"heatmap",showscale:!1,hoverinfo:"none"}],n={type:"category",showgrid:!1,zeroline:!1,rangemode:"nonnegative",side:"top",ticks:""},r={showticklabels:!1,tickmode:"array",ticks:"inside",ticklen:this.heatmapWidth,tickcolor:"#000",tickvals:this.yGrid,fixedrange:!0},i={xaxis:n,yaxis:r,width:this.heatmapWidth,height:this.heatmapHeight,margin:{t:this.getXLabelsRowHeight(),b:0,r:0,l:0},showlegend:!1};Plotly.newPlot(this.name,t,i,{scrollZoom:!0,displayModeBar:!1})},o([n.i(r.Input)(),s("design:type",Object)],HeatmapComponent.prototype,"heatmap",void 0),o([n.i(r.Input)(),s("design:type",String)],HeatmapComponent.prototype,"metric",void 0),o([n.i(r.Input)(),s("design:type",String)],HeatmapComponent.prototype,"name",void 0),HeatmapComponent=o([n.i(r.Component)({selector:"vt-heatmap",template:n(560),styles:[n(546)]}),s("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.NgZone&&r.NgZone)&&e||Object,"function"==typeof(t="undefined"!=typeof i.a&&i.a)&&t||Object])],HeatmapComponent);var e,t}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(29)),o=(n.n(i),n(331)),s=n(142),a=n(319);n.d(t,"a",function(){return u});var l=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(){function StatusComponent(e,t,n,r,i,o){this.componentResolver=e,this.tabletService=t,this.router=n,this.route=r,this.zone=i,this.topoInfoService=o,this.heatmapDataReady=!1,this.listOfKeyspaces=[],this.mapOfKeyspaces={},this.keyspaces=[],this.cells=[],this.tabletTypes=[],this.metrics=[]}return StatusComponent.prototype.ngOnInit=function(){this.getBasicInfo()},StatusComponent.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},StatusComponent.prototype.getTopologyInfo=function(e,t){var n=this;this.topoInfoService.getCombinedTopologyInfo(e,t).subscribe(function(e){var t=e.Keyspaces;n.keyspaces=[],n.keyspaces.push({label:"all",value:"all"});for(var r=0;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(){function TopoBrowserComponent(e,t){this.topoData=e,this.route=t,this.title="Topology Browser",this.node={},this.path="",this.breadcrumbs=[]}return TopoBrowserComponent.prototype.ngOnInit=function(){var e=this;this.routeSub=this.route.queryParams.subscribe(function(t){return e.getNode(t.path)})},TopoBrowserComponent.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe(),this.nodeSub&&this.nodeSub.unsubscribe()},TopoBrowserComponent.prototype.childLink=function(e){return{path:this.path+"/"+e}},TopoBrowserComponent.prototype.getNode=function(e){var t=this;if(this.path="",this.breadcrumbs=[],e){this.path=e;for(var n=e.split("/"),r="",i=1;i0&&"/"===this.path.charAt(this.path.length-1)&&(e=this.path.substring(0,this.path.length-1));var t=e.split("/");return t[t.length-1]},Node}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(334)),o=n(531),s=n(302),a=(n.n(s),n(320)),l=n(84),c=n(85),u=n(145),p=n(330);n.d(t,"a",function(){return f});var d=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=function(){function WorkflowListComponent(e){this.workflowService=e,this.title="Running Workflows",this.redirect="",this.workflows=[new i.b("Horizontal Resharding Workflow","/UU130429",[new i.b("Approval","/UU130429/1",[]),new i.b("Bootstrap","/UU130429/2",[new i.b("Copy to -80","/UU130429/2/6",[]),new i.b("Copy to 80-","/UU130429/2/7",[])]),new i.b("Diff","/UU130429/3",[new i.b("Copy to -80","/UU130429/3/9",[]),new i.b("Copy to 80-","/UU130429/3/10",[])]),new i.b("Redirect","/UU130429/4",[new i.b("Redirect REPLICA","/UU130429/4/11",[new i.b("Redirect -80","/UU130429/4/11/14",[]),new i.b("Redirect 80-","/UU130429/4/11/15",[])]),new i.b("Redirect RDONLY","/UU130429/4/12",[new i.b("Redirect -80","/UU130429/4/12/16",[]),new i.b("Redirect 80-","/UU130429/4/12/17",[])]),new i.b("Redirect Master","/UU130429/4/13",[new i.b("Redirect -80","/UU130429/4/13/16",[]),new i.b("Redirect 80-","/UU130429/4/13/17",[])])]),new i.b("Cleanup","/UU130429/5",[new i.b("Redirect 80-","/UU130429/5/18",[])])]),new i.b("TEST DUMMY","/UU948312",[])],this.running=!0}return WorkflowListComponent.prototype.ngOnInit=function(){var e=this;this.workflowService.updates().subscribe(function(t){e.processUpdateJson(t)}),this.dialogContent=new l.a,this.dialogSettings=new c.a,this.actions=[{label:"Toggle Running / Non-running Workflows",command:function(t){e.toggleRunning()}}],this.updateWorkFlow("/UU130429",{message:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntut labore et dolore magna aliqua.",state:i.c.RUNNING,lastChanged:1471235e6,display:i.d.DETERMINATE,progress:63,progressMsg:"63%",disabled:!1,log:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia conseq/UUntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem."}),this.updateWorkFlow("/UU130429/1",{message:"Workflow was not started automatically. Click 'Start'.",state:i.c.DONE,lastChanged:1471234131e3,actions:[new i.e("Start",i.f.ENABLED,i.a.TRIGGERED)],log:"Started"}),this.updateWorkFlow("/UU130429/2/6",{message:"Copying data from 0",state:i.c.DONE,lastChanged:147123415e4,display:i.d.DETERMINATE,progress:100,progressMsg:"56372/56372 rows",log:"Success"}),this.updateWorkFlow("/UU130429/2/7",{message:"Copying data from 0",state:i.c.DONE,lastChanged:1471234225e3,display:i.d.DETERMINATE,progress:100,progressMsg:"56373/56373 rows",log:"Success"}),this.updateWorkFlow("/UU130429/2",{state:i.c.DONE,lastChanged:14712343e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2",actions:[new i.e("Canary 1st Shard",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Shards",i.f.ENABLED,i.a.TRIGGERED)],log:"Success"}),this.updateWorkFlow("/UU130429/3/9",{message:"Comparing -80 and 0",state:i.c.DONE,lastChanged:147123435e4,display:i.d.DETERMINATE,progress:100,progressMsg:"56372/56372 rows",log:"Success"}),this.updateWorkFlow("/UU130429/3/10",{message:"Comparing 80- and 0",state:i.c.DONE,lastChanged:1471234425e3,display:i.d.DETERMINATE,progress:100,progressMsg:"56373/56373 rows",log:"Success"}),this.updateWorkFlow("/UU130429/3",{state:i.c.DONE,lastChanged:14712345e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2",actions:[new i.e("Canary 1st Shard",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Shards",i.f.ENABLED,i.a.TRIGGERED)],log:"Success"}),this.updateWorkFlow("/UU130429/4/11",{message:"Migrating Serve Type: REPLICA",state:i.c.DONE,lastChanged:14712347e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2"}),this.updateWorkFlow("/UU130429/4/11/14",{message:"Migrating -80",state:i.c.DONE,lastChanged:147123465e4,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/11/15",{message:"Migrating 80-",state:i.c.DONE,lastChanged:14712347e5,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/12",{message:"Migrating Serve Type: RDONLY",state:i.c.RUNNING,lastChanged:14712348e5,display:i.d.DETERMINATE,progress:50,progressMsg:"1/2"}),this.updateWorkFlow("/UU130429/4/12/16",{message:"Migrating -80",state:i.c.DONE,lastChanged:147123475e4,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/12/17",{message:"Migrating 80-",state:i.c.RUNNING,display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4/13",{message:"Migrating Serve Type: MASTER",display:i.d.DETERMINATE,progressMsg:"0/2"}),this.updateWorkFlow("/UU130429/4/13/16",{message:"Migrating -80",display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4/13/17",{message:"Migrating 80-",display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4",{message:"",state:i.c.RUNNING,lastChanged:1471235e6,display:i.d.DETERMINATE,progress:50,progressMsg:"3/6",actions:[new i.e("Canary 1st Tablet Type",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Tablet Types",i.f.ENABLED,i.a.NORMAL)]}),this.updateWorkFlow("/UU130429/5/18",{message:"Recursively removing old shards",display:i.d.DETERMINATE})},WorkflowListComponent.prototype.ngOnDestroy=function(){this.workflowService.stop()},WorkflowListComponent.prototype.processUpdateJson=function(e){if("fullUpdate"in e&&e.fullUpdate&&(this.redirect="",this.workflows=[]),"nodes"in e&&null!==e.nodes&&this.processWorkflowJson(e.nodes),"deletes"in e&&null!==e.deletes)for(var t=0,n=e.deletes;t0&&"/"===e.charAt(0)},WorkflowListComponent.prototype.cleanPath=function(e){return e.length>0&&"/"===e.charAt(e.length-1)?e.substring(0,e.length-1):e},WorkflowListComponent.prototype.getChild=function(e,t){for(var n=0,r=t;n0)if(e.indexOf(" ")>-1)for(var n=e.split(/\s+/g),r=0,i=n.length;r=0;n--)if(t+=this.yLabels[n].CellLabel.Rowspan,e=0;n--){if(null==this.yLabels[n].TypeLabels)return"all";for(var r=this.yLabels[n].TypeLabels.length-1;r>=0;r--)if(t+=this.yLabels[n].TypeLabels[r].Rowspan,et?e:t}),n=0===t?1:1/(1+t);this.colorscaleValue=[[0,"#000000"],[n,"#FFFFFF"],[1,"#A22417"]],this.dataMin=-1,this.dataMax=t}},HeatmapComponent.prototype.drawHeatmap=function(e){this.setupColorscale(e);var t=[{z:this.data,zmin:this.dataMin,zmax:this.dataMax,x:this.xLabels,colorscale:this.colorscaleValue,type:"heatmap",showscale:!1,hoverinfo:"none"}],n={type:"category",showgrid:!1,zeroline:!1,rangemode:"nonnegative",side:"top",ticks:""},r={showticklabels:!1,tickmode:"array",ticks:"inside",ticklen:this.heatmapWidth,tickcolor:"#000",tickvals:this.yGrid,fixedrange:!0},i={xaxis:n,yaxis:r,width:this.heatmapWidth,height:this.heatmapHeight,margin:{t:this.getXLabelsRowHeight(),b:0,r:0,l:0},showlegend:!1};Plotly.newPlot(this.name,t,i,{scrollZoom:!0,displayModeBar:!1})},o([n.i(r.Input)(),s("design:type",Object)],HeatmapComponent.prototype,"heatmap",void 0),o([n.i(r.Input)(),s("design:type",String)],HeatmapComponent.prototype,"metric",void 0),o([n.i(r.Input)(),s("design:type",String)],HeatmapComponent.prototype,"name",void 0),HeatmapComponent=o([n.i(r.Component)({selector:"vt-heatmap",template:n(560),styles:[n(546)]}),s("design:paramtypes",["function"==typeof(e="undefined"!=typeof r.NgZone&&r.NgZone)&&e||Object,"function"==typeof(t="undefined"!=typeof i.a&&i.a)&&t||Object])],HeatmapComponent);var e,t}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(29)),o=(n.n(i),n(331)),s=n(142),a=n(319);n.d(t,"a",function(){return u});var l=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(){function StatusComponent(e,t,n,r,i,o){this.componentResolver=e,this.tabletService=t,this.router=n,this.route=r,this.zone=i,this.topoInfoService=o,this.heatmapDataReady=!1,this.listOfKeyspaces=[],this.mapOfKeyspaces={},this.keyspaces=[],this.cells=[],this.tabletTypes=[],this.metrics=[]}return StatusComponent.prototype.ngOnInit=function(){this.getBasicInfo()},StatusComponent.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},StatusComponent.prototype.getTopologyInfo=function(e,t){var n=this;this.topoInfoService.getCombinedTopologyInfo(e,t).subscribe(function(e){var t=e.Keyspaces;n.keyspaces=[],n.keyspaces.push({label:"all",value:"all"});for(var r=0;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(){function TopoBrowserComponent(e,t){this.topoData=e,this.route=t,this.title="Topology Browser",this.node={},this.path="",this.breadcrumbs=[]}return TopoBrowserComponent.prototype.ngOnInit=function(){var e=this;this.routeSub=this.route.queryParams.subscribe(function(t){return e.getNode(t.path)})},TopoBrowserComponent.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe(),this.nodeSub&&this.nodeSub.unsubscribe()},TopoBrowserComponent.prototype.childLink=function(e){return{path:this.path+"/"+e}},TopoBrowserComponent.prototype.getNode=function(e){var t=this;if(this.path="",this.breadcrumbs=[],e){this.path=e;for(var n=e.split("/"),r="",i=1;i0&&"/"===this.path.charAt(this.path.length-1)&&(e=this.path.substring(0,this.path.length-1));var t=e.split("/");return t[t.length-1]},Node}()},function(e,t,n){"use strict";var r=n(0),i=(n.n(r),n(334)),o=n(531),s=n(302),a=(n.n(s),n(320)),l=n(84),c=n(85),u=n(145),p=n(330);n.d(t,"a",function(){return f});var d=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},f=function(){function WorkflowListComponent(e){this.workflowService=e,this.title="Running Workflows",this.redirect="",this.workflows=[new i.b("Horizontal Resharding Workflow","/UU130429",[new i.b("Approval","/UU130429/1",[]),new i.b("Bootstrap","/UU130429/2",[new i.b("Copy to -80","/UU130429/2/6",[]),new i.b("Copy to 80-","/UU130429/2/7",[])]),new i.b("Diff","/UU130429/3",[new i.b("Copy to -80","/UU130429/3/9",[]),new i.b("Copy to 80-","/UU130429/3/10",[])]),new i.b("Redirect","/UU130429/4",[new i.b("Redirect REPLICA","/UU130429/4/11",[new i.b("Redirect -80","/UU130429/4/11/14",[]),new i.b("Redirect 80-","/UU130429/4/11/15",[])]),new i.b("Redirect RDONLY","/UU130429/4/12",[new i.b("Redirect -80","/UU130429/4/12/16",[]),new i.b("Redirect 80-","/UU130429/4/12/17",[])]),new i.b("Redirect Master","/UU130429/4/13",[new i.b("Redirect -80","/UU130429/4/13/16",[]),new i.b("Redirect 80-","/UU130429/4/13/17",[])])]),new i.b("Cleanup","/UU130429/5",[new i.b("Redirect 80-","/UU130429/5/18",[])])]),new i.b("TEST DUMMY","/UU948312",[])],this.running=!0}return WorkflowListComponent.prototype.ngOnInit=function(){var e=this;this.workflowService.updates().subscribe(function(t){e.processUpdateJson(t)}),this.dialogContent=new l.a,this.dialogSettings=new c.a,this.actions=[{label:"Toggle Running / Non-running Workflows",command:function(t){e.toggleRunning()}}],this.updateWorkFlow("/UU130429",{message:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntut labore et dolore magna aliqua.",state:i.c.RUNNING,lastChanged:1471235e6,display:i.d.DETERMINATE,progress:63,progressMsg:"63%",disabled:!1,log:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia conseq/UUntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem."}),this.updateWorkFlow("/UU130429/1",{message:"Workflow was not started automatically. Click 'Start'.",state:i.c.DONE,lastChanged:1471234131e3,actions:[new i.e("Start",i.f.ENABLED,i.a.TRIGGERED)],log:"Started"}),this.updateWorkFlow("/UU130429/2/6",{message:"Copying data from 0",state:i.c.DONE,lastChanged:147123415e4,display:i.d.DETERMINATE,progress:100,progressMsg:"56372/56372 rows",log:"Success"}),this.updateWorkFlow("/UU130429/2/7",{message:"Copying data from 0",state:i.c.DONE,lastChanged:1471234225e3,display:i.d.DETERMINATE,progress:100,progressMsg:"56373/56373 rows",log:"Success"}),this.updateWorkFlow("/UU130429/2",{state:i.c.DONE,lastChanged:14712343e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2",actions:[new i.e("Canary 1st Shard",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Shards",i.f.ENABLED,i.a.TRIGGERED)],log:"Success"}),this.updateWorkFlow("/UU130429/3/9",{message:"Comparing -80 and 0",state:i.c.DONE,lastChanged:147123435e4,display:i.d.DETERMINATE,progress:100,progressMsg:"56372/56372 rows",log:"Success"}),this.updateWorkFlow("/UU130429/3/10",{message:"Comparing 80- and 0",state:i.c.DONE,lastChanged:1471234425e3,display:i.d.DETERMINATE,progress:100,progressMsg:"56373/56373 rows",log:"Success"}),this.updateWorkFlow("/UU130429/3",{state:i.c.DONE,lastChanged:14712345e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2",actions:[new i.e("Canary 1st Shard",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Shards",i.f.ENABLED,i.a.TRIGGERED)],log:"Success"}),this.updateWorkFlow("/UU130429/4/11",{message:"Migrating Serve Type: REPLICA",state:i.c.DONE,lastChanged:14712347e5,display:i.d.DETERMINATE,progress:100,progressMsg:"2/2"}),this.updateWorkFlow("/UU130429/4/11/14",{message:"Migrating -80",state:i.c.DONE,lastChanged:147123465e4,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/11/15",{message:"Migrating 80-",state:i.c.DONE,lastChanged:14712347e5,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/12",{message:"Migrating Serve Type: RDONLY",state:i.c.RUNNING,lastChanged:14712348e5,display:i.d.DETERMINATE,progress:50,progressMsg:"1/2"}),this.updateWorkFlow("/UU130429/4/12/16",{message:"Migrating -80",state:i.c.DONE,lastChanged:147123475e4,display:i.d.DETERMINATE,progress:100,log:"Success on tablet 1 \nSuccess on tablet 2 \nSuccess on tablet 3 \nSuccess on tablet 4 \n"}),this.updateWorkFlow("/UU130429/4/12/17",{message:"Migrating 80-",state:i.c.RUNNING,display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4/13",{message:"Migrating Serve Type: MASTER",display:i.d.DETERMINATE,progressMsg:"0/2"}),this.updateWorkFlow("/UU130429/4/13/16",{message:"Migrating -80",display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4/13/17",{message:"Migrating 80-",display:i.d.DETERMINATE}),this.updateWorkFlow("/UU130429/4",{message:"",state:i.c.RUNNING,lastChanged:1471235e6,display:i.d.DETERMINATE,progress:50,progressMsg:"3/6",actions:[new i.e("Canary 1st Tablet Type",i.f.ENABLED,i.a.TRIGGERED),new i.e("Remaining Tablet Types",i.f.ENABLED,i.a.NORMAL)]}),this.updateWorkFlow("/UU130429/5/18",{message:"Recursively removing old shards",display:i.d.DETERMINATE})},WorkflowListComponent.prototype.ngOnDestroy=function(){this.workflowService.stop()},WorkflowListComponent.prototype.processUpdateJson=function(e){if("fullUpdate"in e&&e.fullUpdate&&(this.redirect="",this.workflows=[]),"nodes"in e&&null!==e.nodes&&this.processWorkflowJson(e.nodes),"deletes"in e&&null!==e.deletes)for(var t=0,n=e.deletes;t0&&"/"===e.charAt(0)},WorkflowListComponent.prototype.cleanPath=function(e){return e.length>0&&"/"===e.charAt(e.length-1)?e.substring(0,e.length-1):e},WorkflowListComponent.prototype.getChild=function(e,t){for(var n=0,r=t;n0)if(e.indexOf(" ")>-1)for(var n=e.split(/\s+/g),r=0,i=n.length;r1?e[1]:null,r=e.length>2?e[2]:null;return this.control(t,n,r)}return this.control(e)},FormBuilder.decorators=[{type:r.Injectable}],FormBuilder}();t.FormBuilder=a},function(e,t,n){"use strict";var r=n(354);t.AsyncPipe=r.AsyncPipe;var i=n(580);t.COMMON_PIPES=i.COMMON_PIPES;var o=n(355);t.DatePipe=o.DatePipe;var s=n(356);t.I18nPluralPipe=s.I18nPluralPipe;var a=n(357);t.I18nSelectPipe=a.I18nSelectPipe;var l=n(358);t.JsonPipe=l.JsonPipe;var c=n(359);t.LowerCasePipe=c.LowerCasePipe;var u=n(360);t.CurrencyPipe=u.CurrencyPipe,t.DecimalPipe=u.DecimalPipe,t.PercentPipe=u.PercentPipe;var p=n(361);t.ReplacePipe=p.ReplacePipe;var d=n(362);t.SlicePipe=d.SlicePipe;var h=n(363);t.UpperCasePipe=h.UpperCasePipe},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(59),s=function(){function ObservableStrategy(){}return ObservableStrategy.prototype.createSubscription=function(e,t){return e.subscribe({next:t,error:function(e){throw e}})},ObservableStrategy.prototype.dispose=function(e){e.unsubscribe()},ObservableStrategy.prototype.onDestroy=function(e){e.unsubscribe()},ObservableStrategy}(),a=function(){function PromiseStrategy(){}return PromiseStrategy.prototype.createSubscription=function(e,t){return e.then(t,function(e){throw e})},PromiseStrategy.prototype.dispose=function(e){},PromiseStrategy.prototype.onDestroy=function(e){},PromiseStrategy}(),l=new a,c=new s,u=function(){function AsyncPipe(e){this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}return AsyncPipe.prototype.ngOnDestroy=function(){i.isPresent(this._subscription)&&this._dispose()},AsyncPipe.prototype.transform=function(e){return i.isBlank(this._obj)?(i.isPresent(e)&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue):e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,r.WrappedValue.wrap(this._latestValue))},AsyncPipe.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(n){return t._updateLatestValue(e,n)})},AsyncPipe.prototype._selectStrategy=function(e){if(i.isPromise(e))return l;if(e.subscribe)return c;throw new o.InvalidPipeArgumentException(AsyncPipe,e)},AsyncPipe.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},AsyncPipe.prototype._updateLatestValue=function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},AsyncPipe.decorators=[{type:r.Pipe,args:[{name:"async",pure:!1}]}],AsyncPipe.ctorParameters=[{type:r.ChangeDetectorRef}],AsyncPipe}();t.AsyncPipe=u},function(e,t,n){"use strict";var r=n(0),i=n(34),o=n(350),s=n(7),a=n(59),l="en-US",c=function(){function DatePipe(){}return DatePipe.prototype.transform=function(e,t){if(void 0===t&&(t="mediumDate"),s.isBlank(e))return null;if(!this.supports(e))throw new a.InvalidPipeArgumentException(DatePipe,e);return s.NumberWrapper.isNumeric(e)?e=s.DateWrapper.fromMillis(s.NumberWrapper.parseInt(e,10)):s.isString(e)&&(e=s.DateWrapper.fromISOString(e)),i.StringMapWrapper.contains(DatePipe._ALIASES,t)&&(t=i.StringMapWrapper.get(DatePipe._ALIASES,t)),o.DateFormatter.format(e,l,t)},DatePipe.prototype.supports=function(e){return!(!s.isDate(e)&&!s.NumberWrapper.isNumeric(e))||!(!s.isString(e)||!s.isDate(s.DateWrapper.fromISOString(e)))},DatePipe._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},DatePipe.decorators=[{type:r.Pipe,args:[{name:"date",pure:!0}]}],DatePipe}();t.DatePipe=c},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(231),s=n(59),a=/#/g,l=function(){function I18nPluralPipe(e){this._localization=e}return I18nPluralPipe.prototype.transform=function(e,t){if(i.isBlank(e))return"";if(!i.isStringMap(t))throw new s.InvalidPipeArgumentException(I18nPluralPipe,t);var n=o.getPluralCategory(e,Object.keys(t),this._localization);return i.StringWrapper.replaceAll(t[n],a,e.toString())},I18nPluralPipe.decorators=[{type:r.Pipe,args:[{name:"i18nPlural",pure:!0}]}],I18nPluralPipe.ctorParameters=[{type:o.NgLocalization}],I18nPluralPipe}();t.I18nPluralPipe=l},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(59),s=function(){function I18nSelectPipe(){}return I18nSelectPipe.prototype.transform=function(e,t){if(i.isBlank(e))return"";if(!i.isStringMap(t))throw new o.InvalidPipeArgumentException(I18nSelectPipe,t);return t.hasOwnProperty(e)?t[e]:""},I18nSelectPipe.decorators=[{type:r.Pipe,args:[{name:"i18nSelect",pure:!0}]}],I18nSelectPipe}();t.I18nSelectPipe=s},function(e,t,n){"use strict";var r=n(0),i=n(7),o=function(){function JsonPipe(){}return JsonPipe.prototype.transform=function(e){return i.Json.stringify(e)},JsonPipe.decorators=[{type:r.Pipe,args:[{name:"json",pure:!1}]}],JsonPipe}();t.JsonPipe=o},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(59),s=function(){function LowerCasePipe(){}return LowerCasePipe.prototype.transform=function(e){if(i.isBlank(e))return e;if(!i.isString(e))throw new o.InvalidPipeArgumentException(LowerCasePipe,e);return e.toLowerCase()},LowerCasePipe.decorators=[{type:r.Pipe,args:[{name:"lowercase"}]}],LowerCasePipe}();t.LowerCasePipe=s},function(e,t,n){"use strict";function formatNumber(e,t,n,r,c,u){if(void 0===c&&(c=null),void 0===u&&(u=!1),o.isBlank(t))return null;if(t=o.isString(t)&&o.NumberWrapper.isNumeric(t)?+t:t,!o.isNumber(t))throw new s.InvalidPipeArgumentException(e,t);var p,d,h;if(n!==i.NumberFormatStyle.Currency&&(p=1,d=0,h=3),o.isPresent(r)){var f=r.match(l);if(null===f)throw new Error(r+" is not a valid digit info for number pipes");o.isPresent(f[1])&&(p=o.NumberWrapper.parseIntAutoRadix(f[1])),o.isPresent(f[3])&&(d=o.NumberWrapper.parseIntAutoRadix(f[3])),o.isPresent(f[5])&&(h=o.NumberWrapper.parseIntAutoRadix(f[5]))}return i.NumberFormatter.format(t,a,n,{minimumIntegerDigits:p,minimumFractionDigits:d,maximumFractionDigits:h,currency:c,currencyAsSymbol:u})}var r=n(0),i=n(350),o=n(7),s=n(59),a="en-US",l=/^(\d+)?\.((\d+)(\-(\d+))?)?$/,c=function(){function DecimalPipe(){}return DecimalPipe.prototype.transform=function(e,t){return void 0===t&&(t=null),formatNumber(DecimalPipe,e,i.NumberFormatStyle.Decimal,t)},DecimalPipe.decorators=[{type:r.Pipe,args:[{name:"number"}]}],DecimalPipe}();t.DecimalPipe=c;var u=function(){function PercentPipe(){}return PercentPipe.prototype.transform=function(e,t){return void 0===t&&(t=null),formatNumber(PercentPipe,e,i.NumberFormatStyle.Percent,t)},PercentPipe.decorators=[{type:r.Pipe,args:[{name:"percent"}]}],PercentPipe}();t.PercentPipe=u;var p=function(){function CurrencyPipe(){}return CurrencyPipe.prototype.transform=function(e,t,n,r){return void 0===t&&(t="USD"),void 0===n&&(n=!1),void 0===r&&(r=null),formatNumber(CurrencyPipe,e,i.NumberFormatStyle.Currency,r,t,n)},CurrencyPipe.decorators=[{type:r.Pipe,args:[{name:"currency"}]}],CurrencyPipe}();t.CurrencyPipe=p},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(59),s=function(){function ReplacePipe(){}return ReplacePipe.prototype.transform=function(e,t,n){if(i.isBlank(e))return e;if(!this._supportedInput(e))throw new o.InvalidPipeArgumentException(ReplacePipe,e);var r=e.toString();if(!this._supportedPattern(t))throw new o.InvalidPipeArgumentException(ReplacePipe,t);if(!this._supportedReplacement(n))throw new o.InvalidPipeArgumentException(ReplacePipe,n);if(i.isFunction(n)){var s=i.isString(t)?new RegExp(t,"g"):t;return i.StringWrapper.replaceAllMapped(r,s,n)}return t instanceof RegExp?i.StringWrapper.replaceAll(r,t,n):i.StringWrapper.replace(r,t,n)},ReplacePipe.prototype._supportedInput=function(e){return i.isString(e)||i.isNumber(e)},ReplacePipe.prototype._supportedPattern=function(e){return i.isString(e)||e instanceof RegExp},ReplacePipe.prototype._supportedReplacement=function(e){return i.isString(e)||i.isFunction(e)},ReplacePipe.decorators=[{type:r.Pipe,args:[{name:"replace"}]}],ReplacePipe}();t.ReplacePipe=s},function(e,t,n){"use strict";var r=n(0),i=n(34),o=n(7),s=n(59),a=function(){function SlicePipe(){}return SlicePipe.prototype.transform=function(e,t,n){if(void 0===n&&(n=null),o.isBlank(e))return e;if(!this.supports(e))throw new s.InvalidPipeArgumentException(SlicePipe,e);return o.isString(e)?o.StringWrapper.slice(e,t,n):i.ListWrapper.slice(e,t,n)},SlicePipe.prototype.supports=function(e){return o.isString(e)||o.isArray(e)},SlicePipe.decorators=[{type:r.Pipe,args:[{name:"slice",pure:!1}]}],SlicePipe}();t.SlicePipe=a},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(59),s=function(){function UpperCasePipe(){}return UpperCasePipe.prototype.transform=function(e){if(i.isBlank(e))return e;if(!i.isString(e))throw new o.InvalidPipeArgumentException(UpperCasePipe,e);return e.toUpperCase()},UpperCasePipe.decorators=[{type:r.Pipe,args:[{name:"uppercase"}]}],UpperCasePipe}();t.UpperCasePipe=s},function(e,t){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},r=function(){function AnimationAst(){this.startTime=0,this.playTime=0}return AnimationAst}();t.AnimationAst=r;var i=function(e){function AnimationStateAst(){e.apply(this,arguments)}return n(AnimationStateAst,e),AnimationStateAst}(r);t.AnimationStateAst=i;var o=function(e){function AnimationEntryAst(t,n,r){e.call(this),this.name=t,this.stateDeclarations=n,this.stateTransitions=r}return n(AnimationEntryAst,e),AnimationEntryAst.prototype.visit=function(e,t){return e.visitAnimationEntry(this,t)},AnimationEntryAst}(r);t.AnimationEntryAst=o;var s=function(e){function AnimationStateDeclarationAst(t,n){e.call(this),this.stateName=t,this.styles=n}return n(AnimationStateDeclarationAst,e),AnimationStateDeclarationAst.prototype.visit=function(e,t){return e.visitAnimationStateDeclaration(this,t)},AnimationStateDeclarationAst}(i);t.AnimationStateDeclarationAst=s;var a=function(){function AnimationStateTransitionExpression(e,t){this.fromState=e,this.toState=t}return AnimationStateTransitionExpression}();t.AnimationStateTransitionExpression=a;var l=function(e){function AnimationStateTransitionAst(t,n){e.call(this),this.stateChanges=t,this.animation=n}return n(AnimationStateTransitionAst,e),AnimationStateTransitionAst.prototype.visit=function(e,t){return e.visitAnimationStateTransition(this,t)},AnimationStateTransitionAst}(i);t.AnimationStateTransitionAst=l;var c=function(e){function AnimationStepAst(t,n,r,i,o){e.call(this),this.startingStyles=t,this.keyframes=n,this.duration=r,this.delay=i,this.easing=o}return n(AnimationStepAst,e),AnimationStepAst.prototype.visit=function(e,t){return e.visitAnimationStep(this,t)},AnimationStepAst}(r);t.AnimationStepAst=c;var u=function(e){function AnimationStylesAst(t){e.call(this),this.styles=t}return n(AnimationStylesAst,e),AnimationStylesAst.prototype.visit=function(e,t){return e.visitAnimationStyles(this,t)},AnimationStylesAst}(r);t.AnimationStylesAst=u;var p=function(e){function AnimationKeyframeAst(t,n){e.call(this),this.offset=t,this.styles=n}return n(AnimationKeyframeAst,e),AnimationKeyframeAst.prototype.visit=function(e,t){return e.visitAnimationKeyframe(this,t)},AnimationKeyframeAst}(r);t.AnimationKeyframeAst=p;var d=function(e){function AnimationWithStepsAst(t){e.call(this),this.steps=t}return n(AnimationWithStepsAst,e),AnimationWithStepsAst}(r);t.AnimationWithStepsAst=d;var h=function(e){function AnimationGroupAst(t){e.call(this,t)}return n(AnimationGroupAst,e),AnimationGroupAst.prototype.visit=function(e,t){return e.visitAnimationGroup(this,t)},AnimationGroupAst}(d);t.AnimationGroupAst=h;var f=function(e){function AnimationSequenceAst(t){e.call(this,t)}return n(AnimationSequenceAst,e),AnimationSequenceAst.prototype.visit=function(e,t){return e.visitAnimationSequence(this,t)},AnimationSequenceAst}(d);t.AnimationSequenceAst=f},function(e,t,n){"use strict";function _compareToAnimationStateExpr(e,t){var n=l.literal(r.EMPTY_STATE);switch(t){case r.EMPTY_STATE:return e.equals(n);case r.ANY_STATE:return l.literal(!0);default:return e.equals(l.literal(t))}}function _isEndStateAnimateStep(e){if(e instanceof u.AnimationStepAst&&e.duration>0&&2==e.keyframes.length){var t=_getStylesArray(e.keyframes[0])[0],n=_getStylesArray(e.keyframes[1])[0];return i.StringMapWrapper.isEmpty(t)&&i.StringMapWrapper.isEmpty(n)}return!1}function _getStylesArray(e){return e.styles.styles}function _validateAnimationProperties(e,t){var n=new x(e);return c.templateVisitAll(n,t),n.errors}var r=n(27),i=n(10),o=n(18),s=n(5),a=n(28),l=n(16),c=n(61),u=n(364),p=n(582),d=function(){function CompiledAnimation(e,t,n,r,i){this.name=e,this.statesMapStatement=t,this.statesVariableName=n,this.fnStatement=r,this.fnVariable=i}return CompiledAnimation}();t.CompiledAnimation=d;var h=function(){function AnimationCompiler(){}return AnimationCompiler.prototype.compileComponent=function(e,t){var n=[],r=[],i={},s=e.type.name;if(e.template.animations.forEach(function(e){var t=p.parseAnimationEntry(e),o=e.name;if(t.errors.length>0){var a='Unable to parse the animation sequence for "'+o+'" due to the following errors:';t.errors.forEach(function(e){a+="\n-- "+e.msg}),r.push(a)}if(i[o])r.push('The animation trigger "'+o+'" has already been registered on "'+s+'"');else{var l=s+"_"+e.name,c=new T(o,l),u=c.build(t.ast);n.push(u),i[e.name]=u}}),_validateAnimationProperties(n,t).forEach(function(e){r.push(e.msg)}),r.length>0){var a="Animation parsing for "+e.type.name+" has failed due to the following errors:";throw r.forEach(function(e){return a+="\n- "+e}),new o.BaseException(a)}return n},AnimationCompiler}();t.AnimationCompiler=h;var f=l.variable("element"),m=l.variable("defaultStateStyles"),y=l.variable("view"),v=y.prop("renderer"),g=l.variable("currentState"),b=l.variable("nextState"),_=l.variable("player"),S=l.variable("startStateStyles"),w=l.variable("endStateStyles"),C=l.variable("collectedStyles"),E=l.literalMap([]),T=function(){function _AnimationBuilder(e,t){this.animationName=e,this._fnVarName=t+"_factory",this._statesMapVarName=t+"_states",this._statesMapVar=l.variable(this._statesMapVarName)}return _AnimationBuilder.prototype.visitAnimationStyles=function(e,t){var n=[];return t.isExpectingFirstStyleStep&&(n.push(S),t.isExpectingFirstStyleStep=!1),e.styles.forEach(function(e){n.push(l.literalMap(i.StringMapWrapper.keys(e).map(function(t){return[t,l.literal(e[t])]})))}),l.importExpr(a.Identifiers.AnimationStyles).instantiate([l.importExpr(a.Identifiers.collectAndResolveStyles).callFn([C,l.literalArr(n)])])},_AnimationBuilder.prototype.visitAnimationKeyframe=function(e,t){return l.importExpr(a.Identifiers.AnimationKeyframe).instantiate([l.literal(e.offset),e.styles.visit(this,t)])},_AnimationBuilder.prototype.visitAnimationStep=function(e,t){var n=this;if(t.endStateAnimateStep===e)return this._visitEndStateAnimation(e,t);var r=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(n,t)});return this._callAnimateMethod(e,r,l.literalArr(i))},_AnimationBuilder.prototype._visitEndStateAnimation=function(e,t){var n=this,r=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(n,t)}),o=l.importExpr(a.Identifiers.balanceAnimationKeyframes).callFn([C,w,l.literalArr(i)]);return this._callAnimateMethod(e,r,o)},_AnimationBuilder.prototype._callAnimateMethod=function(e,t,n){return v.callMethod("animate",[f,t,n,l.literal(e.duration),l.literal(e.delay),l.literal(e.easing)])},_AnimationBuilder.prototype.visitAnimationSequence=function(e,t){var n=this,r=e.steps.map(function(e){return e.visit(n,t)});return l.importExpr(a.Identifiers.AnimationSequencePlayer).instantiate([l.literalArr(r)])},_AnimationBuilder.prototype.visitAnimationGroup=function(e,t){var n=this,r=e.steps.map(function(e){return e.visit(n,t)});return l.importExpr(a.Identifiers.AnimationGroupPlayer).instantiate([l.literalArr(r)])},_AnimationBuilder.prototype.visitAnimationStateDeclaration=function(e,t){var n={};_getStylesArray(e).forEach(function(e){i.StringMapWrapper.forEach(e,function(e,t){n[t]=e})}),t.stateMap.registerState(e.stateName,n)},_AnimationBuilder.prototype.visitAnimationStateTransition=function(e,t){var n=e.animation.steps,i=n[n.length-1];_isEndStateAnimateStep(i)&&(t.endStateAnimateStep=i),t.isExpectingFirstStyleStep=!0;var o=[];e.stateChanges.forEach(function(e){o.push(_compareToAnimationStateExpr(g,e.fromState).and(_compareToAnimationStateExpr(b,e.toState))),e.fromState!=r.ANY_STATE&&t.stateMap.registerState(e.fromState),e.toState!=r.ANY_STATE&&t.stateMap.registerState(e.toState)});var s=e.animation.visit(this,t),a=o.reduce(function(e,t){return e.or(t)}),c=_.equals(l.NULL_EXPR).and(a);return new l.IfStmt(c,[_.set(s).toStmt()])},_AnimationBuilder.prototype.visitAnimationEntry=function(e,t){var n=this;e.stateDeclarations.forEach(function(e){return e.visit(n,t)}),t.stateMap.registerState(r.DEFAULT_STATE,{});var i=[];i.push(y.callMethod("cancelActiveAnimation",[f,l.literal(this.animationName),b.equals(l.literal(r.EMPTY_STATE))]).toStmt()),i.push(C.set(E).toDeclStmt()),i.push(_.set(l.NULL_EXPR).toDeclStmt()),i.push(m.set(this._statesMapVar.key(l.literal(r.DEFAULT_STATE))).toDeclStmt()),i.push(S.set(this._statesMapVar.key(g)).toDeclStmt()),i.push(new l.IfStmt(S.equals(l.NULL_EXPR),[S.set(m).toStmt()])),i.push(w.set(this._statesMapVar.key(b)).toDeclStmt()),i.push(new l.IfStmt(w.equals(l.NULL_EXPR),[w.set(m).toStmt()]));var o=l.importExpr(a.Identifiers.renderStyles);return i.push(o.callFn([f,v,l.importExpr(a.Identifiers.clearStyles).callFn([S])]).toStmt()),e.stateTransitions.forEach(function(e){return i.push(e.visit(n,t))}),i.push(new l.IfStmt(_.equals(l.NULL_EXPR),[_.set(l.importExpr(a.Identifiers.NoOpAnimationPlayer).instantiate([])).toStmt()])),i.push(_.callMethod("onDone",[l.fn([],[o.callFn([f,v,l.importExpr(a.Identifiers.prepareFinalAnimationStyles).callFn([S,w])]).toStmt()])]).toStmt()),i.push(y.callMethod("queueAnimation",[f,l.literal(this.animationName),_]).toStmt()),l.fn([new l.FnParam(y.name,l.importType(a.Identifiers.AppView,[l.DYNAMIC_TYPE])),new l.FnParam(f.name,l.DYNAMIC_TYPE),new l.FnParam(g.name,l.DYNAMIC_TYPE),new l.FnParam(b.name,l.DYNAMIC_TYPE)],i)},_AnimationBuilder.prototype.build=function(e){var t=new R,n=e.visit(this,t).toDeclStmt(this._fnVarName),r=l.variable(this._fnVarName),o=[];i.StringMapWrapper.forEach(t.stateMap.states,function(e,t){var n=E;if(s.isPresent(e)){var r=[];i.StringMapWrapper.forEach(e,function(e,t){r.push([t,l.literal(e)])}),n=l.literalMap(r)}o.push([t,n])});var a=this._statesMapVar.set(l.literalMap(o)).toDeclStmt();return new d(this.animationName,a,this._statesMapVarName,n,r)},_AnimationBuilder}(),R=function(){function _AnimationBuilderContext(){this.stateMap=new P,this.endStateAnimateStep=null,this.isExpectingFirstStyleStep=!1}return _AnimationBuilderContext}(),P=function(){function _AnimationBuilderStateMap(){this._states={}}return Object.defineProperty(_AnimationBuilderStateMap.prototype,"states",{get:function(){return this._states},enumerable:!0,configurable:!0}),_AnimationBuilderStateMap.prototype.registerState=function(e,t){void 0===t&&(t=null);var n=this._states[e];s.isBlank(n)&&(this._states[e]=t)},_AnimationBuilderStateMap}(),x=function(){function _AnimationTemplatePropertyVisitor(e){var t=this;this._animationRegistry={}, this.errors=[],e.forEach(function(e){t._animationRegistry[e.name]=!0})}return _AnimationTemplatePropertyVisitor.prototype.visitElement=function(e,t){var n=this;e.inputs.forEach(function(e){if(e.type==c.PropertyBindingType.Animation){var t=e.name;s.isPresent(n._animationRegistry[t])||n.errors.push(new p.AnimationParseError("couldn't find an animation entry for "+t))}}),c.templateVisitAll(this,e.children)},_AnimationTemplatePropertyVisitor.prototype.visitBoundText=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitText=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitEmbeddedTemplate=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitNgContent=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitAttr=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitDirective=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitEvent=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitReference=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitVariable=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitDirectiveProperty=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitElementProperty=function(e,t){},_AnimationTemplatePropertyVisitor}()},function(e,t,n){"use strict";function assertArrayOfStrings(e,t){if(r.isDevMode()&&!i.isBlank(t)){if(!i.isArray(t))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=assertInterpolationSymbols},348,[1097,367,10,5],function(e,t){"use strict";function digestMessage(e){return strHash(serializeNodes(e.nodes).join("")+("["+e.meaning+"]"))}function strHash(e){for(var t=0,n=0;n>>0;return t.toString(16)}function serializeNodes(e){return e.map(function(e){return e.visit(r,null)})}t.digestMessage=digestMessage,t.strHash=strHash;var n=function(){function _SerializerVisitor(){}return _SerializerVisitor.prototype.visitText=function(e,t){return e.value},_SerializerVisitor.prototype.visitContainer=function(e,t){var n=this;return"["+e.children.map(function(e){return e.visit(n)}).join(", ")+"]"},_SerializerVisitor.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expression+", "+e.type+", "+r.join(", ")+"}"},_SerializerVisitor.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?'':''+e.children.map(function(e){return e.visit(n)}).join(", ")+''},_SerializerVisitor.prototype.visitPlaceholder=function(e,t){return''+e.value+""},_SerializerVisitor.prototype.visitIcuPlaceholder=function(e,t){return''+e.value.visit(this)+""},_SerializerVisitor}(),r=new n;t.serializeNodes=serializeNodes},function(e,t){"use strict";var n=function(){function Message(e,t,n,r){this.nodes=e,this.placeholders=t,this.meaning=n,this.description=r}return Message}();t.Message=n;var r=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}();t.Text=r;var i=function(){function Container(e,t){this.children=e,this.sourceSpan=t}return Container.prototype.visit=function(e,t){return e.visitContainer(this,t)},Container}();t.Container=i;var o=function(){function Icu(e,t,n,r){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=r}return Icu.prototype.visit=function(e,t){return e.visitIcu(this,t)},Icu}();t.Icu=o;var s=function(){function TagPlaceholder(e,t,n,r,i,o,s){this.tag=e,this.attrs=t,this.startName=n,this.closeName=r,this.children=i,this.isVoid=o,this.sourceSpan=s}return TagPlaceholder.prototype.visit=function(e,t){return e.visitTagPlaceholder(this,t)},TagPlaceholder}();t.TagPlaceholder=s;var a=function(){function Placeholder(e,t,n){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=n}return Placeholder.prototype.visit=function(e,t){return e.visitPlaceholder(this,t)},Placeholder}();t.Placeholder=a;var l=function(){function IcuPlaceholder(e,t,n){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=n}return IcuPlaceholder.prototype.visit=function(e,t){return e.visitIcuPlaceholder(this,t)},IcuPlaceholder}();t.IcuPlaceholder=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(60),o=function(e){function I18nError(t,n){e.call(this,t,n)}return r(I18nError,e),I18nError}(i.ParseError);t.I18nError=o},function(e,t,n){"use strict";function getHtmlTagDefinition(e){return o[e.toLowerCase()]||s}var r=n(103),i=function(){function HtmlTagDefinition(e){var t=this,n=void 0===e?{}:e,i=n.closedByChildren,o=n.requiredParents,s=n.implicitNamespacePrefix,a=n.contentType,l=void 0===a?r.TagContentType.PARSABLE_DATA:a,c=n.closedByParent,u=void 0!==c&&c,p=n.isVoid,d=void 0!==p&&p,h=n.ignoreFirstLf,f=void 0!==h&&h;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=d,this.closedByParent=u||d,o&&o.length>0&&(this.requiredParents={},this.parentToAdd=o[0],o.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=s,this.contentType=l,this.ignoreFirstLf=f}return HtmlTagDefinition.prototype.requireExtraParent=function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},HtmlTagDefinition.prototype.isClosedByChild=function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren},HtmlTagDefinition}();t.HtmlTagDefinition=i;var o={base:new i({isVoid:!0}),meta:new i({isVoid:!0}),area:new i({isVoid:!0}),embed:new i({isVoid:!0}),link:new i({isVoid:!0}),img:new i({isVoid:!0}),input:new i({isVoid:!0}),param:new i({isVoid:!0}),hr:new i({isVoid:!0}),br:new i({isVoid:!0}),source:new i({isVoid:!0}),track:new i({isVoid:!0}),wbr:new i({isVoid:!0}),p:new i({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new i({closedByChildren:["tbody","tfoot"]}),tbody:new i({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new i({closedByChildren:["tbody"],closedByParent:!0}),tr:new i({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new i({closedByChildren:["td","th"],closedByParent:!0}),th:new i({closedByChildren:["td","th"],closedByParent:!0}),col:new i({requiredParents:["colgroup"],isVoid:!0}),svg:new i({implicitNamespacePrefix:"svg"}),math:new i({implicitNamespacePrefix:"math"}),li:new i({closedByChildren:["li"],closedByParent:!0}),dt:new i({closedByChildren:["dt","dd"]}),dd:new i({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new i({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new i({closedByChildren:["optgroup"],closedByParent:!0}),option:new i({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new i({ignoreFirstLf:!0}),listing:new i({ignoreFirstLf:!0}),style:new i({contentType:r.TagContentType.RAW_TEXT}),script:new i({contentType:r.TagContentType.RAW_TEXT}),title:new i({contentType:r.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new i({contentType:r.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},s=new i;t.getHtmlTagDefinition=getHtmlTagDefinition},function(e,t,n){"use strict";function debugOutputAstAsTypeScript(e){var t,n=new u(l),r=s.EmitterVisitorContext.createRoot([]);return t=o.isArray(e)?e:[e],t.forEach(function(e){if(e instanceof a.Statement)e.visitStatement(n,r);else if(e instanceof a.Expression)e.visitExpression(n,r);else{if(!(e instanceof a.Type))throw new i.BaseException("Don't know how to print debug info for "+e);e.visitType(n,r)}}),r.toSource()}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(18),o=n(5),s=n(241),a=n(16),l="asset://debug/lib";t.debugOutputAstAsTypeScript=debugOutputAstAsTypeScript;var c=function(){function TypeScriptEmitter(e){this._importGenerator=e}return TypeScriptEmitter.prototype.emitStatements=function(e,t,n){var r=this,i=new u(e),o=s.EmitterVisitorContext.createRoot(n);i.visitAllStatements(t,o);var a=[];return i.importsWithPrefixes.forEach(function(t,n){a.push("imp"+("ort * as "+t+" from '"+r._importGenerator.getImportPath(e,n)+"';"))}),a.push(o.toSource()),a.join("\n")},TypeScriptEmitter}();t.TypeScriptEmitter=c;var u=function(e){function _TsEmitterVisitor(t){e.call(this,!1),this._moduleUrl=t,this.importsWithPrefixes=new Map}return r(_TsEmitterVisitor,e),_TsEmitterVisitor.prototype.visitType=function(e,t,n){void 0===n&&(n="any"),o.isPresent(e)?e.visitType(this,t):t.print(n)},_TsEmitterVisitor.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitDeclareVarStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),e.hasModifier(a.StmtModifier.Final)?t.print("const"):t.print("var"),t.print(" "+e.name+":"),this.visitType(e.type,t),t.print(" = "),e.value.visitExpression(this,t),t.println(";"),null},_TsEmitterVisitor.prototype.visitCastExpr=function(e,t){return t.print("(<"),e.type.visitType(this,t),t.print(">"),e.value.visitExpression(this,t),t.print(")"),null},_TsEmitterVisitor.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),t.isExportedVar(e.name)&&t.print("export "),t.print("class "+e.name),o.isPresent(e.parent)&&(t.print(" extends "),e.parent.visitExpression(this,t)),t.println(" {"),t.incIndent(),e.fields.forEach(function(e){return n._visitClassField(e,t)}),o.isPresent(e.constructorMethod)&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return n._visitClassGetter(e,t)}),e.methods.forEach(function(e){return n._visitClassMethod(e,t)}),t.decIndent(),t.println("}"),t.popClass(),null},_TsEmitterVisitor.prototype._visitClassField=function(e,t){e.hasModifier(a.StmtModifier.Private)&&t.print("private "),t.print(e.name),t.print(":"),this.visitType(e.type,t),t.println(";")},_TsEmitterVisitor.prototype._visitClassGetter=function(e,t){e.hasModifier(a.StmtModifier.Private)&&t.print("private "),t.print("get "+e.name+"()"),t.print(":"),this.visitType(e.type,t),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassConstructor=function(e,t){t.print("constructor("),this._visitParams(e.constructorMethod.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassMethod=function(e,t){e.hasModifier(a.StmtModifier.Private)&&t.print("private "),t.print(e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype.visitFunctionExpr=function(e,t){return t.print("("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" => {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print("}"),null},_TsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),t.print("function "+e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitTryCatchStmt=function(e,t){t.println("try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println("} catch ("+s.CATCH_ERROR_VAR.name+") {"),t.incIndent();var n=[s.CATCH_STACK_VAR.set(s.CATCH_ERROR_VAR.prop("stack")).toDeclStmt(null,[a.StmtModifier.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitBuiltintType=function(e,t){var n;switch(e.name){case a.BuiltinTypeName.Bool:n="boolean";break;case a.BuiltinTypeName.Dynamic:n="any";break;case a.BuiltinTypeName.Function:n="Function";break;case a.BuiltinTypeName.Number:n="number";break;case a.BuiltinTypeName.Int:n="number";break;case a.BuiltinTypeName.String:n="string";break;default:throw new i.BaseException("Unsupported builtin type "+e.name)}return t.print(n),null},_TsEmitterVisitor.prototype.visitExternalType=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print("[]"),null},_TsEmitterVisitor.prototype.visitMapType=function(e,t){return t.print("{[key: string]:"),this.visitType(e.valueType,t),t.print("}"),null},_TsEmitterVisitor.prototype.getBuiltinMethodName=function(e){var t;switch(e){case a.BuiltinMethod.ConcatArray:t="concat";break;case a.BuiltinMethod.SubscribeObservable:t="subscribe";break;case a.BuiltinMethod.bind:t="bind";break;default:throw new i.BaseException("Unknown builtin method: "+e)}return t},_TsEmitterVisitor.prototype._visitParams=function(e,t){var n=this;this.visitAllObjects(function(e){t.print(e.name),t.print(":"),n.visitType(e.type,t)},e,t,",")},_TsEmitterVisitor.prototype._visitIdentifier=function(e,t,n){var r=this;if(o.isBlank(e.name))throw new i.BaseException("Internal error: unknown identifier "+e);if(o.isPresent(e.moduleUrl)&&e.moduleUrl!=this._moduleUrl){var s=this.importsWithPrefixes.get(e.moduleUrl);o.isBlank(s)&&(s="import"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(e.moduleUrl,s)),n.print(s+".")}n.print(e.name),o.isPresent(t)&&t.length>0&&(n.print("<"),this.visitAllObjects(function(e){return e.visitType(r,n)},t,n,","),n.print(">"))},_TsEmitterVisitor}(s.AbstractEmitterVisitor)},function(e,t,n){"use strict";function convertValueToOutputAst(e,t){return void 0===t&&(t=null),s.visitValue(e,new l,t)}var r=n(31),i=n(10),o=n(18),s=n(36),a=n(16);t.convertValueToOutputAst=convertValueToOutputAst;var l=function(){function _ValueOutputAstTransformer(){}return _ValueOutputAstTransformer.prototype.visitArray=function(e,t){var n=this;return a.literalArr(e.map(function(e){return s.visitValue(e,n,null)}),t)},_ValueOutputAstTransformer.prototype.visitStringMap=function(e,t){var n=this,r=[];return i.StringMapWrapper.forEach(e,function(e,t){r.push([t,s.visitValue(e,n,null)])}),a.literalMap(r,t)},_ValueOutputAstTransformer.prototype.visitPrimitive=function(e,t){return a.literal(e,t)},_ValueOutputAstTransformer.prototype.visitOther=function(e,t){if(e instanceof r.CompileIdentifierMetadata)return a.importExpr(e);if(e instanceof a.Expression)return e;throw new o.BaseException("Illegal state: Don't now how to compile value "+e)},_ValueOutputAstTransformer}()},function(e,t,n){"use strict";function _transformProvider(e,t){var n=t.useExisting,r=t.useValue,o=t.deps;return new i.CompileProviderMetadata({token:e.token,useClass:e.useClass,useExisting:n,useFactory:e.useFactory,useValue:r,deps:o,multi:e.multi})}function _transformProviderAst(e,t){var n=t.eager,r=t.providers;return new u.ProviderAst(e.token,e.multiProvider,e.eager||n,r,e.providerType,e.lifecycleHooks,e.sourceSpan)}function _normalizeProviders(e,t,n,r){return void 0===r&&(r=null),a.isBlank(r)&&(r=[]),a.isPresent(e)&&e.forEach(function(e){if(a.isArray(e))_normalizeProviders(e,t,n,r);else{var o=void 0;e instanceof i.CompileProviderMetadata?o=e:e instanceof i.CompileTypeMetadata?o=new i.CompileProviderMetadata({token:new i.CompileTokenMetadata({identifier:e}),useClass:e}):n.push(new p("Unknown provider type "+e,t)),a.isPresent(o)&&r.push(o)}}),r}function _resolveProvidersFromDirectives(e,t,n){var r=new i.CompileIdentifierMap;e.forEach(function(e){var o=new i.CompileProviderMetadata({token:new i.CompileTokenMetadata({identifier:e.type}),useClass:e.type});_resolveProviders([o],e.isComponent?u.ProviderAstType.Component:u.ProviderAstType.Directive,!0,t,n,r)});var o=e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent}));return o.forEach(function(e){_resolveProviders(_normalizeProviders(e.providers,t,n),u.ProviderAstType.PublicService,!1,t,n,r),_resolveProviders(_normalizeProviders(e.viewProviders,t,n),u.ProviderAstType.PrivateService,!1,t,n,r)}),r}function _resolveProviders(e,t,n,r,s,l){e.forEach(function(e){var c=l.get(e.token);if(a.isPresent(c)&&c.multiProvider!==e.multi&&s.push(new p("Mixing multi and non multi provider is not possible for token "+c.token.name,r)),a.isBlank(c)){var d=e.token.identifier&&e.token.identifier instanceof i.CompileTypeMetadata?e.token.identifier.lifecycleHooks:[];c=new u.ProviderAst(e.token,e.multi,n||d.length>0,[e],t,d,r),l.add(e.token,c)}else e.multi||o.ListWrapper.clear(c.providers),c.providers.push(e)})}function _getViewQueries(e){var t=new i.CompileIdentifierMap;return a.isPresent(e.viewQueries)&&e.viewQueries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){a.isPresent(e.viewQuery)&&_addQueryToTokenMap(t,e.viewQuery)}),t}function _getContentQueries(e){var t=new i.CompileIdentifierMap;return e.forEach(function(e){a.isPresent(e.queries)&&e.queries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){a.isPresent(e.query)&&_addQueryToTokenMap(t,e.query)})}),t}function _addQueryToTokenMap(e,t){t.selectors.forEach(function(n){var r=e.get(n);a.isBlank(r)&&(r=[],e.add(n,r)),r.push(t)})}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(31),o=n(10),s=n(18),a=n(5),l=n(28),c=n(60),u=n(61),p=function(e){function ProviderError(t,n){e.call(this,n,t)}return r(ProviderError,e),ProviderError}(c.ParseError);t.ProviderError=p;var d=function(){function ProviderViewContext(e,t){var n=this;this.component=e,this.sourceSpan=t,this.errors=[],this.viewQueries=_getViewQueries(e),this.viewProviders=new i.CompileIdentifierMap,_normalizeProviders(e.viewProviders,t,this.errors).forEach(function(e){a.isBlank(n.viewProviders.get(e.token))&&n.viewProviders.add(e.token,!0)})}return ProviderViewContext}();t.ProviderViewContext=d;var h=function(){function ProviderElementContext(e,t,n,r,o,s,c){var u=this;this._viewContext=e,this._parent=t,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=c,this._transformedProviders=new i.CompileIdentifierMap,this._seenProviders=new i.CompileIdentifierMap,this._hasViewContainer=!1,this._attrs={},o.forEach(function(e){return u._attrs[e.name]=e.value});var p=r.map(function(e){return e.directive});this._allProviders=_resolveProvidersFromDirectives(p,c,e.errors),this._contentQueries=_getContentQueries(p);var d=new i.CompileIdentifierMap;this._allProviders.values().forEach(function(e){u._addQueryReadsTo(e.token,d)}),s.forEach(function(e){u._addQueryReadsTo(new i.CompileTokenMetadata({value:e.name}),d)}),a.isPresent(d.get(l.identifierToken(l.Identifiers.ViewContainerRef)))&&(this._hasViewContainer=!0),this._allProviders.values().forEach(function(e){var t=e.eager||a.isPresent(d.get(e.token));t&&u._getOrCreateLocalProvider(e.providerType,e.token,!0)})}return ProviderElementContext.prototype.afterElement=function(){var e=this;this._allProviders.values().forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(ProviderElementContext.prototype,"transformProviders",{get:function(){return this._transformedProviders.values()},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedDirectiveAsts",{get:function(){var e=this._transformedProviders.values().map(function(e){return e.token.identifier}),t=o.ListWrapper.clone(this._directiveAsts);return o.ListWrapper.sort(t,function(t,n){return e.indexOf(t.directive.type)-e.indexOf(n.directive.type)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),ProviderElementContext.prototype._addQueryReadsTo=function(e,t){this._getQueriesFor(e).forEach(function(n){var r=a.isPresent(n.read)?n.read:e;a.isBlank(t.get(r))&&t.add(r,!0)})},ProviderElementContext.prototype._getQueriesFor=function(e){for(var t,n=[],r=this,i=0;null!==r;)t=r._contentQueries.get(e),a.isPresent(t)&&o.ListWrapper.addAll(n,t.filter(function(e){return e.descendants||i<=1})),r._directiveAsts.length>0&&i++,r=r._parent;return t=this._viewContext.viewQueries.get(e),a.isPresent(t)&&o.ListWrapper.addAll(n,t),n},ProviderElementContext.prototype._getOrCreateLocalProvider=function(e,t,n){var r=this,o=this._allProviders.get(t);if(a.isBlank(o)||(e===u.ProviderAstType.Directive||e===u.ProviderAstType.PublicService)&&o.providerType===u.ProviderAstType.PrivateService||(e===u.ProviderAstType.PrivateService||e===u.ProviderAstType.PublicService)&&o.providerType===u.ProviderAstType.Builtin)return null;var s=this._transformedProviders.get(t);if(a.isPresent(s))return s;if(a.isPresent(this._seenProviders.get(t)))return this._viewContext.errors.push(new p("Cannot instantiate cyclic dependency! "+t.name,this._sourceSpan)),null;this._seenProviders.add(t,!0);var l=o.providers.map(function(e){var t,s=e.useValue,l=e.useExisting;if(a.isPresent(e.useExisting)){var c=r._getDependency(o.providerType,new i.CompileDiDependencyMetadata({token:e.useExisting}),n);a.isPresent(c.token)?l=c.token:(l=null,s=c.value)}else if(a.isPresent(e.useFactory)){var u=a.isPresent(e.deps)?e.deps:e.useFactory.diDeps;t=u.map(function(e){return r._getDependency(o.providerType,e,n)})}else if(a.isPresent(e.useClass)){var u=a.isPresent(e.deps)?e.deps:e.useClass.diDeps;t=u.map(function(e){return r._getDependency(o.providerType,e,n)})}return _transformProvider(e,{useExisting:l,useValue:s,deps:t})});return s=_transformProviderAst(o,{eager:n,providers:l}),this._transformedProviders.add(t,s),s},ProviderElementContext.prototype._getLocalDependency=function(e,t,n){if(void 0===n&&(n=null),t.isAttribute){var r=this._attrs[t.token.value];return new i.CompileDiDependencyMetadata({isValue:!0,value:a.normalizeBlank(r)})}if(a.isPresent(t.query)||a.isPresent(t.viewQuery))return t;if(a.isPresent(t.token)){if(e===u.ProviderAstType.Directive||e===u.ProviderAstType.Component){if(t.token.equalsTo(l.identifierToken(l.Identifiers.Renderer))||t.token.equalsTo(l.identifierToken(l.Identifiers.ElementRef))||t.token.equalsTo(l.identifierToken(l.Identifiers.ChangeDetectorRef))||t.token.equalsTo(l.identifierToken(l.Identifiers.TemplateRef)))return t;t.token.equalsTo(l.identifierToken(l.Identifiers.ViewContainerRef))&&(this._hasViewContainer=!0)}if(t.token.equalsTo(l.identifierToken(l.Identifiers.Injector)))return t;if(a.isPresent(this._getOrCreateLocalProvider(e,t.token,n)))return t}return null},ProviderElementContext.prototype._getDependency=function(e,t,n){void 0===n&&(n=null);var r=this,o=n,s=null;if(t.isSkipSelf||(s=this._getLocalDependency(e,t,n)),t.isSelf)a.isBlank(s)&&t.isOptional&&(s=new i.CompileDiDependencyMetadata({isValue:!0,value:null}));else{for(;a.isBlank(s)&&a.isPresent(r._parent);){var c=r;r=r._parent,c._isViewRoot&&(o=!1),s=r._getLocalDependency(u.ProviderAstType.PublicService,t,o)}a.isBlank(s)&&(s=!t.isHost||this._viewContext.component.type.isHost||l.identifierToken(this._viewContext.component.type).equalsTo(t.token)||a.isPresent(this._viewContext.viewProviders.get(t.token))?t:t.isOptional?s=new i.CompileDiDependencyMetadata({isValue:!0,value:null}):null)}return a.isBlank(s)&&this._viewContext.errors.push(new p("No provider for "+t.token.name,this._sourceSpan)),s},ProviderElementContext}();t.ProviderElementContext=h;var f=function(){function NgModuleProviderAnalyzer(e,t,n){var r=this;this._transformedProviders=new i.CompileIdentifierMap,this._seenProviders=new i.CompileIdentifierMap,this._unparsedProviders=[],this._errors=[],this._allProviders=new i.CompileIdentifierMap;var o=e.transitiveModule.modules.map(function(e){return e.type});o.forEach(function(e){var t=new i.CompileProviderMetadata({token:new i.CompileTokenMetadata({identifier:e}),useClass:e});_resolveProviders([t],u.ProviderAstType.PublicService,!0,n,r._errors,r._allProviders)}),_resolveProviders(_normalizeProviders(e.transitiveModule.providers.concat(t),n,this._errors),u.ProviderAstType.PublicService,!1,n,this._errors,this._allProviders)}return NgModuleProviderAnalyzer.prototype.parse=function(){var e=this;if(this._allProviders.values().forEach(function(t){e._getOrCreateLocalProvider(t.token,t.eager)}),this._errors.length>0){var t=this._errors.join("\n");throw new s.BaseException("Provider parse errors:\n"+t)}return this._transformedProviders.values()},NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider=function(e,t){var n=this,r=this._allProviders.get(e);if(a.isBlank(r))return null;var o=this._transformedProviders.get(e);if(a.isPresent(o))return o;if(a.isPresent(this._seenProviders.get(e)))return this._errors.push(new p("Cannot instantiate cyclic dependency! "+e.name,r.sourceSpan)),null;this._seenProviders.add(e,!0);var s=r.providers.map(function(e){var o,s=e.useValue,l=e.useExisting;if(a.isPresent(e.useExisting)){var c=n._getDependency(new i.CompileDiDependencyMetadata({token:e.useExisting}),t,r.sourceSpan);a.isPresent(c.token)?l=c.token:(l=null,s=c.value)}else if(a.isPresent(e.useFactory)){var u=a.isPresent(e.deps)?e.deps:e.useFactory.diDeps;o=u.map(function(e){return n._getDependency(e,t,r.sourceSpan)})}else if(a.isPresent(e.useClass)){var u=a.isPresent(e.deps)?e.deps:e.useClass.diDeps;o=u.map(function(e){return n._getDependency(e,t,r.sourceSpan)})}return _transformProvider(e,{useExisting:l,useValue:s,deps:o})});return o=_transformProviderAst(r,{eager:t,providers:s}),this._transformedProviders.add(e,o),o},NgModuleProviderAnalyzer.prototype._getDependency=function(e,t,n){void 0===t&&(t=null);var r=!1;!e.isSkipSelf&&a.isPresent(e.token)&&(e.token.equalsTo(l.identifierToken(l.Identifiers.Injector))||e.token.equalsTo(l.identifierToken(l.Identifiers.ComponentFactoryResolver))?r=!0:a.isPresent(this._getOrCreateLocalProvider(e.token,t))&&(r=!0));var o=e;return e.isSelf&&!r&&(e.isOptional?o=new i.CompileDiDependencyMetadata({isValue:!0,value:null}):this._errors.push(new p("No provider for "+e.token.name,n))),o},NgModuleProviderAnalyzer}();t.NgModuleProviderAnalyzer=f},function(e,t,n){"use strict";function assertComponent(e){if(!e.isComponent)throw new l.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}var r=n(0),i=n(27),o=n(31),s=n(102),a=n(235),l=n(18),c=n(5),u=n(238),p=n(239),d=n(16),h=n(601),f=n(602),m=n(244),y=n(157),v=n(36),g=n(158),b=function(){function RuntimeCompiler(e,t,n,r,i,o,s,a,l){this._injector=e,this._metadataResolver=t,this._templateNormalizer=n,this._templateParser=r,this._styleCompiler=i,this._viewCompiler=o,this._ngModuleCompiler=s,this._compilerConfig=a,this._console=l,this._compiledTemplateCache=new Map,this._compiledHostTemplateCache=new Map,this._compiledNgModuleCache=new Map}return Object.defineProperty(RuntimeCompiler.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),RuntimeCompiler.prototype.compileModuleSync=function(e){return this._compileModuleAndComponents(e,!0).syncResult},RuntimeCompiler.prototype.compileModuleAsync=function(e){return this._compileModuleAndComponents(e,!1).asyncResult},RuntimeCompiler.prototype.compileModuleAndAllComponentsSync=function(e){return this._compileModuleAndAllComponents(e,!0).syncResult},RuntimeCompiler.prototype.compileModuleAndAllComponentsAsync=function(e){return this._compileModuleAndAllComponents(e,!1).asyncResult},RuntimeCompiler.prototype.compileComponentAsync=function(e,t){if(void 0===t&&(t=null),!t)throw new l.BaseException("Calling compileComponentAsync on the root compiler without a module is not allowed! (Compiling component "+c.stringify(e)+")");return this._compileComponentInModule(e,!1,t).asyncResult},RuntimeCompiler.prototype.compileComponentSync=function(e,t){if(void 0===t&&(t=null),!t)throw new l.BaseException("Calling compileComponentSync on the root compiler without a module is not allowed! (Compiling component "+c.stringify(e)+")");return this._compileComponentInModule(e,!0,t).syncResult},RuntimeCompiler.prototype._compileModuleAndComponents=function(e,t){var n=this._compileComponents(e,t),r=this._compileModule(e);return new v.SyncAsyncResult(r,n.then(function(){return r}))},RuntimeCompiler.prototype._compileModuleAndAllComponents=function(e,t){var n=this,i=this._compileComponents(e,t),o=this._compileModule(e),s=this._metadataResolver.getNgModuleMetadata(e),a=[],l=new Set;s.transitiveModule.modules.forEach(function(e){e.declaredDirectives.forEach(function(e){if(e.isComponent){var t=n._createCompiledHostTemplate(e.type.runtime);l.add(t),a.push(t.proxyComponentFactory)}})});var c=new r.ModuleWithComponentFactories(o,a),u=function(){return l.forEach(function(e){n._compileTemplate(e)}),c},p=t?Promise.resolve(u()):i.then(u);return new v.SyncAsyncResult(c,p)},RuntimeCompiler.prototype._compileModule=function(e){var t=this,n=this._compiledNgModuleCache.get(e);if(!n){var i=this._metadataResolver.getNgModuleMetadata(e),o=(i.transitiveModule,function(e){return new S(t,i.type.runtime,e,t._console)}),s=[this._metadataResolver.getProviderMetadata(new r.Provider(r.Compiler,{useFactory:o,deps:[[new r.OptionalMetadata,new r.SkipSelfMetadata,r.ComponentResolver]]})),this._metadataResolver.getProviderMetadata(new r.Provider(r.ComponentResolver,{useExisting:r.Compiler}))],a=this._ngModuleCompiler.compile(i,s);a.dependencies.forEach(function(e){e.placeholder.runtime=t._assertComponentKnown(e.comp.runtime,!0).proxyComponentFactory,e.placeholder.name="compFactory_"+e.comp.name}),n=this._compilerConfig.useJit?f.jitStatements(i.type.name+".ngfactory.js",a.statements,a.ngModuleFactoryVar):h.interpretStatements(a.statements,a.ngModuleFactoryVar),this._compiledNgModuleCache.set(i.type.runtime,n)}return n},RuntimeCompiler.prototype._compileComponentInModule=function(e,t,n){this._metadataResolver.addComponentToModule(n,e);var r=this._compileComponents(n,t),i=this._assertComponentKnown(e,!0).proxyComponentFactory;return new v.SyncAsyncResult(i,r.then(function(){return i}))},RuntimeCompiler.prototype._compileComponents=function(e,t){var n=this,i=new Set,o=[],s=this._metadataResolver.getNgModuleMetadata(e);s.transitiveModule.modules.forEach(function(e){e.declaredDirectives.forEach(function(t){t.isComponent&&(i.add(n._createCompiledTemplate(t,e)),t.entryComponents.forEach(function(e){i.add(n._createCompiledHostTemplate(e.runtime))}))}),e.entryComponents.forEach(function(e){i.add(n._createCompiledHostTemplate(e.runtime))})}),i.forEach(function(e){if(e.loading){if(t)throw new r.ComponentStillLoadingError(e.compType.runtime);o.push(e.loading)}});var a=function(){i.forEach(function(e){n._compileTemplate(e)})};return t?(a(),Promise.resolve(null)):Promise.all(o).then(a); },RuntimeCompiler.prototype.clearCacheFor=function(e){this._compiledNgModuleCache.delete(e),this._metadataResolver.clearCacheFor(e),this._compiledHostTemplateCache.delete(e);var t=this._compiledTemplateCache.get(e);t&&(this._templateNormalizer.clearCacheFor(t.normalizedCompMeta),this._compiledTemplateCache.delete(e))},RuntimeCompiler.prototype.clearCache=function(){this._metadataResolver.clearCache(),this._compiledTemplateCache.clear(),this._compiledHostTemplateCache.clear(),this._templateNormalizer.clearCache(),this._compiledNgModuleCache.clear()},RuntimeCompiler.prototype._createCompiledHostTemplate=function(e){var t=this._compiledHostTemplateCache.get(e);if(c.isBlank(t)){var n=this._metadataResolver.getDirectiveMetadata(e);assertComponent(n);var r=o.createHostComponentMeta(n);t=new _((!0),n.selector,n.type,[n],[],[],this._templateNormalizer.normalizeDirective(r)),this._compiledHostTemplateCache.set(e,t)}return t},RuntimeCompiler.prototype._createCompiledTemplate=function(e,t){var n=this._compiledTemplateCache.get(e.type.runtime);return c.isBlank(n)&&(assertComponent(e),n=new _((!1),e.selector,e.type,t.transitiveModule.directives,t.transitiveModule.pipes,t.schemas,this._templateNormalizer.normalizeDirective(e)),this._compiledTemplateCache.set(e.type.runtime,n)),n},RuntimeCompiler.prototype._assertComponentKnown=function(e,t){var n=t?this._compiledHostTemplateCache.get(e):this._compiledTemplateCache.get(e);if(!n)throw new l.BaseException("Illegal state: CompiledTemplate for "+c.stringify(e)+" (isHost: "+t+") does not exist!");return n},RuntimeCompiler.prototype._assertComponentLoaded=function(e,t){var n=this._assertComponentKnown(e,t);if(n.loading)throw new l.BaseException("Illegal state: CompiledTemplate for "+c.stringify(e)+" (isHost: "+t+") is still loading!");return n},RuntimeCompiler.prototype._compileTemplate=function(e){var t=this;if(!e.isCompiled){var n=e.normalizedCompMeta,r=new Map,i=this._styleCompiler.compileComponent(n);i.externalStylesheets.forEach(function(e){r.set(e.meta.moduleUrl,e)}),this._resolveStylesCompileResult(i.componentStylesheet,r);var o=e.viewComponentTypes.map(function(e){return t._assertComponentLoaded(e,!1).normalizedCompMeta}),s=this._templateParser.parse(n,n.template.template,e.viewDirectives.concat(o),e.viewPipes,e.schemas,n.type.name),a=this._viewCompiler.compileComponent(n,s,d.variable(i.componentStylesheet.stylesVar),e.viewPipes);a.dependencies.forEach(function(e){var n;if(e instanceof g.ViewFactoryDependency){var r=e;n=t._assertComponentLoaded(r.comp.runtime,!1),r.placeholder.runtime=n.proxyViewFactory,r.placeholder.name="viewFactory_"+r.comp.name}else if(e instanceof g.ComponentFactoryDependency){var i=e;n=t._assertComponentLoaded(i.comp.runtime,!0),i.placeholder.runtime=n.proxyComponentFactory,i.placeholder.name="compFactory_"+i.comp.name}});var l,c=i.componentStylesheet.statements.concat(a.statements);l=this._compilerConfig.useJit?f.jitStatements(e.compType.name+".ngfactory.js",c,a.viewFactoryVar):h.interpretStatements(c,a.viewFactoryVar),e.compiled(l)}},RuntimeCompiler.prototype._resolveStylesCompileResult=function(e,t){var n=this;e.dependencies.forEach(function(e,r){var i=t.get(e.moduleUrl),o=n._resolveAndEvalStylesCompileResult(i,t);e.valuePlaceholder.runtime=o,e.valuePlaceholder.name="importedStyles"+r})},RuntimeCompiler.prototype._resolveAndEvalStylesCompileResult=function(e,t){return this._resolveStylesCompileResult(e,t),this._compilerConfig.useJit?f.jitStatements(e.meta.moduleUrl+".css.js",e.statements,e.stylesVar):h.interpretStatements(e.statements,e.stylesVar)},RuntimeCompiler.decorators=[{type:r.Injectable}],RuntimeCompiler.ctorParameters=[{type:r.Injector},{type:u.CompileMetadataResolver},{type:a.DirectiveNormalizer},{type:y.TemplateParser},{type:m.StyleCompiler},{type:g.ViewCompiler},{type:p.NgModuleCompiler},{type:s.CompilerConfig},{type:i.Console}],RuntimeCompiler}();t.RuntimeCompiler=b;var _=function(){function CompiledTemplate(e,t,n,i,o,s,a){var u=this;this.isHost=e,this.compType=n,this.viewPipes=o,this.schemas=s,this._viewFactory=null,this.loading=null,this._normalizedCompMeta=null,this.isCompiled=!1,this.isCompiledWithDeps=!1,this.viewComponentTypes=[],this.viewDirectives=[],i.forEach(function(e){e.isComponent?u.viewComponentTypes.push(e.type.runtime):u.viewDirectives.push(e)}),this.proxyViewFactory=function(){for(var e=[],t=0;t0&&(g=e.value)}),t=normalizeNgContentSelect(t);var b=e.name.toLowerCase(),_=f.OTHER;return r.splitNsName(b)[1]==o?_=f.NG_CONTENT:b==u?_=f.STYLE:b==p?_=f.SCRIPT:b==s&&y==c&&(_=f.STYLESHEET),new m(_,t,n,v,g)}function normalizeNgContentSelect(e){return null===e||0===e.length?"*":e}var r=n(103),i="select",o="ng-content",s="link",a="rel",l="href",c="stylesheet",u="style",p="script",d="ngNonBindable",h="ngProjectAs";t.preparseElement=preparseElement,function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(t.PreparsedElementType||(t.PreparsedElementType={}));var f=t.PreparsedElementType,m=function(){function PreparsedElement(e,t,n,r,i){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i}return PreparsedElement}();t.PreparsedElement=m},function(e,t){"use strict";var n=function(){function CompileBinding(e,t){this.node=e,this.sourceAst=t}return CompileBinding}();t.CompileBinding=n},function(e,t,n){"use strict";function createInjectInternalCondition(e,t,n,r){var i;return i=t>0?l.literal(e).lowerEquals(f.InjectMethodVars.requestNodeIndex).and(f.InjectMethodVars.requestNodeIndex.lowerEquals(l.literal(e+t))):l.literal(e).identical(f.InjectMethodVars.requestNodeIndex),new l.IfStmt(f.InjectMethodVars.token.identical(p.createDiTokenExpression(n.token)).and(i),[new l.ReturnStatement(r)])}function createProviderProperty(e,t,n,r,i,o){var a,c,u=o.view;if(r?(a=l.literalArr(n),c=new l.ArrayType(l.DYNAMIC_TYPE)):(a=n[0],c=n[0].type),s.isBlank(c)&&(c=l.DYNAMIC_TYPE),i)u.fields.push(new l.ClassField(e,c)),u.createMethod.addStmt(l.THIS_EXPR.prop(e).set(a).toStmt());else{var p="_"+e;u.fields.push(new l.ClassField(p,c));var h=new d.CompileMethod(u);h.resetDebugInfo(o.nodeIndex,o.sourceAst),h.addStmt(new l.IfStmt(l.THIS_EXPR.prop(p).isBlank(),[l.THIS_EXPR.prop(p).set(a).toStmt()])),h.addStmt(new l.ReturnStatement(l.THIS_EXPR.prop(p))),u.getters.push(new l.ClassGetter(e,h.finish(),c))}return l.THIS_EXPR.prop(e)}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(31),o=n(10),s=n(5),a=n(28),l=n(16),c=n(374),u=n(61),p=n(36),d=n(245),h=n(382),f=n(105),m=n(115),y=function(){function CompileNode(e,t,n,r,i){this.parent=e,this.view=t,this.nodeIndex=n,this.renderNode=r,this.sourceAst=i}return CompileNode.prototype.isNull=function(){return s.isBlank(this.renderNode)},CompileNode.prototype.isRootElement=function(){return this.view!=this.parent.view},CompileNode}();t.CompileNode=y;var v=function(e){function CompileElement(t,n,r,o,c,u,p,d,h,f,m){var y=this;e.call(this,t,n,r,o,c),this.component=u,this._directives=p,this._resolvedProvidersArray=d,this.hasViewContainer=h,this.hasEmbeddedView=f,this._compViewExpr=null,this.instances=new i.CompileIdentifierMap,this._queryCount=0,this._queries=new i.CompileIdentifierMap,this._componentConstructorViewQueryLists=[],this.contentNodesByNgContentIndex=null,this.referenceTokens={},m.forEach(function(e){return y.referenceTokens[e.name]=e.value}),this.elementRef=l.importExpr(a.Identifiers.ElementRef).instantiate([this.renderNode]),this.instances.add(a.identifierToken(a.Identifiers.ElementRef),this.elementRef),this.injector=l.THIS_EXPR.callMethod("injector",[l.literal(this.nodeIndex)]),this.instances.add(a.identifierToken(a.Identifiers.Injector),this.injector),this.instances.add(a.identifierToken(a.Identifiers.Renderer),l.THIS_EXPR.prop("renderer")),(this.hasViewContainer||this.hasEmbeddedView||s.isPresent(this.component))&&this._createAppElement()}return r(CompileElement,e),CompileElement.createNull=function(){return new CompileElement(null,null,null,null,null,null,[],[],(!1),(!1),[])},CompileElement.prototype._createAppElement=function(){var e="_appEl_"+this.nodeIndex,t=this.isRootElement()?null:this.parent.nodeIndex;this.view.fields.push(new l.ClassField(e,l.importType(a.Identifiers.AppElement),[l.StmtModifier.Private]));var n=l.THIS_EXPR.prop(e).set(l.importExpr(a.Identifiers.AppElement).instantiate([l.literal(this.nodeIndex),l.literal(t),l.THIS_EXPR,this.renderNode])).toStmt();this.view.createMethod.addStmt(n),this.appElement=l.THIS_EXPR.prop(e),this.instances.add(a.identifierToken(a.Identifiers.AppElement),this.appElement)},CompileElement.prototype.createComponentFactoryResolver=function(e){if(e&&0!==e.length){var t=l.importExpr(a.Identifiers.CodegenComponentFactoryResolver).instantiate([l.literalArr(e.map(function(e){return l.importExpr(e)})),m.injectFromViewParentInjector(a.identifierToken(a.Identifiers.ComponentFactoryResolver),!1)]),n=new i.CompileProviderMetadata({token:a.identifierToken(a.Identifiers.ComponentFactoryResolver),useValue:t});this._resolvedProvidersArray.unshift(new u.ProviderAst(n.token,(!1),(!0),[n],u.ProviderAstType.PrivateService,[],this.sourceAst.sourceSpan))}},CompileElement.prototype.setComponentView=function(e){this._compViewExpr=e,this.contentNodesByNgContentIndex=o.ListWrapper.createFixedSize(this.component.template.ngContentSelectors.length);for(var t=0;t0&&i++,r=r.parent;return t=this.view.componentView.viewQueries.get(e),s.isPresent(t)&&o.ListWrapper.addAll(n,t),n},CompileElement.prototype._addQuery=function(e,t){var n="_query_"+e.selectors[0].name+"_"+this.nodeIndex+"_"+this._queryCount++,r=h.createQueryList(e,t,n,this.view),i=new h.CompileQuery(e,r,t,this.view);return h.addQueryToTokenMap(this._queries,i),i},CompileElement.prototype._getLocalDependency=function(e,t){var n=null;if(s.isBlank(n)&&s.isPresent(t.query)&&(n=this._addQuery(t.query,null).queryList),s.isBlank(n)&&s.isPresent(t.viewQuery)&&(n=h.createQueryList(t.viewQuery,null,"_viewQuery_"+t.viewQuery.selectors[0].name+"_"+this.nodeIndex+"_"+this._componentConstructorViewQueryLists.length,this.view),this._componentConstructorViewQueryLists.push(n)),s.isPresent(t.token)){if(s.isBlank(n)&&t.token.equalsTo(a.identifierToken(a.Identifiers.ChangeDetectorRef)))return e===u.ProviderAstType.Component?this._compViewExpr.prop("ref"):m.getPropertyInView(l.THIS_EXPR.prop("ref"),this.view,this.view.componentView);if(s.isBlank(n)){var r=this._resolvedProviders.get(t.token);if(r&&(e===u.ProviderAstType.Directive||e===u.ProviderAstType.PublicService)&&r.providerType===u.ProviderAstType.PrivateService)return null;n=this.instances.get(t.token)}}return n},CompileElement.prototype._getDependency=function(e,t){var n=this,r=null;for(t.isValue&&(r=l.literal(t.value)),s.isBlank(r)&&!t.isSkipSelf&&(r=this._getLocalDependency(e,t));s.isBlank(r)&&!n.parent.isNull();)n=n.parent,r=n._getLocalDependency(u.ProviderAstType.PublicService,new i.CompileDiDependencyMetadata({token:t.token}));return s.isBlank(r)&&(r=m.injectFromViewParentInjector(t.token,t.isOptional)),s.isBlank(r)&&(r=l.NULL_EXPR),m.getPropertyInView(r,this.view,n.view)},CompileElement}(y);t.CompileElement=v;var g=function(){function _QueryWithRead(e,t){this.query=e,this.read=s.isPresent(e.meta.read)?e.meta.read:t}return _QueryWithRead}()},function(e,t,n){"use strict";function createQueryValues(e){return r.ListWrapper.flatten(e.values.map(function(e){return e instanceof l?mapNestedViews(e.view.declarationElement.appElement,e.view,createQueryValues(e)):e}))}function mapNestedViews(e,t,n){var r=n.map(function(e){return s.replaceVarInExpression(s.THIS_EXPR.name,s.variable("nestedView"),e)});return e.callMethod("mapNestedViews",[s.variable(t.className),s.fn([new s.FnParam("nestedView",t.classType)],[new s.ReturnStatement(s.literalArr(r))],s.DYNAMIC_TYPE)])}function createQueryList(e,t,n,r){r.fields.push(new s.ClassField(n,s.importType(o.Identifiers.QueryList,[s.DYNAMIC_TYPE])));var i=s.THIS_EXPR.prop(n);return r.createMethod.addStmt(s.THIS_EXPR.prop(n).set(s.importExpr(o.Identifiers.QueryList,[s.DYNAMIC_TYPE]).instantiate([])).toStmt()),i}function addQueryToTokenMap(e,t){t.meta.selectors.forEach(function(n){var r=e.get(n);i.isBlank(r)&&(r=[],e.add(n,r)),r.push(t)})}var r=n(10),i=n(5),o=n(28),s=n(16),a=n(115),l=function(){function ViewQueryValues(e,t){this.view=e,this.values=t}return ViewQueryValues}(),c=function(){function CompileQuery(e,t,n,r){this.meta=e,this.queryList=t,this.ownerDirectiveExpression=n,this.view=r,this._values=new l(r,[])}return CompileQuery.prototype.addValue=function(e,t){for(var n=t,r=[];i.isPresent(n)&&n!==this.view;){var o=n.declarationElement;r.unshift(o),n=o.view}var s=a.getPropertyInView(this.queryList,t,this.view),c=this._values;r.forEach(function(e){var t=c.values.length>0?c.values[c.values.length-1]:null;if(t instanceof l&&t.view===e.embeddedView)c=t;else{var n=new l(e.embeddedView,[]);c.values.push(n),c=n}}),c.values.push(e),r.length>0&&t.dirtyParentQueriesMethod.addStmt(s.callMethod("setDirty",[]).toStmt())},CompileQuery.prototype._isStatic=function(){return!this._values.values.some(function(e){return e instanceof l})},CompileQuery.prototype.afterChildren=function(e,t){var n=createQueryValues(this._values),r=[this.queryList.callMethod("reset",[s.literalArr(n)]).toStmt()];if(i.isPresent(this.ownerDirectiveExpression)){var o=this.meta.first?this.queryList.prop("first"):this.queryList;r.push(this.ownerDirectiveExpression.prop(this.meta.propertyName).set(o).toStmt())}this.meta.first||r.push(this.queryList.callMethod("notifyOnChanges",[]).toStmt()),this.meta.first&&this._isStatic()?e.addStmts(r):t.addStmt(new s.IfStmt(this.queryList.prop("dirty"),r))},CompileQuery}();t.CompileQuery=c,t.createQueryList=createQueryList,t.addQueryToTokenMap=addQueryToTokenMap},function(e,t,n){"use strict";function getViewType(e,t){return t>0?r.ViewType.EMBEDDED:e.type.isHost?r.ViewType.HOST:r.ViewType.COMPONENT}var r=n(27),i=n(31),o=n(10),s=n(5),a=n(28),l=n(16),c=n(245),u=n(606),p=n(382),d=n(105),h=n(115),f=function(){function CompileView(e,t,n,a,u,d,f,m){var y=this;this.component=e,this.genConfig=t,this.pipeMetas=n,this.styles=a,this.animations=u,this.viewIndex=d,this.declarationElement=f,this.templateVariableBindings=m,this.nodes=[],this.rootNodesOrAppElements=[],this.bindings=[],this.classStatements=[],this.eventHandlerMethods=[],this.fields=[],this.getters=[],this.disposables=[],this.subscriptions=[],this.purePipes=new Map,this.pipes=[],this.locals=new Map,this.literalArrayCount=0, diff --git a/web/vtctld2/app/main.ab14518241846dfc91ba.bundle.js.gz b/web/vtctld2/app/main.ab14518241846dfc91ba.bundle.js.gz new file mode 100644 index 0000000000..ab757b98a9 Binary files /dev/null and b/web/vtctld2/app/main.ab14518241846dfc91ba.bundle.js.gz differ diff --git a/web/vtctld2/app/main.b02cdae8978945277038.bundle.js.gz b/web/vtctld2/app/main.b02cdae8978945277038.bundle.js.gz deleted file mode 100644 index 702d32b222..0000000000 Binary files a/web/vtctld2/app/main.b02cdae8978945277038.bundle.js.gz and /dev/null differ diff --git a/web/vtctld2/src/app/workflows/node.ts b/web/vtctld2/src/app/workflows/node.ts index 40a9db238d..475f86f347 100644 --- a/web/vtctld2/src/app/workflows/node.ts +++ b/web/vtctld2/src/app/workflows/node.ts @@ -1,9 +1,11 @@ export const enum ActionState { + UNKNOWN, ENABLED, DISABLED, } export const enum ActionStyle { + UNKNOWN, NORMAL, WARNING, // Display warning dialog to confirm action with message WAITING, // Highlight to user that the process is waiting on action. @@ -59,6 +61,7 @@ export const enum State { } export const enum Display { // Only relevant if State is RUNNING. + UNKNOWN, INDETERMINATE, // Only relevant if State is RUNNING. DETERMINATE, NONE // Even if Display is NONE progressMsg will still be shown. @@ -95,12 +98,7 @@ export class Node { this.actions = []; if (changes.actions !== null) { for (let actionData of changes.actions) { - let message = actionData.message ? actionData.message : ''; - let state = actionData.state ? actionData.state : ActionState.ENABLED; - let style = actionData.style ? actionData.style : ActionStyle.NORMAL; - if ('name' in actionData) { - this.actions.push(new Action(actionData.name, state, style, message)); - } + this.actions.push(new Action(actionData.name, actionData.state, actionData.style, actionData.message)); } } } diff --git a/web/vtctld2/src/app/workflows/workflow-list.component.ts b/web/vtctld2/src/app/workflows/workflow-list.component.ts index cbe4465d35..8979eab23e 100644 --- a/web/vtctld2/src/app/workflows/workflow-list.component.ts +++ b/web/vtctld2/src/app/workflows/workflow-list.component.ts @@ -256,7 +256,7 @@ dolore magnam aliquam quaerat voluptatem.'}); // Need to update the target now. target.update(workflowData); - if (workflowData.children !== null) { + if ('children' in workflowData && workflowData.children !== null) { target.children = []; for (let childData of workflowData.children) { let child = this.recursiveWorkflowBuilder(childData);