-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrc_app_modules_system_module_ts-es2015.ecec3269ab00fa0a66bf.js
More file actions
1 lines (1 loc) · 72.5 KB
/
Copy pathsrc_app_modules_system_module_ts-es2015.ecec3269ab00fa0a66bf.js
File metadata and controls
1 lines (1 loc) · 72.5 KB
1
"use strict";(self.webpackChunkcism=self.webpackChunkcism||[]).push([["src_app_modules_system_module_ts"],{75573:function(t,e,i){i.r(e),i.d(e,{SystemModule:function(){return le}});var n=i(38583),s=i(13214),a=i(37716),o=i(45094);function r(t,e){1&t&&a._UZ(0,"div",5)}function c(t,e){if(1&t){const t=a.EpF();a.ynx(0),a.YNc(1,r,1,0,"div",3),a.TgZ(2,"span",4),a.NdJ("click",function(){const e=a.CHM(t),i=e.index,n=e.$implicit;return a.oxw().emitClick(i,n)}),a._uU(3),a.qZA(),a.BQk()}if(2&t){const t=e.$implicit,i=e.index;a.xp6(1),a.Q6J("ngIf",i>0),a.xp6(2),a.Oqu(t)}}const l=function(t){return{center:t}},h=["*"];let d=(()=>{class t{constructor(){this.titles=new o.X([]),this.click=new o.X(null)}emitClick(t,e){t+1!=this.titles.getValue().length&&this.click.next({titles:this.titles.getValue(),indexClicked:t,nameClicked:e})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-system-graphic-holder"]],ngContentSelectors:h,decls:6,vars:8,consts:[[1,"title",3,"ngClass"],[4,"ngFor","ngForOf"],[1,"content"],["class","breadcrumb",4,"ngIf"],[1,"part",3,"click"],[1,"breadcrumb"]],template:function(t,e){1&t&&(a.F$t(),a.TgZ(0,"div",0),a.ALo(1,"async"),a.YNc(2,c,4,2,"ng-container",1),a.ALo(3,"async"),a.qZA(),a.TgZ(4,"div",2),a.Hsn(5),a.qZA()),2&t&&(a.Q6J("ngClass",a.VKq(6,l,a.lcZ(1,2,e.titles).length>2)),a.xp6(2),a.Q6J("ngForOf",a.lcZ(3,4,e.titles)))},directives:[n.mk,n.sg,n.O5],pipes:[n.Ov],styles:["[_nghost-%COMP%]{-ms-flex:1 100%;flex:1 100%;width:100%;max-width:100%;padding:20px 20px 30px;box-sizing:border-box;min-height:350px;position:relative;font-size:1.3rem}@media (min-width: 600px){[_nghost-%COMP%]{padding:30px 30px 35px}}@-webkit-keyframes slideIn{0%{opacity:0;transform:translate(-30px)}to{opacity:1;transform:translate(0)}}@keyframes slideIn{0%{opacity:0;transform:translate(-30px)}to{opacity:1;transform:translate(0)}}.title[_ngcontent-%COMP%]{color:rgba(255,255,255,.7);font-size:1.6rem;margin-bottom:35px;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.title.align[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]{text-align:center}.title[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]{-ms-flex:1 1 0px;flex:1 1 0px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-animation:slideIn .3s ease-in-out;animation:slideIn .3s ease-in-out}@media (min-width: 600px){.title[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]{-ms-flex:initial!important;flex:initial!important}}.title[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]:not(:last-child){cursor:pointer}.title[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]:not(:last-child):hover{color:#ef3340}.title[_ngcontent-%COMP%] .part[_ngcontent-%COMP%]:not(:last-child):hover + .breadcrumb[_ngcontent-%COMP%]{-ms-transform:rotate(180deg);transform:rotate(180deg)}.title[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%]{-ms-flex:0 30px;flex:0 30px;margin:0 20px;background-image:url(assets/img/arrow-right.svg);background-size:contain;background-repeat:no-repeat;background-position:center;opacity:.5;transform:rotateX(180deg);transition:transform .3s ease-in-out;-ms-transform-origin:50% 50%;transform-origin:50% 50%;perspective:50px}"],changeDetection:0}),t})();var g=i(64762),m=i(47526),p=i(61172),u=i(20207),y=i(94513),f=i(43463);function x(t,e){(0,f.Z)(2,arguments);var i=(0,y.Z)(t),n=(0,u.Z)(e);return isNaN(n)?new Date(NaN):(n&&i.setDate(i.getDate()+n),i)}function v(t,e){(0,f.Z)(2,arguments);var i=(0,u.Z)(e),n=7*i;return x(t,n)}function b(t,e){(0,f.Z)(1,arguments);var i=e||{},n=i.locale,s=n&&n.options&&n.options.weekStartsOn,a=null==s?0:(0,u.Z)(s),o=null==i.weekStartsOn?a:(0,u.Z)(i.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var r=(0,y.Z)(t),c=r.getDay(),l=(c<o?7:0)+c-o;return r.setDate(r.getDate()-l),r.setHours(0,0,0,0),r}function w(t,e){var i,n;(0,f.Z)(1,arguments);var s=(0,y.Z)(t),a=s.getFullYear(),o=null==e||null===(i=e.locale)||void 0===i||null===(n=i.options)||void 0===n?void 0:n.firstWeekContainsDate,r=null==o?1:(0,u.Z)(o),c=null==(null==e?void 0:e.firstWeekContainsDate)?r:(0,u.Z)(e.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setFullYear(a+1,0,c),l.setHours(0,0,0,0);var h=b(l,e),d=new Date(0);d.setFullYear(a,0,c),d.setHours(0,0,0,0);var g=b(d,e);return s.getTime()>=h.getTime()?a+1:s.getTime()>=g.getTime()?a:a-1}function C(t,e){(0,f.Z)(1,arguments);var i=e||{},n=i.locale,s=n&&n.options&&n.options.firstWeekContainsDate,a=null==s?1:(0,u.Z)(s),o=null==i.firstWeekContainsDate?a:(0,u.Z)(i.firstWeekContainsDate),r=w(t,e),c=new Date(0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);var l=b(c,e);return l}var _=6048e5;function M(t,e){(0,f.Z)(1,arguments);var i=(0,y.Z)(t),n=b(i,e).getTime()-C(i,e).getTime();return Math.round(n/_)+1}var S=i(83902);function A(t){(0,f.Z)(1,arguments);var e=(0,y.Z)(t),i=e.getMonth();return i}var Z=i(30043),O=i(48396),P=i(872),T=i(8202),k=i(98295),D=i(67441),L=i(72458),F=i(36729);const W=function(t){return{enable:t}},Y=["*"];let E=(()=>{class t{constructor(t){this._element=t,this.subs=new m.Y,this.bars=new o.X(0),this.enable=new o.X(!1),this.barsWidth=new o.X(25)}ngOnDestroy(){this.subs.unsubscribe()}ngOnInit(){this.subs.sink=this.bars.pipe((0,F.a)(this.barsWidth)).subscribe(t=>this.resize())}resize(){{const t=this._element.nativeElement.querySelector(".scrollable").offsetWidth;this.enable.next(t+5<=this.bars.getValue()*this.barsWidth.getValue()+50)}}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.SBq))},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-system-scroller"]],hostBindings:function(t,e){1&t&&a.NdJ("resize",function(){return e.resize()},!1,a.Jf7)},ngContentSelectors:Y,decls:7,vars:13,consts:[[1,"scrollable",3,"ngClass"],[1,"content"]],template:function(t,e){1&t&&(a.F$t(),a.TgZ(0,"div",0),a.ALo(1,"async"),a.TgZ(2,"div",1),a.ALo(3,"async"),a.ALo(4,"async"),a.ALo(5,"async"),a.Hsn(6),a.qZA(),a.qZA()),2&t&&(a.Q6J("ngClass",a.VKq(11,W,a.lcZ(1,3,e.enable))),a.xp6(2),a.Udp("width",a.lcZ(3,5,e.enable)?a.lcZ(4,7,e.bars)*a.lcZ(5,9,e.barsWidth)+50:null,"px"))},directives:[n.mk],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;height:200px}.scrollable[_ngcontent-%COMP%]{height:100%}.scrollable.enable[_ngcontent-%COMP%]{overflow-y:hidden;scroll-behavior:smooth;height:auto;height:initial}.scrollable.enable[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{margin-bottom:20px}.scrollable.enable[_ngcontent-%COMP%] cism-system-availability-chart{height:200px!important}.content[_ngcontent-%COMP%]{height:100%}"],changeDetection:0}),t})();function z(t){(0,f.Z)(1,arguments);var e=(0,y.Z)(t),i=e.getFullYear();return i}function J(t,e,i){(0,f.Z)(2,arguments);var n=(0,y.Z)(t),s=(0,u.Z)(e),a=M(n,i)-s;return n.setDate(n.getDate()-7*a),n}var N={lessThanXSeconds:{standalone:{one:"weniger als eine Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als einer Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"eine Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"einer Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als eine Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als einer Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"eine Minute",other:"{{count}} Minuten"},withPreposition:{one:"einer Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa eine Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa einer Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"eine Stunde",other:"{{count}} Stunden"},withPreposition:{one:"einer Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"ein Tag",other:"{{count}} Tage"},withPreposition:{one:"einem Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa ein Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa einem Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"ein Woche",other:"{{count}} Wochen"},withPreposition:{one:"einem Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa ein Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa einem Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"ein Monat",other:"{{count}} Monate"},withPreposition:{one:"einem Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa ein Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa einem Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"ein Jahr",other:"{{count}} Jahre"},withPreposition:{one:"einem Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als ein Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als einem Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast ein Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast einem Jahr",other:"fast {{count}} Jahren"}}},q=i(72496),X={date:(0,q.Z)({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM. y",short:"dd.MM.y"},defaultWidth:"full"}),time:(0,q.Z)({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:(0,q.Z)({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},B={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},R=i(88684),H={ordinalNumber:function(t,e){return Number(t)+"."},era:(0,R.Z)({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:(0,R.Z)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,R.Z)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","M\xe4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},defaultWidth:"wide"}),day:(0,R.Z)({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:(0,R.Z)({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},G=i(77154),I=i(55666),Q={code:"de",formatDistance:function(t,e,i){var n,s=(i=i||{}).addSuffix?N[t].withPreposition:N[t].standalone;return n="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e),i.addSuffix?i.comparison>0?"in "+n:"vor "+n:n},formatLong:X,formatRelative:function(t,e,i,n){return B[t]},localize:H,match:{ordinalNumber:(0,G.Z)({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,I.Z)({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:(0,I.Z)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,I.Z)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|m\xe4r|apr|mai|jun|jul|aug|sep|okt|nov|dez)/i,wide:/^(januar|februar|m\xe4rz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^m\xe4r/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,I.Z)({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,I.Z)({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},j=i(10386);let $=(()=>{class t{constructor(t,e,i){this._tools=t,this._store=e,this._scroller=i,this.minScale=new o.X(0),this.yAxisTicks=new o.X([]),this.chartData=new o.X([]),this.data=[],this.colorScheme={domain:["#00bcd4"]},this.yAxisFormatting=t=>{switch(this.type){case"daily":return`${t} %`;case"monthly":case"weekly":return`AVG ${t} %`}},this.xAxisFormatting=t=>{let e=(0,S.Z)(t,this.config.system.S2.formatDate,new Date);switch(this.type){case"daily":return t;case"monthly":return(0,p.Z)(e,"MMM yyyy",{locale:Q});case"weekly":return(0,p.Z)(e,"dd/MM/yyyy",{locale:Q})}},this.config=this._store.selectSnapshot(t=>t.config)}ngOnInit(){let t=[];switch(this.type){case"daily":t=this.data.map(t=>{let e=(0,S.Z)(t[1],"yyyy-MM-dd",new Date);return e=(0,p.Z)(e,"dd/MM/yyyy"),{name:e,value:Math.round(100*t[2])/100}});break;case"weekly":case"monthly":let e="weekly"==this.type?this.config.system.S2.formatDate:"dd/MM/yyyy";const i=this.data.reduce((t,e)=>{let i=(0,S.Z)(e[1],"yyyy-MM-dd",new Date);return i="weekly"==this.type?`${z(i)}${M(i)}`:(0,p.Z)(i,"yyyyMM"),t[i]=t[i]||[],t[i].push(e),t},{});t=Object.keys(i).map(t=>{let n;return"weekly"==this.type?(n=(0,S.Z)(t.substr(0,4),"yyyy",new Date),n=J(n,+t.substr(4,2)),n=b(n),n=(0,p.Z)(n,e)):(n=(0,S.Z)(t,"yyyyMM",new Date),n=(0,p.Z)(n,e)),{name:n,value:this._tools.averageByIndex(i[t],2,!0),min:this._tools.getMin(i[t],2,!0),max:this._tools.getMax(i[t],2,!0)}})}t.length>this.config.system.unitsPast&&(t=t.slice(Math.max(t.length-this.config.system.unitsPast,1)));let e=Math.round(this._tools.getMin(this.data,2));e>5&&(e-=5),this.minScale.next(e),this.yAxisTicks.next([e,100]),this._scroller.bars.next(t.length),this.chartData.next([{name:"System Availability",series:t}])}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(m.G),a.Y36(O.yh),a.Y36(E,1))},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-system-availability-chart"]],inputs:{data:"data",type:"type"},decls:4,vars:20,consts:[[3,"results","gradient","xAxis","yAxis","legend","schemeType","showGridLines","showXAxisLabel","showYAxisLabel","yAxisTicks","yScaleMin","yAxisTickFormatting","xAxisTickFormatting","scheme"]],template:function(t,e){1&t&&(a._UZ(0,"ngx-charts-line-chart",0),a.ALo(1,"async"),a.ALo(2,"async"),a.ALo(3,"async")),2&t&&a.Q6J("results",a.lcZ(1,14,e.chartData))("gradient",!0)("xAxis",!0)("yAxis",!0)("legend",!1)("schemeType","ordinal")("showGridLines",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("yAxisTicks",a.lcZ(2,16,e.yAxisTicks))("yScaleMin",a.lcZ(3,18,e.minScale))("yAxisTickFormatting",e.yAxisFormatting)("xAxisTickFormatting",e.xAxisFormatting)("scheme",e.colorScheme)},directives:[j.Dw],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;height:225px;padding-top:5px;box-sizing:border-box}[_nghost-%COMP%] .ngx-charts .line-highlight{display:block!important}[_nghost-%COMP%] .ngx-charts .tick text{fill:rgba(255,255,255,.5)!important}"],changeDetection:0}),t})();var U=i(11436);function V(t,e){if(1&t&&(a.TgZ(0,"cism-system-scroller"),a._UZ(1,"cism-system-availability-chart",9),a.ALo(2,"async"),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("data",a.lcZ(2,1,t.SystemAvailabilityRows))}}function K(t,e){if(1&t&&(a.TgZ(0,"cism-system-scroller"),a._UZ(1,"cism-system-availability-chart",10),a.ALo(2,"async"),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("data",a.lcZ(2,1,t.SystemAvailabilityRows))}}function tt(t,e){if(1&t&&(a.TgZ(0,"cism-system-scroller"),a._UZ(1,"cism-system-availability-chart",11),a.ALo(2,"async"),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("data",a.lcZ(2,1,t.SystemAvailabilityRows))}}function et(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",13),a.TgZ(1,"div",14),a._UZ(2,"div",15),a._UZ(3,"div",16),a._UZ(4,"div",17),a.qZA(),a.TgZ(5,"div",18),a.TgZ(6,"div",19),a.TgZ(7,"div",20),a._uU(8,"Today"),a.qZA(),a.TgZ(9,"div",21),a._uU(10),a.qZA(),a.qZA(),a.TgZ(11,"div",22),a.TgZ(12,"div",23),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).view.next("daily")}),a.TgZ(13,"div",24),a._uU(14,"Prev. Day"),a.qZA(),a.TgZ(15,"div",25),a._uU(16,"Pr. Day"),a.qZA(),a.TgZ(17,"div",21),a._uU(18),a.qZA(),a.TgZ(19,"div",26),a._UZ(20,"div",27),a.qZA(),a.qZA(),a.TgZ(21,"div",23),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).view.next("weekly")}),a.TgZ(22,"div",24),a._uU(23,"Prev. Week"),a.qZA(),a.TgZ(24,"div",25),a._uU(25,"Pr. Week"),a.qZA(),a.TgZ(26,"div",21),a._uU(27),a.qZA(),a.TgZ(28,"div",26),a._UZ(29,"div",27),a.qZA(),a.qZA(),a.TgZ(30,"div",23),a.NdJ("click",function(){return a.CHM(t),a.oxw(2).view.next("monthly")}),a.TgZ(31,"div",24),a._uU(32,"Prev. Month"),a.qZA(),a.TgZ(33,"div",25),a._uU(34,"Pr. Month"),a.qZA(),a.TgZ(35,"div",21),a._uU(36),a.qZA(),a.TgZ(37,"div",26),a._UZ(38,"div",27),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()}if(2&t){const t=e.ngIf;a.xp6(2),a.ekj("active",t.today<98),a.xp6(1),a.ekj("active",t.today>98&&t.today<99),a.xp6(1),a.ekj("active",t.today>99),a.xp6(6),a.hij("",t.today," %"),a.xp6(8),a.hij("",t.yesterday," %"),a.xp6(2),a.Q6J("ngClass",t.yesterday_up),a.xp6(7),a.hij("",t.prev_week," %"),a.xp6(2),a.Q6J("ngClass",t.week_up),a.xp6(7),a.hij("",t.prev_month," %"),a.xp6(2),a.Q6J("ngClass",t.month_up)}}function it(t,e){if(1&t&&(a.ynx(0),a.YNc(1,et,39,13,"div",12),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngIf",a.lcZ(2,1,t.percents))}}class nt{constructor(t,e,i){this._store=t,this._tools=e,this._holder=i,this.ngOnDestroy=()=>this.subs.unsubscribe(),this.subs=new m.Y,this.percents=new o.X(null),this.SystemAvailabilityRows=new o.X([]),this.view=new o.X("overview"),this.config=this._store.selectSnapshot(t=>t.config),this._holder.titles.next([this.config.system.titles.S1])}ngOnInit(){this.subs.sink=this.tickets$.subscribe(t=>{let e=0;try{const i=(0,p.Z)(new Date,this.config.system.S1.formatDate);e=this._tools.formatPercent(t.filter(t=>t[1]==i)[0][2])}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for today. Check you system report!!!"),console.log("=======================================================")}let i=0;try{let e=function(t,e){(0,f.Z)(2,arguments);var i=(0,u.Z)(e);return x(t,-i)}(new Date,1);e=(0,p.Z)(e,this.config.system.S1.formatDate),i=this._tools.formatPercent(t.filter(t=>t[1]==e)[0][2])}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for yesterday. Check you system report!!!"),console.log("=======================================================")}let n=0;try{let e=function(t,e){(0,f.Z)(2,arguments);var i=(0,u.Z)(e);return v(t,-i)}(new Date,1);e=M(e);const i=t.filter(t=>M((0,S.Z)(t[1],this.config.system.S1.formatDate,new Date))==e),s=i.map(t=>t[2]).reduce((t,e)=>t+e,0);n=this._tools.formatPercent(s/i.length)}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for previous week. Check you system report!!!"),console.log("=======================================================")}let s=0;try{const e=M(new Date),i=t.filter(t=>{let i=(0,S.Z)(t[1],this.config.system.S1.formatDate,new Date);return i=M(i),i==e}),n=i.map(t=>t[2]).reduce((t,e)=>t+e,0);s=this._tools.formatPercent(n/i.length)}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for actual week. Check you system report!!!"),console.log("=======================================================")}let a=0;try{const e=A((0,Z.Z)(new Date,1)),i=t.filter(t=>{let i=(0,S.Z)(t[1],this.config.system.S1.formatDate,new Date);return i=A(i),i==e}),n=i.map(t=>t[2]).reduce((t,e)=>t+e,0);a=this._tools.formatPercent(n/i.length)}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for previous month. Check you system report!!!"),console.log("=======================================================")}let o=0;try{const e=A(new Date),i=t.filter(t=>{let i=(0,S.Z)(t[1],this.config.system.S1.formatDate,new Date);return i=A(i),i==e}),n=i.map(t=>t[2]).reduce((t,e)=>t+e,0);o=this._tools.formatPercent(n/i.length)}catch(c){console.log("======================================================="),console.log("System Availability","Processing","Percent not found for actual month. Check you system report!!!"),console.log("=======================================================")}const r={rows:t,today:e,yesterday:i,prev_week:n,prev_month:a,yesterday_up:e>i?"up":"down",week_up:s>n?"up":"down",month_up:o>a?"up":"down"};this.percents.next(r),this.SystemAvailabilityRows.next(r.rows)})}}nt.\u0275fac=function(t){return new(t||nt)(a.Y36(O.yh),a.Y36(m.G),a.Y36(d,1))},nt.\u0275cmp=a.Xpm({type:nt,selectors:[["cism-system-availability"]],decls:17,vars:9,consts:[["appearance","outline",1,"view-selector"],[3,"value","selectionChange"],["value","overview","selected",""],["value","daily"],["value","weekly"],["value","monthly"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["type","daily",3,"data"],["type","weekly",3,"data"],["type","monthly",3,"data"],["class","overview-container",4,"ngIf"],[1,"overview-container"],[1,"semaphore"],[1,"status","bad"],[1,"status","medium"],[1,"status","good"],[1,"chart"],[1,"today"],[1,"header"],[1,"percent"],[1,"rest"],["matTooltip","View details","matTooltipPosition","below",1,"unit",3,"click"],[1,"header","show-on-portrait-up"],[1,"header","show-on-mobile"],[1,"difference"],[1,"difference-sign",3,"ngClass"]],template:function(t,e){1&t&&(a.TgZ(0,"mat-form-field",0),a.TgZ(1,"mat-select",1),a.NdJ("selectionChange",function(t){return e.view.next(t.value)}),a.ALo(2,"async"),a.TgZ(3,"mat-option",2),a._uU(4,"Overview"),a.qZA(),a.TgZ(5,"mat-option",3),a._uU(6,"Daily"),a.qZA(),a.TgZ(7,"mat-option",4),a._uU(8,"Weekly"),a.qZA(),a.TgZ(9,"mat-option",5),a._uU(10,"Monthly"),a.qZA(),a.qZA(),a.qZA(),a.ynx(11,6),a.ALo(12,"async"),a.YNc(13,V,3,3,"cism-system-scroller",7),a.YNc(14,K,3,3,"cism-system-scroller",7),a.YNc(15,tt,3,3,"cism-system-scroller",7),a.YNc(16,it,3,3,"ng-container",8),a.BQk()),2&t&&(a.xp6(1),a.Q6J("value",a.lcZ(2,5,e.view)),a.xp6(10),a.Q6J("ngSwitch",a.lcZ(12,7,e.view)),a.xp6(2),a.Q6J("ngSwitchCase","daily"),a.xp6(1),a.Q6J("ngSwitchCase","weekly"),a.xp6(1),a.Q6J("ngSwitchCase","monthly"))},directives:[k.KE,D.gD,L.ey,n.RF,n.n9,n.ED,E,$,n.O5,U.gM,n.mk],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block}.overview-container[_ngcontent-%COMP%]{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;height:225px;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:600px;margin:0 auto;-ms-flex-align:center;align-items:center}@media (min-width: 600px){.overview-container[_ngcontent-%COMP%]{-ms-flex-wrap:nowrap;flex-wrap:nowrap}}.mat-form-field[_ngcontent-%COMP%]{position:absolute;top:8px;right:20px}@media (min-width: 600px){.mat-form-field[_ngcontent-%COMP%]{top:15px}}[_nghost-%COMP%] .mat-form-field-infix{border-top:0!important}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-select-arrow-wrapper{-ms-transform:unset!important;transform:unset!important}[_nghost-%COMP%] .mat-form-field{width:130px}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:rgba(255,255,255,.1)!important}[_nghost-%COMP%] .mat-form-field .mat-select-arrow{color:rgba(255,255,255,.1)!important}[_nghost-%COMP%] .mat-form-field .mat-select-value-text span{color:rgba(255,255,255,.6)!important}.semaphore[_ngcontent-%COMP%]{-ms-flex:1 100%;flex:1 100%;max-width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;margin-top:10px;height:80px}@media (min-width: 600px){.semaphore[_ngcontent-%COMP%]{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 100px;flex:0 100px;height:200px;margin-top:0}}.semaphore[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{height:50px;width:50px;margin:0 auto;border-radius:50%;opacity:.2}.semaphore[_ngcontent-%COMP%] .status.active[_ngcontent-%COMP%]{opacity:1}.semaphore[_ngcontent-%COMP%] .status.bad[_ngcontent-%COMP%]{background-color:#e53935}.semaphore[_ngcontent-%COMP%] .status.bad.active[_ngcontent-%COMP%]{box-shadow:0 0 20px #e53935}.semaphore[_ngcontent-%COMP%] .status.medium[_ngcontent-%COMP%]{background-color:#ffca28}.semaphore[_ngcontent-%COMP%] .status.medium.active[_ngcontent-%COMP%]{box-shadow:0 0 20px #ffca28}.semaphore[_ngcontent-%COMP%] .status.good[_ngcontent-%COMP%]{background-color:#4caf50}.semaphore[_ngcontent-%COMP%] .status.good.active[_ngcontent-%COMP%]{box-shadow:0 0 20px #4caf50}.chart[_ngcontent-%COMP%]{-ms-flex:1 100%;flex:1 100%;max-width:100%;display:-ms-flexbox;display:flex;height:120px}@media (min-width: 600px){.chart[_ngcontent-%COMP%]{-ms-flex:0 400px;flex:0 400px;height:150px}}.chart[_ngcontent-%COMP%] .today[_ngcontent-%COMP%]{-ms-flex:0 30%;flex:0 30%;max-width:30%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:15px;padding:7px;box-sizing:border-box}.chart[_ngcontent-%COMP%] .today[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{-ms-flex:0 50px;flex:0 50px;font-size:1.2rem;color:#ef3340;white-space:nowrap;font-weight:bold}@media (min-width: 600px){.chart[_ngcontent-%COMP%] .today[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:1.5rem}}.chart[_ngcontent-%COMP%] .today[_ngcontent-%COMP%] .percent[_ngcontent-%COMP%]{-ms-flex:1;flex:1;font-size:1.8rem;white-space:nowrap}@media (min-width: 600px){.chart[_ngcontent-%COMP%] .today[_ngcontent-%COMP%] .percent[_ngcontent-%COMP%]{font-size:2.5rem}}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%]{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%]{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column;padding:10px;box-sizing:border-box;border-radius:3px;cursor:pointer}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%]:hover{background-color:rgba(255,255,255,.03)}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{color:#ef3340;white-space:nowrap;font-weight:bold}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] .percent[_ngcontent-%COMP%]{white-space:nowrap}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{-ms-flex:1;flex:1;position:relative;text-align:center}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] .difference-sign[_ngcontent-%COMP%]{position:absolute;margin:auto;top:0;bottom:0;left:0;right:0;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] .difference-sign.down[_ngcontent-%COMP%]{border-top:14px solid #E53935}.chart[_ngcontent-%COMP%] .rest[_ngcontent-%COMP%] .unit[_ngcontent-%COMP%] .difference-sign.up[_ngcontent-%COMP%]{border-bottom:14px solid #4CAF50}@media (max-width: 599px){.show-on-portrait-up[_ngcontent-%COMP%]{display:none}}@media (min-width: 600px){.show-on-mobile[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),(0,g.gn)([(0,O.Ph)(T.gH.Section1),(0,g.w6)("design:type",P.y)],nt.prototype,"tickets$",void 0);var st=i(52468),at=i(23246),ot=i(74703),rt=i(94722);class ct{constructor(t,e,i,n){this._data=t,this._tools=e,this._store=i,this._scroller=n,this.subs=new m.Y,this.ngOnDestroy=()=>this.subs.unsubscribe(),this.data=new o.X([]),this.xAxisFormatting=t=>{let e;switch(this.type){case"daily":return e=(0,S.Z)(t,"yyyy'M'MM'D'dd",new Date),(0,p.Z)(e,"dd'/'MM'/'yyyy");case"monthly":return(0,p.Z)((0,S.Z)(t,"yyyy'M'MM",new Date),"MMM yyyy");case"weekly":const i=+t.substr(0,4),n=+t.substr(4,2);return e=function(t,e){(0,f.Z)(2,arguments);var i=(0,y.Z)(t),n=(0,u.Z)(e);return isNaN(i.getTime())?new Date(NaN):(i.setFullYear(n),i)}(new Date,i),e=J(e,n),(0,p.Z)(e,"dd'/'MM'/'yyyy")}},this.colorScheme={domain:this._store.selectSnapshot(rt.ZP.getColorScheme).map(t=>t.color)}}ngOnChanges(){this.subs.sink=this.tickets$.pipe((0,ot.b)(200)).subscribe(t=>{let e={},i={monthly:"yyyy'M'MM",daily:"yyyy'M'MM'D'dd"};e=this._tools.primitiveReduce(t.ticketsReduced,(t,e)=>{const n=(0,S.Z)(e[0],"dd.MM.yyyy HH:mm",new Date);if(!(0,at.Z)(n))return t;let s;return s="weekly"==this.type?`${z(n)}${M(n)}`:(0,p.Z)(n,i[this.type]),t[s]=t[s]||[],t[s].push(e),t},{});const n=Object.keys(e);n.sort((t,e)=>{let n,s;return"weekly"==this.type?(n=J((0,S.Z)(t.substr(0,4),"yyyy",new Date),+t.substr(4,2)),s=J((0,S.Z)(e.substr(0,4),"yyyy",new Date),+e.substr(4,2))):(n=(0,S.Z)(t,i[this.type],new Date),s=(0,S.Z)(e,i[this.type],new Date)),n.valueOf()-s.valueOf()});let s=n.map(t=>{e[t]=this._tools.classifyByIndex(e[t],1);for(let i in e[t])e[t][i]=e[t][i].length;return{name:t,series:Object.keys(e[t]).map(i=>({name:i,value:e[t][i]}))}});const a=this._store.selectSnapshot(t=>t.config);s=s.slice(Math.max(s.length-a.system.unitsPast,1)),this._scroller.bars.next(s.length),this.data.next(s)})}}ct.\u0275fac=function(t){return new(t||ct)(a.Y36(st.D),a.Y36(m.G),a.Y36(O.yh),a.Y36(E,1))},ct.\u0275cmp=a.Xpm({type:ct,selectors:[["cism-system-robustness-chart"]],inputs:{type:"type"},features:[a.TTD],decls:2,vars:12,consts:[[3,"results","gradient","xAxis","yAxis","legend","showXAxisLabel","showYAxisLabel","scheme","xAxisTickFormatting","showGridLines"]],template:function(t,e){1&t&&(a._UZ(0,"ngx-charts-bar-vertical-stacked",0),a.ALo(1,"async")),2&t&&a.Q6J("results",a.lcZ(1,10,e.data))("gradient",!1)("xAxis",!0)("yAxis",!0)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("scheme",e.colorScheme)("xAxisTickFormatting",e.xAxisFormatting)("showGridLines",!1)},directives:[j.XK],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;height:230px;padding:20px 5px 0;box-sizing:border-box}[_nghost-%COMP%] .ngx-charts .tick text{fill:rgba(255,255,255,.5)!important}"],changeDetection:0}),(0,g.gn)([(0,O.Ph)(T.gH),(0,g.w6)("design:type",P.y)],ct.prototype,"tickets$",void 0);let lt=(()=>{class t{constructor(t,e){this._holder=t,this._store=e,this.view=new o.X("monthly"),this.config=this._store.selectSnapshot(t=>t.config),this._holder.titles.next([this.config.system.titles.S2])}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(d,1),a.Y36(O.yh))},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-system-robustness"]],decls:12,vars:6,consts:[["appearance","outline",1,"view-selector"],[3,"value","selectionChange"],["value","daily"],["value","weekly"],["value","monthly","selected",""],[3,"type"]],template:function(t,e){1&t&&(a.TgZ(0,"mat-form-field",0),a.TgZ(1,"mat-select",1),a.NdJ("selectionChange",function(t){return e.view.next(t.value)}),a.ALo(2,"async"),a.TgZ(3,"mat-option",2),a._uU(4,"Daily"),a.qZA(),a.TgZ(5,"mat-option",3),a._uU(6,"Weekly"),a.qZA(),a.TgZ(7,"mat-option",4),a._uU(8,"Monthly"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(9,"cism-system-scroller"),a._UZ(10,"cism-system-robustness-chart",5),a.ALo(11,"async"),a.qZA()),2&t&&(a.xp6(1),a.Q6J("value",a.lcZ(2,2,e.view)),a.xp6(9),a.Q6J("type",a.lcZ(11,4,e.view)))},directives:[k.KE,D.gD,L.ey,E,ct],pipes:[n.Ov],styles:[".mat-form-field[_ngcontent-%COMP%]{position:absolute;top:8px;right:20px}@media (min-width: 600px){.mat-form-field[_ngcontent-%COMP%]{top:15px}}[_nghost-%COMP%] .mat-form-field-infix{border-top:0!important}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-select-arrow-wrapper{-ms-transform:unset!important;transform:unset!important}[_nghost-%COMP%] .mat-form-field{width:130px}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:rgba(255,255,255,.1)!important}[_nghost-%COMP%] .mat-form-field .mat-select-arrow{color:rgba(255,255,255,.1)!important}[_nghost-%COMP%] .mat-form-field .mat-select-value-text span{color:rgba(255,255,255,.6)!important}"],changeDetection:0}),t})();var ht=i(76889),dt=i(41964),gt=i(49681),mt=i(71598),pt=i(96937),ut=i(83864),yt=i(5207),ft=i(37540);const xt=["*"];var vt=(()=>{return(t=vt||(vt={})).AnnotationChart="AnnotationChart",t.AreaChart="AreaChart",t.Bar="Bar",t.BarChart="BarChart",t.BubbleChart="BubbleChart",t.Calendar="Calendar",t.CandlestickChart="CandlestickChart",t.ColumnChart="ColumnChart",t.ComboChart="ComboChart",t.PieChart="PieChart",t.Gantt="Gantt",t.Gauge="Gauge",t.GeoChart="GeoChart",t.Histogram="Histogram",t.Line="Line",t.LineChart="LineChart",t.Map="Map",t.OrgChart="OrgChart",t.Sankey="Sankey",t.Scatter="Scatter",t.ScatterChart="ScatterChart",t.SteppedAreaChart="SteppedAreaChart",t.Table="Table",t.Timeline="Timeline",t.TreeMap="TreeMap",t.WordTree="wordtree",vt;var t})();const bt={[vt.AnnotationChart]:"annotationchart",[vt.AreaChart]:"corechart",[vt.Bar]:"bar",[vt.BarChart]:"corechart",[vt.BubbleChart]:"corechart",[vt.Calendar]:"calendar",[vt.CandlestickChart]:"corechart",[vt.ColumnChart]:"corechart",[vt.ComboChart]:"corechart",[vt.PieChart]:"corechart",[vt.Gantt]:"gantt",[vt.Gauge]:"gauge",[vt.GeoChart]:"geochart",[vt.Histogram]:"corechart",[vt.Line]:"line",[vt.LineChart]:"corechart",[vt.Map]:"map",[vt.OrgChart]:"orgchart",[vt.Sankey]:"sankey",[vt.Scatter]:"scatter",[vt.ScatterChart]:"corechart",[vt.SteppedAreaChart]:"corechart",[vt.Table]:"table",[vt.Timeline]:"timeline",[vt.TreeMap]:"treemap",[vt.WordTree]:"wordtree"},wt=new a.OlP("GOOGLE_CHARTS_CONFIG"),Ct=new a.OlP("GOOGLE_CHARTS_LAZY_CONFIG",{providedIn:"root",factory:()=>{const t=(0,a.f3M)(wt,a.XFs.Optional);return(0,dt.of)(Object.assign(Object.assign({},{version:"current",safeMode:!1}),t||{}))}});let _t=(()=>{class t{constructor(t,e,i){this.zone=t,this.localeId=e,this.config$=i,this.scriptSource="https://www.gstatic.com/charts/loader.js",this.scriptLoadSubject=new ht.x}isGoogleChartsAvailable(){return!("undefined"==typeof google||void 0===google.charts)}loadChartPackages(...t){return this.loadGoogleCharts().pipe((0,ut.z)(()=>this.config$),(0,yt.U)(t=>Object.assign(Object.assign({},{version:"current",safeMode:!1}),t||{})),(0,ft.w)(e=>new P.y(i=>{google.charts.load(e.version,{packages:t,language:this.localeId,mapsApiKey:e.mapsApiKey,safeMode:e.safeMode}),google.charts.setOnLoadCallback(()=>{this.zone.run(()=>{i.next(),i.complete()})})})))}loadGoogleCharts(){if(this.isGoogleChartsAvailable())return(0,dt.of)(null);if(!this.isLoadingGoogleCharts()){const t=this.createGoogleChartsScript();t.onload=()=>{this.zone.run(()=>{this.scriptLoadSubject.next(),this.scriptLoadSubject.complete()})},t.onerror=()=>{this.zone.run(()=>{console.error("Failed to load the google charts script!"),this.scriptLoadSubject.error(new Error("Failed to load the google charts script!"))})}}return this.scriptLoadSubject.asObservable()}isLoadingGoogleCharts(){return null!=this.getGoogleChartsScript()}getGoogleChartsScript(){return Array.from(document.getElementsByTagName("script")).find(t=>t.src===this.scriptSource)}createGoogleChartsScript(){const t=document.createElement("script");return t.type="text/javascript",t.src=this.scriptSource,t.async=!0,document.getElementsByTagName("head")[0].appendChild(t),t}}return t.\u0275fac=function(e){return new(e||t)(a.LFG(a.R0b),a.LFG(a.soG),a.LFG(Ct))},t.\u0275prov=a.Yz7({token:t,factory:t.\u0275fac}),t})(),Mt=(()=>{class t{create(t,e,i){if(null==t)return;let n=!0;null!=e&&(n=!1);const s=google.visualization.arrayToDataTable(this.getDataAsTable(t,e),n);return i&&this.applyFormatters(s,i),s}getDataAsTable(t,e){return e?[e,...t]:t}applyFormatters(t,e){for(const i of e)i.formatter.format(t,i.colIndex)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=a.Yz7({factory:function(){return new t},token:t,providedIn:"root"}),t})(),St=(()=>{class t{constructor(t){this.loaderService=t,this.error=new a.vpe,this.ready=new a.vpe,this.stateChange=new a.vpe,this.id="_"+Math.random().toString(36).substr(2,9),this.wrapperReadySubject=new gt.t(1)}get wrapperReady$(){return this.wrapperReadySubject.asObservable()}get controlWrapper(){if(!this._controlWrapper)throw new Error("Cannot access the control wrapper before it being initialized.");return this._controlWrapper}ngOnInit(){this.loaderService.loadChartPackages("controls").subscribe(()=>{this.createControlWrapper()})}ngOnChanges(t){!this._controlWrapper||(t.type&&this._controlWrapper.setControlType(this.type),t.options&&this._controlWrapper.setOptions(this.options||{}),t.state&&this._controlWrapper.setState(this.state||{}))}createControlWrapper(){this._controlWrapper=new google.visualization.ControlWrapper({containerId:this.id,controlType:this.type,state:this.state,options:this.options}),this.addEventListeners(),this.wrapperReadySubject.next(this._controlWrapper)}addEventListeners(){google.visualization.events.removeAllListeners(this._controlWrapper),google.visualization.events.addListener(this._controlWrapper,"ready",t=>this.ready.emit(t)),google.visualization.events.addListener(this._controlWrapper,"error",t=>this.error.emit(t)),google.visualization.events.addListener(this._controlWrapper,"statechange",t=>this.stateChange.emit(t))}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(_t))},t.\u0275cmp=a.Xpm({type:t,selectors:[["control-wrapper"]],hostAttrs:[1,"control-wrapper"],hostVars:1,hostBindings:function(t,e){2&t&&a.Ikx("id",e.id)},inputs:{for:"for",type:"type",options:"options",state:"state"},outputs:{error:"error",ready:"ready",stateChange:"stateChange"},exportAs:["controlWrapper"],features:[a.TTD],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),At=(()=>{class t{constructor(t,e,i){this.element=t,this.loaderService=e,this.dataTableService=i,this.ready=new a.vpe,this.error=new a.vpe,this.initialized=!1}ngOnInit(){this.loaderService.loadChartPackages("controls").subscribe(()=>{this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.createDashboard(),this.initialized=!0})}ngOnChanges(t){!this.initialized||(t.data||t.columns||t.formatters)&&(this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.dashboard.draw(this.dataTable))}createDashboard(){const t=this.controlWrappers.map(t=>t.wrapperReady$),e=this.controlWrappers.map(t=>t.for).map(t=>Array.isArray(t)?(0,mt.a)(t.map(t=>t.wrapperReady$)):t.wrapperReady$);(0,mt.a)([...t,...e]).subscribe(()=>{this.dashboard=new google.visualization.Dashboard(this.element.nativeElement),this.initializeBindings(),this.registerEvents(),this.dashboard.draw(this.dataTable)})}registerEvents(){google.visualization.events.removeAllListeners(this.dashboard);const t=(t,e,i)=>{google.visualization.events.addListener(t,e,i)};t(this.dashboard,"ready",()=>this.ready.emit()),t(this.dashboard,"error",t=>this.error.emit(t))}initializeBindings(){this.controlWrappers.forEach(t=>{if(Array.isArray(t.for)){const e=t.for.map(t=>t.chartWrapper);this.dashboard.bind(t.controlWrapper,e)}else this.dashboard.bind(t.controlWrapper,t.for.chartWrapper)})}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.SBq),a.Y36(_t),a.Y36(Mt))},t.\u0275cmp=a.Xpm({type:t,selectors:[["dashboard"]],contentQueries:function(t,e,i){if(1&t&&a.Suo(i,St,4),2&t){let t;a.iGM(t=a.CRH())&&(e.controlWrappers=t)}},hostAttrs:[1,"dashboard"],inputs:{data:"data",columns:"columns",formatters:"formatters"},outputs:{ready:"ready",error:"error"},exportAs:["dashboard"],features:[a.TTD],ngContentSelectors:xt,decls:1,vars:0,template:function(t,e){1&t&&(a.F$t(),a.Hsn(0))},encapsulation:2,changeDetection:0}),t})(),Zt=(()=>{class t{constructor(t,e,i,n){this.element=t,this.scriptLoaderService=e,this.dataTableService=i,this.dashboard=n,this.options={},this.dynamicResize=!1,this.ready=new a.vpe,this.error=new a.vpe,this.select=new a.vpe,this.mouseover=new a.vpe,this.mouseleave=new a.vpe,this.wrapperReadySubject=new gt.t(1),this.initialized=!1,this.eventListeners=new Map}get chart(){return this.chartWrapper.getChart()}get wrapperReady$(){return this.wrapperReadySubject.asObservable()}get chartWrapper(){if(!this.wrapper)throw new Error("Trying to access the chart wrapper before it was fully initialized");return this.wrapper}set chartWrapper(t){this.wrapper=t,this.drawChart()}ngOnInit(){this.scriptLoaderService.loadChartPackages(function(t){return bt[t]}(this.type)).subscribe(()=>{this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.wrapper=new google.visualization.ChartWrapper({container:this.element.nativeElement,chartType:this.type,dataTable:this.dataTable,options:this.mergeOptions()}),this.registerChartEvents(),this.wrapperReadySubject.next(this.wrapper),this.initialized=!0,this.drawChart()})}ngOnChanges(t){if(t.dynamicResize&&this.updateResizeListener(),this.initialized){let e=!1;(t.data||t.columns||t.formatters)&&(this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.wrapper.setDataTable(this.dataTable),e=!0),t.type&&(this.wrapper.setChartType(this.type),e=!0),(t.options||t.width||t.height||t.title)&&(this.wrapper.setOptions(this.mergeOptions()),e=!0),e&&this.drawChart()}}ngOnDestroy(){this.unsubscribeToResizeIfSubscribed()}addEventListener(t,e){const i=this.registerChartEvent(this.chart,t,e);return this.eventListeners.set(i,{eventName:t,callback:e,handle:i}),i}removeEventListener(t){const e=this.eventListeners.get(t);e&&(google.visualization.events.removeListener(e.handle),this.eventListeners.delete(t))}updateResizeListener(){this.unsubscribeToResizeIfSubscribed(),this.dynamicResize&&(this.resizeSubscription=(0,pt.R)(window,"resize",{passive:!0}).pipe((0,ot.b)(100)).subscribe(()=>{this.initialized&&this.drawChart()}))}unsubscribeToResizeIfSubscribed(){null!=this.resizeSubscription&&(this.resizeSubscription.unsubscribe(),this.resizeSubscription=void 0)}mergeOptions(){return Object.assign({title:this.title,width:this.width,height:this.height},this.options)}registerChartEvents(){google.visualization.events.removeAllListeners(this.wrapper),this.registerChartEvent(this.wrapper,"ready",()=>{google.visualization.events.removeAllListeners(this.chart),this.registerChartEvent(this.chart,"onmouseover",t=>this.mouseover.emit(t)),this.registerChartEvent(this.chart,"onmouseout",t=>this.mouseleave.emit(t)),this.registerChartEvent(this.chart,"select",()=>{const t=this.chart.getSelection();this.select.emit({selection:t})}),this.eventListeners.forEach(t=>t.handle=this.registerChartEvent(this.chart,t.eventName,t.callback)),this.ready.emit({chart:this.chart})}),this.registerChartEvent(this.wrapper,"error",t=>this.error.emit(t))}registerChartEvent(t,e,i){return google.visualization.events.addListener(t,e,i)}drawChart(){null==this.dashboard&&this.wrapper.draw()}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.SBq),a.Y36(_t),a.Y36(Mt),a.Y36(At,8))},t.\u0275cmp=a.Xpm({type:t,selectors:[["google-chart"]],hostAttrs:[1,"google-chart"],inputs:{options:"options",dynamicResize:"dynamicResize",type:"type",data:"data",columns:"columns",title:"title",width:"width",height:"height",formatters:"formatters"},outputs:{ready:"ready",error:"error",select:"select",mouseover:"mouseover",mouseleave:"mouseleave"},exportAs:["googleChart"],features:[a.TTD],decls:0,vars:0,template:function(t,e){},styles:["[_nghost-%COMP%] { width: fit-content; display: block; }"],changeDetection:0}),t})(),Ot=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[{provide:wt,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.oAB({type:t}),t.\u0275inj=a.cJS({providers:[_t]}),t})();function Pt(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"ngx-charts-tree-map",2),a.NdJ("select",function(e){return a.CHM(t),a.oxw().onSelect(e)}),a.ALo(1,"async"),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("scheme",t.colorScheme)("valueFormatting",t.valueFormatting)("results",a.lcZ(1,3,t.chartData))}}function Tt(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"google-chart",3),a.NdJ("resize",function(e){return a.CHM(t),a.oxw().onResize(e)},!1,a.Jf7)("select",function(e){return a.CHM(t),a.oxw().onSelect(e)}),a.ALo(1,"async"),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("type",t.TreeMap)("data",a.lcZ(1,4,t.myData))("columnNames",t.myColumnNames)("options",t.myOptions)}}class kt{constructor(t,e,i,n,s){this._data=t,this._tools=e,this._router=i,this._store=n,this._holder=s,this.subs=new m.Y,this.ngOnDestroy=()=>this.subs.unsubscribe(),this.colorScheme={domain:["#00bcd4","#ffb74d","#7e57c2","#039be5"]},this.TreeMap="TreeMap",this.myColumnNames=["Group","Parent","Tickets"],this.myOptions={minColor:"#48bd88",midColor:"#00938c",maxColor:"#007a93",headerHeight:0,highlightOnMouseOver:!1,fontFamily:"CorpoS"},this.valueFormatting=t=>t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."),this.chartData=new o.X([]),this.myData=new o.X([]),this.ie=!1,this.config=this._store.selectSnapshot(t=>t.config),this._holder.titles.next([this.config.system.titles.S3]),this.ie=this._tools.isIE()}ngOnInit(){this.subs.sink=this.tickets$.subscribe(t=>{this.groups=this._tools.classifyByIndex(t.tickets,this.config.columns.service);for(const i in this.groups)this.groups[i]=this.groups[i].length;const e=Object.keys(this.groups).map(t=>({name:t,value:this.groups[t]}));this.chartData.next(e),this.drawChart()})}drawChart(){var t=[];t.push(["Root Cause",null,0]);for(const e in this.groups)t.push([e,"Root Cause",this.groups[e]]);this.myData.next(t)}onResize(t){this.drawChart()}onSelect(t){const e=Array.isArray(t)?this.myData.getValue()[t[0].row][0]:t.name;this._router.navigate(["tickets","service",e])}}function Dt(t){return t<0?-1:1}function Lt(t,e,i){var n=t._x1-t._x0,s=e-t._x1,a=(t._y1-t._y0)/(n||s<0&&-0),o=(i-t._y1)/(s||n<0&&-0),r=(a*s+o*n)/(n+s);return(Dt(a)+Dt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(r))||0}function Ft(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Wt(t,e,i){var n=t._x0,s=t._x1,a=t._y1,o=(s-n)/3;t._context.bezierCurveTo(n+o,t._y0+o*e,s-o,a-o*i,s,a)}function Yt(t){this._context=t}function Et(t){this._context=t}function zt(t){return new Yt(t)}kt.\u0275fac=function(t){return new(t||kt)(a.Y36(st.D),a.Y36(m.G),a.Y36(s.F0),a.Y36(O.yh),a.Y36(d,1))},kt.\u0275cmp=a.Xpm({type:kt,selectors:[["cism-system-root-cause"]],decls:3,vars:2,consts:[[3,"scheme","valueFormatting","results","select",4,"ngIf","ngIfElse"],["ieTemplate",""],[3,"scheme","valueFormatting","results","select"],["id","googlechart",3,"type","data","columnNames","options","resize","select"]],template:function(t,e){if(1&t&&(a.YNc(0,Pt,2,5,"ngx-charts-tree-map",0),a.YNc(1,Tt,2,6,"ng-template",null,1,a.W1O)),2&t){const t=a.MAs(2);a.Q6J("ngIf",!e.ie)("ngIfElse",t)}},directives:[n.O5,j.tt,Zt],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;height:270px}#gcharts[_ngcontent-%COMP%]{width:100%!important;height:100%!important;border:5px solid black!important}#googlechart[_ngcontent-%COMP%]{display:-ms-flexbox;display:flex;width:100%!important;height:100%!important;padding:0!important}[_nghost-%COMP%] #googlechart>div>div:nth-child(1)>div>svg>g:nth-child(21)>rect{display:none}[_nghost-%COMP%] #googlechart svg g rect{stroke:#151515;stroke-width:1px}"],changeDetection:0}),(0,g.gn)([(0,O.Ph)(T.gH),(0,g.w6)("design:type",P.y)],kt.prototype,"tickets$",void 0),Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wt(this,this._t0,Ft(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var i=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Wt(this,Ft(this,i=Lt(this,t,e)),i);break;default:Wt(this,this._t0,i=Lt(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}},((function(t){this._context=new Et(t)}).prototype=Object.create(Yt.prototype)).point=function(t,e){Yt.prototype.point.call(this,e,t)},Et.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,i,n,s,a){this._context.bezierCurveTo(e,t,n,i,a,s)}};var Jt=i(44609),Nt=i(8563),qt=i(72203);const Xt=["tooltipTemplate"],Bt=["seriesTooltipTemplate"];function Rt(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g",9),a.NdJ("dimensionsChanged",function(e){return a.CHM(t),a.oxw().updateXAxisHeight(e)}),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("xScale",t.xScale)("dims",t.dims)("showLabel",t.showXAxisLabel)("labelText",t.xAxisLabel)("tickFormatting",t.xAxisTickFormatting)}}function Ht(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g",10),a.NdJ("dimensionsChanged",function(e){return a.CHM(t),a.oxw().updateYAxisWidth(e)}),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("yScale",t.yScale)("dims",t.dims)("yOrient",t.yOrientLeft)("showGridLines",t.showGridLines)("showLabel",t.showYAxisLabel)("labelText",t.yAxisLabel)("tickFormatting",t.yAxisTickFormatting)}}function Gt(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g",10),a.NdJ("dimensionsChanged",function(e){return a.CHM(t),a.oxw().updateYAxisWidth(e)}),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("yScale",t.yScaleLine)("dims",t.dims)("yOrient",t.yOrientRight)("showGridLines",t.showGridLines)("showLabel",t.showRightYAxisLabel)("labelText",t.yAxisLabelRight)("tickFormatting",t.yRightAxisTickFormatting)}}function It(t,e){if(1&t&&(a.O4$(),a.TgZ(0,"g"),a._UZ(1,"g",11),a.qZA()),2&t){const t=e.$implicit,i=a.oxw();a.xp6(1),a.Q6J("xScale",i.xScaleLine)("yScale",i.yScaleLine)("colors",i.colorsLine)("data",t)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("animations",i.animations)}}function Qt(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g",12),a.NdJ("hover",function(e){return a.CHM(t),a.oxw().updateHoveredVertical(e)}),a.qZA()}if(2&t){const t=a.oxw();a.Q6J("dims",t.dims)("xSet",t.xSet)("xScale",t.xScaleLine)("yScale",t.yScaleLine)("results",t.combinedSeries)("colors",t.colorsLine)("tooltipDisabled",t.tooltipDisabled)}}function jt(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g"),a.TgZ(1,"g",13),a.NdJ("select",function(e){const i=a.CHM(t).$implicit;return a.oxw().onClick(e,i)})("activate",function(e){return a.CHM(t),a.oxw().onActivate(e)})("deactivate",function(e){return a.CHM(t),a.oxw().onDeactivate(e)}),a.qZA(),a.qZA()}if(2&t){const t=e.$implicit,i=a.oxw();a.xp6(1),a.Q6J("xScale",i.xScaleLine)("yScale",i.yScaleLine)("colors",i.colorsLine)("data",t)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)}}const $t=function(t,e){return[t,e]};let Ut=(()=>{class t extends j.ep{constructor(){super(...arguments),this.curve=zt,this.legend=!1,this.legendTitle="Legend",this.legendPosition=j.tV.Right,this.tooltipDisabled=!0,this.showGridLines=!0,this.activeEntries=[],this.roundDomains=!1,this.animations=!0,this.noBarWhenZero=!0,this.activate=new a.vpe,this.deactivate=new a.vpe,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.scaleType="linear",this.yOrientLeft="left",this.yOrientRight="right",this.legendSpacing=0,this.barPadding=8}trackBy(t,e){return e.name}update(){super.update(),this.dims=(0,j.iG)({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.legendSpacing=this.yAxis?this.showYAxisLabel&&this.yAxis?100:40:0,this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.xDomainLine=this.getXDomainLine(),this.filteredDomain&&(this.xDomainLine=this.filteredDomain),this.yDomainLine=this.getYDomainLine(),this.seriesDomain=this.getSeriesDomain(),this.scaleLines(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const t of this.activeEntries)this.deactivate.emit({value:t,entries:[]});this.activeEntries=[]}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}updateHoveredVertical(t){this.hoveredVertical=t.value,this.deactivateAll()}updateDomain(t){this.filteredDomain=t,this.xDomainLine=this.filteredDomain,this.xScaleLine=this.getXScaleLine(this.xDomainLine,this.dims.width)}scaleLines(){this.xScaleLine=this.getXScaleLine(this.xDomainLine,this.dims.width),this.yScaleLine=this.getYScaleLine(this.yDomainLine,this.dims.height)}getSeriesDomain(){return this.combinedSeries=this.lineChart.slice(0),this.combinedSeries.push({name:this.yAxisLabel,series:this.results}),this.combinedSeries.map(t=>t.name)}isDate(t){return t instanceof Date}getScaleType(t){let e=!0,i=!0;for(const n of t)this.isDate(n)||(e=!1),"number"!=typeof n&&(i=!1);return e?"time":i?"linear":"ordinal"}getXDomainLine(){let t=[];for(const i of this.lineChart)for(const e of i.series)t.includes(e.name)||t.push(e.name);this.scaleType=this.getScaleType(t);let e=[];return"time"===this.scaleType?e=[Math.min(...t),Math.max(...t)]:"linear"===this.scaleType?(t=t.map(t=>Number(t)),e=[Math.min(...t),Math.max(...t)]):e=t,this.xSet=t,e}getYDomainLine(){const t=[];for(const n of this.lineChart)for(const e of n.series)t.indexOf(e.value)<0&&t.push(e.value),void 0!==e.min&&t.indexOf(e.min)<0&&t.push(e.min),void 0!==e.max&&t.indexOf(e.max)<0&&t.push(e.max);let e=Math.min(...t);const i=Math.max(...t);if(this.yRightAxisScaleFactor){const t=this.yRightAxisScaleFactor(e,i);return[Math.min(0,t.min),t.max]}return e=Math.min(0,e),[e,i]}getXScaleLine(t,e){let i;void 0===this.bandwidth&&(this.bandwidth=e-this.barPadding);const n=Math.floor((e+this.barPadding-(this.bandwidth+this.barPadding)*t.length)/2);return"time"===this.scaleType?i=(0,Jt.Z)().range([0,e]).domain(t):"linear"===this.scaleType?(i=(0,Nt.Z)().range([0,e]).domain(t),this.roundDomains&&(i=i.nice())):"ordinal"===this.scaleType&&(i=(0,qt.x)().range([n+this.bandwidth/2,e-n-this.bandwidth/2]).domain(t)),i}getYScaleLine(t,e){const i=(0,Nt.Z)().range([e,0]).domain(t);return this.roundDomains?i.nice():i}getXScale(){this.xDomain=this.getXDomain();const t=this.xDomain.length/(this.dims.width/this.barPadding+1);return(0,qt.Z)().range([0,this.dims.width]).paddingInner(t).domain(this.xDomain)}getYScale(){this.yDomain=this.getYDomain();const t=(0,Nt.Z)().range([this.dims.height,0]).domain(this.yDomain);return this.roundDomains?t.nice():t}getXDomain(){return this.results.map(t=>t.name)}getYDomain(){const t=this.results.map(t=>t.value),e=Math.min(0,...t),i=Math.max(...t);if(this.yLeftAxisScaleFactor){const t=this.yLeftAxisScaleFactor(e,i);return[Math.min(0,t.min),t.max]}return[e,i]}onClick(t){this.select.emit(t)}setColors(){let t;t="ordinal"===this.schemeType?this.xDomain:this.yDomain,this.colors=new j.vH(this.scheme,this.schemeType,t,this.customColors),this.colorsLine=new j.vH(this.colorSchemeLine,this.schemeType,t,this.customColors)}getLegendOptions(){const t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colorsLine,t.title=this.legendTitle):(t.domain=this.seriesDomain,t.colors=this.colors.scale),t}updateLineWidth(t){this.bandwidth=t,this.scaleLines()}updateYAxisWidth({width:t}){this.yAxisWidth=t+20,this.update()}updateXAxisHeight({height:t}){this.xAxisHeight=t,this.update()}onActivate(t){this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value&&e.series===t.series)>-1||(this.activeEntries=[t,...this.activeEntries],this.activate.emit({value:t,entries:this.activeEntries}))}onDeactivate(t){const e=this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value&&e.series===t.series);this.activeEntries.splice(e,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:t,entries:this.activeEntries})}}return t.\u0275fac=function(){let e;return function(i){return(e||(e=a.n5z(t)))(i||t)}}(),t.\u0275cmp=a.Xpm({type:t,selectors:[["combo-chart-component"]],contentQueries:function(t,e,i){if(1&t&&(a.Suo(i,Xt,5),a.Suo(i,Bt,5)),2&t){let t;a.iGM(t=a.CRH())&&(e.tooltipTemplate=t.first),a.iGM(t=a.CRH())&&(e.seriesTooltipTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&a.Gf(j.Bk,5),2&t){let t;a.iGM(t=a.CRH())&&(e.lineSeriesComponent=t.first)}},hostBindings:function(t,e){1&t&&a.NdJ("mouseleave",function(){return e.hideCircles()})},inputs:{curve:"curve",legend:"legend",legendTitle:"legendTitle",legendPosition:"legendPosition",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",showRightYAxisLabel:"showRightYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",yAxisLabelRight:"yAxisLabelRight",tooltipDisabled:"tooltipDisabled",gradient:"gradient",showGridLines:"showGridLines",activeEntries:"activeEntries",schemeType:"schemeType",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",yRightAxisTickFormatting:"yRightAxisTickFormatting",roundDomains:"roundDomains",colorSchemeLine:"colorSchemeLine",autoScale:"autoScale",lineChart:"lineChart",yLeftAxisScaleFactor:"yLeftAxisScaleFactor",yRightAxisScaleFactor:"yRightAxisScaleFactor",rangeFillOpacity:"rangeFillOpacity",animations:"animations",noBarWhenZero:"noBarWhenZero"},outputs:{activate:"activate",deactivate:"deactivate"},features:[a.qOj],decls:11,vars:27,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"bar-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showLabel","labelText","tickFormatting","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","yOrient","showGridLines","showLabel","labelText","tickFormatting","dimensionsChanged",4,"ngIf"],["ngx-combo-charts-series-vertical","","tooltipDisabled","true",3,"xScale","yScale","colors","series","seriesLine","dims","gradient","activeEntries","animations","noBarWhenZero","activate","deactivate","bandwidth","select"],[1,"line-chart","chart"],[4,"ngFor","ngForOf","ngForTrackBy"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","hover",4,"ngIf"],[4,"ngFor","ngForOf"],["ngx-charts-x-axis","",3,"xScale","dims","showLabel","labelText","tickFormatting","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","yOrient","showGridLines","showLabel","labelText","tickFormatting","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","animations"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","hover"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","select","activate","deactivate"]],template:function(t,e){1&t&&(a.TgZ(0,"ngx-charts-chart",0),a.NdJ("legendLabelClick",function(t){return e.onClick(t)})("legendLabelActivate",function(t){return e.onActivate(t)})("legendLabelDeactivate",function(t){return e.onDeactivate(t)}),a.O4$(),a.TgZ(1,"g",1),a.YNc(2,Rt,1,5,"g",2),a.YNc(3,Ht,1,7,"g",3),a.YNc(4,Gt,1,7,"g",3),a.TgZ(5,"g",4),a.NdJ("activate",function(t){return e.onActivate(t)})("deactivate",function(t){return e.onDeactivate(t)})("bandwidth",function(t){return e.updateLineWidth(t)})("select",function(t){return e.onClick(t)}),a.qZA(),a.qZA(),a.TgZ(6,"g",5),a.TgZ(7,"g"),a.YNc(8,It,2,9,"g",6),a.YNc(9,Qt,1,7,"g",7),a.YNc(10,jt,2,8,"g",8),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.Q6J("view",a.WLB(24,$t,e.width+e.legendSpacing,e.height))("showLegend",e.legend)("legendOptions",e.legendOptions)("activeEntries",e.activeEntries)("animations",e.animations),a.xp6(1),a.uIk("transform",e.transform),a.xp6(1),a.Q6J("ngIf",e.xAxis),a.xp6(1),a.Q6J("ngIf",e.yAxis),a.xp6(1),a.Q6J("ngIf",e.yAxis),a.xp6(1),a.Q6J("xScale",e.xScale)("yScale",e.yScale)("colors",e.colors)("series",e.results)("seriesLine",e.lineChart)("dims",e.dims)("gradient",e.gradient)("activeEntries",e.activeEntries)("animations",e.animations)("noBarWhenZero",e.noBarWhenZero),a.xp6(1),a.uIk("transform",e.transform),a.xp6(2),a.Q6J("ngForOf",e.lineChart)("ngForTrackBy",e.trackBy),a.xp6(1),a.Q6J("ngIf",!e.tooltipDisabled),a.xp6(1),a.Q6J("ngForOf",e.lineChart))},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:normal}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}\n"],encapsulation:2}),t})();class Vt{constructor(t,e,i){this._data=t,this._store=e,this._holder=i,this.subs=new m.Y,this.ngOnDestroy=()=>this.subs.unsubscribe(),this.chartData=new o.X([]),this.seriesData=new o.X([]),this.showXAxis=!0,this.showYAxis=!0,this.showLegend=!0,this.showXAxisLabel=!0,this.innerPadding="10%",this.animations=!0,this.lineChartScheme={name:"coolthree",selectable:!0,group:"Ordinal",domain:["#ffb74d"]},this.comboBarScheme={name:"singleLightBlue",selectable:!0,group:"Ordinal",domain:["#00bcd4"]},this.config=this._store.selectSnapshot(t=>t.config),this._holder.titles.next([this.config.system.titles.S4])}ngOnInit(){this.subs.sink=this.csvdata$.subscribe(t=>{var e=[],i=[],n=[];for(let s in t)n.push({name:t[s][1],value:t[s][3]}),i.push({name:t[s][1],value:t[s][2]});e.push(i),e.push([{name:"Average Silt",series:n}]),this.chartData.next(e[0]),this.seriesData.next(e[1])})}}Vt.\u0275fac=function(t){return new(t||Vt)(a.Y36(st.D),a.Y36(O.yh),a.Y36(d,1))},Vt.\u0275cmp=a.Xpm({type:Vt,selectors:[["cism-system-performance"]],decls:3,vars:11,consts:[[3,"scheme","colorSchemeLine","results","lineChart","showGridLines","xAxis","yAxis"]],template:function(t,e){1&t&&(a._UZ(0,"combo-chart-component",0),a.ALo(1,"async"),a.ALo(2,"async")),2&t&&a.Q6J("scheme",e.comboBarScheme)("colorSchemeLine",e.lineChartScheme)("results",a.lcZ(1,7,e.chartData))("lineChart",a.lcZ(2,9,e.seriesData))("showGridLines",!1)("xAxis",e.showXAxis)("yAxis",e.showYAxis)},directives:[Ut],pipes:[n.Ov],styles:["[_nghost-%COMP%] ngx-charts-chart .line-chart.chart g.line-series path{stroke-width:3px}[_nghost-%COMP%] [ngx-combo-charts-series-vertical]{opacity:.5!important}[_nghost-%COMP%]{display:block;height:270px;padding-right:15px}"],changeDetection:0}),(0,g.gn)([(0,O.Ph)(T.gH.Section4),(0,g.w6)("design:type",P.y)],Vt.prototype,"csvdata$",void 0);var Kt=i(34689),te=i(42687);let ee=(()=>{class t{constructor(t,e,i){this._tools=t,this._store=e,this._holder=i,this.chartData=new o.X([]),this.colorScheme={domain:["#00bcd4","lightgrey","#ffb74d","#7e57c2","#039be5"]},this.config=this._store.selectSnapshot(t=>t.config),this._holder.titles.next([this.config.system.titles.S5])}ngOnDestroy(){this.titleChangeSub&&this.titleChangeSub.unsubscribe()}ngOnInit(){this.titleChangeSub=this._holder.click.pipe((0,te.x)(),(0,Kt.h)(t=>null!=t&&t.titles[0]==this.config.system.titles.S5)).subscribe(t=>{switch(t.indexClicked){case 0:this.changeData(),this._holder.titles.next([this.config.system.titles.S5]);break;case 1:this.changeData({series:t.nameClicked,extra:{drill:2,service:t.nameClicked}}),this._holder.titles.next([this.config.system.titles.S5,t.nameClicked])}}),this.changeData()}changeData(t){const e=t?t.extra.drill:1;if(e>=1&&e<=3){let i=this._store.selectSnapshot(T.gH.Section5);if(void 0!==t?(i=i.filter(e=>e[7]==t.extra.service),3==e&&(i=i.filter(e=>e[8]==t.series)),i=this._tools.classifyByIndex(i,2==e?this.config.columns.external:this.config.columns.classification)):i=this._tools.classifyByIndex(i,this.config.columns.description),void 0!==t)switch(e){case 2:this._holder.titles.next([this.config.system.titles.S5,t.extra.service]);break;case 3:this._holder.titles.next(this._holder.titles.getValue().concat([t.series]))}const n=Object.keys(i).map(n=>{let s=this._tools.sumByIndex(i[n],2),a=this._tools.sumByIndex(i[n],3),o=this._tools.sumByIndex(i[n],4),r=this._tools.sumByIndex(i[n],5);const c={drill:void 0!==t?e+1:2,service:void 0!==t?t.extra.service:n};return{name:n,series:[{name:"Incident",value:s,extra:c},{name:"",value:"",extra:c},{name:"WIP",value:a,extra:c},{name:"Sleep",value:o,extra:c},{name:"Assigned",value:r,extra:c}]}});this.chartData.next(n),this._scroller.bars.next(n.length),this._scroller.barsWidth.next(100)}}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(m.G),a.Y36(O.yh),a.Y36(d,1))},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-overview-management"]],viewQuery:function(t,e){if(1&t&&a.Gf(E,7),2&t){let t;a.iGM(t=a.CRH())&&(e._scroller=t.first)}},features:[a._Bn([E])],decls:4,vars:9,consts:[[1,"groupedbarcontainer"],[3,"results","xAxis","yAxis","scheme","barPadding","showGridLines","groupPadding","select"]],template:function(t,e){1&t&&(a.TgZ(0,"cism-system-scroller"),a.TgZ(1,"div",0),a.TgZ(2,"ngx-charts-bar-vertical-2d",1),a.NdJ("select",function(t){return e.changeData(t)}),a.ALo(3,"async"),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.xp6(2),a.Q6J("results",a.lcZ(3,7,e.chartData))("xAxis",!0)("yAxis",!0)("scheme",e.colorScheme)("barPadding",3)("showGridLines",!1)("groupPadding",15))},directives:[E,j.H5],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;height:100%} .ngx-charts text{fill:rgba(255,255,255,.6)!important}.groupedbarcontainer[_ngcontent-%COMP%]{height:200px}"],changeDetection:0}),t})(),ie=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Xpm({type:t,selectors:[["cism-system-wrapper"]],decls:10,vars:0,template:function(t,e){1&t&&(a.TgZ(0,"cism-system-graphic-holder"),a._UZ(1,"cism-system-availability"),a.qZA(),a.TgZ(2,"cism-system-graphic-holder"),a._UZ(3,"cism-system-robustness"),a.qZA(),a.TgZ(4,"cism-system-graphic-holder"),a._UZ(5,"cism-system-root-cause"),a.qZA(),a.TgZ(6,"cism-system-graphic-holder"),a._UZ(7,"cism-system-performance"),a.qZA(),a.TgZ(8,"cism-system-graphic-holder"),a._UZ(9,"cism-overview-management"),a.qZA())},directives:[d,nt,lt,kt,Vt,ee],styles:['[_nghost-%COMP%]{display:-ms-flexbox;display:flex;margin-bottom:50px;-ms-flex-wrap:wrap;flex-wrap:wrap}@media (max-width: 1200px){cism-system-graphic-holder[_ngcontent-%COMP%]:nth-child(2n+2){background-color:rgba(255,255,255,.04)}}@media (min-width: 1200px){cism-system-graphic-holder[_ngcontent-%COMP%]{-ms-flex:1 50%;flex:1 50%;max-width:50%}cism-system-graphic-holder[_ngcontent-%COMP%]:nth-child(2n+1):after{position:absolute;content:"";right:0;height:80%;top:0;bottom:0;margin:auto;width:1px;background-color:rgba(255,255,255,.05)}cism-system-graphic-holder[_ngcontent-%COMP%]:nth-child(4n+3), cism-system-graphic-holder[_ngcontent-%COMP%]:nth-child(4n+4){background-color:rgba(255,255,255,.04)}cism-system-graphic-holder[_ngcontent-%COMP%]:last-child{-ms-flex:1 100%;flex:1 100%;max-width:100%}}'],changeDetection:0}),t})();var ne=i(95601),se=i(17238);const ae=["ngx-combo-charts-series-vertical",""];function oe(t,e){if(1&t){const t=a.EpF();a.O4$(),a.TgZ(0,"g",1),a.NdJ("select",function(e){return a.CHM(t),a.oxw().onClick(e)})("activate",function(e){return a.CHM(t),a.oxw().activate.emit(e)})("deactivate",function(e){return a.CHM(t),a.oxw().deactivate.emit(e)}),a.qZA()}if(2&t){const t=e.$implicit,i=a.oxw();a.Q6J("@animationState","active")("width",t.width)("height",t.height)("x",t.x)("y",t.y)("fill",t.color)("stops",t.gradientStops)("data",t.data)("orientation","vertical")("roundEdges",t.roundEdges)("gradient",i.gradient)("isActive",i.isActive(t.data))("animations",i.animations)("noBarWhenZero",i.noBarWhenZero)("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",t.tooltipText)}}let re=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!0,this.animations=!0,this.noBarWhenZero=!0,this.select=new a.vpe,this.activate=new a.vpe,this.deactivate=new a.vpe,this.bandwidth=new a.vpe}ngOnChanges(t){this.update()}update(){let t;this.series.length&&(t=this.xScale.bandwidth(),this.bandwidth.emit(t));let e,i=0;"normalized"===this.type&&(e=this.series.map(t=>t.value).reduce((t,e)=>t+e,0)),this.bars=this.series.map((n,s)=>{let a=n.value;const o=n.name,r=(0,j.N4)(o),c={value:a,label:o,roundEdges:"standard"===this.type,data:n,width:t,formattedLabel:r,height:0,x:0,y:0};if("standard"===this.type)c.height=Math.abs(this.yScale(a)-this.yScale(0)),c.x=this.xScale(o),c.y=this.yScale(a<0?0:a);else if("stacked"===this.type){const t=i,e=t+a;i+=a,c.height=this.yScale(t)-this.yScale(e),c.x=0,c.y=this.yScale(e),c.offset0=t,c.offset1=e}else if("normalized"===this.type){let t=i,n=t+a;i+=a,e>0?(t=100*t/e,n=100*n/e):(t=0,n=0),c.height=this.yScale(t)-this.yScale(n),c.x=0,c.y=this.yScale(n),c.offset0=t,c.offset1=n,a=(n-t).toFixed(2)+"%"}"ordinal"===this.colors.scaleType?c.color=this.colors.getColor(o):"standard"===this.type?(c.color=this.colors.getColor(a),c.gradientStops=this.colors.getLinearGradientStops(a)):(c.color=this.colors.getColor(c.offset1),c.gradientStops=this.colors.getLinearGradientStops(c.offset1,c.offset0));let l=r;this.seriesName&&(l=`${this.seriesName} \u2022 ${r}`),this.getSeriesTooltips(this.seriesLine,s);const h=this.seriesLine[0].series[s].value;return c.tooltipText=`\n <span class="tooltip-label">${l}</span>\n <span class="tooltip-val"> Y1 - ${a.toLocaleString()} \u2022 Y2 - ${h.toLocaleString()}%</span>\n `,c})}getSeriesTooltips(t,e){return t.map(t=>t.series[e])}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.name===e.name&&t.series===e.series)}onClick(t){this.select.emit(t)}trackBy(t,e){return e.label}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Xpm({type:t,selectors:[["g","ngx-combo-charts-series-vertical",""]],inputs:{dims:"dims",type:"type",series:"series",seriesLine:"seriesLine",xScale:"xScale",yScale:"yScale",colors:"colors",tooltipDisabled:"tooltipDisabled",gradient:"gradient",activeEntries:"activeEntries",seriesName:"seriesName",animations:"animations",noBarWhenZero:"noBarWhenZero"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",bandwidth:"bandwidth"},features:[a.TTD],attrs:ae,decls:1,vars:2,consts:[["ngx-charts-bar","","ngx-tooltip","",3,"width","height","x","y","fill","stops","data","orientation","roundEdges","gradient","isActive","animations","noBarWhenZero","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","select","activate","deactivate",4,"ngFor","ngForOf","ngForTrackBy"],["ngx-charts-bar","","ngx-tooltip","",3,"width","height","x","y","fill","stops","data","orientation","roundEdges","gradient","isActive","animations","noBarWhenZero","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","select","activate","deactivate"]],template:function(t,e){1&t&&a.YNc(0,oe,1,18,"g",0),2&t&&a.Q6J("ngForOf",e.bars)("ngForTrackBy",e.trackBy)},directives:[n.sg,j.R2,j.i9],encapsulation:2,data:{animation:[(0,se.X$)("animationState",[(0,se.eR)("* => void",[(0,se.oB)({opacity:1,transform:"*"}),(0,se.jt)(500,(0,se.oB)({opacity:0,transform:"scale(0)"}))])])]},changeDetection:0}),t})();const ce=[{path:"",pathMatch:"prefix",component:ie}];let le=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.oAB({type:t}),t.\u0275inj=a.cJS({imports:[[s.Bz.forChild(ce),ne.m,n.ez,O.$l.forFeature([rt.ZP,T.gH]),Ot.forRoot()]]}),t})();a.B6R(Ut,[j.xH,n.O5,j.IL,j.Mq,re,n.sg,j.Bk,j.sG,j.gv],[])}}]);