(self.webpackChunkPulseClient=self.webpackChunkPulseClient||[]).push([[179],{12362:(Se,pe,r)=>{"use strict";r.d(pe,{Is:()=>o,vT:()=>u});var t=r(69808),e=r(5e3);const a=new e.InjectionToken("cdk-dir-doc",{providedIn:"root",factory:function s(){return(0,e.inject)(t.K0)}});class o{constructor(x){if(this.value="ltr",this.change=new e.EventEmitter,x){const m=x.documentElement?x.documentElement.dir:null,E=(x.body?x.body.dir:null)||m;this.value="ltr"===E||"rtl"===E?E:"ltr"}}ngOnDestroy(){this.change.complete()}}o.\u0275fac=function(x){return new(x||o)(e.\u0275\u0275inject(a,8))},o.\u0275prov=e.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac,providedIn:"root"}),o.ngInjectableDef=(0,e.defineInjectable)({factory:function(){return new o((0,e.inject)(a,8))},token:o,providedIn:"root"});let u=(()=>{class g{}return g.\u0275fac=function(i){return new(i||g)},g.\u0275mod=e.\u0275\u0275defineNgModule({type:g}),g.\u0275inj=e.\u0275\u0275defineInjector({}),g})()},47507:(Se,pe,r)=>{"use strict";r.d(pe,{Eq:()=>o,HM:()=>d,Ig:()=>e,fI:()=>u,su:()=>a});var t=r(5e3);function e(g){return null!=g&&"false"!=`${g}`}function a(g,x=0){return function s(g){return!isNaN(parseFloat(g))&&!isNaN(Number(g))}(g)?Number(g):x}function o(g){return Array.isArray(g)?g:[g]}function d(g){return null==g?"":"string"==typeof g?g:`${g}px`}function u(g){return g instanceof t.ElementRef?g.nativeElement:g}},89055:(Se,pe,r)=>{"use strict";r.d(pe,{Yg:()=>P,xu:()=>h});var t=r(5e3),e=r(96142),a=r(56498),s=r(66688),o=r(67043),d=r(24850);function u(O,T,c){return c?u(O,T).pipe((0,d.U)(M=>(0,s.k)(M)?c(...M):c(M))):new a.y(M=>{const w=(...D)=>M.next(1===D.length?D[0]:D);let R;try{R=O(w)}catch(D){return void M.error(D)}if((0,o.m)(T))return()=>T(w,R)})}var g=r(8929),x=r(36053),i=r(8139),m=r(80013),E=r(1059),C=r(7625),v=r(47507);let h=(()=>{class O{}return O.\u0275fac=function(c){return new(c||O)},O.\u0275mod=t.\u0275\u0275defineNgModule({type:O}),O.\u0275inj=t.\u0275\u0275defineInjector({}),O})();const S=new Set;let p;class L{constructor(T){this.platform=T,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):j}matchMedia(T){return this.platform.WEBKIT&&function N(O){if(!S.has(O))try{p||(p=document.createElement("style"),p.setAttribute("type","text/css"),document.head.appendChild(p)),p.sheet&&(p.sheet.insertRule(`@media ${O} {.fx-query-test{ }}`,0),S.add(O))}catch(T){console.error(T)}}(T),this._matchMedia(T)}}function j(O){return{matches:"all"===O||""===O,media:O,addListener:()=>{},removeListener:()=>{}}}L.\u0275fac=function(T){return new(T||L)(t.\u0275\u0275inject(e.t4))},L.\u0275prov=t.\u0275\u0275defineInjectable({token:L,factory:L.\u0275fac,providedIn:"root"}),L.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new L((0,t.inject)(e.t4))},token:L,providedIn:"root"});class P{constructor(T,c){this.mediaMatcher=T,this.zone=c,this._queries=new Map,this._destroySubject=new g.xQ}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(T){return I((0,v.Eq)(T)).some(M=>this._registerQuery(M).mql.matches)}observe(T){const M=I((0,v.Eq)(T)).map(w=>this._registerQuery(w).observable);return(0,x.aj)(M).pipe((0,m.b)(0,i.E),(0,d.U)(w=>{const R={matches:!1,breakpoints:{}};return w.forEach(D=>{R.matches=R.matches||D.matches,R.breakpoints[D.query]=D.matches}),R}))}_registerQuery(T){if(this._queries.has(T))return this._queries.get(T);const c=this.mediaMatcher.matchMedia(T);let M;const R={observable:u(D=>{M=Y=>this.zone.run(()=>D(Y)),c.addListener(M)},()=>c.removeListener(M)).pipe((0,E.O)(c),(0,d.U)(D=>({query:T,matches:D.matches})),(0,C.R)(this._destroySubject)),mql:c};return this._queries.set(T,R),R}}function I(O){return O.map(T=>T.split(",")).reduce((T,c)=>T.concat(c)).map(T=>T.trim())}P.\u0275fac=function(T){return new(T||P)(t.\u0275\u0275inject(L),t.\u0275\u0275inject(t.NgZone))},P.\u0275prov=t.\u0275\u0275defineInjectable({token:P,factory:P.\u0275fac,providedIn:"root"}),P.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new P((0,t.inject)(L),(0,t.inject)(t.NgZone))},token:P,providedIn:"root"})},96142:(Se,pe,r)=>{"use strict";r.d(pe,{EJ:()=>E,Mq:()=>v,_i:()=>h,i$:()=>m,t4:()=>s,ud:()=>o});var t=r(5e3),e=r(69808);let a;try{a="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(S){a=!1}class s{constructor(p){this._platformId=p,this.isBrowser=this._platformId?(0,e.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!a)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}s.\u0275fac=function(p){return new(p||s)(t.\u0275\u0275inject(t.PLATFORM_ID,8))},s.\u0275prov=t.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"}),s.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new s((0,t.inject)(t.PLATFORM_ID,8))},token:s,providedIn:"root"});let x,o=(()=>{class S{}return S.\u0275fac=function(L){return new(L||S)},S.\u0275mod=t.\u0275\u0275defineNgModule({type:S}),S.\u0275inj=t.\u0275\u0275defineInjector({}),S})();function m(S){return function i(){if(null==x&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>x=!0}))}finally{x=x||!1}return x}()?S:!!S.capture}const E={NORMAL:0,NEGATED:1,INVERTED:2};let C;function v(){return"object"==typeof document&&"scrollBehavior"in document.documentElement.style}function h(){if("object"!=typeof document||!document)return E.NORMAL;if(!C){const S=document.createElement("div"),p=S.style;S.dir="rtl",p.height="1px",p.width="1px",p.overflow="auto",p.visibility="hidden",p.pointerEvents="none",p.position="absolute";const L=document.createElement("div"),N=L.style;N.width="2px",N.height="1px",S.appendChild(L),document.body.appendChild(S),C=E.NORMAL,0===S.scrollLeft&&(S.scrollLeft=1,C=0===S.scrollLeft?E.NEGATED:E.INVERTED),S.parentNode.removeChild(S)}return C}E[E.NORMAL]="NORMAL",E[E.NEGATED]="NEGATED",E[E.INVERTED]="INVERTED"},30660:(Se,pe,r)=>{"use strict";r.d(pe,{xd:()=>Z,x0:()=>se,N7:()=>ce,mF:()=>X,Cl:()=>ue,Z5:()=>Re,rL:()=>me});var t=r(5e3),e=r(47507),a=r(56686),o=r(32268);const u=new class d extends o.v{flush(Ge){this.active=!0,this.scheduled=void 0;const{actions:Pe}=this;let Ae,ve=-1,Oe=Pe.length;Ge=Ge||Pe.shift();do{if(Ae=Ge.execute(Ge.state,Ge.delay))break}while(++ve0?super.requestAsyncId(Ge,Pe,Ae):(Ge.actions.push(this),Ge.scheduled||(Ge.scheduled=requestAnimationFrame(()=>Ge.flush(null))))}recycleAsyncId(Ge,Pe,Ae=0){if(null!==Ae&&Ae>0||null===Ae&&this.delay>0)return super.recycleAsyncId(Ge,Pe,Ae);0===Ge.actions.length&&(cancelAnimationFrame(Pe),Ge.scheduled=void 0)}});var x=r(8929),i=r(21086),m=r(56498),E=r(23753),C=r(8139),v=r(36787),h=r(43489);class p{call(Ge,Pe){return Pe.subscribe(new L(Ge))}}class L extends h.L{constructor(Ge){super(Ge),this.hasPrev=!1}_next(Ge){let Pe;this.hasPrev?Pe=[this.prev,Ge]:this.hasPrev=!0,this.prev=Ge,Pe&&this.destination.next(Pe)}}var N=r(75778),j=r(57138),P=r(92198),I=r(7625),A=r(1059),O=r(87545),T=r(5154),c=r(96142),M=r(12362);class D extends class w{}{constructor(Ge){super(),this._data=Ge}connect(){return this._data instanceof m.y?this._data:(0,i.of)(this._data)}disconnect(){}}class y{constructor(){this._listeners=[]}notify(Ge,Pe){for(let Ae of this._listeners)Ae(Ge,Pe)}listen(Ge){return this._listeners.push(Ge),()=>{this._listeners=this._listeners.filter(Pe=>Ge!==Pe)}}ngOnDestroy(){this._listeners=[]}}y.\u0275fac=function(Ge){return new(Ge||y)},y.\u0275prov=t.\u0275\u0275defineInjectable({token:y,factory:y.\u0275fac,providedIn:"root"}),y.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new y},token:y,providedIn:"root"});const H=["contentWrapper"],$=["*"],K=new t.InjectionToken("VIRTUAL_SCROLL_STRATEGY");class z{constructor(Ge,Pe,Ae){this._scrolledIndexChange=new x.xQ,this.scrolledIndexChange=this._scrolledIndexChange.pipe((0,N.x)()),this._viewport=null,this._itemSize=Ge,this._minBufferPx=Pe,this._maxBufferPx=Ae}attach(Ge){this._viewport=Ge,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(Ge,Pe,Ae){if(Ae0&&(ve.end=Math.min(Be,ve.end+xt),ve.start=Math.max(0,Math.floor(Pe-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(ve),this._viewport.setRenderedContentOffset(this._itemSize*ve.start),this._scrolledIndexChange.next(Math.floor(Pe))}}function G(Ne){return Ne._scrollStrategy}let Z=(()=>{class Ne{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new z(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(Pe){this._itemSize=(0,e.su)(Pe)}get minBufferPx(){return this._minBufferPx}set minBufferPx(Pe){this._minBufferPx=(0,e.su)(Pe)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(Pe){this._maxBufferPx=(0,e.su)(Pe)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return Ne.\u0275fac=function(Pe){return new(Pe||Ne)},Ne.\u0275dir=t.\u0275\u0275defineDirective({type:Ne,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[t.\u0275\u0275ProvidersFeature([{provide:K,useFactory:G,deps:[(0,t.forwardRef)(()=>Ne)]}]),t.\u0275\u0275NgOnChangesFeature]}),Ne})();class X{constructor(Ge,Pe){this._ngZone=Ge,this._platform=Pe,this._scrolled=new x.xQ,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}register(Ge){this.scrollContainers.has(Ge)||this.scrollContainers.set(Ge,Ge.elementScrolled().subscribe(()=>this._scrolled.next(Ge)))}deregister(Ge){const Pe=this.scrollContainers.get(Ge);Pe&&(Pe.unsubscribe(),this.scrollContainers.delete(Ge))}scrolled(Ge=20){return this._platform.isBrowser?new m.y(Pe=>{this._globalSubscription||this._addGlobalListener();const Ae=Ge>0?this._scrolled.pipe((0,j.e)(Ge)).subscribe(Pe):this._scrolled.subscribe(Pe);return this._scrolledCount++,()=>{Ae.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):(0,i.of)()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((Ge,Pe)=>this.deregister(Pe)),this._scrolled.complete()}ancestorScrolled(Ge,Pe){const Ae=this.getAncestorScrollContainers(Ge);return this.scrolled(Pe).pipe((0,P.h)(ve=>!ve||Ae.indexOf(ve)>-1))}getAncestorScrollContainers(Ge){const Pe=[];return this.scrollContainers.forEach((Ae,ve)=>{this._scrollableContainsElement(ve,Ge)&&Pe.push(ve)}),Pe}_scrollableContainsElement(Ge,Pe){let Ae=Pe.nativeElement,ve=Ge.getElementRef().nativeElement;do{if(Ae==ve)return!0}while(Ae=Ae.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>(0,E.R)(window.document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}X.\u0275fac=function(Ge){return new(Ge||X)(t.\u0275\u0275inject(t.NgZone),t.\u0275\u0275inject(c.t4))},X.\u0275prov=t.\u0275\u0275defineInjectable({token:X,factory:X.\u0275fac,providedIn:"root"}),X.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new X((0,t.inject)(t.NgZone),(0,t.inject)(c.t4))},token:X,providedIn:"root"});let de=(()=>{class Ne{constructor(Pe,Ae,ve,Oe){this.elementRef=Pe,this.scrollDispatcher=Ae,this.ngZone=ve,this.dir=Oe,this._destroyed=new x.xQ,this._elementScrolled=new m.y(Be=>this.ngZone.runOutsideAngular(()=>(0,E.R)(this.elementRef.nativeElement,"scroll").pipe((0,I.R)(this._destroyed)).subscribe(Be)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(Pe){const Ae=this.elementRef.nativeElement,ve=this.dir&&"rtl"==this.dir.value;Pe.left=null==Pe.left?ve?Pe.end:Pe.start:Pe.left,Pe.right=null==Pe.right?ve?Pe.start:Pe.end:Pe.right,null!=Pe.bottom&&(Pe.top=Ae.scrollHeight-Ae.clientHeight-Pe.bottom),ve&&(0,c._i)()!=c.EJ.NORMAL?(null!=Pe.left&&(Pe.right=Ae.scrollWidth-Ae.clientWidth-Pe.left),(0,c._i)()==c.EJ.INVERTED?Pe.left=Pe.right:(0,c._i)()==c.EJ.NEGATED&&(Pe.left=Pe.right?-Pe.right:Pe.right)):null!=Pe.right&&(Pe.left=Ae.scrollWidth-Ae.clientWidth-Pe.right),this._applyScrollToOptions(Pe)}_applyScrollToOptions(Pe){const Ae=this.elementRef.nativeElement;(0,c.Mq)()?Ae.scrollTo(Pe):(null!=Pe.top&&(Ae.scrollTop=Pe.top),null!=Pe.left&&(Ae.scrollLeft=Pe.left))}measureScrollOffset(Pe){const Ae="left",Oe=this.elementRef.nativeElement;if("top"==Pe)return Oe.scrollTop;if("bottom"==Pe)return Oe.scrollHeight-Oe.clientHeight-Oe.scrollTop;const Be=this.dir&&"rtl"==this.dir.value;return"start"==Pe?Pe=Be?"right":Ae:"end"==Pe&&(Pe=Be?Ae:"right"),Be&&(0,c._i)()==c.EJ.INVERTED?Pe==Ae?Oe.scrollWidth-Oe.clientWidth-Oe.scrollLeft:Oe.scrollLeft:Be&&(0,c._i)()==c.EJ.NEGATED?Pe==Ae?Oe.scrollLeft+Oe.scrollWidth-Oe.clientWidth:-Oe.scrollLeft:Pe==Ae?Oe.scrollLeft:Oe.scrollWidth-Oe.clientWidth-Oe.scrollLeft}}return Ne.\u0275fac=function(Pe){return new(Pe||Ne)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(X),t.\u0275\u0275directiveInject(t.NgZone),t.\u0275\u0275directiveInject(M.Is,8))},Ne.\u0275dir=t.\u0275\u0275defineDirective({type:Ne,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),Ne})();const te="undefined"!=typeof requestAnimationFrame?u:C.E;let ce=(()=>{class Ne extends de{constructor(Pe,Ae,ve,Oe,Be,ze){if(super(Pe,ze,ve,Be),this.elementRef=Pe,this._changeDetectorRef=Ae,this._scrollStrategy=Oe,this._detachedSubject=new x.xQ,this._renderedRangeSubject=new x.xQ,this.orientation="vertical",this.scrolledIndexChange=new m.y(qe=>this._scrollStrategy.scrolledIndexChange.subscribe(xt=>Promise.resolve().then(()=>this.ngZone.run(()=>qe.next(xt))))),this.renderedRangeStream=this._renderedRangeSubject.asObservable(),this._totalContentSizeTransform="",this._totalContentSize=0,this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],!Oe)throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.')}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe((0,A.O)(null),(0,j.e)(0,te)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),super.ngOnDestroy()}attach(Pe){if(this._forOf)throw Error("CdkVirtualScrollViewport is already attached.");this.ngZone.runOutsideAngular(()=>{this._forOf=Pe,this._forOf.dataStream.pipe((0,I.R)(this._detachedSubject)).subscribe(Ae=>{const ve=Ae.length;ve!==this._dataLength&&(this._dataLength=ve,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}setTotalContentSize(Pe){this._totalContentSize!==Pe&&(this._totalContentSize=Pe,this._totalContentSizeTransform=`scale${"horizontal"==this.orientation?"X":"Y"}(${this._totalContentSize})`,this._markChangeDetectionNeeded())}setRenderedRange(Pe){(function fe(Ne,Ge){return Ne.start==Ge.start&&Ne.end==Ge.end})(this._renderedRange,Pe)||(this._renderedRangeSubject.next(this._renderedRange=Pe),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(Pe,Ae="to-start"){const Oe="horizontal"==this.orientation,Be=Oe?"X":"Y";let qe=`translate${Be}(${Number((Oe&&this.dir&&"rtl"==this.dir.value?-1:1)*Pe)}px)`;this._renderedContentOffset=Pe,"to-end"===Ae&&(qe+=` translate${Be}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=qe&&(this._renderedContentTransform=qe,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(Pe,Ae="auto"){const ve={behavior:Ae};"horizontal"===this.orientation?ve.start=Pe:ve.top=Pe,this.scrollTo(ve)}scrollToIndex(Pe,Ae="auto"){this._scrollStrategy.scrollToIndex(Pe,Ae)}measureScrollOffset(Pe){return super.measureScrollOffset(Pe||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const Pe=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?Pe.offsetWidth:Pe.offsetHeight}measureRangeSize(Pe){return this._forOf?this._forOf.measureRangeSize(Pe,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const Pe=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?Pe.clientWidth:Pe.clientHeight}_markChangeDetectionNeeded(Pe){Pe&&this._runAfterChangeDetection.push(Pe),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this.ngZone.run(()=>this._changeDetectorRef.markForCheck()),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform;const Pe=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const Ae of Pe)Ae()}}return Ne.\u0275fac=function(Pe){return new(Pe||Ne)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(t.ChangeDetectorRef),t.\u0275\u0275directiveInject(t.NgZone),t.\u0275\u0275directiveInject(K,8),t.\u0275\u0275directiveInject(M.Is,8),t.\u0275\u0275directiveInject(X))},Ne.\u0275cmp=t.\u0275\u0275defineComponent({type:Ne,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(Pe,Ae){if(1&Pe&&t.\u0275\u0275viewQuery(H,5),2&Pe){let ve;t.\u0275\u0275queryRefresh(ve=t.\u0275\u0275loadQuery())&&(Ae._contentWrapper=ve.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(Pe,Ae){2&Pe&&t.\u0275\u0275classProp("cdk-virtual-scroll-orientation-horizontal","horizontal"===Ae.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==Ae.orientation)},inputs:{orientation:"orientation"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[t.\u0275\u0275ProvidersFeature([{provide:de,useExisting:Ne}]),t.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:$,decls:4,vars:2,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(Pe,Ae){1&Pe&&(t.\u0275\u0275projectionDef(),t.\u0275\u0275elementStart(0,"div",0,1),t.\u0275\u0275projection(2),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(3,"div",2)),2&Pe&&(t.\u0275\u0275advance(3),t.\u0275\u0275styleProp("transform",Ae._totalContentSizeTransform))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:0}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:0}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),Ne})();function oe(Ne,Ge){if(!Ge.getBoundingClientRect)return 0;const Ae=Ge.getBoundingClientRect();return"horizontal"==Ne?Ae.width:Ae.height}let se=(()=>{class Ne{constructor(Pe,Ae,ve,Oe,Be){this._viewContainerRef=Pe,this._template=Ae,this._differs=ve,this._viewport=Oe,this.viewChange=new x.xQ,this._dataSourceChanges=new x.xQ,this.cdkVirtualForTemplateCacheSize=20,this.dataStream=this._dataSourceChanges.pipe((0,A.O)(null),function S(){return Ne=>Ne.lift(new p)}(),(0,O.w)(([ze,qe])=>this._changeDataSource(ze,qe)),(0,T.d)(1)),this._differ=null,this._templateCache=[],this._needsUpdate=!1,this._destroyed=new x.xQ,this.dataStream.subscribe(ze=>{this._data=ze,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe((0,I.R)(this._destroyed)).subscribe(ze=>{this._renderedRange=ze,Be.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(Pe){this._cdkVirtualForOf=Pe;const Ae=function R(Ne){return Ne&&"function"==typeof Ne.connect}(Pe)?Pe:new D(Pe instanceof m.y?Pe:Array.prototype.slice.call(Pe||[]));this._dataSourceChanges.next(Ae)}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(Pe){this._needsUpdate=!0,this._cdkVirtualForTrackBy=Pe?(Ae,ve)=>Pe(Ae+(this._renderedRange?this._renderedRange.start:0),ve):void 0}set cdkVirtualForTemplate(Pe){Pe&&(this._needsUpdate=!0,this._template=Pe)}measureRangeSize(Pe,Ae){if(Pe.start>=Pe.end)return 0;if(Pe.startthis._renderedRange.end)throw Error("Error: attempted to measure an item that isn't rendered.");const ve=Pe.start-this._renderedRange.start;let Be=0,ze=Pe.end-Pe.start;for(;ze--;){const qe=this._viewContainerRef.get(ze+ve);let xt=qe?qe.rootNodes.length:0;for(;xt--;)Be+=oe(Ae,qe.rootNodes[xt])}return Be}ngDoCheck(){if(this._differ&&this._needsUpdate){const Pe=this._differ.diff(this._renderedItems);Pe?this._applyChanges(Pe):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete();for(let Pe of this._templateCache)Pe.destroy()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create(this.cdkVirtualForTrackBy)),this._needsUpdate=!0)}_changeDataSource(Pe,Ae){return Pe&&Pe.disconnect(this),this._needsUpdate=!0,Ae.connect(this)}_updateContext(){const Pe=this._data.length;let Ae=this._viewContainerRef.length;for(;Ae--;){let ve=this._viewContainerRef.get(Ae);ve.context.index=this._renderedRange.start+Ae,ve.context.count=Pe,this._updateComputedContextProperties(ve.context),ve.detectChanges()}}_applyChanges(Pe){Pe.forEachOperation((Oe,Be,ze)=>{if(null==Oe.previousIndex)this._insertViewForNewItem(ze).context.$implicit=Oe.item;else if(null==ze)this._cacheView(this._detachView(Be));else{const qe=this._viewContainerRef.get(Be);this._viewContainerRef.move(qe,ze),qe.context.$implicit=Oe.item}}),Pe.forEachIdentityChange(Oe=>{this._viewContainerRef.get(Oe.currentIndex).context.$implicit=Oe.item});const Ae=this._data.length;let ve=this._viewContainerRef.length;for(;ve--;){const Oe=this._viewContainerRef.get(ve);Oe.context.index=this._renderedRange.start+ve,Oe.context.count=Ae,this._updateComputedContextProperties(Oe.context)}}_cacheView(Pe){if(this._templateCache.length{class Ne{}return Ne.\u0275fac=function(Pe){return new(Pe||Ne)},Ne.\u0275mod=t.\u0275\u0275defineNgModule({type:Ne}),Ne.\u0275inj=t.\u0275\u0275defineInjector({imports:[[M.vT,c.ud],M.vT]}),Ne})();class me{constructor(Ge,Pe){this._platform=Ge,Pe.runOutsideAngular(()=>{this._change=Ge.isBrowser?(0,v.T)((0,E.R)(window,"resize"),(0,E.R)(window,"orientationchange")):(0,i.of)(),this._invalidateCache=this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){this._invalidateCache.unsubscribe()}getViewportSize(){this._viewportSize||this._updateViewportSize();const Ge={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),Ge}getViewportRect(){const Ge=this.getViewportScrollPosition(),{width:Pe,height:Ae}=this.getViewportSize();return{top:Ge.top,left:Ge.left,bottom:Ge.top+Ae,right:Ge.left+Pe,height:Ae,width:Pe}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const Ge=document.documentElement,Pe=Ge.getBoundingClientRect();return{top:-Pe.top||document.body.scrollTop||window.scrollY||Ge.scrollTop||0,left:-Pe.left||document.body.scrollLeft||window.scrollX||Ge.scrollLeft||0}}change(Ge=20){return Ge>0?this._change.pipe((0,j.e)(Ge)):this._change}_updateViewportSize(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}}me.\u0275fac=function(Ge){return new(Ge||me)(t.\u0275\u0275inject(c.t4),t.\u0275\u0275inject(t.NgZone))},me.\u0275prov=t.\u0275\u0275defineInjectable({token:me,factory:me.\u0275fac,providedIn:"root"}),me.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new me((0,t.inject)(c.t4),(0,t.inject)(t.NgZone))},token:me,providedIn:"root"});const Re={provide:me,deps:[[new t.Optional,new t.SkipSelf,me],c.t4,t.NgZone],useFactory:function we(Ne,Ge,Pe){return Ne||new me(Ge,Pe)}}},85876:(Se,pe,r)=>{const e=r(70532),a=r(37554),s=r(80179),o=r(1036);function d(u,g,x,i,m){const E=[].slice.call(arguments,1),C=E.length,v="function"==typeof E[C-1];if(!v&&!e())throw new Error("Callback required as last argument");if(!v){if(C<1)throw new Error("Too few arguments provided");return 1===C?(x=g,g=i=void 0):2===C&&!g.getContext&&(i=x,x=g,g=void 0),new Promise(function(h,S){try{const p=a.create(x,i);h(u(p,g,i))}catch(p){S(p)}})}if(C<2)throw new Error("Too few arguments provided");2===C?(m=x,x=g,g=i=void 0):3===C&&(g.getContext&&void 0===m?(m=i,i=void 0):(m=i,i=x,x=g,g=void 0));try{const h=a.create(x,i);m(null,u(h,g,i))}catch(h){m(h)}}pe.rT=d.bind(null,s.render),pe.hz=d.bind(null,s.renderToDataURL),pe.toString=d.bind(null,function(u,g,x){return o.render(u,x)})},70532:Se=>{Se.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},63012:(Se,pe,r)=>{const t=r(54860).getSymbolSize;pe.getRowColCoords=function(a){if(1===a)return[];const s=Math.floor(a/7)+2,o=t(a),d=145===o?26:2*Math.ceil((o-13)/(2*s-2)),u=[o-7];for(let g=1;g{const t=r(46906),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(s){this.mode=t.ALPHANUMERIC,this.data=s}a.getBitsLength=function(o){return 11*Math.floor(o/2)+o%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(o){let d;for(d=0;d+2<=this.data.length;d+=2){let u=45*e.indexOf(this.data[d]);u+=e.indexOf(this.data[d+1]),o.put(u,11)}this.data.length%2&&o.put(e.indexOf(this.data[d]),6)},Se.exports=a},43044:Se=>{function pe(){this.buffer=[],this.length=0}pe.prototype={get:function(r){const t=Math.floor(r/8);return 1==(this.buffer[t]>>>7-r%8&1)},put:function(r,t){for(let e=0;e>>t-e-1&1))},getLengthInBits:function(){return this.length},putBit:function(r){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),r&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Se.exports=pe},41973:Se=>{function pe(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}pe.prototype.set=function(r,t,e,a){const s=r*this.size+t;this.data[s]=e,a&&(this.reservedBit[s]=!0)},pe.prototype.get=function(r,t){return this.data[r*this.size+t]},pe.prototype.xor=function(r,t,e){this.data[r*this.size+t]^=e},pe.prototype.isReserved=function(r,t){return this.reservedBit[r*this.size+t]},Se.exports=pe},81824:(Se,pe,r)=>{const t=r(38419),e=r(46906);function a(s){this.mode=e.BYTE,this.data=new Uint8Array(t(s))}a.getBitsLength=function(o){return 8*o},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(s){for(let o=0,d=this.data.length;o{const t=r(9020),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];pe.getBlocksCount=function(o,d){switch(d){case t.L:return e[4*(o-1)+0];case t.M:return e[4*(o-1)+1];case t.Q:return e[4*(o-1)+2];case t.H:return e[4*(o-1)+3];default:return}},pe.getTotalCodewordsCount=function(o,d){switch(d){case t.L:return a[4*(o-1)+0];case t.M:return a[4*(o-1)+1];case t.Q:return a[4*(o-1)+2];case t.H:return a[4*(o-1)+3];default:return}}},9020:(Se,pe)=>{pe.L={bit:1},pe.M={bit:0},pe.Q={bit:3},pe.H={bit:2},pe.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},pe.from=function(e,a){if(pe.isValid(e))return e;try{return function r(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return pe.L;case"m":case"medium":return pe.M;case"q":case"quartile":return pe.Q;case"h":case"high":return pe.H;default:throw new Error("Unknown EC Level: "+t)}}(e)}catch(s){return a}}},39172:(Se,pe,r)=>{const t=r(54860).getSymbolSize;pe.getPositions=function(s){const o=t(s);return[[0,0],[o-7,0],[0,o-7]]}},50611:(Se,pe,r)=>{const t=r(54860),s=t.getBCHDigit(1335);pe.getEncodedBits=function(d,u){const g=d.bit<<3|u;let x=g<<10;for(;t.getBCHDigit(x)-s>=0;)x^=1335<{const r=new Uint8Array(512),t=new Uint8Array(256);(function(){let a=1;for(let s=0;s<255;s++)r[s]=a,t[a]=s,a<<=1,256&a&&(a^=285);for(let s=255;s<512;s++)r[s]=r[s-255]})(),pe.log=function(a){if(a<1)throw new Error("log("+a+")");return t[a]},pe.exp=function(a){return r[a]},pe.mul=function(a,s){return 0===a||0===s?0:r[t[a]+t[s]]}},98043:(Se,pe,r)=>{const t=r(46906),e=r(54860);function a(s){this.mode=t.KANJI,this.data=s}a.getBitsLength=function(o){return 13*o},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(s){let o;for(o=0;o=33088&&d<=40956)d-=33088;else{if(!(d>=57408&&d<=60351))throw new Error("Invalid SJIS character: "+this.data[o]+"\nMake sure your charset is UTF-8");d-=49472}d=192*(d>>>8&255)+(255&d),s.put(d,13)}},Se.exports=a},77135:(Se,pe)=>{pe.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function t(e,a,s){switch(e){case pe.Patterns.PATTERN000:return(a+s)%2==0;case pe.Patterns.PATTERN001:return a%2==0;case pe.Patterns.PATTERN010:return s%3==0;case pe.Patterns.PATTERN011:return(a+s)%3==0;case pe.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(s/3))%2==0;case pe.Patterns.PATTERN101:return a*s%2+a*s%3==0;case pe.Patterns.PATTERN110:return(a*s%2+a*s%3)%2==0;case pe.Patterns.PATTERN111:return(a*s%3+(a+s)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}pe.isValid=function(a){return null!=a&&""!==a&&!isNaN(a)&&a>=0&&a<=7},pe.from=function(a){return pe.isValid(a)?parseInt(a,10):void 0},pe.getPenaltyN1=function(a){const s=a.size;let o=0,d=0,u=0,g=null,x=null;for(let i=0;i=5&&(o+=d-5+3),g=E,d=1),E=a.get(m,i),E===x?u++:(u>=5&&(o+=u-5+3),x=E,u=1)}d>=5&&(o+=d-5+3),u>=5&&(o+=u-5+3)}return o},pe.getPenaltyN2=function(a){const s=a.size;let o=0;for(let d=0;d=10&&(1488===d||93===d)&&o++,u=u<<1&2047|a.get(x,g),x>=10&&(1488===u||93===u)&&o++}return 40*o},pe.getPenaltyN4=function(a){let s=0;const o=a.data.length;for(let u=0;u{const t=r(2316),e=r(54677);pe.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},pe.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},pe.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},pe.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},pe.MIXED={bit:-1},pe.getCharCountIndicator=function(o,d){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(d))throw new Error("Invalid version: "+d);return d>=1&&d<10?o.ccBits[0]:d<27?o.ccBits[1]:o.ccBits[2]},pe.getBestModeForData=function(o){return e.testNumeric(o)?pe.NUMERIC:e.testAlphanumeric(o)?pe.ALPHANUMERIC:e.testKanji(o)?pe.KANJI:pe.BYTE},pe.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},pe.isValid=function(o){return o&&o.bit&&o.ccBits},pe.from=function(o,d){if(pe.isValid(o))return o;try{return function a(s){if("string"!=typeof s)throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return pe.NUMERIC;case"alphanumeric":return pe.ALPHANUMERIC;case"kanji":return pe.KANJI;case"byte":return pe.BYTE;default:throw new Error("Unknown mode: "+s)}}(o)}catch(u){return d}}},86002:(Se,pe,r)=>{const t=r(46906);function e(a){this.mode=t.NUMERIC,this.data=a.toString()}e.getBitsLength=function(s){return 10*Math.floor(s/3)+(s%3?s%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(s){let o,d,u;for(o=0;o+3<=this.data.length;o+=3)d=this.data.substr(o,3),u=parseInt(d,10),s.put(u,10);const g=this.data.length-o;g>0&&(d=this.data.substr(o),u=parseInt(d,10),s.put(u,3*g+1))},Se.exports=e},47793:(Se,pe,r)=>{const t=r(37794);pe.mul=function(a,s){const o=new Uint8Array(a.length+s.length-1);for(let d=0;d=0;){const d=o[0];for(let g=0;g{const t=r(54860),e=r(9020),a=r(43044),s=r(41973),o=r(63012),d=r(39172),u=r(77135),g=r(96194),x=r(68098),i=r(6602),m=r(50611),E=r(46906),C=r(19465);function L(A,O,T){const c=A.size,M=m.getEncodedBits(O,T);let w,R;for(w=0;w<15;w++)R=1==(M>>w&1),A.set(w<6?w:w<8?w+1:c-15+w,8,R,!0),A.set(8,w<8?c-w-1:w<9?15-w-1+1:15-w-1,R,!0);A.set(c-8,8,1,!0)}function I(A,O,T,c){let M;if(Array.isArray(A))M=C.fromArray(A);else{if("string"!=typeof A)throw new Error("Invalid data");{let _=O;if(!_){const y=C.rawSplit(A);_=i.getBestVersionForData(y,T)}M=C.fromString(A,_||40)}}const w=i.getBestVersionForData(M,T);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(O){if(O=0&&D<=6&&(0===Y||6===Y)||Y>=0&&Y<=6&&(0===D||6===D)||D>=2&&D<=4&&Y>=2&&Y<=4,!0)}}(Y,O),function h(A){const O=A.size;for(let T=8;T=7&&function p(A,O){const T=A.size,c=i.getEncodedBits(O);let M,w,R;for(let D=0;D<18;D++)M=Math.floor(D/3),w=D%3+T-8-3,R=1==(c>>D&1),A.set(M,w,R,!0),A.set(w,M,R,!0)}(Y,O),function N(A,O){const T=A.size;let c=-1,M=T-1,w=7,R=0;for(let D=T-1;D>0;D-=2)for(6===D&&D--;;){for(let Y=0;Y<2;Y++)if(!A.isReserved(M,D-Y)){let _=!1;R>>w&1)),A.set(M,D-Y,_),w--,-1===w&&(R++,w=7)}if(M+=c,M<0||T<=M){M-=c,c=-c;break}}}(Y,R),isNaN(c)&&(c=u.getBestMask(Y,L.bind(null,Y,T))),u.applyMask(c,Y),L(Y,T,c),{modules:Y,version:O,errorCorrectionLevel:T,maskPattern:c,segments:M}}pe.create=function(O,T){if(void 0===O||""===O)throw new Error("No input text");let M,w,c=e.M;return void 0!==T&&(c=e.from(T.errorCorrectionLevel,e.M),M=i.from(T.version),w=u.from(T.maskPattern),T.toSJISFunc&&t.setToSJISFunction(T.toSJISFunc)),I(O,M,c,w)}},68098:(Se,pe,r)=>{const t=r(47793);function e(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}e.prototype.initialize=function(s){this.degree=s,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(s){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(s.length+this.degree);o.set(s);const d=t.mod(o,this.genPoly),u=this.degree-d.length;if(u>0){const g=new Uint8Array(this.degree);return g.set(d,u),g}return d},Se.exports=e},54677:(Se,pe)=>{const r="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const a="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";pe.KANJI=new RegExp(e,"g"),pe.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),pe.BYTE=new RegExp(a,"g"),pe.NUMERIC=new RegExp(r,"g"),pe.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const s=new RegExp("^"+e+"$"),o=new RegExp("^"+r+"$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");pe.testKanji=function(g){return s.test(g)},pe.testNumeric=function(g){return o.test(g)},pe.testAlphanumeric=function(g){return d.test(g)}},19465:(Se,pe,r)=>{const t=r(46906),e=r(86002),a=r(30812),s=r(81824),o=r(98043),d=r(54677),u=r(54860),g=r(74901);function x(p){return unescape(encodeURIComponent(p)).length}function i(p,L,N){const j=[];let P;for(;null!==(P=p.exec(N));)j.push({data:P[0],index:P.index,mode:L,length:P[0].length});return j}function m(p){const L=i(d.NUMERIC,t.NUMERIC,p),N=i(d.ALPHANUMERIC,t.ALPHANUMERIC,p);let j,P;return u.isKanjiModeEnabled()?(j=i(d.BYTE,t.BYTE,p),P=i(d.KANJI,t.KANJI,p)):(j=i(d.BYTE_KANJI,t.BYTE,p),P=[]),L.concat(N,j,P).sort(function(A,O){return A.index-O.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function E(p,L){switch(L){case t.NUMERIC:return e.getBitsLength(p);case t.ALPHANUMERIC:return a.getBitsLength(p);case t.KANJI:return o.getBitsLength(p);case t.BYTE:return s.getBitsLength(p)}}function S(p,L){let N;const j=t.getBestModeForData(p);if(N=t.from(L,j),N!==t.BYTE&&N.bit=0?L[L.length-1]:null;return j&&j.mode===N.mode?(L[L.length-1].data+=N.data,L):(L.push(N),L)},[])}(O))},pe.rawSplit=function(L){return pe.fromArray(m(L,u.isKanjiModeEnabled()))}},54860:(Se,pe)=>{let r;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];pe.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return 4*a+17},pe.getSymbolTotalCodewords=function(a){return t[a]},pe.getBCHDigit=function(e){let a=0;for(;0!==e;)a++,e>>>=1;return a},pe.setToSJISFunction=function(a){if("function"!=typeof a)throw new Error('"toSJISFunc" is not a valid function.');r=a},pe.isKanjiModeEnabled=function(){return void 0!==r},pe.toSJIS=function(a){return r(a)}},2316:(Se,pe)=>{pe.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},6602:(Se,pe,r)=>{const t=r(54860),e=r(96194),a=r(9020),s=r(46906),o=r(2316),u=t.getBCHDigit(7973);function x(E,C){return s.getCharCountIndicator(E,C)+4}function i(E,C){let v=0;return E.forEach(function(h){v+=x(h.mode,C)+h.getBitsLength()}),v}pe.from=function(C,v){return o.isValid(C)?parseInt(C,10):v},pe.getCapacity=function(C,v,h){if(!o.isValid(C))throw new Error("Invalid QR Code version");void 0===h&&(h=s.BYTE);const L=8*(t.getSymbolTotalCodewords(C)-e.getTotalCodewordsCount(C,v));if(h===s.MIXED)return L;const N=L-x(h,C);switch(h){case s.NUMERIC:return Math.floor(N/10*3);case s.ALPHANUMERIC:return Math.floor(N/11*2);case s.KANJI:return Math.floor(N/13);default:return Math.floor(N/8)}},pe.getBestVersionForData=function(C,v){let h;const S=a.from(v,a.M);if(Array.isArray(C)){if(C.length>1)return function m(E,C){for(let v=1;v<=40;v++)if(i(E,v)<=pe.getCapacity(v,C,s.MIXED))return v}(C,S);if(0===C.length)return 1;h=C[0]}else h=C;return function g(E,C,v){for(let h=1;h<=40;h++)if(C<=pe.getCapacity(h,v,E))return h}(h.mode,h.getLength(),S)},pe.getEncodedBits=function(C){if(!o.isValid(C)||C<7)throw new Error("Invalid QR Code version");let v=C<<12;for(;t.getBCHDigit(v)-u>=0;)v^=7973<{const t=r(90714);pe.render=function(o,d,u){let g=u,x=d;void 0===g&&(!d||!d.getContext)&&(g=d,d=void 0),d||(x=function a(){try{return document.createElement("canvas")}catch(s){throw new Error("You need to specify a canvas element")}}()),g=t.getOptions(g);const i=t.getImageWidth(o.modules.size,g),m=x.getContext("2d"),E=m.createImageData(i,i);return t.qrToImageData(E.data,o,g),function e(s,o,d){s.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=d,o.width=d,o.style.height=d+"px",o.style.width=d+"px"}(m,x,i),m.putImageData(E,0,0),x},pe.renderToDataURL=function(o,d,u){let g=u;return void 0===g&&(!d||!d.getContext)&&(g=d,d=void 0),g||(g={}),pe.render(o,d,g).toDataURL(g.type||"image/png",(g.rendererOpts||{}).quality)}},1036:(Se,pe,r)=>{const t=r(90714);function e(o,d){const u=o.a/255,g=d+'="'+o.hex+'"';return u<1?g+" "+d+'-opacity="'+u.toFixed(2).slice(1)+'"':g}function a(o,d,u){let g=o+d;return void 0!==u&&(g+=" "+u),g}pe.render=function(d,u,g){const x=t.getOptions(u),i=d.modules.size,m=d.modules.data,E=i+2*x.margin,C=x.color.light.a?"':"",v="0&&C>0&&o[E-1]||(g+=i?a("M",C+u,.5+v+u):a("m",x,0),x=0,i=!1),C+1',p=''+C+v+"\n";return"function"==typeof g&&g(null,p),p}},90714:(Se,pe)=>{function r(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);(3===e.length||4===e.length)&&(e=Array.prototype.concat.apply([],e.map(function(s){return[s,s]}))),6===e.length&&e.push("F","F");const a=parseInt(e.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:255&a,hex:"#"+e.slice(0,6).join("")}}pe.getOptions=function(e){e||(e={}),e.color||(e.color={});const s=e.width&&e.width>=21?e.width:void 0;return{width:s,scale:s?4:e.scale||4,margin:null==e.margin||e.margin<0?4:e.margin,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},pe.getScale=function(e,a){return a.width&&a.width>=e+2*a.margin?a.width/(e+2*a.margin):a.scale},pe.getImageWidth=function(e,a){const s=pe.getScale(e,a);return Math.floor((e+2*a.margin)*s)},pe.qrToImageData=function(e,a,s){const o=a.modules.size,d=a.modules.data,u=pe.getScale(o,s),g=Math.floor((o+2*s.margin)*u),x=s.margin*u,i=[s.color.light,s.color.dark];for(let m=0;m=x&&E>=x&&m{"use strict";r.d(pe,{cu:()=>P,rN:()=>j,KL:()=>I,VY:()=>S});var t=r(96438),e=r(38587),a=r(66404),s=r(36714),o=r(39824),d=r(3392),u=r(84328),g=r(83208),x=r(83486);function i(A,O){var T=new t.Z(A,O||{},e.mc);return T.init(),T}(0,u.xN)(g.n),i.editors={BaseEditor:x.Hf},i.Core=function(A){var O=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new t.Z(A,O,e.mc)},i.DefaultSettings=(0,a.Z)(),i.hooks=s.Z.getSingleton(),i.packageName="handsontable",i.buildDate="08/07/2022 15:24:08",i.version="12.1.2",i.languages={dictionaryKeys:d,getLanguageDictionary:o.qG,getLanguagesDictionaries:o.vq,registerLanguageDictionary:o.MG,getTranslatedPhrase:o.vk};const m=i;var E=r(5e3);const C=["container"],v=new Map,h="The Handsontable instance bound to this component was destroyed and cannot be used properly.";let S=(()=>{class A{getInstance(T){const c=v.get(T);return c.isDestroyed?(console.warn(h),null):c}registerInstance(T,c){return v.set(T,c)}removeInstance(T){return v.delete(T)}}return A.\u0275fac=function(T){return new(T||A)},A.\u0275prov=E.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac}),A})();const p=Object.keys(m.DefaultSettings),L=m.hooks.getRegistered();let N=(()=>{class A{mergeSettings(T){const c="object"==typeof T.settings,M=c?T.settings:{};return L.concat(p).forEach(R=>{const D=L.indexOf(R)>-1;let Y;c&&D&&(Y=T.settings[R]),void 0!==T[R]&&(Y=T[R]),void 0!==Y&&(M[R]="function"==typeof Y&&D?function(..._){return T._ngZone.run(()=>Y.apply(this,_))}:Y)}),M}prepareChanges(T){const c={};return Object.keys(T).forEach(w=>{T.hasOwnProperty(w)&&(c[w]=T[w].currentValue)}),c}}return A.\u0275fac=function(T){return new(T||A)},A.\u0275prov=E.\u0275\u0275defineInjectable({token:A,factory:A.\u0275fac}),A})(),j=(()=>{class A{constructor(T,c,M){this._ngZone=T,this._hotTableRegisterer=c,this._hotSettingsResolver=M,this.__hotInstance=null,this.columnsComponents=[],this.hotId=""}get hotInstance(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(this._hotTableRegisterer.removeInstance(this.hotId),console.warn(h),null)}set hotInstance(T){this.__hotInstance=T}ngAfterViewInit(){const T=this._hotSettingsResolver.mergeSettings(this);if(this.columnsComponents.length>0){const c=[];this.columnsComponents.forEach(M=>{c.push(this._hotSettingsResolver.mergeSettings(M))}),T.columns=c}this._ngZone.runOutsideAngular(()=>{this.hotInstance=new m.Core(this.container.nativeElement,T),this.hotId&&this._hotTableRegisterer.registerInstance(this.hotId,this.hotInstance),this.hotInstance.init()})}ngOnChanges(T){if(null===this.hotInstance)return;const c=this._hotSettingsResolver.prepareChanges(T);this.updateHotTable(c)}ngOnDestroy(){this._ngZone.runOutsideAngular(()=>{this.hotInstance&&this.hotInstance.destroy()}),this.hotId&&this._hotTableRegisterer.removeInstance(this.hotId)}updateHotTable(T){!this.hotInstance||this._ngZone.runOutsideAngular(()=>{this.hotInstance.updateSettings(T,!1)})}onAfterColumnsChange(){if(void 0!==this.columnsComponents&&this.columnsComponents.length>0){const T=[];this.columnsComponents.forEach(M=>{T.push(this._hotSettingsResolver.mergeSettings(M))}),this.updateHotTable({columns:T})}}onAfterColumnsNumberChange(){const T=[];this.columnsComponents.length>0&&this.columnsComponents.forEach(c=>{T.push(this._hotSettingsResolver.mergeSettings(c))}),this.updateHotTable({columns:T})}addColumn(T){this.columnsComponents.push(T),this.onAfterColumnsNumberChange()}removeColumn(T){const c=this.columnsComponents.indexOf(T);this.columnsComponents.splice(c,1),this.onAfterColumnsNumberChange()}}return A.\u0275fac=function(T){return new(T||A)(E.\u0275\u0275directiveInject(E.NgZone),E.\u0275\u0275directiveInject(S),E.\u0275\u0275directiveInject(N))},A.\u0275cmp=E.\u0275\u0275defineComponent({type:A,selectors:[["hot-table"]],viewQuery:function(T,c){if(1&T&&E.\u0275\u0275viewQuery(C,5),2&T){let M;E.\u0275\u0275queryRefresh(M=E.\u0275\u0275loadQuery())&&(c.container=M.first)}},inputs:{hotId:"hotId",settings:"settings",activeHeaderClassName:"activeHeaderClassName",allowEmpty:"allowEmpty",allowHtml:"allowHtml",allowInsertColumn:"allowInsertColumn",allowInsertRow:"allowInsertRow",allowInvalid:"allowInvalid",allowRemoveColumn:"allowRemoveColumn",allowRemoveRow:"allowRemoveRow",autoColumnSize:"autoColumnSize",autoRowSize:"autoRowSize",autoWrapCol:"autoWrapCol",autoWrapRow:"autoWrapRow",bindRowsWithHeaders:"bindRowsWithHeaders",cell:"cell",cells:"cells",checkedTemplate:"checkedTemplate",className:"className",colHeaders:"colHeaders",collapsibleColumns:"collapsibleColumns",columnHeaderHeight:"columnHeaderHeight",columns:"columns",columnSorting:"columnSorting",columnSummary:"columnSummary",colWidths:"colWidths",commentedCellClassName:"commentedCellClassName",comments:"comments",contextMenu:"contextMenu",copyable:"copyable",copyPaste:"copyPaste",correctFormat:"correctFormat",currentColClassName:"currentColClassName",currentHeaderClassName:"currentHeaderClassName",currentRowClassName:"currentRowClassName",customBorders:"customBorders",data:"data",dataSchema:"dataSchema",dateFormat:"dateFormat",defaultDate:"defaultDate",disableVisualSelection:"disableVisualSelection",dragToScroll:"dragToScroll",dropdownMenu:"dropdownMenu",editor:"editor",enterBeginsEditing:"enterBeginsEditing",enterMoves:"enterMoves",fillHandle:"fillHandle",filter:"filter",filteringCaseSensitive:"filteringCaseSensitive",filters:"filters",fixedColumnsLeft:"fixedColumnsLeft",fixedColumnsStart:"fixedColumnsStart",fixedRowsBottom:"fixedRowsBottom",fixedRowsTop:"fixedRowsTop",formulas:"formulas",fragmentSelection:"fragmentSelection",height:"height",hiddenColumns:"hiddenColumns",hiddenRows:"hiddenRows",invalidCellClassName:"invalidCellClassName",label:"label",language:"language",layoutDirection:"layoutDirection",licenseKey:"licenseKey",manualColumnFreeze:"manualColumnFreeze",manualColumnMove:"manualColumnMove",manualColumnResize:"manualColumnResize",manualRowMove:"manualRowMove",manualRowResize:"manualRowResize",maxCols:"maxCols",maxRows:"maxRows",mergeCells:"mergeCells",minCols:"minCols",minRows:"minRows",minSpareCols:"minSpareCols",minSpareRows:"minSpareRows",multiColumnSorting:"multiColumnSorting",nestedHeaders:"nestedHeaders",nestedRows:"nestedRows",noWordWrapClassName:"noWordWrapClassName",numericFormat:"numericFormat",observeDOMVisibility:"observeDOMVisibility",outsideClickDeselects:"outsideClickDeselects",persistentState:"persistentState",placeholder:"placeholder",placeholderCellClassName:"placeholderCellClassName",preventOverflow:"preventOverflow",preventWheel:"preventWheel",readOnly:"readOnly",readOnlyCellClassName:"readOnlyCellClassName",renderAllRows:"renderAllRows",renderer:"renderer",rowHeaders:"rowHeaders",rowHeaderWidth:"rowHeaderWidth",rowHeights:"rowHeights",search:"search",selectionMode:"selectionMode",selectOptions:"selectOptions",skipColumnOnPaste:"skipColumnOnPaste",skipRowOnPaste:"skipRowOnPaste",sortByRelevance:"sortByRelevance",source:"source",startCols:"startCols",startRows:"startRows",stretchH:"stretchH",strict:"strict",tableClassName:"tableClassName",tabMoves:"tabMoves",title:"title",trimDropdown:"trimDropdown",trimRows:"trimRows",trimWhitespace:"trimWhitespace",type:"type",uncheckedTemplate:"uncheckedTemplate",undo:"undo",validator:"validator",viewportColumnRenderingOffset:"viewportColumnRenderingOffset",viewportRowRenderingOffset:"viewportRowRenderingOffset",visibleRows:"visibleRows",width:"width",wordWrap:"wordWrap",afterAddChild:"afterAddChild",afterAutofill:"afterAutofill",afterBeginEditing:"afterBeginEditing",afterCellMetaReset:"afterCellMetaReset",afterChange:"afterChange",afterChangesObserved:"afterChangesObserved",afterColumnCollapse:"afterColumnCollapse",afterColumnExpand:"afterColumnExpand",afterColumnMove:"afterColumnMove",afterColumnResize:"afterColumnResize",afterColumnSort:"afterColumnSort",afterContextMenuDefaultOptions:"afterContextMenuDefaultOptions",afterContextMenuHide:"afterContextMenuHide",afterContextMenuShow:"afterContextMenuShow",afterCopy:"afterCopy",afterCopyLimit:"afterCopyLimit",afterCreateCol:"afterCreateCol",afterCreateRow:"afterCreateRow",afterCut:"afterCut",afterDeselect:"afterDeselect",afterDestroy:"afterDestroy",afterDetachChild:"afterDetachChild",afterDocumentKeyDown:"afterDocumentKeyDown",afterDrawSelection:"afterDrawSelection",afterDropdownMenuDefaultOptions:"afterDropdownMenuDefaultOptions",afterDropdownMenuHide:"afterDropdownMenuHide",afterDropdownMenuShow:"afterDropdownMenuShow",afterFilter:"afterFilter",afterGetCellMeta:"afterGetCellMeta",afterGetColHeader:"afterGetColHeader",afterGetColumnHeaderRenderers:"afterGetColumnHeaderRenderers",afterGetRowHeader:"afterGetRowHeader",afterGetRowHeaderRenderers:"afterGetRowHeaderRenderers",afterHideColumns:"afterHideColumns",afterHideRows:"afterHideRows",afterInit:"afterInit",afterLanguageChange:"afterLanguageChange",afterListen:"afterListen",afterLoadData:"afterLoadData",afterMergeCells:"afterMergeCells",afterModifyTransformEnd:"afterModifyTransformEnd",afterModifyTransformStart:"afterModifyTransformStart",afterMomentumScroll:"afterMomentumScroll",afterOnCellContextMenu:"afterOnCellContextMenu",afterOnCellCornerDblClick:"afterOnCellCornerDblClick",afterOnCellCornerMouseDown:"afterOnCellCornerMouseDown",afterOnCellMouseDown:"afterOnCellMouseDown",afterOnCellMouseOut:"afterOnCellMouseOut",afterOnCellMouseOver:"afterOnCellMouseOver",afterOnCellMouseUp:"afterOnCellMouseUp",afterPaste:"afterPaste",afterPluginsInitialized:"afterPluginsInitialized",afterRedo:"afterRedo",afterRedoStackChange:"afterRedoStackChange",afterRefreshDimensions:"afterRefreshDimensions",afterRemoveCellMeta:"afterRemoveCellMeta",afterRemoveCol:"afterRemoveCol",afterRemoveRow:"afterRemoveRow",afterRender:"afterRender",afterRenderer:"afterRenderer",afterRowMove:"afterRowMove",afterRowResize:"afterRowResize",afterScrollHorizontally:"afterScrollHorizontally",afterScrollVertically:"afterScrollVertically",afterSelection:"afterSelection",afterSelectionByProp:"afterSelectionByProp",afterSelectionEnd:"afterSelectionEnd",afterSelectionEndByProp:"afterSelectionEndByProp",afterSetCellMeta:"afterSetCellMeta",afterSetDataAtCell:"afterSetDataAtCell",afterSetDataAtRowProp:"afterSetDataAtRowProp",afterSetSourceDataAtCell:"afterSetSourceDataAtCell",afterTrimRow:"afterTrimRow",afterUndo:"afterUndo",afterUndoStackChange:"afterUndoStackChange",afterUnhideColumns:"afterUnhideColumns",afterUnhideRows:"afterUnhideRows",afterUnlisten:"afterUnlisten",afterUnmergeCells:"afterUnmergeCells",afterUntrimRow:"afterUntrimRow",afterUpdateSettings:"afterUpdateSettings",afterValidate:"afterValidate",afterViewportColumnCalculatorOverride:"afterViewportColumnCalculatorOverride",afterViewportRowCalculatorOverride:"afterViewportRowCalculatorOverride",afterViewRender:"afterViewRender",beforeAddChild:"beforeAddChild",beforeAutofill:"beforeAutofill",beforeAutofillInsidePopulate:"beforeAutofillInsidePopulate",beforeCellAlignment:"beforeCellAlignment",beforeChange:"beforeChange",beforeChangeRender:"beforeChangeRender",beforeColumnCollapse:"beforeColumnCollapse",beforeColumnExpand:"beforeColumnExpand",beforeColumnMove:"beforeColumnMove",beforeColumnResize:"beforeColumnResize",beforeColumnSort:"beforeColumnSort",beforeContextMenuSetItems:"beforeContextMenuSetItems",beforeContextMenuShow:"beforeContextMenuShow",beforeCopy:"beforeCopy",beforeCreateCol:"beforeCreateCol",beforeCreateRow:"beforeCreateRow",beforeCut:"beforeCut",beforeDetachChild:"beforeDetachChild",beforeDrawBorders:"beforeDrawBorders",beforeDropdownMenuSetItems:"beforeDropdownMenuSetItems",beforeDropdownMenuShow:"beforeDropdownMenuShow",beforeFilter:"beforeFilter",beforeGetCellMeta:"beforeGetCellMeta",beforeHideColumns:"beforeHideColumns",beforeHideRows:"beforeHideRows",beforeInit:"beforeInit",beforeInitWalkontable:"beforeInitWalkontable",beforeKeyDown:"beforeKeyDown",beforeLanguageChange:"beforeLanguageChange",beforeLoadData:"beforeLoadData",beforeMergeCells:"beforeMergeCells",beforeOnCellContextMenu:"beforeOnCellContextMenu",beforeOnCellMouseDown:"beforeOnCellMouseDown",beforeOnCellMouseOut:"beforeOnCellMouseOut",beforeOnCellMouseOver:"beforeOnCellMouseOver",beforeOnCellMouseUp:"beforeOnCellMouseUp",beforePaste:"beforePaste",beforeRedo:"beforeRedo",beforeRedoStackChange:"beforeRedoStackChange",beforeRefreshDimensions:"beforeRefreshDimensions",beforeRemoveCellClassNames:"beforeRemoveCellClassNames",beforeRemoveCellMeta:"beforeRemoveCellMeta",beforeRemoveCol:"beforeRemoveCol",beforeRemoveRow:"beforeRemoveRow",beforeRender:"beforeRender",beforeRenderer:"beforeRenderer",beforeRowMove:"beforeRowMove",beforeRowResize:"beforeRowResize",beforeSetCellMeta:"beforeSetCellMeta",beforeSetRangeEnd:"beforeSetRangeEnd",beforeSetRangeStart:"beforeSetRangeStart",beforeSetRangeStartOnly:"beforeSetRangeStartOnly",beforeStretchingColumnWidth:"beforeStretchingColumnWidth",beforeTouchScroll:"beforeTouchScroll",beforeTrimRow:"beforeTrimRow",beforeUndo:"beforeUndo",beforeUndoStackChange:"beforeUndoStackChange",beforeUnhideColumns:"beforeUnhideColumns",beforeUnhideRows:"beforeUnhideRows",beforeUnmergeCells:"beforeUnmergeCells",beforeUntrimRow:"beforeUntrimRow",beforeValidate:"beforeValidate",beforeValueRender:"beforeValueRender",beforeViewRender:"beforeViewRender",construct:"construct",init:"init",modifyAutoColumnSizeSeed:"modifyAutoColumnSizeSeed",modifyAutofillRange:"modifyAutofillRange",modifyColHeader:"modifyColHeader",modifyColumnHeaderHeight:"modifyColumnHeaderHeight",modifyColWidth:"modifyColWidth",modifyCopyableRange:"modifyCopyableRange",modifyData:"modifyData",modifyGetCellCoords:"modifyGetCellCoords",modifyRowData:"modifyRowData",modifyRowHeader:"modifyRowHeader",modifyRowHeaderWidth:"modifyRowHeaderWidth",modifyRowHeight:"modifyRowHeight",modifySourceData:"modifySourceData",modifyTransformEnd:"modifyTransformEnd",modifyTransformStart:"modifyTransformStart",persistentStateLoad:"persistentStateLoad",persistentStateReset:"persistentStateReset",persistentStateSave:"persistentStateSave"},features:[E.\u0275\u0275ProvidersFeature([S,N]),E.\u0275\u0275NgOnChangesFeature],decls:2,vars:1,consts:[[3,"id"],["container",""]],template:function(T,c){1&T&&E.\u0275\u0275element(0,"div",0,1),2&T&&E.\u0275\u0275property("id",c.hotId)},encapsulation:2}),A})(),P=(()=>{class A{constructor(T){this.parentComponent=T,this.firstRun=!0}ngOnInit(){this.firstRun=!1,this.parentComponent.addColumn(this)}ngOnChanges(){this.firstRun||this.parentComponent.onAfterColumnsChange()}ngOnDestroy(){this.parentComponent.removeColumn(this)}}return A.\u0275fac=function(T){return new(T||A)(E.\u0275\u0275directiveInject(j))},A.\u0275cmp=E.\u0275\u0275defineComponent({type:A,selectors:[["hot-column"]],inputs:{allowEmpty:"allowEmpty",allowHtml:"allowHtml",allowInvalid:"allowInvalid",checkedTemplate:"checkedTemplate",className:"className",columnSorting:"columnSorting",colWidths:"colWidths",commentedCellClassName:"commentedCellClassName",copyable:"copyable",correctFormat:"correctFormat",data:"data",dateFormat:"dateFormat",defaultDate:"defaultDate",editor:"editor",filteringCaseSensitive:"filteringCaseSensitive",invalidCellClassName:"invalidCellClassName",label:"label",language:"language",noWordWrapClassName:"noWordWrapClassName",numericFormat:"numericFormat",placeholder:"placeholder",placeholderCellClassName:"placeholderCellClassName",readOnly:"readOnly",readOnlyCellClassName:"readOnlyCellClassName",renderer:"renderer",selectOptions:"selectOptions",skipColumnOnPaste:"skipColumnOnPaste",sortByRelevance:"sortByRelevance",source:"source",strict:"strict",title:"title",trimDropdown:"trimDropdown",type:"type",uncheckedTemplate:"uncheckedTemplate",validator:"validator",visibleRows:"visibleRows",width:"width",wordWrap:"wordWrap"},features:[E.\u0275\u0275NgOnChangesFeature],decls:0,vars:0,template:function(T,c){},encapsulation:2}),A})(),I=(()=>{class A{static forRoot(){return{ngModule:A,providers:[S]}}}return A.\u0275fac=function(T){return new(T||A)},A.\u0275mod=E.\u0275\u0275defineNgModule({type:A}),A.\u0275inj=E.\u0275\u0275defineInjector({}),A.version="12.1.2",A})()},16458:(Se,pe,r)=>{"use strict";r.d(pe,{j:()=>go});var t=r(64753),e=r(5e3),a=r(22324);const s=["dialog"];let o=(()=>{class ln{constructor(){}ngOnInit(){}onSubmit(){this.callback(),this.dialog.close()}}return ln.\u0275fac=function(We){return new(We||ln)},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-delete-confirm-dialog"]],viewQuery:function(We,Dt){if(1&We&&e.\u0275\u0275viewQuery(s,7),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first)}},decls:10,vars:0,consts:[["dialog",""],[1,"modal-header"],[1,"icon-delete2","header-icon"],[1,"confirmation-info"],[1,"pulse-btn","save",3,"click"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275element(3,"i",2),e.\u0275\u0275text(4," Delete Confirmation "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275text(6," Are you sure that you want to delete this item? "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"button",4),e.\u0275\u0275listener("click",function(){return Dt.onSubmit()}),e.\u0275\u0275element(8,"i",2),e.\u0275\u0275text(9,"Confirm"),e.\u0275\u0275elementEnd()())},directives:[a.a],styles:[".confirmation-info[_ngcontent-%COMP%]{margin:20px} #pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}"]}),ln})();var d=r(40520),u=r(54620),g=r(22290),x=r(9133),i=r(69808),m=r(93075),E=r(77093);const C=["dialog"],v=["class","component"];function h(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",30),e.\u0275\u0275text(2,"Add"),e.\u0275\u0275elementEnd())}function S(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",31),e.\u0275\u0275text(2,"Edit"),e.\u0275\u0275elementEnd())}function p(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",32),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("value",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(We)}}function L(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"label",21)(1,"label"),e.\u0275\u0275text(2," Has Badge "),e.\u0275\u0275elementStart(3,"input",33),e.\u0275\u0275listener("ngModelChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().badge=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"span",23),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",We.badge)}}function N(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"input",34,35),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().onFileChanged(Kt)}),e.\u0275\u0275elementEnd()()}}function j(ln,Un){}function P(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",30),e.\u0275\u0275text(2,"Add"),e.\u0275\u0275elementEnd())}function I(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275element(1,"i",31),e.\u0275\u0275text(2,"Edit"),e.\u0275\u0275elementEnd())}let A=(()=>{class ln{constructor(We,Dt,Kt,dn){this.projectService=We,this.toastr=Dt,this.vari=Kt,this.handler=dn,this.types=["Document","Link","Mail","Image","Popup","Video"],this.type="",this.category="",this.categoryOrder=0,this.titleKey="",this.contentKey="",this.isSurvey=!1,this.hasNewFile=!1,this.isGlobal=!1,this.httpClient=new d.eN(dn)}ngOnInit(){this.isGlobal=!this.projectId}onSubmit(){!("Mail"===this.type||"Link"===this.type)&&this.hasNewFile&&this.uploadFile(),this.callback({id:this.id?this.id:void 0,projectId:this.isGlobal?void 0:this.projectId,isSurvey:this.isSurvey,titleKey:this.titleKey,contentKey:this.contentKey,type:this.type,category:this.category,order:this.categoryOrder,badge:!this.id||this.badge}),this.dialog.close()}uploadFile(){const We=new FormData;We.append("data",this.file),We.append("global",this.isGlobal+"");const Dt=this.vari.apiUrl+"/api/helpsection/content",Kt=new d.WM;return Kt.append("Content-Type","application/json"),this.httpClient.post(Dt,We,{headers:Kt,withCredentials:!0}).toPromise()}onFileChanged(We){this.hasNewFile=!0,this.file=We.target.files[0],this.contentKey=encodeURI(this.file.name),(new FileReader).readAsArrayBuffer(this.file)}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(u.k),e.\u0275\u0275directiveInject(g._W),e.\u0275\u0275directiveInject(x.a),e.\u0275\u0275directiveInject(d.jN))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-help-config-dialog",8,"component"]],viewQuery:function(We,Dt){if(1&We&&e.\u0275\u0275viewQuery(C,7),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first)}},attrs:v,decls:46,vars:16,consts:[["dialog",""],[1,"modal-header"],[4,"ngIf"],[3,"ngSubmit"],["filterForm","ngForm"],[1,"form-group","filter-information-group"],[1,"pulse-form-field","add-formfield"],[1,"pulse-select","full-width"],["name","helptype","required","",1,"form-control",3,"ngModel","ngModelChange"],["helptype","ngModel"],["disabled","","selected","","hidden","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[1,"add-formfield"],["name","categoryname","fxFlex","100","placeholder","Category","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["categoryname","ngModel"],["name","titlekey","fxFlex","100","placeholder","Title Key","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["titlekey","ngModel"],["name","contentkey","fxFlex","100","placeholder","Content","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["contentkey","ngModel"],["name","categoryorder","fxFlex","100","placeholder","categoryorder","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["categoryorder","ngModel"],[1,"pulse-checkbox-container"],["type","checkbox","name","survey",1,"pulse-checkbox",3,"ngModel","ngModelChange"],[1,"checkmark"],["type","checkbox","name","global",1,"pulse-checkbox",3,"ngModel","ngModelChange"],["class","pulse-checkbox-container",4,"ngIf"],[4,"ngIf","ngIfElse"],["other",""],[1,"create-button"],["type","submit","fxFlex","20",1,"pulse-btn","save",3,"disabled"],[1,"icon-plus2"],[1,"icon-edit"],[3,"value"],["type","checkbox","name","badges",1,"pulse-checkbox",3,"ngModel","ngModelChange"],["type","file",3,"change"],["imageInput",""]],template:function(We,Dt){if(1&We&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275template(3,h,3,0,"span",2),e.\u0275\u0275template(4,S,3,0,"span",2),e.\u0275\u0275text(5," Help Section Item "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"form",3,4),e.\u0275\u0275listener("ngSubmit",function(){return Dt.onSubmit()}),e.\u0275\u0275elementStart(8,"div",5)(9,"div",6)(10,"div",7)(11,"select",8,9),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.type=dn}),e.\u0275\u0275elementStart(13,"option",10),e.\u0275\u0275text(14,"Select filter"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(15,p,2,2,"option",11),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(16,"div",12)(17,"input",13,14),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.category=dn}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",12)(20,"input",15,16),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.titleKey=dn}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(22,"div",12)(23,"input",17,18),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.contentKey=dn}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",12)(26,"input",19,20),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.categoryOrder=dn}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"label",21)(29,"label"),e.\u0275\u0275text(30," Is Survey "),e.\u0275\u0275elementStart(31,"input",22),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.isSurvey=dn}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(32,"span",23),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(33,"label",21)(34,"label"),e.\u0275\u0275text(35," Is Global "),e.\u0275\u0275elementStart(36,"input",24),e.\u0275\u0275listener("ngModelChange",function(dn){return Dt.isGlobal=dn}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(37,"span",23),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(38,L,5,1,"label",25),e.\u0275\u0275template(39,N,3,0,"div",26),e.\u0275\u0275template(40,j,0,0,"ng-template",null,27,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(42,"div",28)(43,"button",29),e.\u0275\u0275template(44,P,3,0,"span",2),e.\u0275\u0275template(45,I,3,0,"span",2),e.\u0275\u0275elementEnd()()()()),2&We){const Kt=e.\u0275\u0275reference(7),dn=e.\u0275\u0275reference(41);e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!Dt.id),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!!Dt.id),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",Dt.type),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",Dt.types),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngModel",Dt.category),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",Dt.titleKey),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",Dt.contentKey),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",Dt.categoryOrder),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",Dt.isSurvey),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",Dt.isGlobal),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",Dt.id),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","Document"===Dt.type||"Image"===Dt.type||"Video"===Dt.type)("ngIfElse",dn),e.\u0275\u0275advance(4),e.\u0275\u0275property("disabled",!Kt.form.valid),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!Dt.id),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!!Dt.id)}},directives:[a.a,i.O5,m.\u0275NgNoValidate,m.NgControlStatusGroup,m.NgForm,m.SelectControlValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,m.NgSelectOption,m.\u0275NgSelectMultipleOption,i.sg,m.DefaultValueAccessor,E.yH,m.CheckboxControlValueAccessor],styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}"]}),ln})();var O=r(74564),T=r(47626);function c(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",18),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext().openEditDialog(dn)}),e.\u0275\u0275elementStart(1,"div",19),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",20),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",21),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",22),e.\u0275\u0275text(8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",23),e.\u0275\u0275text(10),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",24),e.\u0275\u0275text(12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"div",25),e.\u0275\u0275text(14),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"div",26),e.\u0275\u0275text(16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",27)(18,"i",28),e.\u0275\u0275listener("click",function(Kt){const pi=e.\u0275\u0275restoreView(We).$implicit,nr=e.\u0275\u0275nextContext();return Kt.stopPropagation(),nr.openDeleteDialog(pi.id)}),e.\u0275\u0275elementEnd()()()}if(2&ln){const We=Un.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.projectId," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.isSurvey," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.titleKey," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.contentKey," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.type," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.category," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.order," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We.badge," ")}}let M=(()=>{class ln{constructor(We,Dt,Kt,dn){this.projectService=We,this.dialogService=Dt,this.headerService=Kt,this.toastr=dn,this.helpconfig=[]}ngOnInit(){this.headerService.showHeader=!1,this.update()}update(){this.projectService.getAllHelpSectionItems().then(We=>{this.helpconfig=We.sort((Dt,Kt)=>Dt.order-Kt.order)})}openHelpConfigDialog(){this.dialogService.open(A,{projectId:this.projectService.projectId,callback:We=>{this.addItem(We)}})}addItem(We){this.projectService.addHelpSectionItem(We).then(Dt=>{this.update()}).catch(Dt=>{this.toastr.error("Could not add Item!")})}editItem(We){this.projectService.editHelpSectionItem(We).then(Dt=>{this.update()}).catch(Dt=>{this.toastr.error("Could not edit Item!")})}deleteItem(We){this.projectService.deleteHelpSectionItem(We).then(Dt=>{this.update()}).catch(Dt=>{this.toastr.error("Could not edit Item!")})}openEditDialog(We){this.dialogService.open(A,{callback:Dt=>{this.editItem(Dt)},id:We.id,type:We.type,category:We.category,categoryOrder:We.order,titleKey:We.titleKey,contentKey:We.contentKey,isSurvey:We.isSurvey,badge:We.badge,projectId:We.projectId})}openDeleteDialog(We){this.dialogService.open(o,{callback:()=>{this.deleteItem(We)}})}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(u.k),e.\u0275\u0275directiveInject(O.x),e.\u0275\u0275directiveInject(T.r),e.\u0275\u0275directiveInject(g._W))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-help-section-config"]],decls:29,vars:1,consts:[[1,"help-config-container"],[1,"help-config-main"],["id","table-container"],["id","table-header","fxLayout","row"],[1,"table-header-item","projectid"],[1,"table-header-item","issurvey"],[1,"table-header-item","titlekey"],[1,"table-header-item","contentkey"],[1,"table-header-item","center","type"],[1,"table-header-item","center","category"],[1,"table-header-item","center","order"],[1,"table-header-item","center","badge"],[1,"table-header-item","center","action"],["id","table-body"],["class","table-row pointer","fxLayout","row",3,"click",4,"ngFor","ngForOf"],[1,"help-add-button",2,"display","flex","justify-content","flex-end","margin","0 20px"],[1,"pulse-btn","save",2,"max-width","150px",3,"click"],[1,"icon-plus2"],["fxLayout","row",1,"table-row","pointer",3,"click"],[1,"table-row-item","projectid"],[1,"table-row-item","issurvey"],[1,"table-row-item","titlekey"],[1,"table-row-item","contentkey"],[1,"table-row-item","center","type"],[1,"table-row-item","center","category"],[1,"table-row-item","center","order"],[1,"table-row-item","center","badge"],[1,"table-row-item","center","action"],[1,"icon-delete2",3,"click"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"div",0)(1,"h2"),e.\u0275\u0275text(2,"Help Section Items"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4),e.\u0275\u0275text(7," Project ID "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"div",5),e.\u0275\u0275text(9," IsSurvey "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"div",6),e.\u0275\u0275text(11," Title Key "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"div",7),e.\u0275\u0275text(13," Content Key "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",8),e.\u0275\u0275text(15," Type "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"div",9),e.\u0275\u0275text(17," Category "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",10),e.\u0275\u0275text(19," Order "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"div",11),e.\u0275\u0275text(21," Badge "),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(22,"div",12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"div",13),e.\u0275\u0275template(24,c,19,8,"div",14),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",15)(26,"button",16),e.\u0275\u0275listener("click",function(){return Dt.openHelpConfigDialog()}),e.\u0275\u0275element(27,"i",17),e.\u0275\u0275text(28,"Add Item"),e.\u0275\u0275elementEnd()()()()),2&We&&(e.\u0275\u0275advance(24),e.\u0275\u0275property("ngForOf",Dt.helpconfig))},directives:[E.xw,i.sg],styles:[".help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%]{padding:px;display:inline}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%]{background:#fff;margin:20px;border-width:1px 1px 0 1px;border-style:solid;border-color:#becdd7}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%]{padding:10px 0;font-weight:500;background-color:#cdd9e14d;border-bottom:1px solid #becdd7}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item[_ngcontent-%COMP%]{padding:0 5px}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.projectid[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.issurvey[_ngcontent-%COMP%]{flex-basis:5%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.titlekey[_ngcontent-%COMP%]{flex-basis:15%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.contentkey[_ngcontent-%COMP%]{flex-basis:30%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.type[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.category[_ngcontent-%COMP%]{flex-basis:15%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.order[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.badge[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.action[_ngcontent-%COMP%]{flex-basis:5%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%]{min-height:45px;border-bottom:1px solid #becdd7;align-items:center;cursor:pointer;transition:all .1s ease}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%]:hover{background-color:#ccc}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item[_ngcontent-%COMP%]{padding:0 5px;overflow:hidden}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.projectid[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.issurvey[_ngcontent-%COMP%]{flex-basis:5%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.titlekey[_ngcontent-%COMP%]{flex-basis:15%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.contentkey[_ngcontent-%COMP%]{flex-basis:30%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.type[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.category[_ngcontent-%COMP%]{flex-basis:15%}.help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.order[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.badge[_ngcontent-%COMP%], .help-config-container[_ngcontent-%COMP%] .help-config-main[_ngcontent-%COMP%] #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.action[_ngcontent-%COMP%]{flex-basis:5%}"]}),ln})();var w=r(8929),R=r(591),D=r(61715),Y=r(80013),_=r(56551),y=r(24217);const H=["dialog"];function $(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",28)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a title "),e.\u0275\u0275elementEnd())}function K(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",29),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}function z(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",28)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a group "),e.\u0275\u0275elementEnd())}function G(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",29),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}function Z(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",28)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a category "),e.\u0275\u0275elementEnd())}function B(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",29),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}function X(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li")(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"a",30),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).deleteCoverPhoto(dn.id)}),e.\u0275\u0275text(5,"delete"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&ln){const We=Un.$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.name)}}function ee(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li")(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"a",30),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).deleteAttachment(dn.id)}),e.\u0275\u0275text(5,"delete"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&ln){const We=Un.$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.attachmentName)}}function le(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"form",4),e.\u0275\u0275listener("ngSubmit",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().onSubmit()}),e.\u0275\u0275elementStart(1,"div",5)(2,"div",6),e.\u0275\u0275text(3," Title:"),e.\u0275\u0275elementStart(4,"sup"),e.\u0275\u0275text(5,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",7),e.\u0275\u0275element(7,"input",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(8,$,4,0,"div",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",5)(10,"div",6),e.\u0275\u0275text(11," Group:"),e.\u0275\u0275elementStart(12,"sup"),e.\u0275\u0275text(13,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",7)(15,"select",10),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().changeGroup(Kt)}),e.\u0275\u0275elementStart(16,"option",11),e.\u0275\u0275text(17,"Choose group"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(18,K,2,2,"option",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(19,z,4,0,"div",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"div",5)(21,"div",6),e.\u0275\u0275text(22," Category:"),e.\u0275\u0275elementStart(23,"sup"),e.\u0275\u0275text(24,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",7)(26,"select",13),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().changeCategory(Kt)}),e.\u0275\u0275elementStart(27,"option",11),e.\u0275\u0275text(28,"Choose category"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(29,G,2,2,"option",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(30,Z,4,0,"div",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(31,"div",5)(32,"div",6),e.\u0275\u0275text(33," Creation Date: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(34,"div",7),e.\u0275\u0275element(35,"input",14),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(36,"div",5)(37,"div",6),e.\u0275\u0275text(38," Description: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(39,"div",7)(40,"pulse-text-area",15),e.\u0275\u0275listener("valueChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().changeDescription(Kt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(41,"div",5)(42,"div",6),e.\u0275\u0275text(43," Is Sticky: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"div",7),e.\u0275\u0275element(45,"input",16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(46,"div",5)(47,"div",6),e.\u0275\u0275text(48," Is Active: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(49,"div",7),e.\u0275\u0275element(50,"input",17),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(51,"div",5)(52,"div",6),e.\u0275\u0275text(53," Upload Cover Photo: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(54,"div",7)(55,"input",18),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().detectFilesCoverPhotos(Kt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(56,"div",5)(57,"div",6),e.\u0275\u0275text(58," Cover Photo Position: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(59,"div",7)(60,"select",19),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().changeCoverPhotoPosition(Kt)}),e.\u0275\u0275elementStart(61,"option",11),e.\u0275\u0275text(62,"Choose position"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(63,B,2,2,"option",12),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(64,"div",20)(65,"ul"),e.\u0275\u0275template(66,X,6,1,"ng-container",21),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(67,"div",5)(68,"div",6),e.\u0275\u0275text(69," Upload Attachments: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(70,"div",7)(71,"input",22),e.\u0275\u0275listener("change",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().detectFiles(Kt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(72,"div",23)(73,"ul"),e.\u0275\u0275template(74,ee,6,1,"ng-container",21),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(75,"div",24)(76,"a",25),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().deleteNotification()}),e.\u0275\u0275text(77," Delete "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(78,"a",26),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().resetForm()}),e.\u0275\u0275text(79," Reset "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(80,"button",27),e.\u0275\u0275pipe(81,"async"),e.\u0275\u0275text(82," Submit "),e.\u0275\u0275elementEnd()()()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275property("formGroup",We.notificationItemForm),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngIf",We.isSubmitted&&(null==We.title?null:We.title.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngForOf",We.groups),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.isSubmitted&&(null==We.group?null:We.group.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngForOf",We.categories),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.isSubmitted&&(null==We.category?null:We.category.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("inputValue",We.descriptionHtml),e.\u0275\u0275advance(23),e.\u0275\u0275property("ngForOf",We.coverPhotoPositions),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",We.coverPhotoList),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngForOf",We.attachmentList),e.\u0275\u0275advance(6),e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(81,11,We.sendingRequest))}}let de=(()=>{class ln{constructor(We,Dt){this._formbuilder=We,this._notificationCenter=Dt,this.sendingRequest=new w.xQ,this.coverPhotoList=[],this.attachmentList=[],this.categories=["Update","Feature","Issue"],this.groups=["Support Function Reporting","Financial Statement Reporting"],this.coverPhotoPositions=["above","below"],this.isSubmitted=!1,this.descriptionHtml=""}get title(){return this.notificationItemForm.get("title")}get group(){return this.notificationItemForm.get("group")}get category(){return this.notificationItemForm.get("category")}get date(){return this.notificationItemForm.get("date")}get isSticky(){return this.notificationItemForm.get("isSticky")}get isActive(){return this.notificationItemForm.get("isActive")}get attachments(){return this.notificationItemForm.get("attachments")}get coverPhotos(){return this.notificationItemForm.get("coverPhotos")}get coverPhotoPosition(){return this.notificationItemForm.get("coverPhotoPosition")}resetForm(){const We=this.notificationItemForm;this.notificationItemForm.reset(),Object.keys(We.controls).forEach(Dt=>{We.get(Dt).setErrors(null)})}createItem(We){return this._formbuilder.group(We)}detectFiles(We){let Dt=We.target.files;if(Dt)for(let Kt of Dt){let dn=new FileReader;dn.onload=pi=>{this.attachments.push(this.createItem({file:Kt,url:pi.target.result}))},dn.readAsDataURL(Kt)}}detectFilesCoverPhotos(We){let Dt=We.target.files;if(Dt)for(let Kt of Dt){let dn=new FileReader;dn.onload=pi=>{this.coverPhotos.push(this.createItem({file:Kt,url:pi.target.result}))},dn.readAsDataURL(Kt)}}ngAfterViewInit(){this._notificationCenter.getAllNotifications().then(We=>{We.forEach(Kt=>{Kt.id===this.notificationId&&(this.notificationItem=Kt)}),this.descriptionHtml=this.notificationItem.notificationText?this.notificationItem.notificationText:"",this._notificationCenter.getAttachmentsByNotificationId(this.notificationId).then(Kt=>{this.attachmentList=Kt}),this.notificationItem.coverPhotoSource&&(this.coverPhotoList=[{id:this.notificationId,name:this.notificationItem.coverPhotoSource}]),this.notificationItemForm=this._formbuilder.group({title:[this.notificationItem.title,[m.Validators.required]],group:["",[m.Validators.required]],category:["",[m.Validators.required]],date:[(0,i.p6)(new Date(this.notificationItem.creationDate),"yyyy-MM-dd","en")],isSticky:[this.notificationItem.isSticky],isActive:[this.notificationItem.isActive],coverPhotos:this._formbuilder.array([]),coverPhotoPosition:[this.notificationItem.coverPhotoPosition],attachments:this._formbuilder.array([])}),this.category.setValue(this.notificationItem.category),this.group.setValue(this.notificationItem.groupName)})}deleteCoverPhoto(We){!We||this._notificationCenter.deleteCoverPhoto(We,"coverphotos").then(Dt=>{this.coverPhotoList=[]})}deleteAttachment(We){!We||this._notificationCenter.deleteAttachment(We,"attachments").then(Dt=>{this._notificationCenter.getAttachmentsByNotificationId(this.notificationId).then(Kt=>{this.attachmentList=Kt})})}onFileChange(We){We.target.files.length>0&&this.notificationItemForm.patchValue({fileSource:We.target.files[0]})}onSubmit(){this.isSubmitted=!0,this.notificationItemForm.valid&&(this.sendingRequest.next(!0),this.createNotificationItem().then(We=>{this.notificationItemForm.get("coverPhotos").value.length>0&&this.uploadCoverPhoto(this.notificationId),this.notificationItemForm.get("attachments").value.length>0&&this.notificationItemForm.get("attachments").value.forEach(Kt=>{this.uploadAttachment(this.notificationId,Kt)}),this.sendingRequest.next(!1),this.callback(),this.dialog.close()}))}createNotificationItem(){const We=this.notificationItemForm.get("group").value.split(":")[1]?this.notificationItemForm.get("group").value.split(":")[1].trim():this.notificationItemForm.get("group").value,Dt=this.notificationItemForm.get("category").value.split(":")[1]?this.notificationItemForm.get("category").value.split(":")[1].trim():this.notificationItemForm.get("category").value,Kt=new FormData;return Kt.append("id",this.notificationId),Kt.append("group",We),Kt.append("category",Dt),Kt.append("title",this.notificationItemForm.get("title").value),Kt.append("creationDate",this.notificationItemForm.get("date").value),Kt.append("description",this.descriptionHtml),Kt.append("isSticky",this.notificationItemForm.get("isSticky").value),Kt.append("isActive",this.notificationItemForm.get("isActive").value),Kt.append("coverPhotoPosition",-1!==this.notificationItemForm.get("coverPhotoPosition").value.indexOf(":")?this.notificationItemForm.get("coverPhotoPosition").value.indexOf(":").split(":")[1].trim():this.notificationItemForm.get("coverPhotoPosition").value),this._notificationCenter.updateNotificationItem(Kt)}uploadCoverPhoto(We){const Dt=this.notificationItemForm.get("coverPhotos").value,Kt={notificationItemId:We,attachmentName:"",folder:"coverphotos"},dn=new FormData,pi=Dt[0].file;dn.append("File",pi,pi.name),dn.append("jsonString",JSON.stringify(Kt)),this._notificationCenter.addCoverPhoto(dn).then(nr=>{})}uploadAttachment(We,Dt){const Kt=new FormData,dn=Dt.file,pi={notificationItemId:We,attachmentName:dn.name,folder:"attachments"};Kt.append("File",dn,dn.name),Kt.append("jsonString",JSON.stringify(pi)),this._notificationCenter.addAttachment(Kt).then(nr=>{})}changeGroup(We){this.group.setValue(We.target.value,{onlySelf:!0})}changeCoverPhotoPosition(We){this.coverPhotoPosition.setValue(We.target.value,{onlySelf:!0})}deleteNotification(){this._notificationCenter.deleteNotificationItem(this.notificationId).then(We=>{this.callback(),this.dialog.close()})}changeCategory(We){this.category.setValue(We.target.value,{onlySelf:!0})}changeDescription(We){this.descriptionHtml=We}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(m.FormBuilder),e.\u0275\u0275directiveInject(_.v))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-modal-add-notification-edit"]],viewQuery:function(We,Dt){if(1&We&&e.\u0275\u0275viewQuery(H,7),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first)}},inputs:{callback:"callback"},decls:6,vars:1,consts:[["dialog",""],[1,"modal-header"],[1,"icon-plus2","header-icon"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"formGroup","ngSubmit"],[1,"form-row"],[1,"form-row-label"],[1,"form-row-input"],["formControlName","title","placeholder","Title",1,"pulse-input"],["class","form-row-invaid",4,"ngIf"],["formControlName","group",1,"pulse-select",3,"change"],["value",""],[3,"ngValue",4,"ngFor","ngForOf"],["formControlName","category",1,"pulse-select",3,"change"],["type","date","formControlName","date",1,"pulse-input"],[3,"inputValue","valueChange"],["type","checkbox","formControlName","isSticky",1,"form-checkbox-input"],["type","checkbox","formControlName","isActive",1,"form-checkbox-input"],["type","file","id","files","accept","image/png, image/jpeg",1,"custom-file-input","form-control",3,"change"],["formControlName","coverPhotoPosition",1,"pulse-select",3,"change"],[1,"uplaoded-coverphotos"],[4,"ngFor","ngForOf"],["type","file","id","files","multiple","",1,"custom-file-input","form-control",3,"change"],[1,"uplaoded-attachments"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","delete",3,"click"],[1,"pulse-btn","cancel",3,"click"],["type","submit",1,"pulse-btn","save",3,"disabled"],[1,"form-row-invaid"],[3,"ngValue"],[3,"click"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275element(3,"i",2),e.\u0275\u0275text(4," Edit Notification "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(5,le,83,13,"form",3),e.\u0275\u0275elementEnd()),2&We&&(e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",Dt.notificationItemForm))},directives:[a.a,i.O5,m.\u0275NgNoValidate,m.NgControlStatusGroup,m.FormGroupDirective,m.DefaultValueAccessor,m.NgControlStatus,m.FormControlName,m.SelectControlValueAccessor,m.NgSelectOption,m.\u0275NgSelectMultipleOption,i.sg,y.U,m.CheckboxControlValueAccessor],pipes:[i.Ov],styles:[".form-row[_ngcontent-%COMP%]{padding:4px 0}.pulse-select[_ngcontent-%COMP%]{padding:10px 12px;width:100%;border-radius:0;border-color:#becdd7}.form-row-invaid[_ngcontent-%COMP%]{color:red;margin-top:5px}"]}),ln})();const fe=["dialog"],te=["attachments"],ce=["coverPhoto"];function oe(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",26)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a title "),e.\u0275\u0275elementEnd())}function se(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",27),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}function ue(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",26)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a group "),e.\u0275\u0275elementEnd())}function _e(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",27),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}function Ce(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",26)(1,"sup"),e.\u0275\u0275text(2,"*"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3,"Please provide a category "),e.\u0275\u0275elementEnd())}function me(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"option",27),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275property("ngValue",We),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We," ")}}let we=(()=>{class ln{constructor(We,Dt){this._formbuilder=We,this._notificationCenter=Dt,this.sendingRequest=new w.xQ,this.categories=["Update","Feature","Issue"],this.groups=["Support Function Reporting","Financial Statement Reporting"],this.coverPhotoPositions=["above","below"],this.isSubmitted=!1,this.descriptionHtml="",this.notificationItemForm=this._formbuilder.group({title:["",[m.Validators.required]],group:["",[m.Validators.required]],category:["",[m.Validators.required]],date:[(0,i.p6)(new Date,"yyyy-MM-dd","en")],isSticky:[!1],isActive:[!0],coverPhotos:this._formbuilder.array([]),coverPhotoPosition:[""],attachments:this._formbuilder.array([])})}get title(){return this.notificationItemForm.get("title")}get group(){return this.notificationItemForm.get("group")}get category(){return this.notificationItemForm.get("category")}get date(){return this.notificationItemForm.get("date")}get isSticky(){return this.notificationItemForm.get("isSticky")}get isActive(){return this.notificationItemForm.get("isActive")}get attachments(){return this.notificationItemForm.get("attachments")}get coverPhotos(){return this.notificationItemForm.get("coverPhotos")}get coverPhotoPosition(){return this.notificationItemForm.get("coverPhotoPosition")}createItem(We){return this._formbuilder.group(We)}resetForm(){const We=this.notificationItemForm;this.notificationItemForm.reset(),Object.keys(We.controls).forEach(Dt=>{We.get(Dt).setErrors(null)})}resetAttachments(){this.attachmentsInputElement.nativeElement.value="",this.notificationItemForm.controls.attachments.reset()}resetCoverPhoto(){this.coverPhotoInputElement.nativeElement.value="",this.notificationItemForm.controls.coverPhotos.reset()}detectFiles(We){let Dt=We.target.files;if(Dt)for(let Kt of Dt){let dn=new FileReader;dn.onload=pi=>{this.attachments.push(this.createItem({file:Kt,url:pi.target.result}))},dn.readAsDataURL(Kt)}}detectFilesCoverPhotos(We){let Dt=We.target.files;if(Dt)for(let Kt of Dt){let dn=new FileReader;dn.onload=pi=>{this.coverPhotos.push(this.createItem({file:Kt,url:pi.target.result}))},dn.readAsDataURL(Kt)}}ngAfterViewInit(){}onFileChange(We){We.target.files.length>0&&this.notificationItemForm.patchValue({fileSource:We.target.files[0]})}onSubmit(){this.isSubmitted=!0,this.notificationItemForm.valid&&(this.sendingRequest.next(!0),this.createNotificationItem().then(We=>{this.notificationItemForm.get("coverPhotos").value.length>0&&this.notificationItemForm.get("coverPhotos").value[0].file&&this.uploadCoverPhoto(We.id),this.notificationItemForm.get("attachments").value.length>0&&this.notificationItemForm.get("attachments").value.forEach(Kt=>{Kt.file&&this.uploadAttachment(We.id,Kt)}),this.sendingRequest.next(!1),this.callback(),this.dialog.close()}))}createNotificationItem(){const We=new FormData;return We.append("group",this.notificationItemForm.get("group").value.split(":")[1].trim()),We.append("category",this.notificationItemForm.get("category").value.split(":")[1].trim()),We.append("title",this.notificationItemForm.get("title").value),We.append("creationDate",this.notificationItemForm.get("date").value),We.append("description",this.descriptionHtml),We.append("isSticky",this.notificationItemForm.get("isSticky").value),We.append("isActive",this.notificationItemForm.get("isActive").value),We.append("coverPhotoPosition",""!=this.notificationItemForm.get("coverPhotoPosition").value?this.notificationItemForm.get("coverPhotoPosition").value.split(":")[1].trim():"above"),this._notificationCenter.addNotificationItem(We)}uploadCoverPhoto(We){const Dt=this.notificationItemForm.get("coverPhotos").value,Kt={notificationItemId:We,attachmentName:"",folder:"coverphotos"},dn=new FormData,pi=Dt[0].file;dn.append("File",pi,pi.name),dn.append("jsonString",JSON.stringify(Kt)),this._notificationCenter.addCoverPhoto(dn).then(nr=>{})}uploadAttachment(We,Dt){const Kt=new FormData,dn=Dt.file,pi={notificationItemId:We,attachmentName:dn.name,folder:"attachments"};Kt.append("File",dn,dn.name),Kt.append("jsonString",JSON.stringify(pi)),this._notificationCenter.addAttachment(Kt).then(nr=>{})}changeGroup(We){this.group.setValue(We.target.value,{onlySelf:!0})}changeCoverPhotoPosition(We){this.coverPhotoPosition.setValue(We.target.value,{onlySelf:!0})}changeCategory(We){this.category.setValue(We.target.value,{onlySelf:!0})}changeDescription(We){this.descriptionHtml=We}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(m.FormBuilder),e.\u0275\u0275directiveInject(_.v))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-modal-add-notification-item"]],viewQuery:function(We,Dt){if(1&We&&(e.\u0275\u0275viewQuery(fe,7),e.\u0275\u0275viewQuery(te,7),e.\u0275\u0275viewQuery(ce,7)),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first),e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.attachmentsInputElement=Kt.first),e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.coverPhotoInputElement=Kt.first)}},inputs:{callback:"callback"},decls:86,vars:11,consts:[["dialog",""],[1,"modal-header"],[1,"icon-plus2","header-icon"],[3,"formGroup","ngSubmit"],[1,"form-row"],[1,"form-row-label"],[1,"form-row-input"],["formControlName","title","placeholder","Title",1,"pulse-input"],["class","form-row-invaid",4,"ngIf"],["formControlName","group",1,"pulse-select",3,"change"],["value",""],[3,"ngValue",4,"ngFor","ngForOf"],["formControlName","category",1,"pulse-select",3,"change"],["type","date","formControlName","date",1,"pulse-input"],[3,"inputValue","valueChange"],["type","checkbox","formControlName","isSticky",1,"form-checkbox-input"],["type","checkbox","formControlName","isActive",1,"form-checkbox-input"],["type","file","accept","image/png, image/jpeg",1,"custom-file-input","form-control",3,"change"],["coverPhoto",""],[3,"click"],["formControlName","coverPhotoPosition",1,"pulse-select",3,"change"],["type","file","multiple","",1,"custom-file-input","form-control",3,"change"],["attachments",""],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],["type","submit",1,"pulse-btn","save",3,"disabled"],[1,"form-row-invaid"],[3,"ngValue"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275element(3,"i",2),e.\u0275\u0275text(4," Add Notification "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"form",3),e.\u0275\u0275listener("ngSubmit",function(){return Dt.onSubmit()}),e.\u0275\u0275elementStart(6,"div",4)(7,"div",5),e.\u0275\u0275text(8," Title:"),e.\u0275\u0275elementStart(9,"sup"),e.\u0275\u0275text(10,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",6),e.\u0275\u0275element(12,"input",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(13,oe,4,0,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",4)(15,"div",5),e.\u0275\u0275text(16," Group:"),e.\u0275\u0275elementStart(17,"sup"),e.\u0275\u0275text(18,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",6)(20,"select",9),e.\u0275\u0275listener("change",function(dn){return Dt.changeGroup(dn)}),e.\u0275\u0275elementStart(21,"option",10),e.\u0275\u0275text(22,"Choose group"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(23,se,2,2,"option",11),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(24,ue,4,0,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(25,"div",4)(26,"div",5),e.\u0275\u0275text(27," Category:"),e.\u0275\u0275elementStart(28,"sup"),e.\u0275\u0275text(29,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(30,"div",6)(31,"select",12),e.\u0275\u0275listener("change",function(dn){return Dt.changeCategory(dn)}),e.\u0275\u0275elementStart(32,"option",10),e.\u0275\u0275text(33,"Choose category"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(34,_e,2,2,"option",11),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(35,Ce,4,0,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(36,"div",4)(37,"div",5),e.\u0275\u0275text(38," Creation Date: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(39,"div",6),e.\u0275\u0275element(40,"input",13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"div",4)(42,"div",5),e.\u0275\u0275text(43," Description: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"div",6)(45,"pulse-text-area",14),e.\u0275\u0275listener("valueChange",function(dn){return Dt.changeDescription(dn)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(46,"div",4)(47,"div",5),e.\u0275\u0275text(48," Is Sticky: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(49,"div",6),e.\u0275\u0275element(50,"input",15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(51,"div",4)(52,"div",5),e.\u0275\u0275text(53," Is Active: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(54,"div",6),e.\u0275\u0275element(55,"input",16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(56,"div",4)(57,"div",5),e.\u0275\u0275text(58," Upload Cover Photo: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(59,"div",6)(60,"input",17,18),e.\u0275\u0275listener("change",function(dn){return Dt.detectFilesCoverPhotos(dn)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(62,"a",19),e.\u0275\u0275listener("click",function(){return Dt.resetCoverPhoto()}),e.\u0275\u0275text(63,"Reset"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(64,"div",4)(65,"div",5),e.\u0275\u0275text(66," Cover Photo Position: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(67,"div",6)(68,"select",20),e.\u0275\u0275listener("change",function(dn){return Dt.changeCoverPhotoPosition(dn)}),e.\u0275\u0275elementStart(69,"option",10),e.\u0275\u0275text(70,"Choose position"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(71,me,2,2,"option",11),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(72,"div",4)(73,"div",5),e.\u0275\u0275text(74," Upload Attachments: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(75,"div",6)(76,"input",21,22),e.\u0275\u0275listener("change",function(dn){return Dt.detectFiles(dn)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(78,"a",19),e.\u0275\u0275listener("click",function(){return Dt.resetAttachments()}),e.\u0275\u0275text(79,"Reset"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(80,"div",23)(81,"a",24),e.\u0275\u0275listener("click",function(){return Dt.resetForm()}),e.\u0275\u0275text(82," Reset "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(83,"button",25),e.\u0275\u0275pipe(84,"async"),e.\u0275\u0275text(85," Submit "),e.\u0275\u0275elementEnd()()()()),2&We&&(e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",Dt.notificationItemForm),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngIf",Dt.isSubmitted&&(null==Dt.title?null:Dt.title.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngForOf",Dt.groups),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.isSubmitted&&(null==Dt.group?null:Dt.group.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("ngForOf",Dt.categories),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.isSubmitted&&(null==Dt.category?null:Dt.category.invalid)),e.\u0275\u0275advance(10),e.\u0275\u0275property("inputValue",Dt.descriptionHtml),e.\u0275\u0275advance(26),e.\u0275\u0275property("ngForOf",Dt.coverPhotoPositions),e.\u0275\u0275advance(12),e.\u0275\u0275property("disabled",e.\u0275\u0275pipeBind1(84,9,Dt.sendingRequest)))},directives:[a.a,m.\u0275NgNoValidate,m.NgControlStatusGroup,m.FormGroupDirective,m.DefaultValueAccessor,m.NgControlStatus,m.FormControlName,i.O5,m.SelectControlValueAccessor,m.NgSelectOption,m.\u0275NgSelectMultipleOption,i.sg,y.U,m.CheckboxControlValueAccessor],pipes:[i.Ov],styles:[".form-row[_ngcontent-%COMP%]{padding:4px 0}.pulse-select[_ngcontent-%COMP%]{padding:10px 12px;width:100%;border-radius:0;border-color:#becdd7}.form-row-invaid[_ngcontent-%COMP%]{color:red;margin-top:5px}"]}),ln})();var Re=r(19611),Ne=r(49059);function Ge(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",12),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",We," ")}}function Pe(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",12),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",Dt[We]," ")}}function Ae(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",13),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext().openModalEditItem(dn.id)}),e.\u0275\u0275template(1,Pe,3,1,"ng-container",9),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",We.tableHeader)}}let ve=(()=>{class ln{constructor(We,Dt,Kt){this._dialogService=We,this.projectService=Dt,this._notificationCenter=Kt,this.valueChanged=new w.xQ,this.tableHeader=["groupName","category","title","creationDate","isSticky","isActive"],this.subs=[],this.notifications$=new R.X([]),this.notificationsBeforeFilter$=new R.X([])}ngOnDestroy(){this.subs.forEach(We=>We.unsubscribe())}ngAfterViewInit(){this.valueChanged.pipe((0,Y.b)(300)).subscribe(Dt=>{if(Dt&&""!=Dt&&this.notifications$.value.length>0){const Kt=this.notifications$.value.filter(dn=>dn.title.search(new RegExp(Dt,"i"))>-1);this.notifications$.next(Kt)}else this.notifications$.next(this.notificationsBeforeFilter$.value)}),this.getAllNotifications();const We=(0,D.F)(1e4);this.subs.push(We.subscribe(Dt=>this.getAllNotifications()))}onSearchChange(We){this.searchText=We,this.valueChanged.next(We)}getAllNotifications(){this._notificationCenter.getAllNotifications().then(We=>{if(We)if(this.notificationsBeforeFilter$.next(We),this.searchText&&""!=this.searchText&&this.notifications$.value.length>0){const Dt=this.notifications$.value.filter(Kt=>Kt.title.search(new RegExp(this.searchText,"i"))>-1);this.notifications$.next(Dt)}else this.notifications$.next(this.notificationsBeforeFilter$.value)})}openModalAddItem(){this._dialogService.open(we,{callback:()=>{}})}openModalEditItem(We){this._dialogService.open(de,{callback:()=>{},notificationId:We})}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(O.x),e.\u0275\u0275directiveInject(u.k),e.\u0275\u0275directiveInject(_.v))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-notification-center-edit"]],decls:14,vars:10,consts:[[1,"notification-center-edit-container"],[1,"notification-center-edit-search-container"],["placeholderText","Search for notification",3,"searchText","disabledFilter","searchTextChange"],[1,"button-add-item",3,"click"],[1,"icon-plus2"],[1,"notification-center-edit-table-container"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],[4,"ngFor","ngForOf"],[1,"pulse-table-body"],["class","pulse-table-row",3,"click",4,"ngFor","ngForOf"],[1,"pulse-table-cell"],[1,"pulse-table-row",3,"click"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"pulse-search-box",2),e.\u0275\u0275listener("searchTextChange",function(dn){return Dt.onSearchChange(dn)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"a",3),e.\u0275\u0275listener("click",function(){return Dt.openModalAddItem()}),e.\u0275\u0275element(4,"i",4),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8),e.\u0275\u0275template(9,Ge,3,1,"ng-container",9),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",10),e.\u0275\u0275template(11,Ae,2,1,"div",11),e.\u0275\u0275pipe(12,"sortBy"),e.\u0275\u0275pipe(13,"async"),e.\u0275\u0275elementEnd()()()()),2&We&&(e.\u0275\u0275advance(2),e.\u0275\u0275property("searchText",Dt.searchText)("disabledFilter",!0),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngForOf",Dt.tableHeader),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind3(12,4,e.\u0275\u0275pipeBind1(13,8,Dt.notifications$),"creationDate",!0)))},directives:[Re.B,i.sg],pipes:[Ne.W,i.Ov],styles:[".notification-center-edit-container[_ngcontent-%COMP%]{margin:20px}.notification-center-edit-container[_ngcontent-%COMP%] .notification-center-edit-search-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:42px;margin-bottom:20px}.notification-center-edit-container[_ngcontent-%COMP%] .notification-center-edit-search-container[_ngcontent-%COMP%] > .button-add-item[_ngcontent-%COMP%]{flex:0 0 50px;flex-grow:0;flex-shrink:0;background:teal;color:#fff;display:flex;align-items:center;justify-content:center} pulse-search-box{flex:1} pulse-search-box .search-box .icon-search{left:14px;right:inherit} pulse-search-box .search-box .search-input{text-indent:28px}.pulse-table-cell[_ngcontent-%COMP%]{text-align:left!important;padding:8px 10px!important}.pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%]{cursor:pointer;background-color:#fff}.pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%]:nth-child(odd){background-color:#f2f2f2}"]}),ln})();var Oe=r(98613),Be=r(27859),ze=r(20688);const qe=["dialog"];function xt(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).addUser2Project(dn)}),e.\u0275\u0275elementStart(1,"div",15)(2,"div"),e.\u0275\u0275element(3,"span",21),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",15)(6,"div"),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",15)(9,"div"),e.\u0275\u0275text(10),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",15)(12,"div"),e.\u0275\u0275text(13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",15)(15,"div"),e.\u0275\u0275text(16),e.\u0275\u0275elementEnd()()()}if(2&ln){const We=Un.$implicit;e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",We.gid,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("",We.lastName,", ",We.firstName,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null==We.email?null:We.email.toLowerCase()),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.businessUnit1),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.orgId)}}function At(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13)(4,"div",14)(5,"div",15)(6,"div"),e.\u0275\u0275text(7,"GID"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",15)(9,"div"),e.\u0275\u0275text(10,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",15)(12,"div"),e.\u0275\u0275text(13,"E-Mail"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",15)(15,"div"),e.\u0275\u0275text(16,"Organization"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"div",15)(18,"div"),e.\u0275\u0275text(19,"Unit"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(20,"div",16)(21,"div",17),e.\u0275\u0275listener("showListChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().filteredUsers=Kt}),e.\u0275\u0275elementStart(22,"div",18),e.\u0275\u0275template(23,xt,17,6,"div",19),e.\u0275\u0275elementEnd()()()()()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("fxFlex","1 0 auto"),e.\u0275\u0275advance(20),e.\u0275\u0275property("rawList",We.filteredUsers)("showList",We.filteredUsers),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",We.filteredUsers)}}let Lt=(()=>{class ln{constructor(We){this.userService=We,this.filteredUsers=[],this.valueChanged=new w.xQ}ngOnInit(){this.valueChanged.pipe((0,Y.b)(500)).subscribe(We=>{We.length<3?this.filteredUsers=[]:this.userService.searchUser(We).then(Dt=>{this.filteredUsers=Dt})}),this.onSearchChange(this.searchText)}onSearchChange(We){this.valueChanged.next(We)}addUser2Project(We){this.userService.postUser2Project(this.projectId,We).then(Dt=>{this.dialog.close()})}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(Oe.K))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-user-management-add-user"]],viewQuery:function(We,Dt){if(1&We&&e.\u0275\u0275viewQuery(qe,7),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first)}},inputs:{projectId:"projectId",searchText:"searchText"},decls:13,vars:5,consts:[[3,"closeIcon","noCloseOutside"],["dialog",""],[1,"modal-header"],[1,"modal-body"],["placeholderText","Search users",3,"searchText","disabledFilter","searchTextChange"],["class","container",4,"ngIf"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],["title","Close",1,"icon-close2"],[1,"container"],[1,"user-table",3,"fxFlex"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],[1,"pulse-table-cell","left"],["id","tablescrollid"],["extendedTable","","rowSelector",".pulse-table-row","pulseInfinityScroll","","scrollContentId","tablescrollid",1,"pulse-table",3,"rawList","showList","showListChange"],[1,"pulse-table-body"],["class","pulse-table-row",3,"click",4,"ngFor","ngForOf"],[1,"pulse-table-row",3,"click"],[1,"icon-user-account","row-icon"]],template:function(We,Dt){if(1&We){const Kt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"div",2)(3,"h3"),e.\u0275\u0275text(4,"Add User"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3)(6,"pulse-search-box",4),e.\u0275\u0275listener("searchTextChange",function(pi){return Dt.onSearchChange(pi)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(7,At,24,4,"div",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"div",6)(9,"div",7)(10,"button",8),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Kt),e.\u0275\u0275reference(1).close()}),e.\u0275\u0275element(11,"i",9),e.\u0275\u0275text(12," Close"),e.\u0275\u0275elementEnd()()()()}2&We&&(e.\u0275\u0275property("closeIcon",!1)("noCloseOutside",!0),e.\u0275\u0275advance(6),e.\u0275\u0275property("searchText",Dt.searchText)("disabledFilter",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.filteredUsers))},directives:[a.a,Re.B,i.O5,E.yH,Be.h,ze.C,i.sg,E.xw,E.Wh,E.SQ],styles:[".search-input{border:1px solid #cdd9e1!important} .search-input:focus{border:1px solid #009999!important;box-shadow:inset 0 0 2px 2px #099}div.modal-header[_ngcontent-%COMP%]{margin:0 0 15px}div.container[_ngcontent-%COMP%]{width:800px;height:400px;overflow:auto}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}tr[_ngcontent-%COMP%]{height:3em}tr[_ngcontent-%COMP%]:hover{background-color:#879baa80}td[_ngcontent-%COMP%]{cursor:pointer}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:0 .5em;text-align:left;border:1px solid #cdd9e1}.pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%]{cursor:pointer}"]}),ln})();function qt(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",We.dups," duplicate users removed")}}function yt(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div",7)(1,"div",11),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(We.users)}}let Wt=(()=>{class ln{constructor(){}ngOnInit(){}}return ln.\u0275fac=function(We){return new(We||ln)},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-failed-users"]],inputs:{users:"users",dups:"dups"},decls:15,vars:4,consts:[[3,"minWidth","minHeight"],["dialog",""],[1,"modal-header"],[1,"modal-body"],[4,"ngIf"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],[1,"pulse-table-cell","center"],[1,"pulse-table-body"],["class","pulse-table-row",4,"ngFor","ngForOf"],[1,"pulse-table-cell","left"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"div",2)(3,"h3"),e.\u0275\u0275text(4," List of failed users "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275template(6,qt,2,1,"div",4),e.\u0275\u0275elementStart(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8),e.\u0275\u0275text(11,"E-Mail/ID"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(12,"div",5)(13,"div",9),e.\u0275\u0275template(14,yt,3,1,"div",10),e.\u0275\u0275elementEnd()()()()),2&We&&(e.\u0275\u0275property("minWidth",700)("minHeight",450),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",Dt.dups>0),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngForOf",Dt.users))},directives:[a.a,i.O5,i.sg],styles:[""]}),ln})();var gt=r(62474);function Et(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",8),e.\u0275\u0275text(1," Validation failed! "),e.\u0275\u0275elementEnd())}function Jt(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,Et,2,0,"div",4),e.\u0275\u0275elementStart(2,"div",5),e.\u0275\u0275text(3," Enter a list of users into the text area "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",5)(5,"textarea",6),e.\u0275\u0275listener("ngModelChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().cloneList=Kt}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().validateCloneList()}),e.\u0275\u0275text(7,"Validate"),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!We.validationSuccess),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngModel",We.cloneList)}}function en(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",23),e.\u0275\u0275text(1," Exists "),e.\u0275\u0275elementEnd())}function On(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",24),e.\u0275\u0275text(1," New "),e.\u0275\u0275elementEnd())}function Wn(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",25)(1,"input",26),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).users[dn].overwrite=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(2," Ignore "),e.\u0275\u0275elementStart(3,"input",27),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).users[dn].overwrite=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(4," Create "),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext().index,Dt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate("name","ignoreNew"+We),e.\u0275\u0275property("ngModel",Dt.users[We].overwrite),e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("name","createNew"+We),e.\u0275\u0275property("ngModel",Dt.users[We].overwrite)}}function an(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",25)(1,"input",26),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).users[dn].overwrite=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(2," Ignore "),e.\u0275\u0275elementStart(3,"input",27),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).users[dn].overwrite=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(4," Extend "),e.\u0275\u0275elementStart(5,"input",28),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).users[dn].overwrite=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(6," Overwrite "),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext().index,Dt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate("name","ignoreOld"+We),e.\u0275\u0275property("ngModel",Dt.users[We].overwrite),e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("name","extendOld"+We),e.\u0275\u0275property("ngModel",Dt.users[We].overwrite),e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("name","overviewOld"+We),e.\u0275\u0275property("ngModel",Dt.users[We].overwrite)}}function kn(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div",14)(1,"div",15),e.\u0275\u0275template(2,en,2,0,"div",20),e.\u0275\u0275template(3,On,2,0,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",15)(5,"div"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",15)(8,"div"),e.\u0275\u0275text(9),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",15)(11,"div"),e.\u0275\u0275text(12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"div",15)(14,"div"),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(16,"div",15)(17,"div"),e.\u0275\u0275text(18),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",15),e.\u0275\u0275template(20,Wn,5,4,"div",22),e.\u0275\u0275template(21,an,7,6,"div",22),e.\u0275\u0275elementEnd()()),2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",Dt.projectHasUser(We.user)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!Dt.projectHasUser(We.user)),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.user.gid),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("",We.user.lastName,", ",We.user.firstName,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.user.email),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.user.businessUnit1),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.user.orgId),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!Dt.projectHasUser(We.user)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.projectHasUser(We.user))}}function vn(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",29),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(2).submitUsers()}),e.\u0275\u0275text(1," Submit "),e.\u0275\u0275elementEnd()}}function Dn(ln,Un){1&ln&&(e.\u0275\u0275elementStart(0,"div",9),e.\u0275\u0275text(1," Submitted cloned user permissions! "),e.\u0275\u0275elementEnd())}function An(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",9),e.\u0275\u0275text(2," Validation success! "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",10),e.\u0275\u0275text(4," Set actions of all existing users to: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",11)(6,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().existingToIgnore()}),e.\u0275\u0275text(7," Ignore "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().existingToExtend()}),e.\u0275\u0275text(9," Extend "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().existingToOverwrite()}),e.\u0275\u0275text(11," Overwrite "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"div",12)(13,"div",13)(14,"div",14),e.\u0275\u0275element(15,"div",15),e.\u0275\u0275elementStart(16,"div",15)(17,"div"),e.\u0275\u0275text(18,"GID"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",15)(20,"div"),e.\u0275\u0275text(21,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(22,"div",15)(23,"div"),e.\u0275\u0275text(24,"E-Mail"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",15)(26,"div"),e.\u0275\u0275text(27,"Organization"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"div",15)(29,"div"),e.\u0275\u0275text(30,"Unit"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"div",15)(32,"div"),e.\u0275\u0275text(33,"Action"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(34,"div",12)(35,"div",16),e.\u0275\u0275template(36,kn,22,10,"div",17),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(37,vn,2,0,"button",18),e.\u0275\u0275template(38,Dn,2,0,"div",19),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(36),e.\u0275\u0275property("ngForOf",We.users),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!We.submitted),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.submitted)}}let Zn=(()=>{class ln{constructor(We,Dt,Kt){this.webApiService=We,this.projectService=Dt,this.dialogService=Kt,this.validationCompleted=!1,this.validationSuccess=!0,this.submitted=!1,this.users=[],this.user={},this.failedUsers=[]}ngOnInit(){this.webApiService.get("/api/project/admin/"+this.projectService.projectId+"/user").then(We=>{this.projectUsers=We})}validateCloneList(){const We=this.cloneList.split(/,| |;|\n/);this.users=[],We.length>0&&this.pushNextUser(We,0)}pushNextUser(We,Dt){We[Dt]&&We[Dt].length>0?this.webApiService.post("/api/scd/search",{search:We[Dt]}).then(Kt=>{if(1===Kt.length){if(!this.deepListHasUser(this.users,Kt[0])&&Kt[0].gid!==this.user.gid){let dn;dn=this.projectHasUser(Kt[0])?{user:Kt[0],overwrite:"2"}:{user:Kt[0],overwrite:"1"},this.users.push(dn)}++Dt0?this.validationSucceed():(this.failedUsers.push(We[Dt]),++DtKt.user.gid===Dt.gid).length>0}projectHasUser(We){return this.listHasUser(this.projectUsers,We)}listHasUser(We,Dt){return We.filter(Kt=>Kt.gid===Dt.gid).length>0}validationSucceed(){this.validationSuccess=!0,this.validationCompleted=!0,this.failedUsers.length>0&&this.loadFailedUsers(this.failedUsers)}loadFailedUsers(We){this.dialogService.open(Wt,{users:this.removeDuplicates(We)[0],dups:this.removeDuplicates(We)[1]})}removeDuplicates(We){const Dt=[];let Kt=0;for(let dn=0;dn0?this.webApiService.post("/api/project/admin/"+this.projectService.projectId+"/user/"+this.selectedUser.gid+"/clone",We).then(()=>{this.submitted=!0}):this.submitted=!0}existingToIgnore(){for(let We=0;We{class ln{constructor(We){this.userService=We}deleteUser2Project(){this.userService.deleteUser2Project(this.projectId,this.user).then(We=>{this.result.deleted=!0,this.dialog.close()})}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(Oe.K))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-user-management-delete-user"]],viewQuery:function(We,Dt){if(1&We&&e.\u0275\u0275viewQuery(Qn,7),2&We){let Kt;e.\u0275\u0275queryRefresh(Kt=e.\u0275\u0275loadQuery())&&(Dt.dialog=Kt.first)}},inputs:{projectId:"projectId",user:"user",result:"result"},decls:16,vars:2,consts:[["dialog",""],[1,"modal-header"],[1,"modal-body"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","success",3,"click"],["title","Close",1,"icon-minus"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],["title","Close",1,"icon-close2"]],template:function(We,Dt){if(1&We){const Kt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),e.\u0275\u0275text(4,"Delete User"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",2)(6,"p"),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",3)(9,"div",4)(10,"button",5),e.\u0275\u0275listener("click",function(){return Dt.deleteUser2Project()}),e.\u0275\u0275element(11,"i",6),e.\u0275\u0275text(12," Yes "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Kt),e.\u0275\u0275reference(1).close()}),e.\u0275\u0275element(14,"i",8),e.\u0275\u0275text(15," No "),e.\u0275\u0275elementEnd()()()()}2&We&&(e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate2(" Do you really want to delete the user (",Dt.user.firstName," ",Dt.user.lastName,") from the project? "))},directives:[a.a,E.xw,E.Wh,E.SQ,E.yH],styles:["p[_ngcontent-%COMP%]{font-size:14pt}"]}),ln})(),Gi=(()=>{class ln{constructor(We,Dt,Kt){this.userService=We,this.projectService=Dt,this.toastr=Kt,this.hierarchyPermissionKeyList=new Array,this.hierarchyPermissionList=new Array,this.permloading=!0,this.userLoading={hierarchy:!1,global:!1},this.globalObjectPermissionKeyList=new Array,this.globalObjectPermissionList=new Array,this.goloading=!0,this.navbarTabs=new Array,this.savedChangesOpacity=0,this.intervalId=null,this._newUserSelected$=new R.X(void 0),this.newUserSelected$=this._newUserSelected$}selectNewUser(We){this._newUserSelected$.next(We)}getActiveElements(We,Dt){if(We.length>0){We.forEach(Kt=>Kt.active=!1);for(let Kt=0;Ktdn.id===Dt[Kt].roleId)&&(We.find(dn=>dn.id===Dt[Kt].roleId).active=!0)}}getCategories(We,Dt){for(let Kt=0;Ktpi===We[Kt].category)||Dt.push(We[Kt].category)}splitElementsByCategory(We,Dt,Kt){for(let dn=0;dnnr.category===We[dn]);Kt[dn]=pi}}checkAllElementsStatus(We,Dt,Kt){for(let dn=0;dn{Kt[dn]=Kt[dn]||pi.active,Dt[dn]=Dt[dn]&&pi.active}),Dt[dn]&&(Kt[dn]=!1)}getPermissionIndexWhole(We,Dt){return this.getPermissions(Dt).findIndex(Kt=>Kt.Name===We.Name)}getPermissions(We){return this.hierarchyPermissionList[We]}loadHierarchyPermission(We){this.permloading=!0,this.userLoading.hierarchy=!0,this.userService.getHierarchyPermissions(this.projectService.projectId,We).then(Dt=>{this.permloading=!1,this.hierarchyPermissionKeyList=new Array,this.hierarchyPermissionList=new Array;for(let Kt=0;Kt{this.goloading=!1;const pi=dn[0],nr=dn[1];this.globalObjectPermissionKeyList=new Array,this.globalObjectPermissionList=new Array;for(let or=0;orbi.globalObjectId===pi[or].id).length>0&&(pi[or].isChecked=!0),void 0!==this.globalObjectPermissionList[pi[or].category]?this.globalObjectPermissionList[pi[or].category].push(pi[or]):(this.globalObjectPermissionList[pi[or].category]=new Array,this.globalObjectPermissionList[pi[or].category].push(pi[or]),this.insertTab(this.globalObjectPermissionKeyList,pi[or].category));this.userLoading.global=!1})}insertTab(We,Dt){let Kt=1;for(;Kt=Kt+1&&dn.tabIndex++;for(const dn of this.globalObjectPermissionKeyList)dn.tabIndex>=Kt+1&&dn.tabIndex++;We.push({category:Dt,tabIndex:Kt+1})}getCheckState(We){let Dt=!1,Kt=!1;for(let dn=0;dn0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.values.project.pptExport>0)}}function He(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",8)(1,"label")(2,"input",9),e.\u0275\u0275listener("change",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(4).updateUser(!0)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3," Project Management "),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(2),e.\u0275\u0275property("checked",1===We.user.group_pm)}}function $e(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",8)(1,"label")(2,"input",9),e.\u0275\u0275listener("change",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(4).updateUser(!1)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3," Mapping Table "),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(2),e.\u0275\u0275property("checked",1===We.user.group_mapping_table)}}function Ke(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",6)(2,"label")(3,"input",9),e.\u0275\u0275listener("change",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(3).allAdditionalChange()}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(4," Additional Groups "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(5,He,4,1,"div",11),e.\u0275\u0275template(6,$e,4,1,"div",11),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(3),e.\u0275\u0275property("checked",We.general.allAdditional&&1===We.user.group_pm&&1===We.user.group_mapping_table||We.general.onlyPm&&1===We.user.group_pm||We.general.onlyMt&&1===We.user.group_mapping_table),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",We.values.project.pm_project>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.values.project.id_mapping_table>0)}}function vt(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,ot,7,3,"div",10),e.\u0275\u0275template(2,Ke,7,3,"div",1),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.values.configs.length>0||We.values.project.pptExport>0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.values.project.pm_project>0||We.values.project.id_mapping_table>0)}}function Nt(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,Ct,3,2,"div",2),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275template(3,vt,3,2,"div",1),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind1(2,2,We.valueChanged)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",We.values)}}let Qt=(()=>{class ln{constructor(We,Dt,Kt){this.userService=We,this.userManagementService=Dt,this.toastr=Kt,this.general={},this.allRolesChecked=[],this.allGeneralRolesChecked=[],this.checkboxIndeterminate=[],this.generalCheckboxIndeterminate=[],this.valueChanged=new R.X([]),this.roleCategories=[],this.splitRoles=[],this.subs=[]}ngOnInit(){this.subs.push(this.userManagementService.newUserSelected$.subscribe(We=>{We&&(this.splitRoles=[],this.userRoles=[],this.user2Role=[],this.roleCategories=[],this.initSub&&this.initSub.unsubscribe(),this.initSub=this.userService.initGeneralRoles(this.projectId,this.userId).subscribe(({configs:Dt,project:Kt,user2Project:dn})=>{Dt&&Kt&&dn&&(this.values={configs:Dt,project:Kt,user2Project:dn},this.initGeneral(Dt,Kt),this.getUserRoles())}))}),this.userService.user.subscribe(We=>this.user=We))}ngOnDestroy(){this.subs.forEach(We=>We.unsubscribe())}getUserRoles(){this.userService.getUserRoles(this.projectId,this.userId).then(We=>{this.userRoles=We,this.getUser2Role()})}getUser2Role(){this.userService.getUser2Role(this.projectId,this.userId).then(We=>{this.user2Role=We,this.getActiveRoles(),this.getRoleCategories(),this.splitRolesByCategory()})}getActiveRoles(){this.userManagementService.getActiveElements(this.userRoles,this.user2Role)}getRoleCategories(){this.userManagementService.getCategories(this.userRoles,this.roleCategories)}splitRolesByCategory(){this.splitRoles=new Array(this.roleCategories.length),this.userManagementService.splitElementsByCategory(this.roleCategories,this.userRoles,this.splitRoles),this.checkAllRolesStatus()}checkAllRolesStatus(){this.userManagementService.checkAllElementsStatus(this.splitRoles,this.allRolesChecked,this.checkboxIndeterminate),this.splitRoles=this.splitRoles.filter(We=>We&&We.length&&void 0!==We[0].category),this.valueChanged.next(this.splitRoles)}onActiveRoleChange(We,Dt){const Kt=this.findCategoryFromSearch(We),dn=this.findRoleFromSearch(Kt,We,Dt),nr=this.splitRoles[Kt][dn],or=this.user2Role.find(bi=>bi.userId===this.userId&&bi.roleId===nr.id);or?(this.removeUser2Role(or),nr.active=!1,this.checkAllRolesStatus()):(this.addUser2Role(or,nr.id),nr.active=!0,this.checkAllRolesStatus())}onAllRolesChange(We){const Dt=this.findCategoryFromSearch(We);this.allRolesChecked[Dt]=!this.allRolesChecked[Dt],this.allRolesChecked[Dt]?(this.addAllUser2Roles(Dt),this.checkboxIndeterminate[Dt]=!1):(this.removeAllUser2Roles(Dt),this.checkboxIndeterminate[Dt]=!1)}removeUser2Role(We){this.userService.deleteUser2Role(this.projectId,this.userId,We.roleId).then(Dt=>{this.userManagementService.showSavedChanges()}),7===We.roleId&&this.userService.setUserProjectAdmin(this.projectId,this.userId),this.user2Role.splice(this.user2Role.indexOf(We),1)}removeAllUser2Roles(We){this.splitRoles[We].forEach(Dt=>{const Kt=this.user2Role.find(dn=>dn.userId===this.userId&&dn.roleId===Dt.id);Kt&&(this.removeUser2Role(Kt),Dt.active=!1)})}addUser2Role(We,Dt){(We={}).projectId=this.projectId,We.roleId=Dt,We.userId=this.userId,this.userService.postUser2Role(this.projectId,this.userId,We).then(Kt=>{this.userManagementService.showSavedChanges()}),7===Dt&&this.userService.setUserProjectAdmin(this.projectId,null,{id_project:this.projectId,id_user:this.userId}),this.user2Role.push(We)}addAllUser2Roles(We){this.splitRoles[We].forEach(Dt=>{const Kt=this.user2Role.find(dn=>dn.userId===this.userId&&dn.roleId===Dt.id);void 0===Kt&&(this.addUser2Role(Kt,Dt.id),Dt.active=!0)})}updateUser2Project(We,Dt){Dt?We.rawExport^=1:We.pptExport^=1,this.userService.updateUser2Project(We,this.projectId,this.userId)}updateUser(We){We?this.user.group_pm^=1:this.user.group_mapping_table^=1,this.userService.updateUser(this.projectId,this.user)}initGeneral(We,Dt){this.general.allDataService=Dt.pptExport>0&&We.length>0,this.general.allAdditional=Dt.pm_project>0&&Dt.id_mapping_table>0,this.general.onlyRaw=!(Dt.pptExport>0)&&We.length>0,this.general.onlyPpt=Dt.pptExport>0&&!(We.length>0),this.general.onlyMt=!(Dt.pm_project>0)&&Dt.id_mapping_table>0,this.general.onlyPm=Dt.pm_project>0&&!(Dt.id_mapping_table>0)}allDataServiceChange(We){switch(!0){case this.general.allDataService:this.updateUser2Project(We,!0),this.updateUser2Project(We,!1);break;case this.general.onlyRaw:this.updateUser2Project(We,!0);break;case this.general.onlyPpt:this.updateUser2Project(We,!1)}}allAdditionalChange(){switch(!0){case this.general.allAdditional:this.updateUser(!0),this.updateUser(!1);break;case this.general.onlyPm:this.updateUser(!0);break;case this.general.onlyMt:this.updateUser(!1)}}onSearchChange(We){const Dt=this.splitRoles.map(Kt=>Kt.filter(pi=>pi.name&&pi.name.toLowerCase().indexOf(We.toLowerCase())>=0)).filter(Kt=>Kt.length>0);this.valueChanged.next(Dt)}findCategoryFromSearch(We){return this.splitRoles.findIndex(Dt=>Dt[0]&&Dt[0].category===this.valueChanged.value[We][0].category)}findRoleFromSearch(We,Dt,Kt){return this.splitRoles[We].findIndex(dn=>dn.key===this.valueChanged.value[Dt][Kt].key)}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(Oe.K),e.\u0275\u0275directiveInject(Gi),e.\u0275\u0275directiveInject(g._W))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-user-management-roles"]],inputs:{projectId:"projectId",userId:"userId"},decls:2,vars:2,consts:[["placeholderText","Search",3,"disabledFilter","searchTextChange"],[4,"ngIf"],["fxLayout","row wrap","class","panel",4,"ngFor","ngForOf"],["fxLayout","row wrap",1,"panel"],["fxFlex","100%","class","panel-heading",4,"ngIf"],["fxFlex","100%","class","panel-row",4,"ngFor","ngForOf"],["fxFlex","100%",1,"panel-heading"],["type","checkbox",1,"management-checkbox",3,"checked","indeterminate","change"],["fxFlex","100%",1,"panel-row"],["type","checkbox",1,"management-checkbox",3,"checked","change"],["fxLayout","row wrap","class","panel",4,"ngIf"],["fxFlex","100%","class","panel-row",4,"ngIf"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-search-box",0),e.\u0275\u0275listener("searchTextChange",function(dn){return Dt.onSearchChange(dn)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(1,Nt,4,4,"div",1)),2&We&&(e.\u0275\u0275property("disabledFilter",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.splitRoles))},directives:[Re.B,i.O5,i.sg,E.xw,E.yH],pipes:[i.Ov],styles:[".pulse-nav-links{margin:0!important} .pulse-nav-team a{margin:10px 15px 0 0!important;padding:10px 5px 7px!important}label[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{cursor:pointer}"]}),ln})();var sn=r(27737);function yn(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div",7)(1,"label"),e.\u0275\u0275element(2,"input",8),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()()),2&ln){const We=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",We.name," ")}}function Ft(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,yn,4,1,"div",6),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1==We.flagPublic)}}function tn(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"div",4)(3,"label"),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275template(6,Ft,2,1,"ng-container",5),e.\u0275\u0275elementEnd()()),2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("Project ",We.permissionKey,"s"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",We.selectedElements)}}function on(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",7)(1,"label")(2,"input",10),e.\u0275\u0275listener("ngModelChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().$implicit.isChecked=Kt})("change",function(){e.\u0275\u0275restoreView(We);const Kt=e.\u0275\u0275nextContext().$implicit,dn=e.\u0275\u0275nextContext(2);return dn.onActivePermissionChange(Kt,Kt.isChecked),dn.setParentCheckState()}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275property("ngModel",We.isChecked),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We.name," ")}}function Tn(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,on,4,2,"div",6),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1!==We.flagPublic)}}function $n(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"div",4)(3,"label")(4,"input",9),e.\u0275\u0275listener("ngModelChange",function(Kt){e.\u0275\u0275restoreView(We);const dn=e.\u0275\u0275nextContext();return dn.selector[dn.permissionKey]=Kt})("change",function(){e.\u0275\u0275restoreView(We);const Kt=e.\u0275\u0275nextContext();return Kt.isIndeterminate=!1,Kt.multiSelection(Kt.selectedElements,Kt.selector[Kt.permissionKey])})("indeterminateChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().isIndeterminate=Kt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(6,"div",3),e.\u0275\u0275template(7,Tn,2,1,"ng-container",5),e.\u0275\u0275elementEnd()()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275property("ngModel",We.selector[We.permissionKey])("indeterminate",We.isIndeterminate),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" All ",We.permissionKey,"s "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",We.selectedElements)}}let ii=(()=>{class ln{constructor(We,Dt,Kt){this.userService=We,this.userMgmService=Dt,this.toastr=Kt,this.selector=new Array,this.selectedElements=[]}ngOnInit(){this.selectedElements=this.userMgmService.globalObjectPermissionList[this.permissionKey],this.setParentCheckState()}onActivePermissionChange(We){const Dt={globalObjectId:We.id,userId:this.userId};We.isChecked?this.userService.postUser2GlobalObject(this.userId,this.projectId,Dt).then(Kt=>{this.userMgmService.showSavedChanges()}).catch(Kt=>{console.log(Kt,Kt)}):this.userService.deleteUser2GlobalObject(this.userId,this.projectId,Dt.globalObjectId).then(Kt=>{this.userMgmService.showSavedChanges(),We.type===sn.S.dashboard&&this.userService.deleteDashboardPermissions(We.id,this.userGid).then(dn=>{console.log("Permission deleted")})}).catch(Kt=>{console.log(Kt,Kt)})}multiSelection(We,Dt){for(let Kt=0;Kt0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.countElements(Dt.selectedElements,0)>0||Dt.countElements(Dt.selectedElements,void 0)>0))},directives:[Re.B,i.O5,E.xw,E.yH,i.sg,m.CheckboxControlValueAccessor,m.NgControlStatus,m.NgModel],styles:["label[_ngcontent-%COMP%]{cursor:pointer}"]}),ln})();var $i=r(75778),Wi=r(92198),yi=r(22868);function Fr(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(We);const Kt=e.\u0275\u0275nextContext(),dn=Kt.index,pi=Kt.$implicit,nr=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext(2).updateColumnValues(nr,dn,pi)}),e.\u0275\u0275elementStart(1,"a"),e.\u0275\u0275text(2,"Show all items"),e.\u0275\u0275elementEnd()()}}const Rr=function(ln){return{noPointer:ln}};function _s(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",15)(1,"label",10)(2,"input",16),e.\u0275\u0275listener("ngModelChange",function(Kt){return e.\u0275\u0275restoreView(We).$implicit.isChecked=Kt})("change",function(){const dn=e.\u0275\u0275restoreView(We).$implicit,pi=e.\u0275\u0275nextContext().$implicit,nr=e.\u0275\u0275nextContext().$implicit,or=e.\u0275\u0275nextContext(2);return or.onActivePermissionChange(nr,dn),or.setParentCheckState(pi)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()()}if(2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(4,Rr,Dt.allowAll)),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",Dt.allowAll)("ngModel",We.isChecked),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We.Name," ")}}const br=function(ln){return{border:ln}};function lr(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",4)(1,"div",9)(2,"div")(3,"label",10)(4,"input",11),e.\u0275\u0275listener("ngModelChange",function(Kt){const pi=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(3).columnSelector[pi.Name]=Kt})("click",function(){const Kt=e.\u0275\u0275restoreView(We),dn=Kt.$implicit,pi=Kt.index,nr=e.\u0275\u0275nextContext().$implicit,or=e.\u0275\u0275nextContext(2);return or.isIndeterminate[dn.Name]=!1,or.multiSelection(dn,nr,pi,or.columnSelector[dn.Name])}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(6,Fr,3,0,"div",12),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(7,_s,4,6,"div",13),e.\u0275\u0275elementEnd()}if(2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext().$implicit,Kt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(8,br,0==We.Items.length?"none":null)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(10,Rr,Dt.allowAll)),e.\u0275\u0275advance(1),e.\u0275\u0275property("disabled",Dt.allowAll)("ngModel",Kt.columnSelector[We.Name])("indeterminate",Kt.isIndeterminate[We.Name]),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",We.Name," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.TooManyItems),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",We.ItemsFiltered)}}function Hr(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",3)(1,"div",4)(2,"div",5),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",4)(5,"div",6)(6,"label"),e.\u0275\u0275text(7,"Allow all"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"input",7),e.\u0275\u0275listener("change",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).onActivePermissionChange(dn,{isChecked:dn.allowAll})})("ngModelChange",function(Kt){return e.\u0275\u0275restoreView(We).$implicit.allowAll=Kt}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(9,lr,8,12,"div",8),e.\u0275\u0275elementEnd()}if(2&ln){const We=Un.$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",We.Name," "),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",We.allowAll),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",We.ColumnsFiltered)}}function fs(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,Hr,10,3,"div",2),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind1(2,1,We.valueChanged$))}}let Ts=(()=>{class ln{constructor(We,Dt,Kt){this.userService=We,this.userMgmService=Dt,this.toastr=Kt,this.currentSearchValue=null,this.columnSelector=new Array,this.isIndeterminate=new Array,this.subs=[],this.valueChanged$=new R.X([]),this.onSearchChange$=new R.X("")}ngOnInit(){for(const We of this.userMgmService.hierarchyPermissionList[this.permissionKey])for(const Dt of We.Columns)this.setParentCheckState(Dt);this.subs.push(this.onSearchChange$.pipe((0,Y.b)(500),(0,$i.x)(),(0,Wi.h)(We=>We!==this.currentSearchValue),(0,yi.b)(We=>this.currentSearchValue=We)).subscribe(We=>{this.updateSearchColumnValues(),this.onSearchChange(We)}))}onActivePermissionChange(We,Dt){this.userService.updateHierarchyPermission({isChecked:Dt.isChecked,configId:We.Id,column:Dt.columnName?Dt.columnName:null,value:Dt.Name?Dt.Name:null},this.projectId,this.userId).then(dn=>{this.userMgmService.showSavedChanges()}).catch(dn=>{console.log(dn,dn)})}updateSearchColumnValues(){const We=this.userMgmService.getPermissions(this.permissionKey);return this.userService.getHierarchyPermission(this.projectId,this.userId,null,this.onSearchChange$.value,null).then((Dt=>{We.forEach(Kt=>{Kt.Columns.forEach(dn=>{this.setColumnValuesFromFetch(Dt,Kt,dn,We,dn.id)})})}).bind(this))}updateColumnValues(We,Dt,Kt){const dn=this.userMgmService.getPermissionIndexWhole(We,this.permissionKey),pi=this.userMgmService.hierarchyPermissionList[this.permissionKey];return this.userService.getHierarchyPermission(this.projectId,this.userId,pi[dn].ColumnsFiltered[Dt].id,this.onSearchChange$.value,Kt.id).then(nr=>{this.setColumnValuesFromFetch(nr,We,Kt,pi,Kt.id)})}setColumnValuesFromFetch(We,Dt,Kt,dn,pi){const nr=this.userMgmService.hierarchyPermissionList[this.permissionKey].findIndex(ri=>ri.Name===Dt.Name),or=dn[this.userMgmService.getPermissionIndexWhole(Dt,this.permissionKey)].Columns.findIndex(ri=>ri.id===pi),bi=dn[this.userMgmService.getPermissionIndexWhole(Dt,this.permissionKey)].ColumnsFiltered.findIndex(ri=>ri.id===pi),jn=We.find(ri=>ri.Name===Dt.Name&&ri.Category===this.permissionKey).Columns.find(ri=>ri.id===Kt.id);dn[nr].Columns[or]=jn,dn[nr].ColumnsFiltered[bi]=jn,this.onSearchChange(this.onSearchChange$.value)}multiSelection(We,Dt,Kt,dn){const pi=this.userMgmService.getPermissions(this.permissionKey),nr=this.userMgmService.getPermissionIndexWhole(Dt,this.permissionKey);this.updateColumnValues(Dt,Kt,We).then(()=>{const or=pi[nr].ColumnsFiltered.find(bi=>bi.id===We.id);for(let bi=0;bi(Kt.ColumnsFiltered=Kt.Columns.filter(dn=>{let pi=null==We||""==We||dn.Name.toLowerCase().indexOf(We.toLowerCase())>=0||Kt.Category.toLowerCase().indexOf(We.toLowerCase())>=0;return dn.ItemsFiltered=dn.Items.filter(nr=>{const or=nr.Name.toLowerCase().indexOf(We.toLowerCase())>=0;return pi=or||pi,or}),pi}),console.log(Kt.ColumnsFiltered),Kt)).filter(Kt=>Kt.ColumnsFiltered.length||Kt.Category.toLowerCase().indexOf(We.toLowerCase())>=0);this.valueChanged$.next(Dt)}}return ln.\u0275fac=function(We){return new(We||ln)(e.\u0275\u0275directiveInject(Oe.K),e.\u0275\u0275directiveInject(Gi),e.\u0275\u0275directiveInject(g._W))},ln.\u0275cmp=e.\u0275\u0275defineComponent({type:ln,selectors:[["pulse-user-management-hierarchy-permission"]],inputs:{projectId:"projectId",userId:"userId",permissionKey:"permissionKey"},decls:2,vars:2,consts:[["placeholderText","Search",3,"disabledFilter","searchTextChange"],[4,"ngIf"],["class","hierarchy-permission-group",4,"ngFor","ngForOf"],[1,"hierarchy-permission-group"],["fxLayout","row wrap",1,"panel"],["fxFlex","100%",1,"panel-heading"],["fxFlex","100%",1,"panel-heading",2,"border-bottom","none"],["type","checkbox",1,"management-checkbox",3,"ngModel","change","ngModelChange"],["fxLayout","row wrap","class","panel",4,"ngFor","ngForOf"],["fxFlex","100%",1,"panel-heading",3,"ngStyle"],[3,"ngClass"],["type","checkbox",1,"management-checkbox",3,"disabled","ngModel","indeterminate","ngModelChange","click"],[3,"click",4,"ngIf"],["fxFlex","100%","class","panel-row",4,"ngFor","ngForOf"],[3,"click"],["fxFlex","100%",1,"panel-row"],["type","checkbox",1,"management-checkbox",3,"disabled","ngModel","ngModelChange","change"]],template:function(We,Dt){1&We&&(e.\u0275\u0275elementStart(0,"pulse-search-box",0),e.\u0275\u0275listener("searchTextChange",function(dn){return Dt.onSearchChange$.next(dn)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(1,fs,3,3,"div",1)),2&We&&(e.\u0275\u0275property("disabledFilter",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.userMgmService.hierarchyPermissionList[Dt.permissionKey]))},directives:[Re.B,i.O5,i.sg,E.xw,E.yH,m.CheckboxControlValueAccessor,m.NgControlStatus,m.NgModel,i.PC,Ve.Zl,i.mk,Ve.oO],pipes:[i.Ov],styles:["label[_ngcontent-%COMP%]{cursor:pointer}label.noPointer[_ngcontent-%COMP%]{cursor:default}"]}),ln})();const ur=["tablescrollid"];function Ys(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).showUser(dn)}),e.\u0275\u0275elementStart(1,"div",13)(2,"div"),e.\u0275\u0275element(3,"span",22),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",13)(6,"div"),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",13)(9,"div"),e.\u0275\u0275text(10),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",13)(12,"div"),e.\u0275\u0275text(13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",13)(15,"div"),e.\u0275\u0275text(16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"div",23)(18,"a",24),e.\u0275\u0275listener("click",function(){const dn=e.\u0275\u0275restoreView(We).$implicit;return e.\u0275\u0275nextContext(2).deleteUser(dn)}),e.\u0275\u0275elementEnd()()()}if(2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("ngClass",Dt.userMgmService.userLoading.hierarchy||Dt.userMgmService.userLoading.global?"userLoading":""),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",We.gid,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("",We.lastName,", ",We.firstName,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null==We.email?null:We.email.toLowerCase()),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.businessUnit1),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.orgId)}}function Jr(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275element(1,"pulse-user-management-roles",34),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("projectId",We.projectService.projectId)("userId",We.selectedUser.id)}}function zr(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275element(1,"pulse-user-management-global-object-permission",35),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext().$implicit,Dt=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("projectId",Dt.projectService.projectId)("permissionKey",We.category)("userId",Dt.selectedUser.id)("userGid",Dt.selectedUser.gid)}}function ys(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,zr,2,4,"div",32),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.activeTab==We.tabIndex)}}function Ls(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275element(1,"pulse-user-management-hierarchy-permission",36),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext().$implicit,Dt=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("projectId",Dt.projectService.projectId)("permissionKey",We.category)("userId",Dt.selectedUser.id)}}function os(ln,Un){if(1&ln&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Ls,2,3,"div",32),e.\u0275\u0275elementContainerEnd()),2&ln){const We=Un.$implicit,Dt=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Dt.activeTab==We.tabIndex)}}function jr(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",27)(1,"h3")(2,"div"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",28),e.\u0275\u0275element(5,"span",29),e.\u0275\u0275text(6," all saved"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div")(8,"a",30),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(3).closeUserDetails()}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(9,"pulse-tab-navigation",31),e.\u0275\u0275listener("activeTabChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext(3).onActiveTabChange(Kt)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(10,"pulse-spinner",8),e.\u0275\u0275template(11,Jr,2,2,"div",32),e.\u0275\u0275template(12,ys,2,1,"ng-container",33),e.\u0275\u0275template(13,os,2,1,"ng-container",33),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("ngClass",We.showUserDetails?"user-details-opened":"user-details"),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(We.selectedUser.firstName+" "+We.selectedUser.lastName),e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("opacity",We.userMgmService.savedChangesOpacity),e.\u0275\u0275advance(5),e.\u0275\u0275property("navbarTabs",We.userMgmService.navbarTabs)("activeTab",We.activeTab)("isTransparent",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("isRelative",!1)("isSpin",We.userMgmService.permloading||We.userMgmService.goloading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1===We.activeTab),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",We.userMgmService.globalObjectPermissionKeyList),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",We.userMgmService.hierarchyPermissionKeyList)}}function Zr(ln,Un){if(1&ln&&(e.\u0275\u0275elementStart(0,"div",25),e.\u0275\u0275template(1,jr,14,12,"div",26),e.\u0275\u0275elementEnd()),2&ln){const We=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("fxFlex","1 0 50%"),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.selectedUser)}}const ts=function(ln){return{userInfoOpen:ln}},qi=function(ln){return{tableScroll:ln}};function Hs(ln,Un){if(1&ln){const We=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275element(1,"pulse-spinner",8),e.\u0275\u0275elementStart(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"div",13)(7,"div"),e.\u0275\u0275text(8,"GID"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"div",13)(10,"div"),e.\u0275\u0275text(11,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"div",13)(13,"div"),e.\u0275\u0275text(14,"E-Mail"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(15,"div",13)(16,"div"),e.\u0275\u0275text(17,"Organization"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(18,"div",13)(19,"div"),e.\u0275\u0275text(20,"Unit"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(21,"div",14),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(22,"div",15,16)(24,"div",17),e.\u0275\u0275listener("showListChange",function(Kt){return e.\u0275\u0275restoreView(We),e.\u0275\u0275nextContext().visibleUsers=Kt}),e.\u0275\u0275elementStart(25,"div",18),e.\u0275\u0275template(26,Ys,19,7,"div",19),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(27,Zr,2,2,"div",20),e.\u0275\u0275elementEnd()}if(2&ln){const We=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("isRelative",!1)("isSpin",We.excelLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(8,ts,We.showUserDetails)),e.\u0275\u0275advance(19),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(10,qi,We.tableScroll)),e.\u0275\u0275advance(3),e.\u0275\u0275property("rawList",We.filteredUsers)("showList",We.visibleUsers),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",We.visibleUsers),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",We.showUserDetails)}}let as=(()=>{class ln{constructor(We,Dt,Kt,dn,pi,nr,or){this.projectService=We,this.userService=Dt,this.userMgmService=Kt,this.headerService=dn,this.dialogService=pi,this.webApiService=nr,this.document=or,this.tableScroll=!1,this.topPadding=0,this.estimatedRowHeight=40,this.tblHeight=100,this.dashboardLoaded=!1,this.searchText="",this.searchKeys=["gid","firstName","lastName","businessUnit1","orgId","email"],this.activeTab=1,this.userInfoOpen="",this.visibleUsers=[],this.addActionItem={label:"Add User",callback:()=>{this.addUser()},icon:"icon-plus2"},this.permissionsItem={label:"Permissions",callback:()=>{this.openDownloadModal()},icon:"icon-download"},this.cloneItem={label:"Clone User",callback:()=>{this.openCloneModal()},icon:"icon-forum2"}}ngOnInit(){this.updateUserList(),this.headerService.showHeader=!0,this.headerService.addAction(this.addActionItem),this.userService.user.subscribe(We=>{We&&this.showDownloadButton("canuseradministraion",We.id).then(Dt=>{(Dt||1===We.admin)&&this.headerService.addAction(this.permissionsItem)})})}ngOnDestroy(){this.headerService.removeAction(this.addActionItem),this.headerService.removeAction(this.cloneItem),this.headerService.removeAction(this.permissionsItem)}ngOnChanges(){this.checkTableScroll()}updateUserList(){this.projectService.getUser(!0).then(We=>{this.projectUsers=We,this.filteredUsers=We,this.projectUsersCount=this.projectUsers.length,this.visibleUsersCount=this.projectUsers.length}).then(()=>{this.checkTableScroll()})}openDownloadModal(){this.excelLoading=!0,this.webApiService.get("/api/project/GetPermissionAsExcel/"+this.projectService.projectId).then(We=>{if(We){const Dt="https://add1.pulse.siemens.cloud/"+We.substring(We.indexOf("uploads"),We.length);window.open(Dt,"_blank")}this.excelLoading=!1})}showUser(We){this.userInfoOpen="infoOpen",(!this.selectedUser||this.selectedUser===We||!this.showUserDetails&&this.selectedUser!==We)&&(this.showUserDetails=!this.showUserDetails),null==this.lastUser||this.lastUser.id!==We.id?(this.selectedUser=We,this.userMgmService.navbarTabs=new Array,this.userMgmService.navbarTabs=[{title:"Role"}],this.userMgmService.selectNewUser(We.id),this.userMgmService.loadHierarchyPermission(We.id),this.userMgmService.loadGlobalObjectPermission(We.id),this.lastUser=We,this.showUserDetails?this.headerService.addAction(this.cloneItem):this.headerService.removeAction(this.cloneItem)):this.showUserDetails?this.headerService.addAction(this.cloneItem):this.headerService.removeAction(this.cloneItem)}addUser(){this.userService.newUser=null,this.dialogService.open(Lt,{projectId:this.projectService.projectId,searchText:this.searchText}).onDestroy(()=>{null!=this.userService.newUser&&(this.updateUserList(),this.showUser(this.userService.newUser))})}deleteUser(We){const Dt={projectId:this.projectService.projectId,user:We,result:{deleted:!1}};this.dialogService.open(hi,Dt).onDestroy(()=>{Dt.result.deleted&&(this.showUserDetails=!1,this.updateUserList(),this.headerService.removeAction(this.cloneItem))})}showDownloadButton(We,Dt){return this.userService.getUserRoles(this.projectService.projectId,Dt).then(Kt=>{if(Kt){if(Array.isArray(We)){for(let dn=0;dn=0)return!0;return!1}return"string"==typeof Kt[0]?Kt.indexOf(We.toLowerCase())>=0:Kt.findIndex(dn=>dn.key.toLowerCase()===We.toLowerCase())>=0}return!1})}openCloneModal(){this.dialogService.open(Zn,{selectedUser:this.selectedUser}).onDestroy(()=>{this.updateUserList()})}getGlobalObject(){this.globalObject=this.userService.getGlobalObject(this.projectService.projectId).then(We=>{this.globalObject=We})}getUser2GlobalObject(){this.user2GlobalObject=this.userService.getUser2GlobalObject(this.projectService.projectId,this.selectedUser.id).then(We=>{We.length>0&&(this.user2GlobalObject=We[0].GlobalObject)})}filterUsers(We){this.filteredUsers=We,this.visibleUsersCount=this.visibleUsers.length,this.checkTableScroll()}onActiveTabChange(We){this.activeTab=We}closeUserDetails(){this.headerService.removeAction(this.cloneItem),this.showUserDetails=!1}checkTableScroll(){setTimeout(()=>{this.tableScroll=!!(this.table&&this.table.nativeElement.clientHeight{class ln{}return ln.Config={path:"administration",data:{navigation:"Administration",icon:"icon-settings",checkChildren:!0,role:["canprojectadministraion","admin","canuseradministraion","canprojectadministraion","canrunetljobs"]},children:[{path:"project",component:t.H,data:{navigation:"Project Configuration",iframe:"/Administration/ProjectConfiguration",role:["canprojectadministraion","admin"]}},{path:"user",component:as,data:{navigation:"User Management",icon:"icon-user-account",role:["canuseradministraion","admin"]}},{path:"notification-center",component:ve,data:{navigation:"Notification Center",role:"canAdministrateNotificationcenter"}},{path:"announcement",component:t.H,data:{navigation:"Announcement",iframe:"/Administration/Announcement",role:"canprojectadministraion"}},{path:"document",component:t.H,data:{navigation:"Document Library",iframe:"/Administration/DocumentLibrary",role:"canprojectadministraion"}},{path:"mappingtable",component:t.H,data:{navigation:"Mapping Table",iframe:"/Administration/MappingTable",role:"admin"}},{path:"rawdata",component:t.H,data:{navigation:"Raw Data",iframe:"/Administration/RawData",role:"admin"}},{path:"upload",component:t.H,data:{navigation:"Upload Management",iframe:"/Administration/UploadMng",role:"admin"}},{path:"kpi",component:t.H,data:{navigation:"KPI Management",iframe:"/Administration/KPIManagement",hasMenu:"hasKpi"}},{path:"dataentry",component:t.H,data:{navigation:"Data Entry",iframe:"/Administration/InputForm",hasMenu:"hasDataEntry"}},{path:"etl",component:t.H,data:{navigation:"ETL Jobs",icon:"icon-icon_orgmanager",iframe:"/Administration/EtlJobs",role:"canrunetljobs"}},{path:"cubes",component:t.H,data:{navigation:"Cubes",iframe:"/Administration/Cube",role:"canprojectadministraion"}},{path:"helpsectionconfig",component:M,data:{navigation:"Help Section Config",role:"canprojectadministraion"}}]},ln})()},25231:(Se,pe,r)=>{"use strict";r.d(pe,{M:()=>o});var t=r(591),e=r(46809),a=r(5e3),s=r(36885);let o=(()=>{class d{constructor(g){this.tableService=g,this.tableObserv=new t.X(null),this._additionalFilter$=new t.X(null),this.viewprogrammedFilter$=this._additionalFilter$,this.prefix=`/${d.GetConfig("base")}/`,this.projectId=d.GetConfig("projectId"),this.tableService.getTables(d.GetConfig("table","tableId")),this.tableService.table.subscribe(x=>this.setTable(x))}get additionalFilter(){return this._additionalFilter$.value}static GetConfig(...g){switch(this.GetBase()){case this.config.base:return e.Z.GetDeep(this.config,...g);case this.configMo.base:return e.Z.GetDeep(this.configMo,...g);case this.configSe.base:return e.Z.GetDeep(this.configSe,...g);case this.configShs.base:return e.Z.GetDeep(this.configShs,...g)}}static GetBase(){switch(e.Z.GetBase()){case this.config.base:return this.config.base;case this.configMo.base:return this.configMo.base;case this.configSe.base:return this.configSe.base;case this.configShs.base:return this.configShs.base}}setTable(g){this.table=g,this.tableObserv.next(g)}updateProrammedFilter(){const g=d.GetConfig("viewSwitch","viewSwitchColumnName");g&&this._viewSwitchSelected&&this._additionalFilter$.next([{name:this._viewSwitchSelected,column:g}])}switchView(g){this._viewSwitchSelected=g,this.updateProrammedFilter()}}return d.config={base:"cmapp",parentIsExternal:!0,parentUri:"https://isa.siemens.com/content/20180001/default.aspx",projectId:5480,limitNumberOfValues:25,unauthMes:{msg:"You don't have access to the GBS CMApp Reporting",link:"https://cmapp.siemens.com/content/20180001/CenterSite/isatool.aspx"},doShowTopRowAggregated:!1,viewSwitch:{viewSwitchSelection:[{label:"Receiver View",key:"Receiver",disabled:!1},{label:"Provider View",key:"Provider",disabled:!1}],viewSwitchLabel:"Switch to Receiver View (Only ARE/Country Permission Area)",viewSwitchSelectedDefault:"Provider",viewSwitchBookmark:"cmapppermissionview",viewSwitchColumnName:"PermissionViewPerspective"},table:{frtId:2297,tableId:1510,filterGroupId:100,allowSkipNullColumns:!0,customExportConfig:{exportId:4381,label:"SE Report"}},board:{goIds:[2300,2302,2301,2299,2304,2305,2306,2307],lcChartIds:{availableLocalCurrencyId:2308,currencyCountChartId:2309},labelFontSizes:{min:16,max:46},tableId:1510,filterGroupId:100,frtId:2297},formview:{goId:2310,filterGroupId:100,tableId:1510},chart:{colors:["#00646E","#41AAAA","#32838b","#a5e1e1","#CDD9E1"]}},d.configMo={base:"cmapp-mo",projectId:5518,parentIsExternal:!0,parentUri:"https://isa.siemens.com/content/20190002/default.aspx",limitNumberOfValues:25,unauthMes:{msg:"You don't have access to the Mobility CMApp Reporting",link:"https://cmapp.siemens.com/content/20190002/CenterSite/isatool.aspx"},doShowTopRowAggregated:!1,viewSwitch:{viewSwitchSelection:[{label:"Receiver View",key:"Receiver",disabled:!1},{label:"Provider View",key:"Provider",disabled:!1}],viewSwitchLabel:"Switch to Receiver View (Only ARE/Country Permission Area)",viewSwitchSelectedDefault:"Provider",viewSwitchBookmark:"cmapppermissionview",viewSwitchColumnName:"PermissionViewPerspective"},table:{frtId:2367,tableId:2378,filterGroupId:314,allowSkipNullColumns:!0,customExportConfig:null},board:{goIds:[2370,2372,2371,2369,2373,2374,2375,2376],lcChartIds:{availableLocalCurrencyId:2377,currencyCountChartId:2378},labelFontSizes:{min:16,max:46},tableId:2378,filterGroupId:314,frtId:2297},formview:{goId:2379,filterGroupId:314,tableId:2367},chart:{colors:["#00646E","#41AAAA","#32838b","#a5e1e1","#CDD9E1"]}},d.configSe={base:"cmapp-se",projectId:5536,parentIsExternal:!0,parentUri:"https://isa.siemens.com/content/20200003/default.aspx",unauthMes:{msg:"You don't have access to the Siemens Energy CMApp Reporting",link:"https://cmapp.siemens.com/content/20200003/CenterSite/isatool.aspx"},doShowTopRowAggregated:!1,limitNumberOfValues:25,viewSwitch:{viewSwitchSelection:[{label:"Receiver View",key:"Receiver",disabled:!1},{label:"Provider View",key:"Provider",disabled:!1}],viewSwitchLabel:"Switch to Receiver View (Only ARE/Country Permission Area)",viewSwitchSelectedDefault:"Provider",viewSwitchBookmark:"cmapppermissionview",viewSwitchColumnName:"PermissionViewPerspective"},table:{frtId:2599,tableId:2443,filterGroupId:354,allowSkipNullColumns:!0,customExportConfig:null},board:{goIds:[2592,2594,2593,2587,2588,2589,2590,2591],lcChartIds:{availableLocalCurrencyId:2595,currencyCountChartId:2596},labelFontSizes:{min:16,max:46},tableId:2443,filterGroupId:354,frtId:2599},formview:{goId:2606,filterGroupId:354,tableId:2443},chart:{colors:["#00646E","#41AAAA","#32838b","#a5e1e1","#CDD9E1"]}},d.configShs={base:"cmapp-shs",projectId:5537,parentIsExternal:!0,parentUri:"https://pulse.siemens.cloud/error",unauthMes:{msg:"You don't have access to this CMApp Reporting, it's not yet configured correctly"},limitNumberOfValues:25,viewSwitch:{viewSwitchSelection:[{label:"Receiver View",key:"Receiver",disabled:!1},{label:"Provider View",key:"Provider",disabled:!1}],doShowTopRowAggregated:!1,viewSwitchLabel:"Switch to Receiver View (Only ARE/Country Permission Area)",viewSwitchSelectedDefault:"Provider",viewSwitchBookmark:"cmapppermissionview",viewSwitchColumnName:"PermissionViewPerspective"},table:{frtId:2621,tableId:2450,filterGroupId:358,allowSkipNullColumns:!0,customExportConfig:null},board:{goIds:[2616,2618,2617,2611,2612,2613,2614,2615],lcChartIds:{availableLocalCurrencyId:2619,currencyCountChartId:2620},labelFontSizes:{min:16,max:46},tableId:2450,filterGroupId:358,frtId:2621},formview:{goId:2622,filterGroupId:358,tableId:2450},chart:{colors:["#00646E","#41AAAA","#32838b","#a5e1e1","#CDD9E1"]}},d.\u0275fac=function(g){return new(g||d)(a.\u0275\u0275inject(s._))},d.\u0275prov=a.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac}),d})()},32763:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>Js});var t=r(64753),e=r(5e3),a=r(62474),s=r(54620),o=r(4371),d=r(11735);let u=(()=>{class Mt{constructor(Te,rt,wt){this.webapi=Te,this.projectService=rt,this.sidebarService=wt}ngOnInit(){this.webapi.get(`/api/project/${this.projectService.projectId}/dataentryform`).then(Te=>{const rt=[],wt=Te.map(St=>({path:St.id,data:{navigation:St.name}}));rt.push(...wt),this.sidebarService.navigationItemsBottom.find(St=>"data"===St.path).children.find(St=>"dataentry"===St.path).children=rt})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(a.f),e.\u0275\u0275directiveInject(s.k),e.\u0275\u0275directiveInject(o.R))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-data-entry"]],decls:1,vars:0,template:function(Te,rt){1&Te&&e.\u0275\u0275element(0,"router-outlet")},directives:[d.lC],styles:[""]}),Mt})();var g=r(591),x=r(27737),i=r(53403),m=r(22290),E=r(22324),C=r(69808),v=r(93075),h=r(90809),S=r(558),p=r(77093);const L=["dialog"];function N(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"i",20)}function j(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"button",21),e.\u0275\u0275element(1,"i",3),e.\u0275\u0275text(2,"Add"),e.\u0275\u0275elementEnd()),2&Mt){const Te=e.\u0275\u0275nextContext(),rt=e.\u0275\u0275reference(8);e.\u0275\u0275property("disabled",!rt.form.valid||!Te.datasourceInfo.servername)}}function P(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"span",22),e.\u0275\u0275text(1,"Info: Already existing filter will keep their old datasource."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"button",21),e.\u0275\u0275element(3,"i",3),e.\u0275\u0275text(4,"Edit"),e.\u0275\u0275elementEnd()),2&Mt){const Te=e.\u0275\u0275nextContext(),rt=e.\u0275\u0275reference(8);e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",!rt.form.valid||!Te.datasourceInfo.servername)}}let I=(()=>{class Mt{constructor(Te,rt){this.datasourceService=Te,this.toasty=rt,this.loading=!1,this.datasourceInfo={serverId:0,serverurl:"",servername:"",database:"",table:""},this.servers=[],this.serverNames=[],this.databases=[],this.tables=[]}ngOnInit(){this.getServerInformation(),this.groupId&&(this.getDatabaseInformation(!0),this.getTableInformation(!0))}getServerInformation(){this.loading=!0,this.datasourceService.getServers().then(Te=>{this.servers=Te,this.serverNames=this.servers.map(rt=>rt.name),this.loading=!1}).catch(Te=>{this.loading=!1,this.toasty.error("Something went wrong.")})}getDatabaseInformation(Te){if(Te){if(!this.servers)return void setTimeout(()=>{this.getDatabaseInformation(Te)},50);this.datasourceInfo.serverId=this.servers.find(rt=>rt.name===this.datasourceInfo.servername).id,this.datasourceInfo.database="",this.loading=!0,this.datasourceService.getDatabaseNames(this.datasourceInfo.servername).then(rt=>{this.databases=rt,this.loading=!1}).catch(rt=>{this.loading=!1,this.toasty.error("Something went wrong.")})}}getTableInformation(Te){if(Te){if(!this.databases)return void setTimeout(()=>{this.getTableInformation(Te)},50);this.datasourceInfo.table="",this.loading=!0,this.datasourceService.getTableAndViewNames(this.datasourceInfo.servername,this.datasourceInfo.database).then(rt=>{this.tables=rt,this.loading=!1}).catch(rt=>{this.loading=!1,this.toasty.error("Something went wrong.")})}}onSubmit(){this.callback(this.groupId?{datasource:this.datasourceInfo,groupId:this.groupId}:this.datasourceInfo),this.dialog.close()}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(i.U),e.\u0275\u0275directiveInject(m._W))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-datasource-dialog"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(L,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:28,vars:14,consts:[["dialog",""],[1,"flex"],[1,"modal-header"],[1,"icon-database"],["class","icon-loading spin",4,"ngIf"],[3,"ngSubmit"],["filterForm","ngForm"],[1,"form-group"],[1,"pulse-form-field"],["for","server"],["name","server","required","",3,"options","pulseValueInListValidator","ngModel","ngModelChange"],["server","ngModel"],["for","database"],["name","database","required","",3,"options","disabled","pulseValueInListValidator","ngModel","ngModelChange"],["database","ngModel"],["for","table"],["name","table","required","",3,"options","disabled","pulseValueInListValidator","ngModel","ngModelChange"],[1,"create-button"],["type","submit","class","pulse-btn save","fxFlex","20",3,"disabled",4,"ngIf","ngIfElse"],["edit",""],[1,"icon-loading","spin"],["type","submit","fxFlex","20",1,"pulse-btn","save",3,"disabled"],[1,"info-message"]],template:function(Te,rt){if(1&Te){const wt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3",2),e.\u0275\u0275element(4,"i",3),e.\u0275\u0275text(5," Datasource "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(6,N,1,0,"i",4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"form",5,6),e.\u0275\u0275listener("ngSubmit",function(){return rt.onSubmit()}),e.\u0275\u0275elementStart(9,"div",7)(10,"div",8)(11,"label",9),e.\u0275\u0275text(12,"Server:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"pulse-combobox",10,11),e.\u0275\u0275listener("ngModelChange",function(In){return rt.datasourceInfo.servername=In})("ngModelChange",function(){e.\u0275\u0275restoreView(wt);const In=e.\u0275\u0275reference(14);return rt.getDatabaseInformation(In.valid)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(15,"div",8)(16,"label",12),e.\u0275\u0275text(17,"Database:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"pulse-combobox",13,14),e.\u0275\u0275listener("ngModelChange",function(In){return rt.datasourceInfo.database=In})("ngModelChange",function(){e.\u0275\u0275restoreView(wt);const In=e.\u0275\u0275reference(19);return rt.getTableInformation(In.valid)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(20,"div",8)(21,"label",15),e.\u0275\u0275text(22,"Table:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"pulse-combobox",16),e.\u0275\u0275listener("ngModelChange",function(In){return rt.datasourceInfo.table=In}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(24,"div",17),e.\u0275\u0275template(25,j,3,1,"button",18),e.\u0275\u0275template(26,P,5,1,"ng-template",null,19,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()()()}if(2&Te){const wt=e.\u0275\u0275reference(14),St=e.\u0275\u0275reference(19),In=e.\u0275\u0275reference(27);e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",rt.loading),e.\u0275\u0275advance(7),e.\u0275\u0275property("options",rt.serverNames)("pulseValueInListValidator",rt.serverNames)("ngModel",rt.datasourceInfo.servername),e.\u0275\u0275advance(5),e.\u0275\u0275property("options",rt.databases)("disabled",!wt.valid||rt.loading)("pulseValueInListValidator",rt.databases)("ngModel",rt.datasourceInfo.database),e.\u0275\u0275advance(5),e.\u0275\u0275property("options",rt.tables)("disabled",!St.valid||rt.loading)("pulseValueInListValidator",rt.tables)("ngModel",rt.datasourceInfo.table),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!rt.groupId)("ngIfElse",In)}},directives:[E.a,C.O5,v.\u0275NgNoValidate,v.NgControlStatusGroup,v.NgForm,h.R,v.RequiredValidator,S._,v.NgControlStatus,v.NgModel,p.yH],styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}input[_ngcontent-%COMP%], select[_ngcontent-%COMP%], option[_ngcontent-%COMP%]{font-family:Siemens Sans}.create-button[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;margin-top:25px}.create-button[_ngcontent-%COMP%] .info-message[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:20px}.spin[_ngcontent-%COMP%]{height:24px;width:24px;font-size:20px;margin:0 0 0 15px;-webkit-animation:2s linear infinite spin;animation:2s linear infinite spin}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}"]}),Mt})();const A=["dialog"];function O(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",11),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit;e.\u0275\u0275property("value",Te.groupId),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(Te.name)}}function T(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",11),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit;e.\u0275\u0275property("value",Te),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(Te)}}function c(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"option",12),e.\u0275\u0275text(2,"All"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,T,2,2,"option",6),e.\u0275\u0275elementContainerEnd()),2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275property("ngForOf",Te.selectedGlobal.categories)}}let M=(()=>{class Mt{constructor(){}ngOnInit(){this.selectedCategory="all",this.globalObjs=this.globalObjs.filter(Te=>Te.groupId&&this.globalObj.type===Te.type&&Te.groupId!==this.globalObj.groupId)}changedGlobalObject(){this.selectedGlobal=this.globalObjs.find(Te=>Te.groupId===Number(this.selectedGroupId))}onSubmit(){this.callback(this.selectedGlobal.groupId,this.globalObj.groupId,this.selectedCategory),this.dialog.close()}}return Mt.\u0275fac=function(Te){return new(Te||Mt)},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-import-dialog"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(A,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:22,vars:6,consts:[["dialog",""],[1,"modal-header"],[1,"icon-login-variant","header-icon"],[1,"pulse-form-field"],[1,"pulse-select"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","disabled","ngModelChange"],[4,"ngIf"],[1,"info-message"],[1,"pulse-btn","save",2,"margin-top","25px",3,"disabled","click"],[3,"value"],["value","all","default","","selected",""]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275element(3,"i",2),e.\u0275\u0275text(4," Import Configuration "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",3)(6,"label"),e.\u0275\u0275text(7,"From:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"div",4)(9,"select",5),e.\u0275\u0275listener("ngModelChange",function(St){return rt.selectedGroupId=St})("change",function(){return rt.changedGlobalObject()}),e.\u0275\u0275template(10,O,2,2,"option",6),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(11,"div",3)(12,"label"),e.\u0275\u0275text(13,"Category:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",4)(15,"select",7),e.\u0275\u0275listener("ngModelChange",function(St){return rt.selectedCategory=St}),e.\u0275\u0275template(16,c,4,1,"ng-container",8),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(17,"span",9),e.\u0275\u0275text(18,"Please make sure, that you do not import Filters which are already imported."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(19,"button",10),e.\u0275\u0275listener("click",function(){return rt.onSubmit()}),e.\u0275\u0275element(20,"i",2),e.\u0275\u0275text(21,"Import"),e.\u0275\u0275elementEnd()()),2&Te&&(e.\u0275\u0275advance(9),e.\u0275\u0275property("ngModel",rt.selectedGroupId),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",rt.globalObjs),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",rt.selectedCategory)("disabled",!rt.selectedGlobal),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",rt.selectedGlobal),e.\u0275\u0275advance(3),e.\u0275\u0275property("disabled",!rt.selectedGlobal))},directives:[E.a,v.SelectControlValueAccessor,v.NgControlStatus,v.NgModel,C.sg,v.NgSelectOption,v.\u0275NgSelectMultipleOption,C.O5],styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}.info-message[_ngcontent-%COMP%]{margin-top:20px}"]}),Mt})();var w=r(47626),R=r(45383),D=r(74564),Y=r(98613),_=r(30745),y=r(37802);const H=["dialog"];let $=(()=>{class Mt{constructor(){}ngOnInit(){}onSubmit(){this.callback(!0),this.dialog.close()}}return Mt.\u0275fac=function(Te){return new(Te||Mt)},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-delete-confirm-dialog"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(H,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:10,vars:0,consts:[["dialog",""],[1,"modal-header"],[1,"icon-delete2","header-icon"],[1,"confirmation-info"],[1,"pulse-btn","save",3,"click"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),e.\u0275\u0275element(3,"i",2),e.\u0275\u0275text(4," Delete Confirmation "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",3),e.\u0275\u0275text(6," Are you sure that you want to delete this filter? "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"button",4),e.\u0275\u0275listener("click",function(){return rt.onSubmit()}),e.\u0275\u0275element(8,"i",2),e.\u0275\u0275text(9,"Confirm"),e.\u0275\u0275elementEnd()())},directives:[E.a],styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}.confirmation-info[_ngcontent-%COMP%]{margin:20px}"]}),Mt})();var K=r(10705),z=r(85083),G=r(45622);const Z=["dialog"];function B(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-treeview",15),e.\u0275\u0275listener("selectionChange",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().filter.hasAll?null==St.values[0]?null:St.values[0].children:St.values=wt}),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit,rt=e.\u0275\u0275nextContext();e.\u0275\u0275property("tree",rt.treeview[Te.name])("noneLabel",rt.filter.hasAll?"All":null==rt.children[0]?null:rt.children[0].name)("allLabel",rt.filter.hasAll?"All":null)("selection",rt.filter.hasAll?null==Te.values[0]?null:Te.values[0].children:Te.values)}}function X(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-datepicker",16),e.\u0275\u0275listener("ngModelChange",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext().treeview[St.name]=wt}),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit,rt=e.\u0275\u0275nextContext();e.\u0275\u0275property("ngModel",rt.treeview[Te.name])}}function ee(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",6)(1,"span",11),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,B,1,4,"pulse-treeview",12),e.\u0275\u0275template(4,X,1,1,"pulse-datepicker",13),e.\u0275\u0275elementStart(5,"i",14),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext().deleteToken(St)}),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(Te.name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",rt.filter.type<1),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",2===rt.filter.type)}}function le(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-treeview",17),e.\u0275\u0275listener("selectionChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().selection=wt}),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275property("tree",Te.children)("noneLabel",Te.filter.hasAll?"All":null==Te.children[0]?null:Te.children[0].name)("allLabel",Te.filter.hasAll?"All":null)("selection",Te.selection)}}function de(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-datepicker",18),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().selection=wt}),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275property("useLocalTime",!0)("ngModel",Te.selection)}}let fe=(()=>{class Mt{constructor(Te,rt){this.filterConfigService=Te,this.datePipe=rt,this.treeview={},this.selection=[],this.tokenName=""}ngOnInit(){this.filter.tokens=this.filter.tokens?JSON.parse(this.filter.tokens.toString()):[],this.filter.tokens.forEach(Te=>{this.filter.type<1?this.treeview[Te.name]=JSON.parse(JSON.stringify(this.children)):(this.treeview[Te.name]=JSON.parse(JSON.stringify(Te.value).replace("fromDate","startDate").replace("toDate","endDate")),this.treeview[Te.name].startDate=new Date(this.treeview[Te.name].startDate),this.treeview[Te.name].endDate=new Date(this.treeview[Te.name].endDate))})}deleteToken(Te){this.filter.tokens=this.filter.tokens.filter(rt=>rt.name!==Te.name),this.filterConfigService.updateToken(this.filter.id,JSON.stringify(this.filter.tokens)),this.callback(JSON.stringify(this.filter.tokens))}addToken(){const Te={name:this.tokenName};this.filter.type<1?(Te.values=this.selection,this.treeview[Te.name]=this.children):(Te.value={startDate:this.datePipe.transform(this.selection.startDate,"MM.dd.yyyy"),endDate:this.datePipe.transform(this.selection.endDate,"MM.dd.yyyy")},this.treeview[Te.name]=JSON.parse(JSON.stringify(Te.value)),this.treeview[Te.name].startDate=new Date(this.treeview[Te.name].startDate),this.treeview[Te.name].endDate=new Date(this.treeview[Te.name].endDate)),this.filter.tokens.find(rt=>rt.name===Te.name)||(this.filter.tokens.push(Te),this.filterConfigService.updateToken(this.filter.id,JSON.stringify(this.filter.tokens)),this.callback(JSON.stringify(this.filter.tokens)))}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(R.s),e.\u0275\u0275directiveInject(C.uU))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-token-dialog"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(Z,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:17,vars:7,consts:[[3,"noFlow"],["dialog",""],[1,"modal-header","flex"],[1,"icon-token","header-icon"],[1,"existing-tokens"],["class","add-token-container",4,"ngFor","ngForOf"],[1,"add-token-container"],["isDropdown","true","filter","","selectionKeys","name|column","expandAll","true","collapseAll","true","noChildrenOfSelectedItems","true","itemsCountDropdownText","3","fxFlex","40",3,"tree","noneLabel","allLabel","selection","selectionChange",4,"ngIf"],[3,"useLocalTime","ngModel","ngModelChange",4,"ngIf"],["fxFlex","30","name","tokenname","placeholder","Token name",1,"pulse-input",3,"ngModel","ngModelChange"],["fxFlex","15",1,"pulse-btn","save",2,"height","40px",3,"click"],["fxFlex","40"],["fxFlex","40","isDropdown","true","filter","","selectionKeys","name|column","expandAll","true","collapseAll","true","noChildrenOfSelectedItems","true","itemsCountDropdownText","3","fxFlex","50",3,"tree","noneLabel","allLabel","selection","selectionChange",4,"ngIf"],["fxFlex","40",3,"ngModel","ngModelChange",4,"ngIf"],["fxfFlex","10",1,"icon-delete","pointer",3,"click"],["fxFlex","40","isDropdown","true","filter","","selectionKeys","name|column","expandAll","true","collapseAll","true","noChildrenOfSelectedItems","true","itemsCountDropdownText","3","fxFlex","50",3,"tree","noneLabel","allLabel","selection","selectionChange"],["fxFlex","40",3,"ngModel","ngModelChange"],["isDropdown","true","filter","","selectionKeys","name|column","expandAll","true","collapseAll","true","noChildrenOfSelectedItems","true","itemsCountDropdownText","3","fxFlex","40",3,"tree","noneLabel","allLabel","selection","selectionChange"],[3,"useLocalTime","ngModel","ngModelChange"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"h3",2),e.\u0275\u0275element(3,"i",3),e.\u0275\u0275text(4," Token Manager "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",4)(6,"h4"),e.\u0275\u0275text(7,"Tokens"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(8,ee,6,3,"div",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"h4"),e.\u0275\u0275text(10,"Add Token"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",6),e.\u0275\u0275template(12,le,1,4,"pulse-treeview",7),e.\u0275\u0275template(13,de,1,2,"pulse-datepicker",8),e.\u0275\u0275elementStart(14,"input",9),e.\u0275\u0275listener("ngModelChange",function(St){return rt.tokenName=St}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"button",10),e.\u0275\u0275listener("click",function(){return rt.addToken()}),e.\u0275\u0275text(16,"Add"),e.\u0275\u0275elementEnd()()()),2&Te&&(e.\u0275\u0275styleProp("min-height",500),e.\u0275\u0275property("noFlow",!1),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngForOf",rt.filter.tokens),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",rt.filter.type<1),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",2===rt.filter.type),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngModel",rt.tokenName))},directives:[E.a,C.sg,p.yH,C.O5,z.G,G.Q,v.NgControlStatus,v.NgModel,v.DefaultValueAccessor],styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}.header-icon[_ngcontent-%COMP%]{margin-right:5px}.token-value-cell[_ngcontent-%COMP%]{width:70%;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.add-token-container[_ngcontent-%COMP%]{display:flex;margin-top:20px;border-top:1px solid grey;padding-top:12px;justify-content:space-between;align-items:center}"]}),Mt})();var te=r(23322),ce=r(56982),oe=r(16427),se=r(57125),ue=r(32925),_e=r(74171),Ce=function(Mt,mn,Te,rt){return new(Te||(Te=Promise))(function(St,In){function vi(pr){try{Jn(rt.next(pr))}catch($r){In($r)}}function rr(pr){try{Jn(rt.throw(pr))}catch($r){In($r)}}function Jn(pr){pr.done?St(pr.value):function wt(St){return St instanceof Te?St:new Te(function(In){In(St)})}(pr.value).then(vi,rr)}Jn((rt=rt.apply(Mt,mn||[])).next())})};function me(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext(2).startEdit(wt)}),e.\u0275\u0275element(1,"i"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275classMap(Te.categoryIcon),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",Te.category," ")}}function we(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",16)(1,"pulse-icon-picker",17),e.\u0275\u0275listener("picked",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.newCategoryIcon=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"input",18),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.newCategory=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"i",19),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext(2).editCategory(wt)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"i",20),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.editMode=!1}),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("icon",Te.newCategoryIcon),e.\u0275\u0275advance(1),e.\u0275\u0275property("placeholder",Te.newCategory)("ngModel",Te.newCategory)}}function Re(Mt,mn){if(1&Mt&&e.\u0275\u0275element(0,"pulse-input",26),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("placeholder",Te.name)}}function Ne(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"pulse-treeview",31)}function Ge(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"pulse-datepicker",32)}function Pe(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",27),e.\u0275\u0275template(1,Ne,1,0,"pulse-treeview",28),e.\u0275\u0275template(2,Ge,1,0,"pulse-datepicker",29),e.\u0275\u0275elementStart(3,"div",30),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext(3).openTokenDialog(wt)}),e.\u0275\u0275element(4,"i"),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Te.type<1),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",2===Te.type),e.\u0275\u0275advance(2),e.\u0275\u0275classMap(Te.tokens?"icon-token":"icon-plus")}}function Ae(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"label"),e.\u0275\u0275text(2),e.\u0275\u0275elementStart(3,"i",22),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext(3).openDeleteDialog(St)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"i",23),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext(3).openEditDialog(St)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(5,Re,1,1,"pulse-input",24),e.\u0275\u0275template(6,Pe,5,4,"div",25),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=mn.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275styleProp("margin-right","5px"),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",Te.name," "),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",1===Te.type),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1!==Te.type)}}const ve=function(Mt){return{"disabled no-pointer-event":Mt}};function Oe(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",8)(1,"div",9),e.\u0275\u0275template(2,me,3,4,"div",10),e.\u0275\u0275template(3,we,5,3,"div",11),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",12),e.\u0275\u0275template(5,Ae,7,5,"div",13),e.\u0275\u0275pipe(6,"orderBy"),e.\u0275\u0275elementStart(7,"div",14),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext(2).openCreateDialog(St.category,St.categoryIcon,St.filter[St.filter.length-1].order+1)}),e.\u0275\u0275element(8,"i",6),e.\u0275\u0275elementStart(9,"span",7),e.\u0275\u0275text(10,"Filter"),e.\u0275\u0275elementEnd()()()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(7,ve,rt.loading)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!Te.editMode),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Te.editMode),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind2(6,4,Te.filter,"order"))}}const Be=function(Mt){return{disabled:Mt}};function ze(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",3),e.\u0275\u0275template(1,Oe,11,9,"div",4),e.\u0275\u0275elementStart(2,"div",5),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().openCreateDialog()}),e.\u0275\u0275element(3,"i",6),e.\u0275\u0275elementStart(4,"span",7),e.\u0275\u0275text(5,"Category"),e.\u0275\u0275elementEnd()()()}if(2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",Te.filters),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(2,Be,Te.loading))}}function qe(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",33),e.\u0275\u0275element(1,"pulse-spinner",34),e.\u0275\u0275elementEnd()),2&Mt&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("isRelative",!0))}let xt=(()=>{class Mt{constructor(Te,rt,wt,St,In){this.headerService=Te,this.filterService=rt,this.dialogService=wt,this.toastr=St,this.webApi=In,this.initLoading=!0,this.loading=!1}ngOnInit(){return Ce(this,void 0,void 0,function*(){this.globalObject$.subscribe(Te=>Ce(this,void 0,void 0,function*(){Te&&Te.groupId&&(this.initLoading=!0,this.filters=yield this.filterService.getGroupedFilter(Te.groupId),this.initLoading=!1)}))})}startEdit(Te){Te.newCategory=Te.category,Te.newCategoryIcon=Te.categoryIcon,Te.editMode=!0}openCreateDialog(Te="",rt="",wt=(this.filters.length>0?this.filters[this.filters.length-1].filter[this.filters[this.filters.length-1].filter.length-1].order+1:0)){this.dialogService.open(y.q,{category:Te,categoryIcon:rt,order:wt,datasourceInfo:this.globalObject$.value.datasource,groupId:this.globalObject$.value.groupId,callback:St=>{this.createFilter(St)}})}createFilter(Te){this.loading=!0,this.filterService.createFilter(Te).then(()=>Ce(this,void 0,void 0,function*(){this.toastr.success("Filter has been created."),this.filters=yield this.filterService.getGroupedFilter(this.globalObject$.value.groupId),this.loading=!1})).catch(()=>{this.loading=!1,this.toastr.error("Could not create filter.")})}openEditDialog(Te){Te=JSON.parse(JSON.stringify(Te)),this.dialogService.open(K.Q,{filter:Te,datasourceInfo:this.globalObject$.value.datasource,groupId:this.globalObject$.value.groupId,callback:rt=>{this.editFilter(rt)}})}editFilter(Te){this.loading=!0,this.filterService.editFilter(Te,this.globalObject$.value.groupId).then(()=>Ce(this,void 0,void 0,function*(){this.invalidateFilterCache(),this.toastr.success("Filter has been edited."),this.filters=yield this.filterService.getGroupedFilter(this.globalObject$.value.groupId),this.loading=!1})).catch(()=>{this.loading=!1,this.toastr.error("Could not edit filter.")})}openTokenDialog(Te){this.loading=!0,this.filterService.getTreeview(Te.id).then(rt=>{this.loading=!1,this.dialogService.open(fe,{callback:wt=>{this.updateToken(Te,wt)},filter:JSON.parse(JSON.stringify(Te)),children:rt.children})}).catch(rt=>{this.loading=!1,this.toastr.error("Could not load tokens.")})}updateToken(Te,rt){Te.tokens=rt}editCategory(Te){this.loading=!0,this.filterService.editCategory(this.globalObject$.value.groupId,Te.category,Te.newCategory,Te.newCategoryIcon).then(()=>Ce(this,void 0,void 0,function*(){this.toastr.success("Category has been edited."),this.filters=yield this.filterService.getGroupedFilter(this.globalObject$.value.groupId),this.loading=!1})).catch(()=>{this.loading=!1,this.toastr.error("Could not edit category.")})}openDeleteDialog(Te){this.dialogService.open($,{callback:rt=>{this.deleteFilter(Te.id,rt)}})}deleteFilter(Te,rt){!rt||(this.loading=!0,this.filterService.deleteFilter(this.globalObject$.value.groupId,Te).then(()=>Ce(this,void 0,void 0,function*(){this.toastr.success("Filter has been deleted."),this.filters=yield this.filterService.getGroupedFilter(this.globalObject$.value.groupId),this.loading=!1})).catch(()=>{this.loading=!1,this.toastr.error("Could not delete filter.")}))}invalidateFilterCache(){return Ce(this,void 0,void 0,function*(){yield this.webApi.post("/Customer/HierarchyFilter/GetFilterGroup",{groupId:this.globalObject$.value.groupId,table:null},{params:{cached:!1}})})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(w.r),e.\u0275\u0275directiveInject(R.s),e.\u0275\u0275directiveInject(D.x),e.\u0275\u0275directiveInject(m._W),e.\u0275\u0275directiveInject(a.f))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-filter-group-config"]],inputs:{globalObject$:"globalObject$"},decls:4,vars:2,consts:[[1,"filter-group-preview"],["fxLayout","row wrap",4,"ngIf","ngIfElse"],["spinner",""],["fxLayout","row wrap"],["fxLayout","column","fxFlex","0 1 20%",3,"ngClass",4,"ngFor","ngForOf"],[1,"category-create-button",3,"ngClass","click"],[1,"icon-plus2"],[1,"add-title"],["fxLayout","column","fxFlex","0 1 20%",3,"ngClass"],[1,"pulse-category-header"],["class","pointer",3,"click",4,"ngIf"],["style","display:flex;align-items: center;",4,"ngIf"],[1,"pulse-category-body"],["class","pulse-form-field","fxLayout","column","fxLayoutAlign","start start","fxFlex","nogrow","style","width: 100% !important;",4,"ngFor","ngForOf"],[1,"filter-create-button",3,"click"],[1,"pointer",3,"click"],[2,"display","flex","align-items","center"],[2,"margin-right","5px",3,"icon","picked"],[1,"form-control","pulse-input-small",3,"placeholder","ngModel","ngModelChange"],[1,"icon-check","category-action",3,"click"],[1,"icon-close2","category-action",2,"margin-top","5px",3,"click"],["fxLayout","column","fxLayoutAlign","start start","fxFlex","nogrow",1,"pulse-form-field",2,"width","100% !important"],[1,"icon-delete2","pointer",3,"click"],[1,"icon-edit","pointer",3,"click"],["pulseTooltip","* = wildcard; ? = single character",3,"placeholder",4,"ngIf"],["class","flex",4,"ngIf"],["pulseTooltip","* = wildcard; ? = single character",3,"placeholder"],[1,"flex"],["class","with-token","isDropdown","true",4,"ngIf"],["class","with-token",4,"ngIf"],[1,"configurator-token",3,"click"],["isDropdown","true",1,"with-token"],[1,"with-token"],[1,"spinner-container"],[3,"isRelative"]],template:function(Te,rt){if(1&Te&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,ze,6,4,"div",1),e.\u0275\u0275template(2,qe,2,1,"ng-template",null,2,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()),2&Te){const wt=e.\u0275\u0275reference(3);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!rt.initLoading)("ngIfElse",wt)}},directives:[C.O5,p.xw,C.sg,p.yH,C.mk,te.oO,ce.I,v.DefaultValueAccessor,v.NgControlStatus,v.NgModel,p.Wh,oe.$,se.i,z.G,G.Q,ue.O],pipes:[_e.d],styles:[".pointer{cursor:pointer}.flex{display:flex}.no-pointer-event{pointer-events:none}.filter-group-preview{background-color:#fff;z-index:100;border-style:solid;border-width:1px;border-color:#ffffff #ffffff #cdd9e1 #ffffff;padding:20px 5px;height:100%}.filter-group-preview .with-token{width:calc(100% - 40px)!important}.filter-group-preview .with-token .tree-filter-group{width:auto}.filter-group-preview .configurator-token{width:40px;height:40px;background:#00646e;display:flex;justify-content:center;align-items:center;transition:all .1s ease;cursor:pointer;color:#fff;font-size:20px}.filter-group-preview .configurator-token:hover{background:#00846e}.filter-group-preview .filter-create-button{border:1px solid #00646e;border-radius:3px;cursor:pointer;font-weight:700;margin:24px 15px;color:#00646e;display:flex;justify-content:center;align-items:center;height:40px;transition:all .1s ease;width:89%}.filter-group-preview .filter-create-button:hover{background:#00646e;color:#fff}.filter-group-preview .category-create-button{border:1px solid #00646e;border-radius:3px;cursor:pointer;font-weight:700;margin:-10px 15px;color:#00646e;display:flex;justify-content:center;align-items:center;width:18%;height:40px;transition:all .1s ease}.filter-group-preview .category-create-button:hover{background:#00646e;color:#fff}.filter-group-preview .add-title{font-size:14px}.filter-group-preview .pulse-category-header{padding:0 15px}.filter-group-preview .pulse-category-header .category-action{cursor:pointer;font-size:14px}.filter-group-preview .pulse-category-body{display:flex;flex-direction:column}.filter-group-preview .pulse-category-body>div{padding:0 15px}.filter-group-preview .spinner-container{width:100%;height:80%;display:flex;justify-content:center;align-items:center}\n"],encapsulation:2}),Mt})();var At=r(47582);function qt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",13)(1,"span"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"i",14),e.\u0275\u0275listener("click",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext(4);return wt.stopPropagation(),St.openEditDatasource()}),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(Te.datasource.table)}}function yt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",10),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext(3).openPreview(St)}),e.\u0275\u0275elementStart(1,"span",11),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"span"),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(5,qt,4,1,"div",12),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=mn.$implicit;e.\u0275\u0275property("id","tile-"+Te.id),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(Te.name),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(Te.type),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Te.datasource)}}function Wt(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",6),e.\u0275\u0275template(2,yt,6,4,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",8),e.\u0275\u0275element(4,"pulse-filter-group-config",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&Mt){const Te=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",Te.globalObjects),e.\u0275\u0275advance(2),e.\u0275\u0275property("globalObject$",Te.selectedGlobalObject$)}}function gt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"i",36),e.\u0275\u0275listener("click",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext().$implicit,In=e.\u0275\u0275nextContext(3);return wt.stopPropagation(),In.openEditDatasource(St)}),e.\u0275\u0275elementEnd()}}function Et(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"i",37)}function Jt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"i",38),e.\u0275\u0275listener("click",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext().$implicit,In=e.\u0275\u0275nextContext(3);return wt.stopPropagation(),In.openImportDialog(St)}),e.\u0275\u0275elementEnd()}}function en(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",26),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext(3).openPreview(St)}),e.\u0275\u0275elementStart(1,"div",27),e.\u0275\u0275element(2,"i"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",28),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",29),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",30),e.\u0275\u0275text(8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",31),e.\u0275\u0275text(10),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",32),e.\u0275\u0275template(12,gt,1,0,"i",33),e.\u0275\u0275template(13,Et,1,0,"i",34),e.\u0275\u0275template(14,Jt,1,0,"i",35),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(2),e.\u0275\u0275classMap(rt.getIcon(Te.type)),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",rt.formalizeType(Te.type)," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",Te.name," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",Te.datasource?Te.datasource.database:""," "),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",Te.datasource?Te.datasource.table:""," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",Te.datasource),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!Te.datasource),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",Te.groupId)}}function On(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",15)(1,"div",16)(2,"div",17),e.\u0275\u0275element(3,"div",18),e.\u0275\u0275elementStart(4,"div",19),e.\u0275\u0275text(5," Type "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",20),e.\u0275\u0275text(7," Name "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"div",21),e.\u0275\u0275text(9," Database "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"div",22),e.\u0275\u0275text(11," Table "),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(12,"div",23),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"div",24),e.\u0275\u0275template(14,en,15,9,"div",25),e.\u0275\u0275elementEnd()()()),2&Mt){const Te=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(14),e.\u0275\u0275property("ngForOf",Te.globalObjects)}}function Wn(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3),e.\u0275\u0275text(2," Filter Configurator "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",4),e.\u0275\u0275template(4,Wt,5,2,"ng-container",1),e.\u0275\u0275template(5,On,15,1,"div",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",Te.showPreview),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!Te.showPreview)}}let an=(()=>{class Mt{constructor(Te,rt,wt,St,In,vi,rr){this.headerService=Te,this.filterConfigService=rt,this.projectService=wt,this.toastr=St,this.dialogService=In,this.userService=vi,this.ngxSmartModalService=rr,this.selectedGlobalObject$=new g.X(null),this.isLoading=!0,this.showPreview=!1,this.addGlobalAction={label:"Global Object",icon:"icon-plus2",callback:()=>{this.addGlobalObject()}}}ngOnInit(){this.headerService.showHeader=!0,this.initHeaderAction(),this.initData()}initHeaderAction(){this.headerService.addAction(this.addGlobalAction)}addGlobalObject(){this.ngxSmartModalService.getModal("addProject").open()}initData(){return function(Mt,mn,Te,rt){return new(Te||(Te=Promise))(function(St,In){function vi(pr){try{Jn(rt.next(pr))}catch($r){In($r)}}function rr(pr){try{Jn(rt.throw(pr))}catch($r){In($r)}}function Jn(pr){pr.done?St(pr.value):function wt(St){return St instanceof Te?St:new Te(function(In){In(St)})}(pr.value).then(vi,rr)}Jn((rt=rt.apply(Mt,mn||[])).next())})}(this,void 0,void 0,function*(){this.isLoading=!0;const rt=(this.userService.roles?this.userService.roles:yield this.userService.getRoles(this.projectService.projectId)).includes("canaccessactionsmodule");this.filterConfigService.getGlobalObjectsByProjectId(this.projectService.projectId,rt).then(wt=>{this.globalObjects=wt,this.isLoading=!1}).catch(wt=>{this.toastr.error("Could not load data.")})})}formalizeType(Te){return"dash"===Te?"Dashboard":Te}openPreview(Te){if(this.selectedGlobalObject$.value&&this.selectedGlobalObject$.value.id===Te.id&&this.showPreview)return this.showPreview=!1,this.selectedGlobalObject$.next(null),void setTimeout(()=>{this.selectTile()},100);this.selectedGlobalObject$.next(Te),this.selectedGlobalObject$.value.groupId?(this.showPreview=!0,setTimeout(()=>{this.selectTile(Te.id)},100)):(this.showPreview=!1,this.dialogService.open(I,{callback:rt=>{this.createGroup(rt)}}))}selectTile(Te=-1){const rt=document.getElementsByClassName("configurator-tile");for(let wt=0;wt{const wt=this.selectedGlobalObject$.value;wt.datasource=Te,wt.groupId=rt,this.selectedGlobalObject$.next(wt),this.showPreview=!0,setTimeout(()=>{this.selectTile(wt.id)},100)})}openEditDatasource(Te=null){this.dialogService.open(I,{groupId:Te?Te.groupId:this.selectedGlobalObject$.value.groupId,datasourceInfo:Te?Te.datasource:this.selectedGlobalObject$.value.datasource,callback:rt=>{this.editDatasource(rt)}})}editDatasource(Te){this.filterConfigService.editDatasource(Te.datasource,Te.groupId).then(()=>{this.initData()})}openImportDialog(Te){this.dialogService.open(M,{globalObj:Te,globalObjs:this.globalObjects,callback:(rt,wt,St)=>{this.importConfiguration(Te,rt,wt,St)}})}importConfiguration(Te,rt,wt,St){this.filterConfigService.importConfiguration(rt,wt,St).then(()=>{Te.categories?Te.categories.push(St):Te.categories=[St],this.toastr.success("Configuration has been imported.")}).catch(In=>{this.toastr.error("Could not import configuration.")})}ngOnDestroy(){this.headerService.removeAction(this.addGlobalAction)}getIcon(Te){switch(Te){case x.S.group:return"icon-folder-open";case x.S.dashboard:return"icon-chart-arc";case x.S.FRT:return"icon-table";case x.S.bsc:return"icon-view-module";case x.S.link:return"icon-globe";case x.S.sa:return"icon-chart-bar";default:return"icon-file-check"}}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(w.r),e.\u0275\u0275directiveInject(R.s),e.\u0275\u0275directiveInject(s.k),e.\u0275\u0275directiveInject(m._W),e.\u0275\u0275directiveInject(D.x),e.\u0275\u0275directiveInject(Y.K),e.\u0275\u0275directiveInject(_.lu))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-filter-management"]],decls:4,vars:2,consts:[[1,"container-fluid"],[4,"ngIf"],[3,"isSpin"],[1,"configurator-header"],[1,"configurator-container"],["class","tile-container tile-preview-inactive",4,"ngIf"],[1,"tile-container","tile-preview-active"],["class","configurator-tile",3,"id","click",4,"ngFor","ngForOf"],[1,"filter-builder"],[3,"globalObject$"],[1,"configurator-tile",3,"id","click"],[1,"bold"],["class","datasource-table-info flex",4,"ngIf"],[1,"datasource-table-info","flex"],[1,"icon-settings","edit-datasource",3,"click"],[1,"tile-container","tile-preview-inactive"],["id","table-container"],["id","table-header","fxLayout","row"],[1,"table-header-item","icon"],[1,"table-header-item","type"],[1,"table-header-item","name"],[1,"table-header-item","database"],[1,"table-header-item","table"],[1,"table-row-item","center","action"],["id","table-body"],["class","table-row pointer","fxLayout","row",3,"click",4,"ngFor","ngForOf"],["fxLayout","row",1,"table-row","pointer",3,"click"],[1,"table-row-item","center","icon"],[1,"table-row-item","center","type"],[1,"table-row-item","center","name"],[1,"table-row-item","center","database"],[1,"table-row-item","center","table"],[1,"table-row-item","action"],["pulseTooltip","Edit Datasource","class","icon-settings",3,"click",4,"ngIf"],["pulseTooltip","Add Datasource","class","icon-plus2",4,"ngIf"],["class","icon-login-variant icon--justified","pulseTooltip","Import Configuration",3,"click",4,"ngIf"],["pulseTooltip","Edit Datasource",1,"icon-settings",3,"click"],["pulseTooltip","Add Datasource",1,"icon-plus2"],["pulseTooltip","Import Configuration",1,"icon-login-variant","icon--justified",3,"click"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,Wn,6,2,"ng-container",1),e.\u0275\u0275element(2,"pulse-spinner",2),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"pulse-project-add")),2&Te&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!rt.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("isSpin",rt.isLoading))},directives:[C.O5,C.sg,xt,p.xw,se.i,ue.O,At.i],styles:[".bold[_ngcontent-%COMP%]{font-weight:700}.flex[_ngcontent-%COMP%]{display:flex}.pointer[_ngcontent-%COMP%]{cursor:pointer}.configurator-header[_ngcontent-%COMP%]{font-weight:500;margin:20px 0;font-size:32px}.configurator-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex}.configurator-container[_ngcontent-%COMP%] .filter-builder[_ngcontent-%COMP%]{width:85%;height:91vh}.tile-container[_ngcontent-%COMP%]{width:15%}.tile-container[_ngcontent-%COMP%] .datasource-table-info[_ngcontent-%COMP%]{overflow:hidden;font-size:10px}.tile-container[_ngcontent-%COMP%] .datasource-table-info[_ngcontent-%COMP%] .edit-datasource[_ngcontent-%COMP%]{margin:2px}.tile-container[_ngcontent-%COMP%] .configurator-tile[_ngcontent-%COMP%]{background:white;height:100px;border-bottom:.5px solid rgba(128,128,128,.3);border-right:1px solid rgba(128,128,128,.3);cursor:pointer;transition:all .15s ease;padding:5px;font-size:13px;display:grid}.tile-container[_ngcontent-%COMP%] .configurator-tile[_ngcontent-%COMP%]:hover{background-color:#ebf0f5}.tile-container[_ngcontent-%COMP%] .configurator-tile.selected[_ngcontent-%COMP%]{background-color:#41aaaa;color:#fff}.tile-preview-active[_ngcontent-%COMP%]{height:91vh;overflow-y:scroll}.tile-preview-inactive[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:wrap}.tile-preview-inactive[_ngcontent-%COMP%] .configurator-tile[_ngcontent-%COMP%]{width:16.6666666667%}.tile-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.tile-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.tile-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:9px;background:rgba(0,0,0,.5)}.font--bold[_ngcontent-%COMP%]{font-weight:700}#table-container[_ngcontent-%COMP%]{background:#fff;border-width:1px 1px 0 1px;border-style:solid;border-color:#becdd7;display:flex;flex-direction:column}#table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%]{padding:10px 0;font-weight:500;background-color:#cdd9e14d;border-bottom:1px solid #becdd7;width:inherit}#table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item[_ngcontent-%COMP%]{padding:0 5px}#table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.icon[_ngcontent-%COMP%]{flex-basis:5%}#table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.type[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.name[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.database[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.table[_ngcontent-%COMP%]{flex-basis:22.5%}#table-container[_ngcontent-%COMP%] #table-header[_ngcontent-%COMP%] .table-header-item.action[_ngcontent-%COMP%]{flex-basis:5%}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%]{min-height:45px;border-bottom:1px solid #becdd7;align-items:center;cursor:pointer;transition:all .1s ease}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%]:hover{background-color:#ccc}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item[_ngcontent-%COMP%]{padding:0 5px}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.icon[_ngcontent-%COMP%]{flex-basis:5%;font-size:17px;text-align:center}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.type[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.name[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.database[_ngcontent-%COMP%], #table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.table[_ngcontent-%COMP%]{flex-basis:22.5%}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.action[_ngcontent-%COMP%]{flex-basis:5%;text-align:center;padding:10px 10px 0 0;font-size:14px;color:#555}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.action[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{color:#00646e}#table-container[_ngcontent-%COMP%] .table-row[_ngcontent-%COMP%] .table-row-item.action[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:3px}.icon--justified[_ngcontent-%COMP%]{position:relative;bottom:3px}"]}),Mt})();var kn=r(8929),vn=r(9133);let Dn=(()=>{class Mt{constructor(Te,rt){this.variables=Te,this.webApi=rt}getEtlStepWithExecution(Te,rt){return Te?this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/steps/execution/"+rt).then(wt=>wt):Promise.reject()}getEtlPackagesWithExecution(){return new Promise((Te,rt)=>{this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/allPackages").then(wt=>{Te(wt)},wt=>rt(wt))})}getEtlQueuedPackagesWithExecution(){return new Promise((Te,rt)=>{this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/allQueuedPackages").then(wt=>{Te(wt)},wt=>rt(wt))})}getEtlLogPackagesWithExecution(){return new Promise((Te,rt)=>{this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/allLogPackages").then(wt=>{Te(wt)},wt=>rt(wt))})}getOneEtlPackagesWithExecution(Te,rt){return Te?this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/execution/"+rt).then(wt=>wt):Promise.reject()}getEtlPackages(){return new Promise((Te,rt)=>{this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/").then(wt=>{Te(wt)},wt=>rt(wt))})}getEtlSteps(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/steps").then(St=>{rt(St)},St=>wt(St))})}getEtlStepsSucces(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/steps").then(St=>{rt(St)},St=>wt(St))})}getEtlStepsError(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/steps").then(St=>{rt(St)},St=>wt(St))})}getEtlPackage(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te).then(St=>{rt(St)},St=>wt(St))})}addPackage(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.post(this.variables.apiUrl+"/api/PulseEtl/package",Te).then(St=>{rt(St)},St=>wt(St))})}getDataSources(){return new Promise((Te,rt)=>{this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/datasource").then(wt=>{Te(wt)},wt=>rt(wt))})}editStep(Te,rt,wt){return new Promise((St,In)=>{Te||St(null),this.webApi.put(this.variables.apiUrl+"/api/PulseEtl/package/"+rt+"/step/"+wt,Te).then(vi=>{St(vi)},vi=>In(vi))})}editPackage(Te,rt){return new Promise((wt,St)=>{Te||wt(null),this.webApi.put(this.variables.apiUrl+"/api/PulseEtl/package/"+rt,Te).then(In=>{wt(In)},In=>St(In))})}addStep(Te,rt){return new Promise((wt,St)=>{Te||wt(null),this.webApi.post(this.variables.apiUrl+"/api/PulseEtl/package/"+rt+"/step",Te).then(In=>{wt(In)},In=>St(In))})}deleteStep(Te,rt,wt){return new Promise((St,In)=>{Te||St(null),this.webApi.delete(this.variables.apiUrl+"/api/PulseEtl/package/"+rt+"/step/"+Te).then(vi=>{St(vi)},vi=>In(vi))})}deletePackage(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.delete(this.variables.apiUrl+"/api/PulseEtl/package/"+Te).then(St=>{rt(St)},St=>wt(St))})}getLastStepExecution(Te,rt){return new Promise((wt,St)=>{!Te&&!rt&&wt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/step/"+rt+"/execution").then(In=>{wt(In)},In=>St(In))})}getLastPackageExecution(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.get(this.variables.apiUrl+"/api/PulseEtl/package/"+Te+"/execution").then(St=>{rt(St)},St=>wt(St))})}triggerStartLambda(Te){return new Promise((rt,wt)=>{Te||rt(null),this.webApi.post(this.variables.apiUrl+"/api/PulseEtl/startPackageExecution/"+Te,{}).then(St=>{rt(St)},St=>wt(St))})}executeStepLambda(Te,rt,wt){return new Promise((St,In)=>{Te||St(null),this.webApi.post(this.variables.apiUrl+"/api/PulseEtl/"+wt+"/"+Te,rt).then(vi=>{St(vi)},vi=>In(vi))})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275inject(vn.a),e.\u0275\u0275inject(a.f))},Mt.\u0275prov=e.\u0275\u0275defineInjectable({token:Mt,factory:Mt.\u0275fac,providedIn:"root"}),Mt})();const An=["dialog"];let Zn=(()=>{class Mt{constructor(Te,rt){this.pulseEtlService=Te,this.toastr=rt}ngOnInit(){}deleteStep(){this.pulseEtlService.deleteStep(this.id,this.packageId,this.sort).then(Te=>{this.toastr.success("Step successfully deleted","",{timeOut:2e3}),!1===this.sort?this.reloadStepsWithoutSort.next(!0):this.reloadStepsWithSort.next(!0)}),this.dialog.close()}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Dn),e.\u0275\u0275directiveInject(m._W))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-delete-step"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(An,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:15,vars:0,consts:[["dialog",""],[1,"modal-header"],[1,"modal-body"],[2,"margin-top","8%"],[2,"font-size","22px"],[1,"modal-buttons",2,"padding-top","0px !important"],["color","primary",1,"pulse-btn","delete",2,"margin-bottom","5px","padding-top","0px !important",3,"click"],["color","accent",1,"pulse-btn","cancel",3,"click"]],template:function(Te,rt){if(1&Te){const wt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),e.\u0275\u0275text(4,"Delete Step"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",2)(6,"div",3)(7,"label",4)(8,"b"),e.\u0275\u0275text(9,"Do you want to delete the Step?"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(10,"div",5)(11,"button",6),e.\u0275\u0275listener("click",function(){return rt.deleteStep()}),e.\u0275\u0275text(12,"Delete"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(wt),e.\u0275\u0275reference(1).close()}),e.\u0275\u0275text(14,"Cancel"),e.\u0275\u0275elementEnd()()()}},directives:[E.a],styles:[""]}),Mt})();const Qn=["template"];function hi(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",15),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275property("value",Te),e.\u0275\u0275attribute("selected",Te==rt.stepType||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(Te)}}function Gi(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te.data),e.\u0275\u0275attribute("selected",Te.data==rt.payload.Encrypted||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te.selector," ")}}function Ui(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",49),e.\u0275\u0275element(1,"div",50),e.\u0275\u0275elementEnd())}function _n(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",51),e.\u0275\u0275element(1,"i",52),e.\u0275\u0275elementEnd())}function Ve(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",53),e.\u0275\u0275element(1,"i",54),e.\u0275\u0275elementEnd())}function Ye(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",16)(1,"form",null,17)(3,"div",3)(4,"div",18)(5,"div",3)(6,"div",19)(7,"label")(8,"b"),e.\u0275\u0275text(9,"Sender"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"input",20,21),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.Sender.ReplyTo=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"div",22),e.\u0275\u0275text(13,"Sender is required "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",19)(15,"label")(16,"b"),e.\u0275\u0275text(17,"Recipient"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(18,"input",23,24),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.recipient=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"div",22),e.\u0275\u0275text(21,"Recipient to is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(22,"div",19)(23,"label")(24,"b"),e.\u0275\u0275text(25,"Cc"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(26,"input",25,26),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.cc=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(28,"div",22),e.\u0275\u0275text(29,"Cc is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(30,"div",19)(31,"label")(32,"b"),e.\u0275\u0275text(33,"Bcc"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"input",27,28),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.bcc=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(36,"div",22),e.\u0275\u0275text(37,"Bcc is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(38,"div",3)(39,"div",19)(40,"label")(41,"b"),e.\u0275\u0275text(42,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(43,"input",29,30),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.name=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(45,"div",22),e.\u0275\u0275text(46,"Name is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(47,"div",19)(48,"label")(49,"b"),e.\u0275\u0275text(50,"Subject"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(51,"input",31,32),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.Subject=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(53,"div",22),e.\u0275\u0275text(54,"Subject is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(55,"div",19)(56,"label")(57,"b"),e.\u0275\u0275text(58,"Attachments"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(59,"input",33,34),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.attachments=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(61,"div",22),e.\u0275\u0275text(62,"Attachments is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(63,"div",19)(64,"label")(65,"b"),e.\u0275\u0275text(66,"Encrypted"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(67,"div",5)(68,"select",35,36),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.Encrypted=wt}),e.\u0275\u0275template(70,Gi,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(71,"div",22),e.\u0275\u0275text(72,"Encrypted is required"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(73,"div",3)(74,"div",38)(75,"label")(76,"b"),e.\u0275\u0275text(77,"Description"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(78,"textarea",39,40),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.description=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(80,"div",22),e.\u0275\u0275text(81,"Description is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(82,"div",38)(83,"label")(84,"b"),e.\u0275\u0275text(85,"Body"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(86,"textarea",41,42),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.Body=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(88,"div",22),e.\u0275\u0275text(89,"Body is required"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(90,"div",43)(91,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeStep(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(92,"Execute Step"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(93,"br"),e.\u0275\u0275elementStart(94,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeFromHere(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(95,"Execute from here"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(96,"br"),e.\u0275\u0275template(97,Ui,2,0,"div",45),e.\u0275\u0275element(98,"br"),e.\u0275\u0275template(99,_n,2,0,"div",46),e.\u0275\u0275element(100,"br"),e.\u0275\u0275template(101,Ve,2,0,"div",47),e.\u0275\u0275elementEnd()()()()}if(2&Mt){const Te=e.\u0275\u0275reference(11),rt=e.\u0275\u0275reference(19),wt=e.\u0275\u0275reference(27),St=e.\u0275\u0275reference(35),In=e.\u0275\u0275reference(44),vi=e.\u0275\u0275reference(52),rr=e.\u0275\u0275reference(60),Jn=e.\u0275\u0275reference(69),pr=e.\u0275\u0275reference(79),$r=e.\u0275\u0275reference(87),bs=e.\u0275\u0275nextContext(),qr=bs.$implicit,Dr=bs.index,Es=e.\u0275\u0275nextContext();e.\u0275\u0275advance(10),e.\u0275\u0275property("ngModel",qr.payload.Sender.ReplyTo),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",Te.valid||Te.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.recipient),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",rt.valid||rt.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.cc),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",wt.valid||wt.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.bcc),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",St.valid||St.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",qr.name),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",In.valid||In.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.payload.Subject),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",vi.valid||vi.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.attachments),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",rr.valid||rr.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",qr.payload.Encrypted),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Es.data?null:Es.data.encryptedMail),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",Jn.valid||Jn.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",qr.description)("value",qr.description),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",pr.valid||pr.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",qr.payload.Body)("value",qr.payload.Body),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",$r.valid||$r.pristine),e.\u0275\u0275advance(9),e.\u0275\u0275property("ngIf",(null==Es.data?null:Es.data.startedIcon[Dr])==Es.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Es.data?null:Es.data.finishedIcon[Dr])==Es.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Es.data?null:Es.data.errorIcon[Dr])==Es.arrayName)}}function Qe(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te.id),e.\u0275\u0275attribute("selected",Te.id==rt.payload.destinationId||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te.url," ")}}function _t(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",15),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit;e.\u0275\u0275property("value",Te.statement),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(Te.selector)}}function Ct(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",49),e.\u0275\u0275element(1,"i",50),e.\u0275\u0275elementEnd())}function Bt(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",51),e.\u0275\u0275element(1,"i",52),e.\u0275\u0275elementEnd())}function Le(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",53),e.\u0275\u0275element(1,"i",54),e.\u0275\u0275elementEnd())}function ot(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",55)(1,"form",null,17)(3,"div",3)(4,"div",18)(5,"div",3)(6,"div",19)(7,"label")(8,"b"),e.\u0275\u0275text(9,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"input",56,57),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.name=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(12,"div",22),e.\u0275\u0275text(13,"Name is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",19)(15,"label")(16,"b"),e.\u0275\u0275text(17,"Destination connection"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(18,"div",5)(19,"select",58,59),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.destinationId=wt}),e.\u0275\u0275template(21,Qe,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"div",22),e.\u0275\u0275text(23,"Destination is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(24,"div",19)(25,"label")(26,"b"),e.\u0275\u0275text(27,"Presets"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"div",5)(29,"select",60,61),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.statement=wt}),e.\u0275\u0275element(31,"option",62),e.\u0275\u0275template(32,_t,2,2,"option",7),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(33,"div",63)(34,"label")(35,"b"),e.\u0275\u0275text(36,"Description"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(37,"textarea",64,65),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.description=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(39,"div",22),e.\u0275\u0275text(40,"Description is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"div",63)(42,"label")(43,"b"),e.\u0275\u0275text(44,"Statement"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(45,"textarea",66,67),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.statement=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(47,"div",22),e.\u0275\u0275text(48,"Statement is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(49,"div",43)(50,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeStep(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(51,"Execute Step"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(52,"br"),e.\u0275\u0275elementStart(53,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeFromHere(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(54,"Execute from here"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(55,"br"),e.\u0275\u0275template(56,Ct,2,0,"div",45),e.\u0275\u0275element(57,"br"),e.\u0275\u0275template(58,Bt,2,0,"div",46),e.\u0275\u0275element(59,"br"),e.\u0275\u0275template(60,Le,2,0,"div",47),e.\u0275\u0275elementEnd()()()()}if(2&Mt){const Te=e.\u0275\u0275reference(11),rt=e.\u0275\u0275reference(20),wt=e.\u0275\u0275reference(38),St=e.\u0275\u0275reference(46),In=e.\u0275\u0275nextContext(),vi=In.$implicit,rr=In.index,Jn=e.\u0275\u0275nextContext();e.\u0275\u0275advance(10),e.\u0275\u0275property("ngModel",vi.name)("value",vi.name),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",Te.valid||Te.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",vi.payload.destinationId),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Jn.data?null:Jn.data.dataSources),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",rt.valid||rt.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",vi.payload.statement),e.\u0275\u0275advance(2),e.\u0275\u0275property("value",void 0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",null==Jn.data?null:Jn.data.selectPresets),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",vi.description)("value",vi.description),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",wt.valid||wt.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",vi.payload.statement)("value",vi.payload.statement),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",St.valid||St.pristine),e.\u0275\u0275advance(9),e.\u0275\u0275property("ngIf",(null==Jn.data?null:Jn.data.startedIcon[rr])==Jn.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Jn.data?null:Jn.data.finishedIcon[rr])==Jn.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Jn.data?null:Jn.data.errorIcon[rr])==Jn.arrayName)}}function He(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te.id),e.\u0275\u0275attribute("selected",Te.id==rt.payload.sourceId||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te.url," ")}}function $e(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te),e.\u0275\u0275attribute("selected",Te.sourcePoolsize==rt.payload.sourceConnectionPoolSize||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",Te," ")}}function Ke(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te.id),e.\u0275\u0275attribute("selected",Te.id==rt.payload.destinationId||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te.url," ")}}function vt(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te),e.\u0275\u0275attribute("selected",Te.sourcePoolsize==rt.payload.destinationConnectionPoolSize||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te," ")}}function Nt(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div")(1,"div",22),e.\u0275\u0275text(2,"Partition is required"),e.\u0275\u0275elementEnd()()),2&Mt){e.\u0275\u0275nextContext();const Te=e.\u0275\u0275reference(60);e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",Te.valid||Te.pristine)}}function Qt(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"option",48),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("ngValue",Te),e.\u0275\u0275attribute("selected",Te.batchsize==rt.payload.batchSize||null),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",Te," ")}}function sn(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",49),e.\u0275\u0275element(1,"div",50),e.\u0275\u0275elementEnd())}function yn(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",51),e.\u0275\u0275element(1,"i",52),e.\u0275\u0275elementEnd())}function Ft(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",53),e.\u0275\u0275element(1,"i",54),e.\u0275\u0275elementEnd())}function tn(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",68)(1,"form",null,17)(3,"div",3)(4,"div",18)(5,"div",3)(6,"div",19)(7,"label")(8,"b"),e.\u0275\u0275text(9,"Source Connection"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",5)(11,"select",69,70),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.sourceId=wt}),e.\u0275\u0275template(13,He,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",22),e.\u0275\u0275text(15,"Source connection is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(16,"div",19)(17,"label")(18,"b"),e.\u0275\u0275text(19,"Source Poolsize"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(20,"div",5)(21,"select",71,72),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.sourceConnectionPoolSize=wt})("ngModelChange",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().$implicit;return 1===wt.payload.sourceConnectionPoolSize?wt.payload.expressionForDataSeparation=" ":"step.payload.expressionForDataSeparation"}),e.\u0275\u0275template(23,$e,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(24,"div",22),e.\u0275\u0275text(25,"Poolsize is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(26,"div",19)(27,"label")(28,"b"),e.\u0275\u0275text(29,"Destination Connection"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(30,"div",5)(31,"select",58,59),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.destinationId=wt}),e.\u0275\u0275template(33,Ke,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(34,"div",22),e.\u0275\u0275text(35,"Destination is required"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(36,"div",19)(37,"label")(38,"b"),e.\u0275\u0275text(39,"Destination Poolsize"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(40,"div",5)(41,"select",73,74),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.destinationConnectionPoolSize=wt}),e.\u0275\u0275template(43,vt,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"div",22),e.\u0275\u0275text(45,"Poolsize is required"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(46,"div",3)(47,"div",19)(48,"label")(49,"b"),e.\u0275\u0275text(50,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(51,"input",75,76),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.name=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(53,"div",22),e.\u0275\u0275text(54,"Name is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(55,"div",19)(56,"label")(57,"b"),e.\u0275\u0275text(58,"Partition"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(59,"input",77,78),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.expressionForDataSeparation=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(61,Nt,3,1,"div",79),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(62,"div",19)(63,"label")(64,"b"),e.\u0275\u0275text(65,"Batchsize"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(66,"div",5)(67,"select",80,81),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.batchSize=wt}),e.\u0275\u0275template(69,Qt,2,3,"option",37),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(70,"div",22),e.\u0275\u0275text(71,"Batchize is required"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(72,"div",63)(73,"label")(74,"b"),e.\u0275\u0275text(75,"Description"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(76,"textarea",82,83),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.description=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(78,"div",22),e.\u0275\u0275text(79,"Description is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(80,"div",3)(81,"div",63)(82,"label")(83,"b"),e.\u0275\u0275text(84,"Select statement "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(85,"textarea",84,85),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.selectStatement=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(87,"div",22),e.\u0275\u0275text(88,"Select statement is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(89,"div",63)(90,"label")(91,"b"),e.\u0275\u0275text(92,"Insert statement "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(93,"textarea",86,87),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().$implicit.payload.insertStatement=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(95,"div",22),e.\u0275\u0275text(96,"Insert statement is required"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(97,"div",43)(98,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeStep(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(99,"Execute Step"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(100,"br"),e.\u0275\u0275elementStart(101,"button",44),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.executeFromHere(St,In.stepType,vi.arrayName)}),e.\u0275\u0275text(102,"Execute from here"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(103,"br"),e.\u0275\u0275template(104,sn,2,0,"div",45),e.\u0275\u0275element(105,"br"),e.\u0275\u0275template(106,yn,2,0,"div",46),e.\u0275\u0275element(107,"br"),e.\u0275\u0275template(108,Ft,2,0,"div",47),e.\u0275\u0275elementEnd()()()()}if(2&Mt){const Te=e.\u0275\u0275reference(12),rt=e.\u0275\u0275reference(22),wt=e.\u0275\u0275reference(32),St=e.\u0275\u0275reference(42),In=e.\u0275\u0275reference(52),vi=e.\u0275\u0275reference(68),rr=e.\u0275\u0275reference(77),Jn=e.\u0275\u0275reference(86),pr=e.\u0275\u0275reference(94),$r=e.\u0275\u0275nextContext(),bs=$r.$implicit,qr=$r.index,Dr=e.\u0275\u0275nextContext();e.\u0275\u0275advance(11),e.\u0275\u0275property("ngModel",bs.payload.sourceId),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Dr.data?null:Dr.data.dataSources),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",Te.valid||Te.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",bs.payload.sourceConnectionPoolSize),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Dr.data?null:Dr.data.sourcePoolSize),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",rt.valid||rt.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",bs.payload.destinationId),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Dr.data?null:Dr.data.dataSources),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",wt.valid||wt.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",bs.payload.destinationConnectionPoolSize),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Dr.data?null:Dr.data.destPoolSize),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",St.valid||St.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",bs.name),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",In.valid||In.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",bs.payload.expressionForDataSeparation)("readonly",1===bs.payload.sourceConnectionPoolSize),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",bs.payload.sourceConnectionPoolSize>1),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",bs.payload.batchSize),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",null==Dr.data?null:Dr.data.batchsize),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",vi.valid||vi.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",bs.description)("value",bs.description),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",rr.valid||rr.pristine),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngModel",bs.payload.selectStatement)("value",bs.payload.selectStatement),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",Jn.valid||Jn.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",bs.payload.insertStatement)("value",bs.payload.insertStatement),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",pr.valid||pr.pristine),e.\u0275\u0275advance(9),e.\u0275\u0275property("ngIf",(null==Dr.data?null:Dr.data.startedIcon[qr])==Dr.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Dr.data?null:Dr.data.finishedIcon[qr])==Dr.arrayName),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==Dr.data?null:Dr.data.errorIcon[qr])==Dr.arrayName)}}function on(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label")(6,"b"),e.\u0275\u0275text(7,"Function"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",5)(9,"select",6),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.stepType=wt})("change",function(){const wt=e.\u0275\u0275restoreView(Te),St=wt.index,In=wt.$implicit,vi=e.\u0275\u0275nextContext();return null==vi.data?null:vi.data.selectFunction(St,In.stepType,vi.arrayName)}),e.\u0275\u0275template(10,hi,2,3,"option",7),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(11,"div",8)(12,"button",9),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).index,In=e.\u0275\u0275nextContext();return null==In.data||null==In.data.editCmp?null:In.data.editCmp.deleteStep(St,In.arrayName)}),e.\u0275\u0275text(13,"Delete Step"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275template(14,Ye,102,26,"div",10),e.\u0275\u0275template(15,ot,61,18,"div",11),e.\u0275\u0275template(16,tn,109,32,"div",12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",13)(18,"i",14),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).index,In=e.\u0275\u0275nextContext();return null==In.data?null:In.data.addStep(St+1,In.arrayName)}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext();e.\u0275\u0275advance(9),e.\u0275\u0275property("ngModel",Te.stepType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",null==rt.data?null:rt.data.lambdaFunctions),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf","sendEmail"===Te.stepType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","executeMysql"===Te.stepType||"executeMssql"===Te.stepType),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","mssqlToMysql"===Te.stepType||"mysqlToMssql"===Te.stepType||"mssqlToMssql"===Te.stepType||"mysqlToMysql"===Te.stepType)}}let Tn=(()=>{class Mt{constructor(){this.areFormValid=!1,this.subs=[]}ngOnInit(){}ngAfterViewInit(){0===this.templateForms.length&&(this.areFormValid=!0),this.templateForms.changes.subscribe(Te=>{this.templateForms.forEach(rt=>{const wt=rt.form.statusChanges.subscribe(()=>{this.areFormValid=!this.templateForms.find(St=>!1===St.valid)});this.subs.push(wt)})})}ngOnDestroy(){this.subs.forEach(Te=>{Te.unsubscribe()})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-step-template"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(Qn,5),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.templateForms=wt)}},inputs:{data:"data",allSteps:"allSteps",arrayName:"arrayName"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],[1,"item-block"],[1,"selectFunction"],["fxLayout","row"],["fxLayout","column","fxFlex","0 1 calc(90%)","id","row",1,"pulse-form-field",2,"width","60% !important"],[1,"pulse-select"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","0 1 calc(10%)",2,"margin-top","22px"],["color","primary",1,"pulse-btn","delete",3,"click"],["class","sendMail",4,"ngIf"],["class","executeStatement",4,"ngIf"],["class","transferStatement",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",2,"margin-top","10px"],["id","addButton",1,"icon-plus2",3,"click"],[3,"value"],[1,"sendMail"],["template","ngForm"],["fxLayout","column","fxFlex","0 1 calc(90%)"],["fxLayout","column","fxFlex","0 1 calc(24%)","id","row",1,"pulse-form-field"],["required","","name","mailReplyTo","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"],["mailReplyTo","ngModel"],[1,"alert",3,"hidden"],["required","","name","Recipient","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"],["Recipient","ngModel"],["required","","name","Cc","placeholder","If empty write []",1,"pulse-input",3,"ngModel","ngModelChange"],["Cc","ngModel"],["required","","name","Bcc","placeholder","If empty write []",1,"pulse-input",3,"ngModel","ngModelChange"],["Bcc","ngModel"],["required","","name","mailName","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"],["mailName","ngModel"],["required","","name","subject","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"],["subject","ngModel"],["required","","name","attachments","placeholder","If empty write []",1,"pulse-input",3,"ngModel","ngModelChange"],["attachments","ngModel"],["required","","name","mailEncrypted",3,"ngModel","ngModelChange"],["mailEncrypted","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","0 1 calc(48%)",1,"pulse-form-field"],["required","","name","mailDescription","type","text","placeholder","Description",1,"pulse-textarea",2,"width","95% !important",3,"ngModel","value","ngModelChange"],["mailDescription","ngModel"],["required","","name","body","type","text","placeholder","Description",1,"pulse-textarea",3,"ngModel","value","ngModelChange"],["body","ngModel"],["fxLayout","column","fxFlex","0 1 calc(10%)",2,"margin-top","20px"],["color","primary",1,"pulse-btn","save",3,"click"],["class","startedIcon",4,"ngIf"],["class","finishedIcon",4,"ngIf"],["class","errorIcon",4,"ngIf"],[3,"ngValue"],[1,"startedIcon"],[1,"loader"],[1,"finishedIcon"],[1,"icon-checkbox-marked"],[1,"errorIcon"],[1,"icon-close-box"],[1,"executeStatement"],["required","","name","stepName","placeholder","",1,"pulse-input",3,"ngModel","value","ngModelChange"],["stepName","ngModel"],["required","","name","stepDest",3,"ngModel","ngModelChange"],["stepDest","ngModel"],["name","preset",3,"ngModel","ngModelChange"],["preset","ngModel"],["disabled","","hidden","",3,"value"],["fxLayout","column",1,"pulse-form-field"],["required","","name","stepDescription","type","text","placeholder","Description",1,"pulse-textarea",2,"height","80px","width","96% !important",3,"ngModel","value","ngModelChange"],["stepDescription","ngModel"],["required","","name","stepStatement","type","text","placeholder","Statement",1,"pulse-textarea",2,"height","120px","width","96% !important",3,"ngModel","value","ngModelChange"],["stepStatement","ngModel"],[1,"transferStatement"],["required","","name","stepSource",3,"ngModel","ngModelChange"],["stepSource","ngModel"],["required","","name","stepSourcePool",3,"ngModel","ngModelChange"],["stepSourcePool","ngModel"],["required","","name","stepDestPool",3,"ngModel","ngModelChange"],["stepDestPool","ngModel"],["required","","name","stepTransferName","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"],["stepTransferName","ngModel"],["required","","name","stepPartition",1,"pulse-input",3,"ngModel","readonly","ngModelChange"],["stepPartition","ngModel"],[4,"ngIf"],["required","","name","stepBatchsize",3,"ngModel","ngModelChange"],["stepBatchsize","ngModel"],["required","","name","stepTranferDesc","type","text","placeholder","Description",1,"pulse-textarea",2,"height","80px","width","96% !important",3,"ngModel","value","ngModelChange"],["stepTranferDesc","ngModel"],["required","","name","stepTranferSelect","type","text","placeholder","Select statement",1,"pulse-textarea",2,"height","120px","width","93% !important",3,"ngModel","value","ngModelChange"],["stepTranferSelect","ngModel"],["required","","name","stepTransferInsert","type","text","placeholder","Insert statement",1,"pulse-textarea",2,"height","120px","width","93% !important",3,"ngModel","value","ngModelChange"],["stepTransferInsert","ngModel"]],template:function(Te,rt){1&Te&&e.\u0275\u0275template(0,on,19,5,"ng-container",0),2&Te&&e.\u0275\u0275property("ngForOf",rt.allSteps)},directives:[C.sg,p.xw,p.yH,v.SelectControlValueAccessor,v.NgControlStatus,v.NgModel,v.NgSelectOption,v.\u0275NgSelectMultipleOption,C.O5,v.\u0275NgNoValidate,v.NgControlStatusGroup,v.NgForm,v.DefaultValueAccessor,v.RequiredValidator,p.Wh],styles:["#row[_ngcontent-%COMP%]{padding-right:5px!important}.errorIcon[_ngcontent-%COMP%]{font-size:45px;color:red}.finishedIcon[_ngcontent-%COMP%]{font-size:45px;color:green}.startedIcon[_ngcontent-%COMP%]{padding:10px 0 0 50px;font-size:45px;color:#89bff8}.loader[_ngcontent-%COMP%]{border:10px solid #f3f3f3;border-radius:50%;border-top:10px solid #0f8287;width:60px;height:60px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#addButton[_ngcontent-%COMP%]{font-size:30px;cursor:pointer}.save[_ngcontent-%COMP%]{width:60%;text-align:right;margin:0 auto}.biggerModal[_ngcontent-%COMP%]{min-width:85vw;min-height:68vw}label[_ngcontent-%COMP%]{text-align:left}.alert[_ngcontent-%COMP%]{color:red;text-align:left}"]}),Mt})();class $n{constructor(mn,Te,rt,wt,St,In,vi,rr,Jn){this.id=mn,this.packageId=Te,this.stepType=rt,this.name=wt,this.description=St,this.payload=In,this.nextStepId=vi,this.finalize=rr,this.first=Jn}}class ii extends $n{get recipient(){return null===this.payload.Recipient?null:0===this.payload.Recipient.length?"[]":this.payload.Recipient.map(mn=>mn.mail).join(";")}set recipient(mn){if("[]"===mn)this.payload.Recipient=[];else{const Te=[],rt=mn.split(";");rt.forEach(function(wt,St){Te[St]={displayName:rt[St],mail:rt[St]}}),console.log(this.payload.Recipient),console.log(Te),this.payload.Recipient=Te}}get cc(){return null===this.payload.Cc?null:0===this.payload.Cc.length?"[]":this.payload.Cc.map(mn=>mn.mail).join(";")}set cc(mn){if("[]"===mn)this.payload.Cc=[];else{const Te=[],rt=mn.split(";");rt.forEach(function(wt,St){Te[St]={displayName:rt[St],mail:rt[St]}}),this.payload.Cc=Te}}get bcc(){return null===this.payload.Bcc?null:0===this.payload.Bcc.length?"[]":this.payload.Bcc.map(mn=>mn.mail).join(";")}set bcc(mn){if("[]"===mn)this.payload.Bcc=[];else{const Te=[],rt=mn.split(";");rt.forEach(function(wt,St){Te[St]={displayName:rt[St],mail:rt[St]}}),this.payload.Bcc=Te}}get attachments(){if(null===this.payload.Attachments)return null;if(0===this.payload.Attachments.length)return"[]";{const mn=[];return this.payload.Attachments.forEach(function(Te,rt){mn[rt]=Object.values(Te).join(",")}),mn.join(";")}}set attachments(mn){if("[]"===mn)this.payload.Attachments=[];else{const Te=[],rt=mn.split(";");let wt;rt.forEach(function(St,In){wt=rt[In].split(","),Te[In]={bucket:wt[0],path:wt[1],targetFileName:wt[2]}}),this.payload.Attachments=Te}}}var $i=r(14356);const Wi=["dialog"],yi=["template"];function Fr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"label")(3,"b"),e.\u0275\u0275text(4,"Packagename"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"input",23,24),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.name=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",25),e.\u0275\u0275text(8,"Name is required"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"div",22)(10,"label")(11,"b"),e.\u0275\u0275text(12,"Description"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"textarea",26,27),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.description=wt}),e.\u0275\u0275text(15," "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"div",25),e.\u0275\u0275text(17,"Description is required"),e.\u0275\u0275elementEnd()()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275reference(6),wt=e.\u0275\u0275reference(14);e.\u0275\u0275advance(5),e.\u0275\u0275property("ngModel",Te.name)("value",Te.name),e.\u0275\u0275advance(2),e.\u0275\u0275property("hidden",rt.valid||rt.pristine),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngModel",Te.description)("value",Te.description),e.\u0275\u0275advance(3),e.\u0275\u0275property("hidden",wt.valid||wt.pristine)}}let Rr=(()=>{class Mt{constructor(Te,rt,wt,St){this.toastr=Te,this.pulseEtlService=rt,this.dialogService=wt,this.loadingBarService=St,this.reloadStepsWithSort=new kn.xQ,this.reloadStepsWithoutSort=new kn.xQ,this.refreshDataAfterStart=new kn.xQ,this.subs=[],this.executeTemplate=[],this.firstStep=null,this.firstStepError=null,this.firstStepSucces=null,this.addStepId=[],this.finishedIcon=[],this.errorIcon=[],this.startedIcon=[],this.allSteps=[],this.allStepsSucces=[],this.allStepsError=[],this.emptyField=!1,this.batchsize=[1e3,2e3,3e3,4e3,5e3,8e3,1e4,15e3,2e4,3e4],this.sourcePoolSize=[1,2,3,4,5,6,7,8,9,10],this.destPoolSize=[10,50,100,200,250,300,400,500,1e3],this.encryptedMail=[{selector:"Yes",data:1},{selector:"No",data:0}],this.selectPresets=[{selector:"Select",statement:"SELECT column1, column2, ... FROM table_name;"},{selector:"Update",statement:"UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;"}],this.insertPresets=[{selector:"Insert",statement:"INSERT INTO table_name VALUES (value1, value2, value3, ...);"}],this.lambdaFunctions=["executeMysql","executeMssql","mssqlToMysql","mysqlToMssql","mssqlToMssql","mysqlToMysql","sendEmail"],this.subs.push(this.reloadStepsWithSort.subscribe(In=>{In&&this.sortAfterDelete()})),this.subs.push(this.reloadStepsWithoutSort.subscribe(In=>{In&&this.withoutSortAfterDelete()}))}ngOnDestroy(){this.loadingBarService.stop(),this.refreshDataAfterStart.next(!0)}ngOnInit(){this.loadingBarService.start(),this.getAllSteps(),this.getEtlPackage(),this.getDataSources()}getDataForTemplate(){return{lambdaFunctions:this.lambdaFunctions,finishedIcon:this.finishedIcon,errorIcon:this.errorIcon,startedIcon:this.startedIcon,selectFunction:this.selectFunction,deleteStep:this.deleteStep,executeStep:this.executeStep,executeFromHere:this.executeFromHere,dataSources:this.dataSources,batchsize:this.batchsize,selectPresets:this.selectPresets,sourcePoolSize:this.sourcePoolSize,destPoolSize:this.destPoolSize,insertPresets:this.insertPresets,addStep:this.addStep,addStepId:this.addStepId,pulseEtlService:this.pulseEtlService,allSteps:this.allSteps,allStepsError:this.allStepsError,allStepsSucces:this.allStepsSucces,dialogService:this.dialogService,reloadStepsWithSort:this.reloadStepsWithSort,reloadStepsWithoutSort:this.reloadStepsWithoutSort,toastr:this.toastr,packageId:this.packageId,editCmp:this,encryptedMail:this.encryptedMail,deleteStepFromArray:this.withoutSortAfterDelete}}getDataSources(){this.pulseEtlService.getDataSources().then(Te=>{this.dataSources=Te.map(rt=>({id:rt.id,name:rt.name,url:rt.url,type:rt.type}))})}getEtlPackage(){this.pulseEtlService.getEtlPackage(this.packageId).then(Te=>{this.package=Te.map(rt=>({name:rt.name,description:rt.description,id:rt.id,pulseProjectId:rt.pulseProjectId}))})}getAllSteps(){const Te=[];let rt;const wt=[];let St;const In=[];let vi;this.pulseEtlService.getEtlSteps(this.packageId).then(rr=>{rr.map(Jn=>{null===Jn.finalize&&(JSON.parse(Jn.payload).Sender?this.allSteps.push(new ii(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,null,Jn.first)):this.allSteps.push(new $n(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,null,Jn.first))),"succes"===Jn.finalize&&(JSON.parse(Jn.payload).Sender?this.allStepsSucces.push(new ii(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,Jn.finalize,Jn.first)):this.allStepsSucces.push(new $n(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,Jn.finalize,Jn.first))),"error"===Jn.finalize&&(JSON.parse(Jn.payload).Sender?this.allStepsError.push(new ii(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,Jn.finalize,Jn.first)):this.allStepsError.push(new $n(Jn.id,Jn.packageId,Jn.stepType,Jn.name,Jn.description,JSON.parse(Jn.payload),Jn.nextStepId?Jn.nextStepId:null,Jn.finalize,Jn.first)))}),this.allSteps.length>=1&&Te.push(this.allSteps.find(Jn=>null===Jn.nextStepId)),this.allSteps.map(Jn=>{null!==Jn.nextStepId&&(rt=Te[Te.length-1].id,Te.push(this.allSteps.find(pr=>pr.nextStepId===rt)))}),this.allStepsSucces.length>=1&&wt.push(this.allStepsSucces.find(Jn=>null===Jn.nextStepId)),this.allStepsSucces.map(Jn=>{null!==Jn.nextStepId&&(St=wt[wt.length-1].id,wt.push(this.allStepsSucces.find(pr=>pr.nextStepId===St)))}),this.allStepsError.length>=1&&In.push(this.allStepsError.find(Jn=>null===Jn.nextStepId)),this.allStepsError.map(Jn=>{null!==Jn.nextStepId&&(vi=In[In.length-1].id,In.push(this.allStepsError.find(pr=>pr.nextStepId===vi)))}),this.allStepsSucces=wt.reverse(),this.allStepsError=In.reverse(),this.allSteps=Te.reverse()}),this.loadingBarService.complete()}saveChanges(){this.errorIcon=[],this.finishedIcon=[],this.startedIcon=[],this.executeTemplate=[],this.templateComponents.find(Te=>!1===Te.areFormValid)?this.executeTemplate.push("false"):this.executeTemplate.push("true"),this.template.find(Te=>{this.executeTemplate.push(!1===Te.valid?"false":"true")}),!1===this.executeTemplate.includes("false")?(this.editSteps=[],this.editSteps=this.allSteps.map(Te=>({id:Te.id,name:Te.name,description:Te.description,packageId:Te.packageId,stepType:Te.stepType,nextStepId:Te.nextStepId,payload:JSON.stringify(Te.payload),finalize:Te.finalize,first:Te.first})),this.editStepsSucces=[],this.editStepsSucces=this.allStepsSucces.map(Te=>({id:Te.id,name:Te.name,description:Te.description,packageId:Te.packageId,stepType:Te.stepType,nextStepId:Te.nextStepId,payload:JSON.stringify(Te.payload),finalize:"succes",first:Te.first})),this.editStepsError=[],this.editStepsError=this.allStepsError.map(Te=>({id:Te.id,name:Te.name,description:Te.description,packageId:Te.packageId,stepType:Te.stepType,nextStepId:Te.nextStepId,payload:JSON.stringify(Te.payload),finalize:"error",first:Te.first})),this.pulseEtlService.editPackage(this.package[0],this.packageId).then(Te=>{}),this.editSteps.forEach((Te,rt)=>{this.pulseEtlService.editStep(this.editSteps[rt],this.packageId,this.editSteps[rt].id).then(wt=>{this.toastr.success("Steps saved successfully","",{timeOut:5e3})})}),this.editStepsError.forEach((Te,rt)=>{this.pulseEtlService.editStep(this.editStepsError[rt],this.packageId,this.editStepsError[rt].id).then(wt=>{this.toastr.success("Finalize steps saved successfully","",{timeOut:5e3})})}),this.editStepsSucces.forEach((Te,rt)=>{this.pulseEtlService.editStep(this.editStepsSucces[rt],this.packageId,this.editStepsSucces[rt].id).then(wt=>{})})):this.toastr.info("Empty fields","",{timeOut:5e3})}addStep(Te,rt){this.errorIcon=[],this.finishedIcon=[],this.startedIcon=[];const wt={name:null,description:null,packageId:this.packageId,stepType:null,nextStepId:Int16Array,payload:null,first:null};"allSteps"===rt&&this.pulseEtlService.addStep(wt,this.packageId).then(St=>{this.allSteps.splice(Te,0,St),this.addStepId.push(St.id)}),"allStepsSucces"===rt&&this.pulseEtlService.addStep(wt,this.packageId).then(St=>{this.allStepsSucces.splice(Te,0,St),this.addStepId.push(St.id)}),"allStepsError"===rt&&this.pulseEtlService.addStep(wt,this.packageId).then(St=>{this.allStepsError.splice(Te,0,St),this.addStepId.push(St.id)})}sortAfterDelete(){"allSteps"===this.deletedStepArray&&(0===this.deletedObjectId?(this.allSteps.splice(this.deletedObjectId,1),void 0!==this.allSteps[0]&&(this.allSteps[0].first="true",this.saveChanges())):this.allSteps.length-1===this.deletedObjectId?(this.allSteps[this.deletedObjectId-1].nextStepId=null,this.allSteps.splice(this.deletedObjectId,1),this.saveChanges()):void 0!==this.allSteps[this.deletedObjectId-1]&&(this.allSteps[this.deletedObjectId-1].nextStepId=this.deletedObject.nextStepId,this.allSteps.splice(this.deletedObjectId,1),this.saveChanges())),"allStepsSucces"===this.deletedStepArray&&(0===this.deletedObjectId?(this.allStepsSucces.splice(this.deletedObjectId,1),void 0!==this.allStepsSucces[0]&&(this.allStepsSucces[0].first="true",this.saveChanges())):this.allStepsSucces.length-1===this.deletedObjectId?(this.allStepsSucces[this.deletedObjectId-1].nextStepId=null,this.allStepsSucces.splice(this.deletedObjectId,1),this.saveChanges()):void 0!==this.allStepsSucces[this.deletedObjectId-1]&&(this.allStepsSucces[this.deletedObjectId-1].nextStepId=this.deletedObject.nextStepId,this.allStepsSucces.splice(this.deletedObjectId,1),this.saveChanges())),"allStepsError"===this.deletedStepArray&&(0===this.deletedObjectId?(this.allStepsError.splice(this.deletedObjectId,1),void 0!==this.allStepsError[0]&&(this.allStepsError[0].first="true",this.saveChanges())):this.allStepsError.length-1===this.deletedObjectId?(this.allStepsError[this.deletedObjectId-1].nextStepId=null,this.allStepsError.splice(this.deletedObjectId,1),this.saveChanges()):void 0!==this.allStepsError[this.deletedObjectId-1]&&(this.allStepsError[this.deletedObjectId-1].nextStepId=this.deletedObject.nextStepId,this.allStepsError.splice(this.deletedObjectId,1),this.saveChanges())),this.deletedObjectId=null,this.deletedObject=null,this.deletedStepArray=null}withoutSortAfterDelete(){"allSteps"===this.deletedStepArray&&this.allSteps.splice(this.deletedObjectId,1),"allStepsSucces"===this.deletedStepArray&&this.allStepsSucces.splice(this.deletedObjectId,1),"allStepsError"===this.deletedStepArray&&this.allStepsError.splice(this.deletedObjectId,1)}deleteStep(Te,rt){this.errorIcon=[],this.finishedIcon=[],this.startedIcon=[],this.deletedObjectId=Te,"allSteps"===rt&&(this.deletedStepArray="allSteps",this.deletedObject=this.allSteps[Te],this.deletedStepId=this.allSteps[Te].id),"allStepsSucces"===rt&&(this.deletedStepArray="allStepsSucces",this.deletedObject=this.allStepsSucces[Te],this.deletedStepId=this.allStepsSucces[Te].id),"allStepsError"===rt&&(this.deletedStepArray="allStepsError",this.deletedObject=this.allStepsError[Te],this.deletedStepId=this.allStepsError[Te].id),this.dialogService.open(Zn,null==this.deletedObject.description||null==this.deletedObject.name||null==this.deletedObject.payload||null==this.deletedObject.stepType?{id:this.deletedStepId,packageId:this.packageId,reloadStepsWithoutSort:this.reloadStepsWithoutSort,sort:!1}:{id:this.deletedStepId,packageId:this.packageId,editPackageCmp:this,reloadStepsWithSort:this.reloadStepsWithSort,sort:!0},{})}selectFunction(Te,rt,wt){if(this.firstStep=0===Te?"true":null,"allSteps"===wt&&(this.nextStepId=null,this.selectId=this.allSteps[Te].id,1===this.allSteps.length?(this.nextStepId=null,this.firstStep="true"):this.allSteps.length-1===Te&&(this.nextStepId=null,this.allSteps[Te-1].nextStepId=this.selectId),void 0!==this.allSteps[Te+1]&&(this.nextStepId=this.allSteps[Te+1].id,this.allSteps[Te+1].first=null,void 0!==this.allSteps[Te-1]&&(this.nextStepId=this.allSteps[Te+1].id,this.allSteps[Te-1].nextStepId=this.selectId))),"allStepsSucces"===wt&&(this.nextStepId=null,this.selectId=this.allStepsSucces[Te].id,1===this.allStepsSucces.length?(this.nextStepId=null,this.firstStep="true"):this.allStepsSucces.length-1===Te&&(this.nextStepId=null,this.allStepsSucces[Te-1].nextStepId=this.selectId),void 0!==this.allStepsSucces[Te+1]&&(this.nextStepId=this.allStepsSucces[Te+1].id,this.allStepsSucces[Te+1].first=null,void 0!==this.allStepsSucces[Te-1]&&(this.nextStepId=this.allStepsSucces[Te+1].id,this.allStepsSucces[Te-1].nextStepId=this.selectId))),"allStepsError"===wt&&(this.nextStepId=null,this.selectId=this.allStepsError[Te].id,1===this.allStepsError.length?(this.nextStepId=null,this.firstStep="true"):this.allStepsError.length-1===Te&&(this.nextStepId=null,this.allStepsError[Te-1].nextStepId=this.selectId),void 0!==this.allStepsError[Te+1]&&(this.nextStepId=this.allStepsError[Te+1].id,this.allStepsError[Te+1].first=null,void 0!==this.allStepsError[Te-1]&&(this.nextStepId=this.allStepsError[Te+1].id,this.allStepsError[Te-1].nextStepId=this.selectId))),"executeMysql"===rt||"executeMssql"===rt){const St={id:this.selectId,name:null,description:null,packageId:this.packageId,stepType:rt,nextStepId:this.nextStepId,finalize:null,first:this.firstStep,payload:{destinationId:null,statement:null}};if("allSteps"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,St.finalize,St.first);this.allSteps[Te]=In}if("allStepsSucces"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,St.finalize,St.first);this.allStepsSucces[Te]=In}if("allStepsError"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,St.finalize,St.first);this.allStepsError[Te]=In}}else if("sendEmail"===rt){const St={id:this.selectId,name:null,description:null,packageId:this.packageId,stepType:rt,nextStepId:this.nextStepId,finalize:null,first:this.firstStep,payload:{Sender:{MailServer:"SES",mail:"pulse@siemens.com",ReplyTo:null,displayName:"Pulse ETL"},EmailSmtpId:1,Recipient:[],Cc:[],Bcc:[],Body:null,Subject:null,Attachments:[],Encrypted:0}};if("allSteps"===wt){const In=new ii(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,null,St.first);this.allSteps[Te]=In}if("allStepsSucces"===wt){const In=new ii(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,"succes",St.first);this.allStepsSucces[Te]=In}if("allStepsError"===wt){const In=new ii(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,"error",St.first);this.allStepsError[Te]=In}}else{const St={id:this.selectId,name:null,description:null,packageId:this.packageId,stepType:rt,nextStepId:this.nextStepId,finalize:null,first:this.firstStep,payload:{sourceId:null,destinationId:null,selectStatement:null,insertStatement:null,batchSize:null,destinationConnectionPoolSize:null,sourceConnectionPoolSize:null,expressionForDataSeparation:null}};if("allSteps"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,null,St.first);this.allSteps[Te]=In}if("allStepsSucces"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,"succes",St.first);this.allStepsSucces[Te]=In}if("allStepsError"===wt){const In=new $n(St.id,St.packageId,St.stepType,St.name,St.description,St.payload,St.nextStepId?St.nextStepId:null,"error",St.first);this.allStepsError[Te]=In}}}executeAll(){this.pulseEtlService.triggerStartLambda(this.packageId).then(Te=>{this.toastr.success(Te,"",{timeOut:5e3})})}executeStep(Te,rt,wt){this.errorIcon[Te]="false",this.finishedIcon[Te]="false","allSteps"===wt&&(this.startedIcon[Te]=wt,this.payload=this.allSteps[Te].payload,this.payload.oneStep="oneStep",this.executeStepId=this.allSteps[Te].id),"allStepsSucces"===wt&&(this.startedIcon[Te]=wt,this.payload=this.allStepsSucces[Te].payload,this.payload.oneStep="oneStep",this.executeStepId=this.allSteps[Te].id),"allStepsError"===wt&&(this.startedIcon[Te]=wt,this.payload=this.allStepsError[Te].payload,this.payload.oneStep="oneStep",this.executeStepId=this.allSteps[Te].id),this.pulseEtlService.executeStepLambda(this.executeStepId,this.payload,rt).then(St=>{"The Step was succesfully"===St?(this.toastr.success(St,"",{timeOut:5e3}),this.startedIcon[Te]="false",this.finishedIcon[Te]=wt,this.payload.oneStep=null):(this.toastr.error(St,"",{timeOut:0,extendedTimeOut:0}),this.startedIcon[Te]="false",this.errorIcon[Te]=wt,this.payload.oneStep=null)})}executeFromHere(Te,rt,wt){console.log(Te,rt,wt),("allSteps"===wt||"allStepsSucces"===wt||"allStepsError"===wt)&&(this.startedIcon[Te]=wt,this.payload=this.allSteps[Te].payload,this.payload.oneStep="oneStep",this.executeAllStepId=this.allSteps[Te].id,this.nextStep=this.allSteps[Te].nextStepId,null!==this.nextStep&&(this.nextStepType=this.allSteps[Te+1].stepType)),this.pulseEtlService.executeStepLambda(this.executeAllStepId,this.payload,rt).then(St=>{"The Step was succesfully"===St?(this.toastr.success(St,"",{timeOut:5e3}),this.startedIcon[Te]="false",this.finishedIcon[Te]=wt,this.payload.oneStep=null,null!==this.nextStep&&setTimeout(()=>{this.executeFromHere(Te+1,this.nextStepType,wt)},2e3)):(this.toastr.error(St,"",{timeOut:0,extendedTimeOut:0}),this.startedIcon[Te]="false",this.errorIcon[Te]=wt,this.payload.oneStep=null,null!==this.nextStep&&setTimeout(()=>{this.executeFromHere(Te+1,this.nextStepType,wt)},2e3))})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(m._W),e.\u0275\u0275directiveInject(Dn),e.\u0275\u0275directiveInject(D.x),e.\u0275\u0275directiveInject($i.dL))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-edit-package"]],viewQuery:function(Te,rt){if(1&Te&&(e.\u0275\u0275viewQuery(Wi,7),e.\u0275\u0275viewQuery(yi,5),e.\u0275\u0275viewQuery(Tn,5)),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first),e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.template=wt),e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.templateComponents=wt)}},decls:39,vars:10,consts:[["dialog",""],[1,"biggerModal"],["fxLayout","row"],[1,"heading"],[1,"save"],[1,"item-block"],["template","ngForm"],["fxLayout","column","fxFlex","0 1 calc(90%)",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","0 1 calc(10%)"],["color","primary",1,"pulse-btn","save",3,"click"],["fxLayout","row","fxLayoutAlign","center center",2,"margin-top","10px"],["id","addButton",1,"icon-plus2",3,"click"],[3,"allSteps","arrayName","data"],[1,"finalize"],["fxLayout","row","fxLayoutGap","10px"],["fxLayout","column","fxFlex","0 1 calc(50%)"],["fxLayoutAlign","center center"],["fxLayoutAlign","center center",2,"margin-top","10px"],[1,"footer"],[1,"savebutton"],["id","saveButton",1,"icon-check"],["fxLayout","column","fxFlex","0 1 calc(90%)"],[1,"pulse-form-field"],["required","","name","packageName","placeholder","Packagename",1,"pulse-input",2,"width","40% !important",3,"ngModel","value","ngModelChange"],["packageName","ngModel"],[1,"alert",3,"hidden"],["required","","name","packageDescription","type","text","placeholder","Description",1,"pulse-textarea",2,"height","80px","width","96% !important",3,"ngModel","value","ngModelChange"],["packageDescription","ngModel"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"div",2)(4,"h2",3),e.\u0275\u0275text(5,"Edit Package"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(6,"div",4),e.\u0275\u0275elementStart(7,"div",5)(8,"form",null,6)(10,"div",2),e.\u0275\u0275template(11,Fr,18,6,"div",7),e.\u0275\u0275elementStart(12,"div",8)(13,"button",9),e.\u0275\u0275listener("click",function(){return rt.executeAll()}),e.\u0275\u0275text(14,"Execute All"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(15,"div",10)(16,"i",11),e.\u0275\u0275listener("click",function(){return rt.addStep(0,"allSteps")}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(17,"pulse-step-template",12),e.\u0275\u0275elementStart(18,"div",5)(19,"h2",13),e.\u0275\u0275text(20,"Finalize"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"div",14)(22,"div",15)(23,"h3",16),e.\u0275\u0275text(24,"Success"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(25,"div",17)(26,"i",11),e.\u0275\u0275listener("click",function(){return rt.addStep(0,"allStepsSucces")}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(27,"pulse-step-template",12),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(28,"div",15)(29,"h3",16),e.\u0275\u0275text(30,"Error"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(31,"div",17)(32,"i",11),e.\u0275\u0275listener("click",function(){return rt.addStep(0,"allStepsError")}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(33,"pulse-step-template",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",18)(35,"div",19)(36,"button",9),e.\u0275\u0275listener("click",function(){return rt.saveChanges()}),e.\u0275\u0275element(37,"i",20),e.\u0275\u0275text(38," Save Changes"),e.\u0275\u0275elementEnd()()()()()),2&Te&&(e.\u0275\u0275advance(11),e.\u0275\u0275property("ngForOf",rt.package),e.\u0275\u0275advance(6),e.\u0275\u0275property("allSteps",rt.allSteps)("arrayName","allSteps")("data",rt.getDataForTemplate()),e.\u0275\u0275advance(10),e.\u0275\u0275property("allSteps",rt.allStepsSucces)("arrayName","allStepsSucces")("data",rt.getDataForTemplate()),e.\u0275\u0275advance(6),e.\u0275\u0275property("allSteps",rt.allStepsError)("arrayName","allStepsError")("data",rt.getDataForTemplate()))},directives:[E.a,p.xw,v.\u0275NgNoValidate,v.NgControlStatusGroup,v.NgForm,C.sg,p.yH,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,p.Wh,Tn,p.SQ],styles:["#addButton[_ngcontent-%COMP%]{font-size:30px;cursor:pointer}.heading[_ngcontent-%COMP%]{padding-left:10px;margin-top:0}.finalize[_ngcontent-%COMP%]{margin-top:5px}.biggerModal[_ngcontent-%COMP%]{min-width:75vw;min-height:40vw;overflow-y:auto;padding-bottom:55px;margin-top:18px}label[_ngcontent-%COMP%]{text-align:left}.footer[_ngcontent-%COMP%]{position:fixed;bottom:0px;left:0;right:30px;background:#fafafa}.savebutton[_ngcontent-%COMP%]{padding:17px 17px 10px;float:right;width:20%} #pulse-model-container{background-color:#fafafa!important}.alert[_ngcontent-%COMP%]{color:red;text-align:left}"]}),Mt})();const _s=["dialog"];let br=(()=>{class Mt{constructor(Te,rt,wt){this.pulseEtlService=Te,this.toastr=rt,this.dialogService=wt,this.refreshDataAfterStart=new kn.xQ}ngOnInit(){}addPackage(Te){this.newPackage={pulseProjectId:this.projectId,name:this.name,description:this.description},this.pulseEtlService.addPackage(this.newPackage).then(rt=>{this.reload.next(!0),this.toastr.success("Package successfully added","",{timeOut:2e3}),this.openEdit(rt.id)})}openEdit(Te){this.dialog.close(),this.dialogService.open(Rr,{packageId:Te,refreshDataAfterStart:this.refreshDataAfterStart},{})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Dn),e.\u0275\u0275directiveInject(m._W),e.\u0275\u0275directiveInject(D.x))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-add-package"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(_s,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:28,vars:2,consts:[["dialog",""],[1,"modal-header"],[1,"modal-body"],[1,"row"],[1,"col-2"],[2,"position","fixed","left","15px"],[1,"col-10"],[1,"form-group"],["placeholder","Name",1,"pulse-input",2,"width","95%",3,"ngModel","keyup.enter","ngModelChange"],["type","text","placeholder","Description","rows","8",1,"pulse-textarea",2,"width","95%",3,"ngModel","keyup.enter","ngModelChange"],[1,"modal-buttons",2,"padding-top","0px !important"],["color","primary",1,"pulse-btn","save",2,"margin-bottom","5px","padding-top","0px !important",3,"click"],["color","accent",1,"pulse-btn","cancel",3,"click"]],template:function(Te,rt){if(1&Te){const wt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),e.\u0275\u0275text(4,"Add new Package"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",2),e.\u0275\u0275element(6,"br"),e.\u0275\u0275elementStart(7,"div",3)(8,"div",4)(9,"label",5),e.\u0275\u0275text(10,"Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",6)(12,"div",7)(13,"input",8),e.\u0275\u0275listener("keyup.enter",function(In){return rt.addPackage(In)})("ngModelChange",function(In){return rt.name=In}),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(14,"br"),e.\u0275\u0275elementStart(15,"div",3)(16,"div",4)(17,"label"),e.\u0275\u0275text(18,"Description"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",6)(20,"div",7)(21,"textarea",9),e.\u0275\u0275listener("keyup.enter",function(In){return rt.addPackage(In)})("ngModelChange",function(In){return rt.description=In}),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275element(22,"br"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"div",10)(24,"button",11),e.\u0275\u0275listener("click",function(){return rt.addPackage()}),e.\u0275\u0275text(25,"Save"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"button",12),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(wt),e.\u0275\u0275reference(1).close()}),e.\u0275\u0275text(27,"Cancel"),e.\u0275\u0275elementEnd()()()}2&Te&&(e.\u0275\u0275advance(13),e.\u0275\u0275property("ngModel",rt.name),e.\u0275\u0275advance(8),e.\u0275\u0275property("ngModel",rt.description))},directives:[E.a,v.DefaultValueAccessor,v.NgControlStatus,v.NgModel],styles:[""]}),Mt})();const lr=["dialog"];let Hr=(()=>{class Mt{constructor(Te,rt){this.pulseEtlService=Te,this.toastr=rt}ngOnInit(){}deletePackage(){this.pulseEtlService.deletePackage(this.id).then(Te=>{this.reload.next(!0),this.toastr.success("Package successfully deleted","",{timeOut:2e3})}),this.dialog.close()}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Dn),e.\u0275\u0275directiveInject(m._W))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-delete-package"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(lr,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},decls:15,vars:0,consts:[["dialog",""],[1,"modal-header"],[1,"modal-body"],[2,"margin-top","8%"],[2,"font-size","22px"],[1,"modal-buttons",2,"padding-top","0px !important"],["color","primary",1,"pulse-btn","delete",2,"margin-bottom","5px","padding-top","0px !important",3,"click"],["color","accent",1,"pulse-btn","cancel",3,"click"]],template:function(Te,rt){if(1&Te){const wt=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),e.\u0275\u0275text(4,"Delete Package"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",2)(6,"div",3)(7,"label",4)(8,"b"),e.\u0275\u0275text(9,"Do you want to delete the Package with all Steps?"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(10,"div",5)(11,"button",6),e.\u0275\u0275listener("click",function(){return rt.deletePackage()}),e.\u0275\u0275text(12,"Delete"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"button",7),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(wt),e.\u0275\u0275reference(1).close()}),e.\u0275\u0275text(14,"Cancel"),e.\u0275\u0275elementEnd()()()}},directives:[E.a],styles:[""]}),Mt})(),fs=(()=>{class Mt{transform(Te){if(Te){const rt=new Date(Te);return new Date(Date.UTC(rt.getUTCFullYear(),rt.getUTCMonth(),rt.getUTCDate(),rt.getUTCHours(),rt.getUTCMinutes(),rt.getUTCSeconds())).toLocaleString()}return null}}return Mt.\u0275fac=function(Te){return new(Te||Mt)},Mt.\u0275pipe=e.\u0275\u0275definePipe({name:"UTCtoDate",type:Mt,pure:!0}),Mt})();var Ts=r(11622),ur=function(Mt,mn,Te,rt){return new(Te||(Te=Promise))(function(St,In){function vi(pr){try{Jn(rt.next(pr))}catch($r){In($r)}}function rr(pr){try{Jn(rt.throw(pr))}catch($r){In($r)}}function Jn(pr){pr.done?St(pr.value):function wt(St){return St instanceof Te?St:new Te(function(In){In(St)})}(pr.value).then(vi,rr)}Jn((rt=rt.apply(Mt,mn||[])).next())})};const Ys=["dialog"];function Jr(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",25),e.\u0275\u0275element(1,"i",26),e.\u0275\u0275elementEnd())}function zr(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",27),e.\u0275\u0275element(1,"i",28),e.\u0275\u0275elementEnd())}function ys(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",29),e.\u0275\u0275element(1,"div",30),e.\u0275\u0275elementEnd())}function Ls(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275element(1,"i",32),e.\u0275\u0275elementEnd())}function os(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div")(1,"div",6),e.\u0275\u0275element(2,"div",7),e.\u0275\u0275elementStart(3,"div",8)(4,"label")(5,"b"),e.\u0275\u0275text(6,"PackageId: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(8,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",6),e.\u0275\u0275element(10,"div",7),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"PackageExecutionId: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(16,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",6),e.\u0275\u0275element(18,"div",7),e.\u0275\u0275elementStart(19,"div",33)(20,"label")(21,"b"),e.\u0275\u0275text(22,"Description:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(23,"label"),e.\u0275\u0275text(24),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(25,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",6),e.\u0275\u0275element(27,"div",7),e.\u0275\u0275elementStart(28,"div",8)(29,"label")(30,"b"),e.\u0275\u0275text(31,"Startreason: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(33,"div",7),e.\u0275\u0275elementEnd()()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate(Te.PackageId),e.\u0275\u0275advance(8),e.\u0275\u0275textInterpolate(Te.PackageExecutionId),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.Description," "),e.\u0275\u0275advance(8),e.\u0275\u0275textInterpolate(Te.StartReason)}}function jr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",17)(2,"div",6)(3,"div",7)(4,"label")(5,"b"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(7,Jr,2,0,"div",18),e.\u0275\u0275template(8,zr,2,0,"div",19),e.\u0275\u0275template(9,ys,2,0,"div",20),e.\u0275\u0275template(10,Ls,2,0,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"Starttime: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"UTCtoDate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"label")(18,"b"),e.\u0275\u0275text(19,"Duration: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(20),e.\u0275\u0275pipe(21,"NoComma"),e.\u0275\u0275pipe(22,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"label")(24,"b"),e.\u0275\u0275text(25,"Expected Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"NoComma"),e.\u0275\u0275pipe(28,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"label")(30,"b"),e.\u0275\u0275text(31,"Endtime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"UTCtoDate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",22)(35,"i",23),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return St.display=!St.display}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(36,os,34,4,"div",24),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit;e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(Te.Name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","finished"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","error"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","started"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null===Te.Status),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(16,10,Te.Starttime),""),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(21,12,e.\u0275\u0275pipeBind2(22,14,Te.Duration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,17,e.\u0275\u0275pipeBind2(28,19,Te.ExpectedDuration/1e3,"1.0-0"))," s"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(33,22,Te.Endtime),""),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",Te.display)}}function Zr(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",25),e.\u0275\u0275element(1,"i",26),e.\u0275\u0275elementEnd())}function ts(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",27),e.\u0275\u0275element(1,"i",28),e.\u0275\u0275elementEnd())}function qi(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",29),e.\u0275\u0275element(1,"div",30),e.\u0275\u0275elementEnd())}function Hs(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275element(1,"i",32),e.\u0275\u0275elementEnd())}function as(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div")(1,"div",6),e.\u0275\u0275element(2,"div",7),e.\u0275\u0275elementStart(3,"div",8)(4,"label")(5,"b"),e.\u0275\u0275text(6,"StepId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(8,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",6),e.\u0275\u0275element(10,"div",7),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"StepExecutionId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(16,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",6),e.\u0275\u0275element(18,"div",7),e.\u0275\u0275elementStart(19,"div",8)(20,"label")(21,"b"),e.\u0275\u0275text(22,"Description:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(23,"label"),e.\u0275\u0275text(24),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(25,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",6),e.\u0275\u0275element(27,"div",7),e.\u0275\u0275elementStart(28,"div",8)(29,"label")(30,"b"),e.\u0275\u0275text(31,"Startreason:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"label"),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(34,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"div",6),e.\u0275\u0275element(36,"div",7),e.\u0275\u0275elementStart(37,"div",8)(38,"label")(39,"b"),e.\u0275\u0275text(40,"FailedReson:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"label"),e.\u0275\u0275text(42),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(43,"div",7),e.\u0275\u0275elementEnd()()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1(" ",Te.StepId,""),e.\u0275\u0275advance(8),e.\u0275\u0275textInterpolate1(" ",Te.StepExecutionId,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.Description," "),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.StartReason,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.FailedReason,"")}}function go(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",6),e.\u0275\u0275element(1,"div",7),e.\u0275\u0275elementStart(2,"div",8)(3,"div",11),e.\u0275\u0275element(4,"i",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(5,"div",7),e.\u0275\u0275elementEnd())}function ln(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",17)(2,"div",6)(3,"div",7)(4,"label")(5,"b"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(7,Zr,2,0,"div",18),e.\u0275\u0275template(8,ts,2,0,"div",19),e.\u0275\u0275template(9,qi,2,0,"div",20),e.\u0275\u0275template(10,Hs,2,0,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"Starttime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"UTCtoDate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"label")(18,"b"),e.\u0275\u0275text(19,"Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(20),e.\u0275\u0275pipe(21,"NoComma"),e.\u0275\u0275pipe(22,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"label")(24,"b"),e.\u0275\u0275text(25,"Expected Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"NoComma"),e.\u0275\u0275pipe(28,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"label")(30,"b"),e.\u0275\u0275text(31,"Endtime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"UTCtoDate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",22)(35,"i",23),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return St.display=!St.display}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(36,as,44,5,"div",24),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(37,go,6,0,"div",34),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=mn.$implicit,rt=mn.last;e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(Te.Name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","finished"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","error"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","started"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null===Te.Status),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(16,11,Te.Starttime),""),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(21,13,e.\u0275\u0275pipeBind2(22,15,Te.Duration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,18,e.\u0275\u0275pipeBind2(28,20,Te.ExpectedDuration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(33,23,Te.Endtime),""),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",Te.display),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!rt)}}function Un(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",25),e.\u0275\u0275element(1,"i",26),e.\u0275\u0275elementEnd())}function We(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",27),e.\u0275\u0275element(1,"i",28),e.\u0275\u0275elementEnd())}function Dt(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",29),e.\u0275\u0275element(1,"div",30),e.\u0275\u0275elementEnd())}function Kt(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275element(1,"i",32),e.\u0275\u0275elementEnd())}function dn(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div")(1,"div",6),e.\u0275\u0275element(2,"div",7),e.\u0275\u0275elementStart(3,"div",8)(4,"label")(5,"b"),e.\u0275\u0275text(6,"StepId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(8,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",6),e.\u0275\u0275element(10,"div",7),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"StepExecutionId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(16,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",6),e.\u0275\u0275element(18,"div",7),e.\u0275\u0275elementStart(19,"div",8)(20,"label")(21,"b"),e.\u0275\u0275text(22,"Description:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(23,"label"),e.\u0275\u0275text(24),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(25,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",6),e.\u0275\u0275element(27,"div",7),e.\u0275\u0275elementStart(28,"div",8)(29,"label")(30,"b"),e.\u0275\u0275text(31,"Startreason:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"label"),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(34,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"div",6),e.\u0275\u0275element(36,"div",7),e.\u0275\u0275elementStart(37,"div",8)(38,"label")(39,"b"),e.\u0275\u0275text(40,"FailedReson:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"label"),e.\u0275\u0275text(42),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(43,"div",7),e.\u0275\u0275elementEnd()()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1(" ",Te.StepId,""),e.\u0275\u0275advance(8),e.\u0275\u0275textInterpolate1(" ",Te.StepExecutionId,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.Description," "),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.StartReason,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.FailedReason,"")}}function pi(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",6),e.\u0275\u0275element(1,"div",7),e.\u0275\u0275elementStart(2,"div",8)(3,"div",11),e.\u0275\u0275element(4,"i",14),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(5,"div",7),e.\u0275\u0275elementEnd())}function nr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",17)(2,"div",6)(3,"div",7)(4,"label")(5,"b"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(7,Un,2,0,"div",18),e.\u0275\u0275template(8,We,2,0,"div",19),e.\u0275\u0275template(9,Dt,2,0,"div",20),e.\u0275\u0275template(10,Kt,2,0,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"Starttime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"UTCtoDate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"label")(18,"b"),e.\u0275\u0275text(19,"Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(20),e.\u0275\u0275pipe(21,"NoComma"),e.\u0275\u0275pipe(22,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"label")(24,"b"),e.\u0275\u0275text(25,"Expected Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"NoComma"),e.\u0275\u0275pipe(28,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"label")(30,"b"),e.\u0275\u0275text(31,"Endtime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"UTCtoDate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",22)(35,"i",23),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return St.display=!St.display}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(36,dn,44,5,"div",24),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(37,pi,6,0,"div",34),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=mn.$implicit,rt=mn.last;e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(Te.Name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","finished"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","error"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","started"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null===Te.Status),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(16,11,Te.Starttime),""),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(21,13,e.\u0275\u0275pipeBind2(22,15,Te.Duration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,18,e.\u0275\u0275pipeBind2(28,20,Te.ExpectedDuration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(33,23,Te.Endtime),""),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",Te.display),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!rt)}}function or(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",25),e.\u0275\u0275element(1,"i",26),e.\u0275\u0275elementEnd())}function bi(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",27),e.\u0275\u0275element(1,"i",28),e.\u0275\u0275elementEnd())}function jn(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",29),e.\u0275\u0275element(1,"div",30),e.\u0275\u0275elementEnd())}function ri(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275element(1,"i",32),e.\u0275\u0275elementEnd())}function Ci(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div")(1,"div",6),e.\u0275\u0275element(2,"div",7),e.\u0275\u0275elementStart(3,"div",8)(4,"label")(5,"b"),e.\u0275\u0275text(6,"StepId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(8,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"div",6),e.\u0275\u0275element(10,"div",7),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"StepExecutionId:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(16,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"div",6),e.\u0275\u0275element(18,"div",7),e.\u0275\u0275elementStart(19,"div",8)(20,"label")(21,"b"),e.\u0275\u0275text(22,"Description:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(23,"label"),e.\u0275\u0275text(24),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(25,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",6),e.\u0275\u0275element(27,"div",7),e.\u0275\u0275elementStart(28,"div",8)(29,"label")(30,"b"),e.\u0275\u0275text(31,"Startreason:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"label"),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(34,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"div",6),e.\u0275\u0275element(36,"div",7),e.\u0275\u0275elementStart(37,"div",8)(38,"label")(39,"b"),e.\u0275\u0275text(40,"FailedReson:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(41,"label"),e.\u0275\u0275text(42),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(43,"div",7),e.\u0275\u0275elementEnd()()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate1(" ",Te.StepId,""),e.\u0275\u0275advance(8),e.\u0275\u0275textInterpolate1(" ",Te.StepExecutionId,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.Description," "),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.StartReason,""),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate1(" ",Te.FailedReason,"")}}function dr(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",6),e.\u0275\u0275element(1,"div",7),e.\u0275\u0275elementStart(2,"div",8)(3,"div",11),e.\u0275\u0275element(4,"i",16),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(5,"div",7),e.\u0275\u0275elementEnd())}function ls(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"div",17)(2,"div",6)(3,"div",7)(4,"label")(5,"b"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(7,or,2,0,"div",18),e.\u0275\u0275template(8,bi,2,0,"div",19),e.\u0275\u0275template(9,jn,2,0,"div",20),e.\u0275\u0275template(10,ri,2,0,"div",21),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",8)(12,"label")(13,"b"),e.\u0275\u0275text(14,"Starttime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"UTCtoDate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(17,"label")(18,"b"),e.\u0275\u0275text(19,"Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(20),e.\u0275\u0275pipe(21,"NoComma"),e.\u0275\u0275pipe(22,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"label")(24,"b"),e.\u0275\u0275text(25,"Expected Duration:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"NoComma"),e.\u0275\u0275pipe(28,"number"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(29,"label")(30,"b"),e.\u0275\u0275text(31,"Endtime:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"UTCtoDate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",22)(35,"i",23),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return St.display=!St.display}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(36,Ci,44,5,"div",24),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(37,dr,6,0,"div",34),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=mn.$implicit,rt=mn.last;e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(Te.Name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","finished"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","error"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","started"===Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null===Te.Status),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(16,11,Te.Starttime),""),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(21,13,e.\u0275\u0275pipeBind2(22,15,Te.Duration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,18,e.\u0275\u0275pipeBind2(28,20,Te.ExpectedDuration/1e3,"1.0-0"))," s "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(33,23,Te.Endtime),""),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",Te.display),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!rt)}}const cs=function(Mt){return{width:Mt}};let Xr=(()=>{class Mt{constructor(Te,rt){this.pulseEtlService=Te,this.loadingBarService=rt,this.stepsDetails=[],this.openPackage=!1,this.openStep=!1,this.loaded=!1,this.refreshDataAfterShow=new kn.xQ,this.value=0,this.width=0}ngOnDestroy(){this.restartInterval.next(!0),this.refreshDataAfterShow.next(!0),clearInterval(this.progressbar),clearInterval(this.refreshInterval)}ngOnInit(){this.allSteps=[],this.allStepsMain=[],this.allStepsError=[],this.allStepsSuccess=[],this.mainReverse=[],this.successReverse=[],this.errorReverse=[],this.calculatedStepExpectedDuration=0,this.calculatedPackageExpectedDuration=0,this.loaded=!1;const Te=new Array;Te.push(this.preparePackages()),Te.push(this.prepareSteps()),Promise.all(Te).then(rt=>{this.packages=rt[0],this.startProgressBar(this.packages[0].Duration,this.packages[0].ExpectedDuration,this.packages[0].Status),this.allSteps=rt[1],this.sortArray(this.allSteps),this.loaded=!0}),this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.preparePackages().then(rt=>{this.packages=rt,"finished"===this.packages[0].Status&&(this.width=100)}),this.prepareSteps().then(rt=>{this.sortArray(rt)})},1e4)}sortArray(Te){return ur(this,void 0,void 0,function*(){this.allSteps=[],this.allStepsMain=[],this.allStepsError=[],this.allStepsSuccess=[],this.mainReverse=[],this.successReverse=[],this.errorReverse=[],this.allSteps=Te,this.allSteps.map(rt=>{"succes"===rt.Finalize?this.allStepsSuccess.push(rt):"error"===rt.Finalize?this.allStepsError.push(rt):this.allStepsMain.push(rt)}),this.allStepsMain.length>=1&&this.mainReverse.push(this.allStepsMain.find(rt=>null===rt.NextStepId)),this.allStepsMain.map(rt=>{null!==rt.NextStepId&&(this.nextId=this.mainReverse[this.mainReverse.length-1].StepId,this.mainReverse.push(this.allStepsMain.find(wt=>wt.NextStepId===this.nextId)))}),this.allStepsMain=this.mainReverse.reverse(),this.allStepsSuccess.length>=1&&this.successReverse.push(this.allStepsSuccess.find(rt=>null===rt.NextStepId)),this.allStepsSuccess.map(rt=>{null!==rt.NextStepId&&(this.nextId=this.successReverse[this.successReverse.length-1].StepId,this.successReverse.push(this.allStepsSuccess.find(wt=>wt.NextStepId===this.nextId)))}),this.allStepsSuccess=this.successReverse.reverse(),this.allStepsError.length>=1&&this.errorReverse.push(this.allStepsError.find(rt=>null===rt.NextStepId)),this.allStepsError.map(rt=>{null!==rt.NextStepId&&(this.nextId=this.errorReverse[this.errorReverse.length-1].StepId,this.errorReverse.push(this.allStepsError.find(wt=>wt.NextStepId===this.nextId)))}),this.allStepsError=this.errorReverse.reverse(),this.allSteps=this.allStepsMain.concat(this.allStepsSuccess.concat(this.allStepsError))})}preparePackages(){return ur(this,void 0,void 0,function*(){const Te=yield this.pulseEtlService.getOneEtlPackagesWithExecution(this.packageId,this.execId),rt=new Date;return yield Promise.all(Te.map(wt=>ur(this,void 0,void 0,function*(){return{Packagename:wt.name,PackageId:wt.id,PackageExecutionId:wt.etlPackageExecution.id,Status:wt.etlPackageExecution.status,Duration:wt.etlPackageExecution.endTime?Date.parse(wt.etlPackageExecution.endTime)-Date.parse(wt.etlPackageExecution.startTime):rt.setHours(rt.getHours()-2)-Date.parse(wt.etlPackageExecution.startTime),ExpectedDuration:yield this.calculateDurationPackage(),Starttime:wt.etlPackageExecution.startTime,Endtime:wt.etlPackageExecution.endTime,Description:wt.description,Name:wt.name,StartReason:wt.etlPackageExecution.startReason}})))})}prepareSteps(){return ur(this,void 0,void 0,function*(){const Te=yield this.pulseEtlService.getEtlStepWithExecution(this.packageId,this.execId),rt=new Date;return yield Promise.all(Te.map(wt=>ur(this,void 0,void 0,function*(){return{Name:wt.name,StepId:wt.id,StepType:wt.stepType,NextStepId:wt.nextStepId,Description:wt.description,Duration:wt.endTime?Date.parse(wt.endTime)-Date.parse(wt.startTime):rt.setHours(rt.getHours()-2)-Date.parse(wt.startTime),ExpectedDuration:yield this.calculateDurationStep(wt.id),StepExecutionId:wt.execId,Status:wt.status,Starttime:wt.startTime,Endtime:wt.endTime,StartReason:wt.startReason,FailedReason:wt.failedReason,First:wt.first,Finalize:wt.finalize}})))})}calculateDurationPackage(){return this.pulseEtlService.getLastPackageExecution(this.packageId).then(Te=>{let rt=0;for(let wt=0;wt{let wt=0;for(let St=0;Strt?"finished"===wt?(this.width=100,this.value=100,clearInterval(this.refreshInterval)):"started"===wt&&(this.width=99,this.value=99):(this.width=Math.round(Te/rt*100),this.value=this.width,this.progressbar=setInterval(()=>{100!==this.width?(this.width=this.width+1,this.value=this.value+1):(this.width=100,this.value=100,clearInterval(this.progressbar),clearInterval(this.refreshInterval),this.preparePackages().then(St=>{this.packages=St}),this.prepareSteps().then(St=>{this.allSteps=St}))},1e3))}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Dn),e.\u0275\u0275directiveInject($i.dL))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-show-package"]],viewQuery:function(Te,rt){if(1&Te&&e.\u0275\u0275viewQuery(Ys,7),2&Te){let wt;e.\u0275\u0275queryRefresh(wt=e.\u0275\u0275loadQuery())&&(rt.dialog=wt.first)}},inputs:{value:"value",width:"width"},decls:41,vars:8,consts:[["dialog",""],[1,"biggerModal"],["fxLayout","column",1,"item-block","progress"],[1,"percentValue"],[1,"first"],[1,"second",3,"ngStyle"],["fxLayout","row"],["fxLayout","column","fxFlex","0 1 calc(15%)",1,"pulse-form-field"],["fxLayout","column","fxFlex","0 1 calc(70%)",1,"pulse-form-field"],[1,"headingText"],[4,"ngFor","ngForOf"],["fxLayoutAlign","center center"],["id","arrow",1,"icon-arrow-down-bold"],["fxLayout","column","fxFlex","0 1 calc(50%)"],["id","arrowSuccess",1,"icon-arrow-down-bold"],["id","heading","fxLayoutAlign","center center"],["id","arrowError",1,"icon-arrow-down-bold"],[1,"item-block"],["class","finishedIcon",4,"ngIf"],["class","errorIcon",4,"ngIf"],["class","startedIcon",4,"ngIf"],["class","blankIcon",4,"ngIf"],["fxLayout","column","fxFlex","0 1 calc(15%)"],["id","closeIcon",1,"icon-more",3,"click"],[4,"ngIf"],[1,"finishedIcon"],[1,"icon-checkbox-marked"],[1,"errorIcon"],[1,"icon-close-box"],[1,"startedIcon"],[1,"loader"],[1,"blankIcon"],[1,"icon-checkbox-blank-outline"],["fxLayout","column","fxFlex","0 1 calc(150%)",1,"pulse-form-field"],["fxLayout","row",4,"ngIf"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"div",2)(4,"div",3),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",4),e.\u0275\u0275element(7,"div",5),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275element(9,"div",7),e.\u0275\u0275elementStart(10,"div",8)(11,"h2",9),e.\u0275\u0275text(12,"Package"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(13,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(14,jr,37,24,"div",10),e.\u0275\u0275elementStart(15,"div",6),e.\u0275\u0275element(16,"div",7),e.\u0275\u0275elementStart(17,"div",8)(18,"div",11),e.\u0275\u0275element(19,"i",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(20,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(21,"div",6),e.\u0275\u0275element(22,"div",7),e.\u0275\u0275elementStart(23,"div",8)(24,"h2",9),e.\u0275\u0275text(25,"Steps"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(26,"div",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(27,ln,38,25,"div",10),e.\u0275\u0275elementStart(28,"div",6)(29,"div",13)(30,"div",11),e.\u0275\u0275element(31,"i",14),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(32,"h3",15),e.\u0275\u0275text(33,"Success"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(34,nr,38,25,"div",10),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(35,"div",13)(36,"div",11),e.\u0275\u0275element(37,"i",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(38,"h3",15),e.\u0275\u0275text(39,"Error"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(40,ls,38,25,"div",10),e.\u0275\u0275elementEnd()()()()),2&Te&&(e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("",rt.value," %"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction1(6,cs,rt.width+"%")),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngForOf",rt.packages),e.\u0275\u0275advance(13),e.\u0275\u0275property("ngForOf",rt.allStepsMain),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngForOf",rt.allStepsSuccess),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngForOf",rt.allStepsError))},directives:[E.a,p.xw,C.PC,te.Zl,p.yH,C.sg,C.O5,p.Wh],pipes:[fs,Ts.o,C.JJ],styles:[".first[_ngcontent-%COMP%]{height:25px;width:100%;background:lightgrey}.second[_ngcontent-%COMP%]{height:25px;background:#0f8287}.progress[_ngcontent-%COMP%]{height:65px}.percentValue[_ngcontent-%COMP%]{color:#00646e;text-align:center;font-size:18px}.errorIcon[_ngcontent-%COMP%]{padding:6px 0;font-size:30px;color:red}.finishedIcon[_ngcontent-%COMP%]{padding:6px 0;font-size:30px;color:green}.blankIcon[_ngcontent-%COMP%]{padding:6px 0;font-size:30px;color:#000}.startedIcon[_ngcontent-%COMP%]{padding:6px 0 6px 85px;font-size:30px;color:#89bff8}.loader[_ngcontent-%COMP%]{border:10px solid #f3f3f3;border-radius:50%;border-top:10px solid #0f8287;width:40px;height:40px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.biggerModal[_ngcontent-%COMP%]{min-width:75vw}#arrow[_ngcontent-%COMP%]{font-size:30px}#arrowSuccess[_ngcontent-%COMP%]{font-size:30px;color:green}#arrowError[_ngcontent-%COMP%]{font-size:30px;color:red}#heading[_ngcontent-%COMP%]{margin-top:10px}#closeButton[_ngcontent-%COMP%]{min-width:50px!important}#closeIcon[_ngcontent-%COMP%]{text-align:right;margin-right:10px;padding-right:10px;font-size:30px!important;cursor:pointer}#closeIcon[_ngcontent-%COMP%]:hover{color:#239196}.headingText[_ngcontent-%COMP%]{margin-top:5px!important} #pulse-model-container{background-color:#fafafa!important}"]}),Mt})();var ir=r(19611),di=r(27859);function Ms(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",9)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&Mt){const Te=mn.$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",Te," ")}}function xs(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",9)(1,"div"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",rt[Te]," ")}}function io(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"i",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).openShow(wt)}),e.\u0275\u0275elementEnd()}}function Cr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"i",16),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).openEdit(wt)}),e.\u0275\u0275elementEnd()}}function Ds(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"i",17),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).deletePackage(wt)}),e.\u0275\u0275elementEnd()}}function lo(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",5),e.\u0275\u0275template(1,xs,3,1,"div",6),e.\u0275\u0275elementStart(2,"div",7),e.\u0275\u0275template(3,io,1,0,"i",12),e.\u0275\u0275template(4,Cr,1,0,"i",13),e.\u0275\u0275template(5,Ds,1,0,"i",14),e.\u0275\u0275elementEnd()()),2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",rt.getColumns),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","-"!==Te.Status),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",rt.userService.hasRole("admin")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",rt.userService.hasRole("admin"))}}function ko(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",10),e.\u0275\u0275template(1,lo,6,4,"div",11),e.\u0275\u0275elementEnd()),2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",Te.allPackagesFiltered)}}let Br=(()=>{class Mt{constructor(Te,rt,wt,St,In,vi,rr){this.headerService=Te,this.pulseEtlService=rt,this.projectGlobalService=wt,this.dialogService=St,this.router=In,this.loadingBarService=vi,this.userService=rr,this.isOpen=!1,this.showBothActions=!1,this.showEyeAction=!1,this.reload=new kn.xQ,this.back=new kn.xQ,this.restartInterval=new kn.xQ,this.refreshDataAfterStart=new kn.xQ,this.refreshDataAfterShow=new kn.xQ,this.subs=[],this.allPackages=[],this.subs.push(this.reload.subscribe(Jn=>{Jn&&this.loadPackages()}),this.refreshDataAfterShow.subscribe(Jn=>{Jn&&this.loadPackages()}),this.refreshDataAfterStart.subscribe(Jn=>{Jn&&(this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadPackages()},1e4))}),this.restartInterval.subscribe(Jn=>{Jn&&(this.refreshInterval=setInterval(()=>{this.loadPackages()},1e4))})),this.projectId=this.projectGlobalService.getProjectId(),this.addPackageAction={label:"ADD NEW PACKAGE",icon:"icon-plus2",callback:()=>{this.addPackage()}}}ngOnDestroy(){this.headerService.showHeader=!1,this.headerService.removeAction(this.addPackageAction)}ngOnInit(){this.loadingBarService.start(),this.headerService.addAction(this.addPackageAction),this.headerService.showHeader=!0,this.getColumns=["Packagename","PackageId","Status"],this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadPackages()},1e4)}loadPackages(){this.pulseEtlService.getEtlPackagesWithExecution().then(Te=>{this.allPackages=Te.map(rt=>({Packagename:rt.name,PackageId:rt.id,Status:""===rt.status?"-":rt.status,ExecutionId:rt.execId})),this.allPackagesFiltered=this.allPackages,this.loadingBarService.complete()})}addPackage(){this.dialogService.open(br,{projectId:this.projectId,reload:this.reload,refreshDataAfterStart:this.refreshDataAfterStart},{})}onSearchChange(Te){""===Te?(this.allPackagesFiltered=this.allPackages,this.refreshInterval=setInterval(()=>{this.loadPackages()},1e4)):(this.allPackagesFiltered=this.allPackages.filter(rt=>-1{class Mt{constructor(Te,rt,wt,St,In,vi,rr){this.headerService=Te,this.pulseEtlService=rt,this.projectGlobalService=wt,this.dialogService=St,this.router=In,this.loadingBarService=vi,this.userService=rr,this.isOpen=!1,this.showBothActions=!1,this.showEyeAction=!1,this.reload=new kn.xQ,this.back=new kn.xQ,this.subs=[],this.restartInterval=new kn.xQ,this.refreshDataAfterStart=new kn.xQ,this.allPackages=[],this.subs.push(this.reload.subscribe(Jn=>{Jn&&this.loadPackages()}),this.refreshDataAfterStart.subscribe(Jn=>{Jn&&(this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4))}),this.restartInterval.subscribe(Jn=>{Jn&&(this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4))})),this.projectId=this.projectGlobalService.getProjectId()}ngOnDestroy(){this.headerService.showHeader=!1,clearInterval(this.refreshInterval)}ngOnInit(){this.loadingBarService.start(),this.headerService.showHeader=!0,this.getColumns=["Packagename","PackageId","Status"],this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4)}loadPackages(){this.pulseEtlService.getEtlLogPackagesWithExecution().then(Te=>{this.allPackages=Te.map(rt=>({Packagename:rt.name,PackageId:rt.id,Status:""===rt.status?"-":rt.status,ExecutionId:rt.execId})),this.allPackagesFiltered=this.allPackages,this.loadingBarService.complete()})}onSearchChange(Te){""===Te?(this.allPackagesFiltered=this.allPackages,this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4)):(this.allPackagesFiltered=this.allPackages.filter(rt=>-1{class Mt{constructor(Te,rt,wt,St,In,vi,rr){this.headerService=Te,this.pulseEtlService=rt,this.projectGlobalService=wt,this.dialogService=St,this.router=In,this.loadingBarService=vi,this.userService=rr,this.isOpen=!1,this.showBothActions=!1,this.showEyeAction=!1,this.reload=new kn.xQ,this.back=new kn.xQ,this.subs=[],this.restartInterval=new kn.xQ,this.refreshDataAfterStart=new kn.xQ,this.allPackages=[],this.subs.push(this.reload.subscribe(Jn=>{Jn&&this.loadPackages()}),this.refreshDataAfterStart.subscribe(Jn=>{Jn&&(this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4))}),this.restartInterval.subscribe(Jn=>{Jn&&(this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4))})),this.projectId=this.projectGlobalService.getProjectId()}ngOnDestroy(){this.headerService.showHeader=!1,clearInterval(this.refreshInterval)}ngOnInit(){clearInterval(this.refreshInterval),this.loadingBarService.start(),this.headerService.showHeader=!0,this.getColumns=["Packagename","PackageId","Status"],this.loadPackages(),this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4)}loadPackages(){this.pulseEtlService.getEtlQueuedPackagesWithExecution().then(Te=>{this.allPackages=Te.map(rt=>({Packagename:rt.name,PackageId:rt.id,Status:rt.status,ExecutionId:rt.execId})),this.allPackagesFiltered=this.allPackages,this.loadingBarService.complete()})}onSearchChange(Te){""===Te?(this.allPackagesFiltered=this.allPackages,this.refreshInterval=setInterval(()=>{this.loadingBarService.start(),this.loadPackages()},1e4)):(this.allPackagesFiltered=this.allPackages.filter(rt=>-1{class Mt{constructor(){}}return Mt.\u0275fac=function(Te){return new(Te||Mt)},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-pulse-etl"]],decls:1,vars:0,template:function(Te,rt){1&Te&&e.\u0275\u0275element(0,"router-outlet")},directives:[d.lC],styles:[""]}),Mt})();var ht=r(3990),Zt=r(96995),En=r(90605),cn=r(17650),$t=r(8971),Ti=r(87436);function Pr(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"pulse-loader")}function Xi(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",44),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().checkBeforeSaveItem()}),e.\u0275\u0275text(1," save"),e.\u0275\u0275elementEnd()}}function Ni(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"li",45)(1,"a",46),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit;return e.\u0275\u0275nextContext().onBucketSelectionChanged(St)}),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275classProp("selected",(null==rt.service.selectedBucket?null:rt.service.selectedBucket.name)==Te.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,Te.label))}}function hr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"input",47),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().data.Config.config.TargetBucketName=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(2," / "),e.\u0275\u0275elementStart(3,"input",48),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().data.Config.config.TargetFileS3Location=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275classProp("error",!Te.data.Config.config.TargetBucketName&&Te.trySave),e.\u0275\u0275property("ngModel",Te.data.Config.config.TargetBucketName),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("error",!Te.data.Config.config.TargetFileS3Location&&Te.trySave),e.\u0275\u0275property("ngModel",Te.data.Config.config.TargetFileS3Location)}}function Ss(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"li",45)(1,"a",46),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit,In=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext().onTypeSelectionChanged(In,St)}),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275classProp("selected",rt.ColumnType==Te.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,Te.label))}}function Vr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"li",45)(1,"a",46),e.\u0275\u0275listener("click",function(){const St=e.\u0275\u0275restoreView(Te).$implicit,In=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext().onPresetValueSelectionChanged(In,St)}),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275classProp("selected",rt.PresetValueType==Te.name),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,Te.label))}}function rs(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",49)(1,"div",50)(2,"label",22)(3,"input",51),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.selected=wt}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"span",25),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"div",52)(6,"input",53),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.Name=wt}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",54)(8,"div",55)(9,"div",12)(10,"a",13,56)(12,"span",15),e.\u0275\u0275text(13),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",16,57)(16,"ul",18),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275reference(11).close()}),e.\u0275\u0275template(17,Ss,4,5,"li",19),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(18,"div",58)(19,"input",59),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.ColumnLength=wt}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(20,"div",60)(21,"div",54)(22,"div",55)(23,"div",12)(24,"a",13,61)(26,"span",15),e.\u0275\u0275text(27),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"div",16,62)(30,"ul",18),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275reference(25).close()}),e.\u0275\u0275template(31,Vr,4,5,"li",19),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(32,"input",53),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.DefaultValue=wt}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(33,"div",63)(34,"input",53),e.\u0275\u0275listener("ngModelChange",function(wt){return e.\u0275\u0275restoreView(Te).$implicit.ColumnDescription=wt}),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(35,"div",64)(36,"div",3)(37,"label",22)(38,"input",23),e.\u0275\u0275listener("change",function(){const St=e.\u0275\u0275restoreView(Te).index;return e.\u0275\u0275nextContext().checkBoxToggle(St,"Mandatory")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(39,"span",24),e.\u0275\u0275text(40,"Mandatory"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(41,"span",25),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(42,"div",65)(43,"label",22)(44,"input",23),e.\u0275\u0275listener("change",function(){const St=e.\u0275\u0275restoreView(Te).index;return e.\u0275\u0275nextContext().checkBoxToggle(St,"Unique")}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(45,"span",24),e.\u0275\u0275text(46,"Unique"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(47,"span",25),e.\u0275\u0275elementEnd()()()()}if(2&Mt){const Te=mn.$implicit,rt=e.\u0275\u0275reference(15),wt=e.\u0275\u0275reference(29),St=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275property("ngModel",Te.selected),e.\u0275\u0275advance(3),e.\u0275\u0275classProp("error",!Te.Name&&St.trySave),e.\u0275\u0275property("ngModel",Te.Name),e.\u0275\u0275advance(2),e.\u0275\u0275styleProp("margin",0),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("error",!Te.ColumnType&&St.trySave),e.\u0275\u0275property("pulseDropdownMenu",rt),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(Te.ColumnType?Te.ColumnType:"select..."),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",St.types),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngModel",Te.ColumnLength),e.\u0275\u0275advance(3),e.\u0275\u0275styleProp("margin",0),e.\u0275\u0275advance(2),e.\u0275\u0275property("pulseDropdownMenu",wt),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(Te.PresetValueType?Te.PresetValueType:"Overwrite"),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",St.preset),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngModel",Te.DefaultValue),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngModel",Te.ColumnDescription),e.\u0275\u0275advance(4),e.\u0275\u0275property("checked",1==Te.Mandatory),e.\u0275\u0275advance(6),e.\u0275\u0275property("checked",1==Te.Unique)}}function bt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",66),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().deleteItem()}),e.\u0275\u0275text(1," Delete"),e.\u0275\u0275elementEnd()}}function dt(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",66),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(Te),e.\u0275\u0275nextContext().updateFile()}),e.\u0275\u0275element(1,"i",67),e.\u0275\u0275elementStart(2,"span"),e.\u0275\u0275text(3,"Continue"),e.\u0275\u0275elementEnd()()}}let st=(()=>{class Mt{constructor(Te,rt,wt){this.service=Te,this.headerService=rt,this.modalService=wt,this.trySave=!1,this.loading=!1,this.test1=!0,this.types=[{name:"String",label:"String"},{name:"Number",label:"Number"},{name:"Date",label:"Date"},{name:"Email",label:"Email"}],this.locations=[{name:"none",label:"No target location"},{name:"s3",label:"S3 Bucket"}],this.preset=[{name:"Overwrite",label:"Overwrite"},{name:"Default",label:"Default"}],this.addActionItem={label:"Back to List",callback:()=>{this.backToList()},icon:"icon-replay"}}ngOnInit(){this.headerService.showHeader=!0,this.headerService.addAction(this.addActionItem),this.service.selectedBucket={name:"s3",label:"S3 Bucket"},this.service.selectedIndex>-1?(this.data=this.service.validatorItem[this.service.selectedIndex],this.service.selectedBucket=this.data&&this.data.Config&&this.data.Config.config&&this.data.Config.config.TargetBucketName&&this.data.Config.config.TargetFileS3Location?{name:"s3",label:"S3 Bucket"}:{name:"none",label:"No target location"}):this.service.cloneIndex>-1?(this.data=JSON.parse(JSON.stringify(this.service.validatorItem[this.service.cloneIndex])),this.data&&this.data.Config&&this.data.Config.config&&(this.data.Config.config.Name=this.data.Config.config.Name+"_copy"),this.service.selectedBucket=this.data&&this.data.Config&&this.data.Config.config&&this.data.Config.config.TargetBucketName&&this.data.Config.config.TargetFileS3Location?{name:"s3",label:"S3 Bucket"}:{name:"none",label:"No target location"}):this.data={Config:{config:{Name:"",OriginalFileS3Location:"",TargetBucketName:"",TargetFileS3Location:""},ruleSet:[{Name:"",ColumnType:"",Unique:0,Mandatory:0,PresetValueType:"Overwrite"}]}}}ngOnDestroy(){this.headerService.removeAction(this.addActionItem)}backToList(){this.service.isList=!0}onTypeSelectionChanged(Te,rt){this.service.validatorItem&&(this.data.Config.ruleSet[Te].ColumnType=rt.name)}onPresetValueSelectionChanged(Te,rt){this.data.Config.ruleSet[Te].PresetValueType=rt.name}onBucketSelectionChanged(Te){this.service.selectedBucket=Te}AddItem(){this.data.Config.ruleSet.push({Name:"",ColumnType:"",Unique:0,Mandatory:0,PresetValueType:"Overwrite"})}deleteItem(){this.data.Config.ruleSet.length>1&&(this.data.Config.ruleSet=this.data.Config.ruleSet.filter(function(Te){return!Te.selected})),0===this.data.Config.ruleSet.length&&this.AddItem()}saveItem(){if(this.service.selectedIndex>-1)if(this.data&&this.data.Config&&this.data.Config.log&&this.data.Config.log.FileName){const Te={text:"Attention: There is an unprocessed file on S3 for this tempalte. If you edit the template, the file will be deleted. Do you really want to continue?",update:!0};this.modalService.resetModalData("deleteExpModal"),this.modalService.setModalData(Te,"deleteExpModal"),this.modalService.open("deleteExpModal")}else this.updateFile();else this.loading=!0,this.service.addFileConfig(this.data).then(Te=>{this.service.validatorItem.push(Te),this.service.selectedIndex=this.service.validatorItem.length-1,this.loading=!1},Te=>{this.loading=!1})}updateFile(){this.modalService.close("deleteExpModal"),this.modalService.resetModalData("deleteExpModal"),this.loading=!0,this.service.updateFileConfig(this.data).then(Te=>{this.service.validatorItem[this.service.selectedIndex]=Te,this.loading=!1},Te=>{this.loading=!1})}checkBoxToggle(Te,rt){this.data.Config.ruleSet[Te][rt]=1===this.data.Config.ruleSet[Te][rt]?0:1}checkWizzrdToggle(){this.data.Config.config.Wizzard="true"===this.data.Config.config.Wizzard?"false":"true"}checkBeforeSaveItem(){const Te=this.data.Config.config.Name;let rt=!0;for(let St=0;St1),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate(null!=(In=St.getData())&&In.update?"Warning":"Error"),e.\u0275\u0275advance(2),e.\u0275\u0275property("innerHTML",null==(vi=St.getData())?null:vi.text,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",null==(rr=St.getData())?null:rr.update),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null!=(Jn=St.getData())&&Jn.update?"Cancel":"Ok")}},directives:[v.DefaultValueAccessor,v.NgControlStatus,v.NgModel,C.O5,En.R,cn.Ml,$t.w,C.sg,v.CheckboxControlValueAccessor,p.yH,p.xw,p.Wh,v.NumberValueAccessor,_.Q3],pipes:[Ti.k],styles:[".config-container[_ngcontent-%COMP%]{margin:30px}.first-section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;align-items:center;margin-bottom:15px}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%]{display:flex;align-items:center;width:25%}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%]{font-size:12px;display:inline-block;justify-content:center;margin-top:0;margin-right:10px;margin-left:15px;border-radius:50%;padding:3px;width:18px;height:18px;color:#fff;background:#6199AB}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%]:hover, .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%]:hover, .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%] a.icon-information[_ngcontent-%COMP%]:hover{background:#41aaaa}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%]{width:25%}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%]{margin-bottom:0}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{max-width:200px}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%]{width:50%;margin-top:0;margin-bottom:0}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%]{margin-bottom:0}.first-section[_ngcontent-%COMP%] .first-row[_ngcontent-%COMP%] .checkbox-section[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .checkbox-section[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%], .first-section[_ngcontent-%COMP%] .third-row[_ngcontent-%COMP%] .checkbox-section[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%]{width:200px;height:20px}.first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%]{width:75%}.first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%]{display:inline-block}.first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%]{width:200px;display:inline-block}.first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{margin-left:20px;bottom:1px;position:relative;margin-right:5px}.first-section[_ngcontent-%COMP%] .second-row[_ngcontent-%COMP%] .input-section[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input.directory[_ngcontent-%COMP%]{margin-left:5px}.pulse-btn-group[_ngcontent-%COMP%]{margin-top:0 px;justify-content:flex-end;width:50%}.second-section[_ngcontent-%COMP%]{margin-left:0;margin-top:30px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%]{display:flex;width:100%;border-bottom:1px solid #cdd9e1}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-first-item[_ngcontent-%COMP%]{width:30px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-item[_ngcontent-%COMP%]:nth-child(2){width:15%;max-width:210px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-item[_ngcontent-%COMP%]:nth-child(3){width:15%;max-width:210px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-item[_ngcontent-%COMP%]:nth-child(4){width:10%;max-width:150px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-item[_ngcontent-%COMP%]:nth-child(5){width:20%;max-width:300px}.second-section[_ngcontent-%COMP%] .header-row[_ngcontent-%COMP%] .header-item[_ngcontent-%COMP%]:nth-child(6){width:20%;max-width:300px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{margin:10px 0;width:100%}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .item-first-cell[_ngcontent-%COMP%]{width:30px;display:inline-block;position:relative;top:8px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .modal-input-container[_ngcontent-%COMP%]{width:15%;max-width:210px;padding-right:5px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .modal-input-container[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{max-width:200px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .pulse-header-dropdown[_ngcontent-%COMP%]{width:15%;max-width:210px;padding-right:5px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-description[_ngcontent-%COMP%]{width:20%;max-width:300px;padding-right:20px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-description[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{max-width:250px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-default[_ngcontent-%COMP%]{width:20%;max-width:300px;padding-right:5px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-default[_ngcontent-%COMP%] .pulse-header-dropdown[_ngcontent-%COMP%]{min-width:113px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-default[_ngcontent-%COMP%] .pulse-header-dropdown[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] .filter-class[_ngcontent-%COMP%]{width:110px;min-width:110px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-default[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{max-width:170px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-length[_ngcontent-%COMP%]{width:10%;max-width:150px;padding-right:5px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .column-length[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{max-width:200px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .item-others[_ngcontent-%COMP%]{display:flex;width:20%;align-items:center}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .item-others[_ngcontent-%COMP%] .first-item[_ngcontent-%COMP%]{width:50%;min-width:100px}.second-section[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%] .item-others[_ngcontent-%COMP%] .second-item[_ngcontent-%COMP%]{width:50%}.second-section[_ngcontent-%COMP%] .row-action[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;margin-top:15px}.second-section[_ngcontent-%COMP%] .row-action[_ngcontent-%COMP%] .pulse-btn-group[_ngcontent-%COMP%]{justify-content:flex-start}.dropdown[_ngcontent-%COMP%] .pulse-dropdown-toggle[_ngcontent-%COMP%]{font-weight:500;max-width:200px!important;min-width:inherit!important;background-color:#fff}.dropdown[_ngcontent-%COMP%] .pulse-dropdown-toggle.error[_ngcontent-%COMP%]{border:1px solid #d7698c}.pulse-dropdown-menu[_ngcontent-%COMP%]{max-width:100%;margin:0;padding:10px}.selected-question[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pulse-dropdown[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;overflow-x:hidden;border-radius:1px}.qlist-item[_ngcontent-%COMP%]{max-width:100%;display:list-item;white-space:normal;list-style-type:none;padding:5px}.qlist-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:block;white-space:normal;text-align:left}.qlist-item[_ngcontent-%COMP%] a.selected[_ngcontent-%COMP%]{font-weight:500;color:#00557d}.filter-class[_ngcontent-%COMP%]{margin-top:-40px;min-width:200px;border:1px solid #cdd9e1;background-color:#fff}.pulse-input.error[_ngcontent-%COMP%]{border:1px solid #d7698c} .modal-dialog-content .title-container .icon-alert-outline{padding:0 5px;bottom:3px;position:relative} .modal-dialog-content .modal-button{justify-content:center;width:100%}"]}),Mt})();var Ut=r(46809),ei=r(95346);function Di(Mt,mn){1&Mt&&(e.\u0275\u0275elementStart(0,"div",23)(1,"div"),e.\u0275\u0275text(2,"Actions"),e.\u0275\u0275elementEnd()())}function Lr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",38),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(2).index;return e.\u0275\u0275nextContext(2).downloadFile(wt)}),e.\u0275\u0275text(1),e.\u0275\u0275element(2,"i",39),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext(2).$implicit;e.\u0275\u0275property("title",null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.FileName.substr(18)),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.FileName.substr(18))}}function co(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"span",36),e.\u0275\u0275text(2," Validation Success "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(3,Lr,3,2,"a",37),e.\u0275\u0275elementContainerEnd()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.FileName)}}function Ks(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"span",40),e.\u0275\u0275text(2,"Validation Failed"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"a",41),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().$implicit;return e.\u0275\u0275nextContext(2).openLog(wt)}),e.\u0275\u0275text(4,"Open Error-Log"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}}function Ro(Mt,mn){1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1," None "),e.\u0275\u0275elementContainerEnd())}function ha(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"span",42),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&Mt){const Te=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.TimeStamp)}}function si(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",43),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=wt.index,In=wt.$implicit;return e.\u0275\u0275nextContext(2).openDeleteDialog(St,In)}),e.\u0275\u0275text(1,"delete last uploaded file"),e.\u0275\u0275elementEnd()}}function cr(Mt,mn){1&Mt&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1,"None "),e.\u0275\u0275elementContainerEnd())}function pa(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",44)(1,"span"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"input",45),e.\u0275\u0275listener("change",function(wt){e.\u0275\u0275restoreView(Te);const St=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).onFileChange(wt.target.files,St)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(4,"button",46),e.\u0275\u0275elementEnd()}if(2&Mt){const Te=e.\u0275\u0275nextContext().index,rt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",rt.selectedFile[Te]&&rt.selectedFile[Te][0]?rt.selectedFile[Te][0].name:"Choose a file...",""),e.\u0275\u0275advance(1),e.\u0275\u0275propertyInterpolate1("id","uploadFileInput",Te,"")}}function ns(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",47)(1,"button",48),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).validateFile(wt)}),e.\u0275\u0275text(2,"Validate"),e.\u0275\u0275elementEnd()()}}function As(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",49),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).downloadTemplate(wt)}),e.\u0275\u0275text(1,"download"),e.\u0275\u0275elementEnd()}}function Gr(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",50)(2,"div",51)(3,"span",52),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).editItem(wt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(4,"div",50)(5,"div",51)(6,"span",53),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).cloneItem(wt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(7,"div",50)(8,"div",51)(9,"span",54),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext().index;return e.\u0275\u0275nextContext(2).showDeleteItemDialog(wt)}),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()}}function Is(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",16)(1,"div",17)(2,"div"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"div",17)(5,"div"),e.\u0275\u0275text(6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",24)(8,"div",25)(9,"div",26)(10,"label"),e.\u0275\u0275text(11,"Last Action: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(12,co,4,1,"ng-container",27),e.\u0275\u0275template(13,Ks,5,0,"ng-container",27),e.\u0275\u0275template(14,Ro,2,0,"ng-container",27),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(15,"div",28)(16,"label"),e.\u0275\u0275text(17,"Date: "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(18,ha,2,1,"span",29),e.\u0275\u0275template(19,si,2,0,"a",30),e.\u0275\u0275template(20,cr,2,0,"ng-container",27),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"div",31),e.\u0275\u0275template(22,pa,5,2,"div",32),e.\u0275\u0275template(23,ns,3,0,"div",33),e.\u0275\u0275element(24,"pulse-spinner",34),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",17),e.\u0275\u0275template(26,As,2,0,"div",35),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(27,Gr,10,0,"ng-container",27),e.\u0275\u0275elementEnd()),2&Mt){const Te=mn.$implicit,rt=mn.index,wt=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",null==Te?null:Te.Id,""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",null==Te?null:Te.Name,""),e.\u0275\u0275advance(6),e.\u0275\u0275property("ngIf",1==(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.Validated)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.Message)&&0==(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.Validated)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(Te&&Te.Config&&Te.Config.log&&Te.Config.log.TimeStamp)),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.TimeStamp),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",1==(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.Validated)&&(null==Te||null==Te.Config||null==Te.Config.log?null:Te.Config.log.FileName)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(Te&&Te.Config&&Te.Config.log&&Te.Config.log.TimeStamp)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","true"!==(null==Te||null==Te.Config||null==Te.Config.config?null:Te.Config.config.Wizzard)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",wt.selectedFile[rt]&&wt.selectedFile[rt].length>0&&wt.showButton[rt]),e.\u0275\u0275advance(1),e.\u0275\u0275property("isSpin",0==wt.showButton[rt]&&!wt.validated[rt]),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",null==Te||null==Te.Config||null==Te.Config.config?null:Te.Config.config.TemplateName),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",wt.service.canManageValidator)}}function La(Mt,mn){if(1&Mt&&(e.\u0275\u0275elementStart(0,"div",12)(1,"div",13)(2,"div",14)(3,"div",15)(4,"div",16)(5,"div",17)(6,"div"),e.\u0275\u0275text(7,"ID"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",17)(9,"div"),e.\u0275\u0275text(10,"Template Name"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",17),e.\u0275\u0275element(12,"div"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"div",17)(14,"div"),e.\u0275\u0275text(15,"Template"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(16,Di,3,0,"div",18),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(17,"div",19)(18,"div",20)(19,"div",21),e.\u0275\u0275template(20,Is,28,13,"div",22),e.\u0275\u0275elementEnd()()()()()),2&Mt){const Te=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("fxFlex","1 0 auto"),e.\u0275\u0275advance(15),e.\u0275\u0275property("ngIf",Te.service.canManageValidator),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",Te.service.validatorItem)}}function To(Mt,mn){if(1&Mt){const Te=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",55),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(Te);const wt=e.\u0275\u0275nextContext(),St=e.\u0275\u0275reference(2);return wt.deleteFile(St.getData())}),e.\u0275\u0275element(1,"i",56),e.\u0275\u0275elementStart(2,"span"),e.\u0275\u0275text(3,"Yes"),e.\u0275\u0275elementEnd()()}}let Ji=(()=>{class Mt{constructor(Te,rt,wt,St,In){this.service=Te,this.headerService=rt,this.dialogService=wt,this.modalService=St,this.el=In,this.selectedFile={},this.validated={},this.showButton={},this.loading=!0,this.addActionItem={label:"Add New Template",callback:()=>{this.addItem()},icon:"icon-plus2"}}ngOnInit(){this.headerService.showHeader=!0,this.service.canManageValidator&&this.headerService.addAction(this.addActionItem),this.service.visibleUsers=[],this.service.getRules().then(Te=>{const rt=[];Te.forEach(wt=>{const St=JSON.parse(JSON.stringify(wt));St.Config=JSON.parse(wt.Config),rt.push(St)}),this.service.validatorItem=rt,this.service.projectValidators=this.service.validatorItem,this.service.filteredItems=JSON.parse(JSON.stringify(this.service.validatorItem)),this.loading=!1})}ngOnDestroy(){this.service.canManageValidator&&this.headerService.removeAction(this.addActionItem)}filterValidators(Te){this.service.filteredItems=Te}addItem(){this.service.selectedIndex=-1,this.service.cloneIndex=-1,this.service.isList=!1}editItem(Te){this.service.cloneIndex=-1,this.service.selectedIndex=Te,this.service.isList=!1}cloneItem(Te){this.service.selectedIndex=-1,this.service.cloneIndex=Te,this.service.isList=!1}downloadTemplate(Te){this.service.getPresignedUrl(this.service.validatorItem[Te].Config.config.TemplateName,"template",this.service.validatorItem[Te].Config.config.TargetBucketName,!0).then(St=>{St&&St.length>0&&Ut.Z.downloadLink(St[0])}).catch(St=>{console.log(St)})}showDeleteItemDialog(Te){const St={text:"Are you sure you want to delete the template?
name : "+this.service.validatorItem[Te].Name+"",resourceId:this.service.validatorItem[Te].Id,globalObjectId:this.service.validatorItem[Te].GlobalObjectId};this.modalService.resetModalData("deleteExpModal"),this.modalService.setModalData(St,"deleteExpModal"),this.modalService.open("deleteExpModal")}onFileChange(Te,rt){Te?(this.selectedFile[rt]=Te,this.showButton[rt]=!0,delete this.validated[rt]):(delete this.selectedFile[rt],this.showButton[rt]=!1)}validateFile(Te){this.showButton[Te]=!1;const rt=this.service.validatorItem[Te].Id;if(this.service.validatorItem[Te].Config.log&&this.service.validatorItem[Te].Config.log.FileName){console.log(this.service.validatorItem[Te].Config);const wt=this.service.validatorItem[Te].Config.log.FileName,St=this.service.validatorItem[Te].Config.config.TargetFileS3Location,In=this.service.validatorItem[Te].Id;this.service.validatorItem[Te].Config.log=null,this.service.deleteFile(wt,St,In).then(vi=>{this.service.validateFile(this.selectedFile[Te][0],rt).then(rr=>{const Jn=JSON.parse(JSON.stringify(rr));Jn.Config=JSON.parse(rr.Config),this.service.validatorItem[Te]=Jn,this.selectedFile[Te]=null,this.el.nativeElement.querySelector("#uploadFileInput"+Te).value="",this.validated[Te]=!0})})}else this.service.validatorItem[Te].Config.log=null,this.service.validateFile(this.selectedFile[Te][0],rt).then(wt=>{const St=JSON.parse(JSON.stringify(wt));St.Config=JSON.parse(wt.Config),this.service.validatorItem[Te]=St,this.validated[Te]=!0,this.selectedFile[Te]=null,this.el.nativeElement.querySelector("#uploadFileInput"+Te).value=""})}openLog(Te){if(Te){const rt=Te.Config.log.Message,wt={data:rt?JSON.parse(rt):""};this.dialogService.open(ei.F,wt,{})}}downloadFile(Te){this.service.getPresignedUrl(this.service.validatorItem[Te].Config.log.FileName,this.service.validatorItem[Te].Config.config.TargetFileS3Location,this.service.validatorItem[Te].Config.config.TargetBucketName).then(In=>{In&&In.length>0&&Ut.Z.downloadLink(In[0])}).catch(In=>{console.log(In)})}openDeleteDialog(Te,rt){const wt={text:"Are you sure you want to delete the validated file
name : "+rt.Config.log.FileName.substr(18)+"
uploaded at : "+rt.Config.log.TimeStamp+"",fileId:Te};this.modalService.resetModalData("deleteExpModal"),this.modalService.setModalData(wt,"deleteExpModal"),this.modalService.open("deleteExpModal")}deleteFile(Te){if(Te&&!Te.resourceId){const rt=Te.fileId;this.service.deleteFile(this.service.validatorItem[rt].Config.log.FileName,this.service.validatorItem[rt].Config.config.TargetFileS3Location,this.service.validatorItem[rt].Id,!0).then(vi=>{const rr=JSON.parse(JSON.stringify(vi));rr.Config=JSON.parse(vi.Config),this.service.validatorItem[rt]=rr})}else if(Te&&Te.resourceId){const rt=Te.resourceId;this.service.deleteFileConfig(rt,Te.globalObjectId).then(wt=>{const St=this.service.validatorItem.findIndex(In=>In.Id===rt);this.service.validatorItem.splice(St,1)})}this.modalService.close("deleteExpModal"),this.modalService.resetModalData("deleteExpModal")}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Zt.o),e.\u0275\u0275directiveInject(w.r),e.\u0275\u0275directiveInject(D.x),e.\u0275\u0275directiveInject(_.lu),e.\u0275\u0275directiveInject(e.ElementRef))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-validator-list"]],decls:15,vars:3,consts:[["fxLayout","row","class","validator-management",4,"ngIf"],["identifier","deleteExpModal","customClass","nsm-centered"],["deleteExpModal",""],[1,"modal-dialog-content"],[1,"title-container"],[1,"icon-delete2","icon"],[1,"title"],[1,"content-container"],[1,"text",3,"innerHTML"],[1,"pulse-btn-group","horizontal"],["class","pulse-btn delete",3,"click",4,"ngIf"],[1,"pulse-btn","cancel",3,"click"],["fxLayout","row",1,"validator-management"],[1,"validator-table",3,"fxFlex"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],[1,"pulse-table-cell","left"],["class","pulse-table-cell header-last",4,"ngIf"],["id","tablescrollid"],["extendedTable","","rowSelector",".pulse-table-row","scrollContentId","tablescrollid",1,"pulse-table"],[1,"pulse-table-body"],["class","pulse-table-row",4,"ngFor","ngForOf"],[1,"pulse-table-cell","header-last"],[1,"pulse-table-cell","left","main"],[1,"info-section"],[1,"validate-result"],[4,"ngIf"],[1,"date-section"],["class","status-date",4,"ngIf"],[3,"click",4,"ngIf"],[1,"file-select"],["class","upload-select",4,"ngIf"],["class","upload-button",4,"ngIf"],["isRelative","true",3,"isSpin"],["class","download-template",3,"click",4,"ngIf"],[1,"message-success"],[3,"title","click",4,"ngIf"],[3,"title","click"],[1,"icon-download2"],[1,"message-fail"],[1,"message-fail",3,"click"],[1,"status-date"],[3,"click"],[1,"upload-select"],["type","file",3,"id","change"],[1,"icon-folder-open"],[1,"upload-button"],["type","button",1,"pulse-btn","btn-small","save",3,"click"],[1,"download-template",3,"click"],[1,"pulse-table-cell","last"],[1,"action-section"],[1,"icon-edit",3,"click"],[1,"icon-content_copy",3,"click"],[1,"icon-delete2",3,"click"],[1,"pulse-btn","delete",3,"click"],[1,"icon-delete2"]],template:function(Te,rt){if(1&Te){const wt=e.\u0275\u0275getCurrentView();e.\u0275\u0275template(0,La,21,3,"div",0),e.\u0275\u0275elementStart(1,"ngx-smart-modal",1,2)(3,"div",3)(4,"div",4),e.\u0275\u0275element(5,"i",5),e.\u0275\u0275elementStart(6,"span",6),e.\u0275\u0275text(7,"Delete"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",7),e.\u0275\u0275element(9,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"div",9),e.\u0275\u0275template(11,To,4,0,"button",10),e.\u0275\u0275elementStart(12,"button",11),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(wt),e.\u0275\u0275reference(2).close()}),e.\u0275\u0275elementStart(13,"span"),e.\u0275\u0275text(14,"Cancel"),e.\u0275\u0275elementEnd()()()()()}if(2&Te){const wt=e.\u0275\u0275reference(2);let St;e.\u0275\u0275property("ngIf",rt.service.validatorItem&&rt.service.validatorItem.length>0),e.\u0275\u0275advance(9),e.\u0275\u0275property("innerHTML",null==(St=wt.getData())?null:St.text,e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",wt.hasData())}},directives:[C.O5,p.xw,p.yH,di.h,C.sg,ue.O,_.Q3],styles:[".validator-options[_ngcontent-%COMP%]{position:fixed;top:5px;padding-left:15px}.pulse-table-cell[_ngcontent-%COMP%]:first-child{flex:0 0 110px!important}.pulse-table-cell[_ngcontent-%COMP%]:nth-child(2){flex:0 0 20%!important}.pulse-table-cell[_ngcontent-%COMP%]:nth-child(4){flex:0 0 80px!important}.pulse-table-cell[_ngcontent-%COMP%]:nth-child(5):not(.header-last){flex:0 0 40px!important;text-align:center!important}.pulse-table-cell[_ngcontent-%COMP%]:nth-child(6){flex:0 0 40px!important;text-align:center!important}.pulse-table-cell[_ngcontent-%COMP%]:nth-child(7){flex:0 0 40px!important;text-align:center!important}.pulse-table-cell.header-last[_ngcontent-%COMP%]{flex:0 0 120px!important;text-align:center!important}#tablescrollid[_ngcontent-%COMP%]{overflow:auto;height:calc(100vh - 112px)}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%]{background-color:#fff}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]{padding:8px 0!important;align-items:center}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%]{margin-left:25px;margin-top:-20px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]:not(.main){display:flex;justify-content:center;align-items:baseline!important}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]:not(.main) div[_ngcontent-%COMP%]{margin-left:inherit!important}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell.main[_ngcontent-%COMP%]{display:flex;flex-direction:row}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .download-template[_ngcontent-%COMP%]{color:#00646e;text-decoration:underline;cursor:pointer}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .download-template[_ngcontent-%COMP%]:hover{color:#41aaaa;font-weight:500}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .action-section[_ngcontent-%COMP%]{display:flex;justify-content:space-around;width:100%}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .action-section[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;padding:0 5px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%]{width:40%}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .validate-result[_ngcontent-%COMP%]{margin:5px 0}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .validate-result[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:right;margin-right:15px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .validate-result[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .icon-download2[_ngcontent-%COMP%]{padding-left:5px;position:relative;bottom:-2px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .validate-result[_ngcontent-%COMP%] .message-success[_ngcontent-%COMP%]{color:#00737d;font-weight:500}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .validate-result[_ngcontent-%COMP%] .message-fail[_ngcontent-%COMP%]{color:#af235f;font-weight:500}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .date-section[_ngcontent-%COMP%]{margin:5px 0}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .date-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:right;margin-right:15px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .info-section[_ngcontent-%COMP%] .date-section[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:0!important}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%]{width:60%;display:inline-block}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-select[_ngcontent-%COMP%]{position:relative;display:inline-block;cursor:pointer;width:250px;height:32px;margin:5px 15px;border:1px solid #cdd9e1;background-color:#fff;text-align:center}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-select[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;display:inline-flex;width:150px;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis;justify-content:center;align-items:center;height:30px}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-select[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;opacity:0;cursor:pointer}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-select[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]::-webkit-file-upload-button{cursor:pointer}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-select[_ngcontent-%COMP%] .icon-folder-open[_ngcontent-%COMP%]{height:30px;width:30px;margin-top:-1px;background-size:cover;background-color:transparent;border:none;float:right;color:#697882}#tablescrollid[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .file-select[_ngcontent-%COMP%] .upload-button[_ngcontent-%COMP%]{display:inline-block;width:250px;margin:5px 15px;padding:0!important}.validator-table[_ngcontent-%COMP%]{padding:20px 20px 0} pulse-spinner .spinner{width:50%!important;display:inline-block!important;height:30px!important} pulse-spinner .spinner .loading{top:7px!important} .content-container{text-align:inherit!important}"]}),Mt})();function zo(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"pulse-validator-config")}function Rs(Mt,mn){1&Mt&&e.\u0275\u0275element(0,"pulse-validator-list")}let jo=(()=>{class Mt{constructor(Te,rt){this.service=Te,this.userService=rt}ngOnInit(){this.userSubscription=this.userService.user.subscribe(Te=>{Te&&this.userService.getRoles(this.service.projectId).then(rt=>{this.service.canAccessValidator=rt.indexOf("canaccessvalidator")>-1,this.service.canManageValidator=rt.indexOf("canmanagevalidator")>-1,this.service.canAccessValidator||this.service.canManageValidator||this.service.APIResponseControl("access")})})}}return Mt.\u0275fac=function(Te){return new(Te||Mt)(e.\u0275\u0275directiveInject(Zt.o),e.\u0275\u0275directiveInject(Y.K))},Mt.\u0275cmp=e.\u0275\u0275defineComponent({type:Mt,selectors:[["pulse-validator"]],decls:2,vars:2,consts:[[4,"ngIf"]],template:function(Te,rt){1&Te&&(e.\u0275\u0275template(0,zo,1,0,"pulse-validator-config",0),e.\u0275\u0275template(1,Rs,1,0,"pulse-validator-list",0)),2&Te&&(e.\u0275\u0275property("ngIf",!rt.service.isList&&rt.service.canManageValidator),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",rt.service.isList&&(rt.service.canAccessValidator||rt.service.canManageValidator)))},directives:[C.O5,st,Ji],styles:[""]}),Mt})(),Js=(()=>{class Mt{}return Mt.Config={path:"data",data:{navigation:"Data Management",icon:"icon-database",checkChildren:!0},children:[{path:"filter",component:an,data:{navigation:"Filter Management",role:"canUseFilterManagement",icon:"icon-database",badge:"beta"}},{path:"rawdata",component:t.H,data:{navigation:"Raw Data",iframe:"/RawData",hasMenu:"hasRawData"}},{path:"mappingtable",component:t.H,data:{navigation:"Mapping Table",iframe:"/MappingTable",hasMenu:"hasMappingtable"}},{path:"etl",component:Vt,data:{navigation:"ETL",role:"canusepulseetlbeta",badge:"beta"},children:[{path:"",pathMatch:"full",redirectTo:"package"},{path:"package",component:Br,data:{navigation:"Package",disabled:!1}},{path:"queue",component:ut,data:{navigation:"Queue",disabled:!1}},{path:"log",component:Ki,data:{navigation:"Log",disabled:!1}}]},{path:"dataentry",component:u,data:{navigation:"Data Entry",hasMenu:"hasDataEntry"},children:[{path:":id",component:t.H,data:{navigation:"Data Entry",iframe:"/DataEntry",disabled:!0}}]},{path:"pptexporter",component:t.H,data:{navigation:"PPT Exporter",iframe:"/PPTExporter",hasMenu:"hasPptExport"}},{path:"documents",component:t.H,data:{navigation:"Documents",iframe:"/Document",hasMenu:"hasDocuments"}},{path:"upload",data:{navigation:"Upload Management",icon:"icon-database",iframe:"/UploadManagement",role:"canuploadfiles"},component:t.H},{path:"translate",component:ht.L,data:{navigation:"Translation Management",icon:"icon-chat_bubble",role:"canDoTranslation"}},{path:"validator",component:jo,data:{navigation:"Validator Management",role:["canAccessValidator","canManageValidator"]}}]},Mt})()},37802:(Se,pe,r)=>{"use strict";r.d(pe,{q:()=>P});var t=r(5e3),e=r(53403),a=r(45383),s=r(54620),o=r(22290);const d=["dialog"];function u(I,A){1&I&&(t.\u0275\u0275elementStart(0,"span"),t.\u0275\u0275text(1," New Category"),t.\u0275\u0275elementEnd())}function g(I,A){1&I&&(t.\u0275\u0275elementStart(0,"span"),t.\u0275\u0275text(1," Add Filter"),t.\u0275\u0275elementEnd())}function x(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",24)(1,"input",25,26),t.\u0275\u0275listener("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).filterdata.category=c}),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",27),t.\u0275\u0275text(4," Category is required "),t.\u0275\u0275elementEnd()()}if(2&I){const O=t.\u0275\u0275reference(2),T=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngModel",T.filterdata.category),t.\u0275\u0275advance(2),t.\u0275\u0275property("hidden",O.valid||O.pristine)}}function i(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",28)(1,"span"),t.\u0275\u0275text(2,"Category Icon:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"pulse-icon-picker",29),t.\u0275\u0275listener("picked",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).filterdata.categoryIcon=c}),t.\u0275\u0275elementEnd()()}if(2&I){const O=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(3),t.\u0275\u0275property("icon",O.filterdata.categoryIcon)}}function m(I,A){if(1&I&&(t.\u0275\u0275elementStart(0,"option",34),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&I){const O=A.$implicit;t.\u0275\u0275property("value",O.id),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(O.name)}}function E(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",11)(1,"div",12)(2,"select",30,31),t.\u0275\u0275listener("change",function(){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).setSuggestion()})("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).selected=c}),t.\u0275\u0275elementStart(4,"option",32),t.\u0275\u0275text(5,"Select filter"),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(6,m,2,2,"option",33),t.\u0275\u0275elementEnd()()()}if(2&I){const O=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(2),t.\u0275\u0275property("disabled",O.loading)("ngModel",O.selected),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngForOf",O.suggestions)}}function C(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",24)(1,"input",35,36),t.\u0275\u0275listener("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).filterdata.name=c}),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",27),t.\u0275\u0275text(4," Name is required "),t.\u0275\u0275elementEnd()()}if(2&I){const O=t.\u0275\u0275reference(2),T=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngModel",T.filterdata.name),t.\u0275\u0275advance(2),t.\u0275\u0275property("hidden",O.valid||O.pristine)}}function v(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"label",20)(1,"label"),t.\u0275\u0275text(2," Has Select All "),t.\u0275\u0275elementStart(3,"input",21),t.\u0275\u0275listener("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext(2).filterdata.hasAll=c}),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(4,"span",22),t.\u0275\u0275elementEnd()()}if(2&I){const O=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(3),t.\u0275\u0275property("ngModel",O.filterdata.hasAll)("disabled",O.state===O.states.bind)}}function h(I,A){if(1&I&&(t.\u0275\u0275elementStart(0,"div",37)(1,"button",38),t.\u0275\u0275element(2,"i",39),t.\u0275\u0275text(3,"Add"),t.\u0275\u0275elementEnd()()),2&I){t.\u0275\u0275nextContext();const O=t.\u0275\u0275reference(1),T=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("disabled",!O.form.valid||!T.pickedColumns||0===T.pickedColumns.length)}}function S(I,A){if(1&I&&(t.\u0275\u0275elementStart(0,"div",37)(1,"button",38),t.\u0275\u0275element(2,"i",39),t.\u0275\u0275text(3,"Add"),t.\u0275\u0275elementEnd()()),2&I){const O=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("disabled",!O.selected)}}const p=function(I){return{"picker-disabled disabled":I}};function L(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"form",5,6),t.\u0275\u0275listener("ngSubmit",function(){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().onSubmit()}),t.\u0275\u0275elementStart(2,"div",7),t.\u0275\u0275template(3,x,5,2,"div",8),t.\u0275\u0275template(4,i,4,1,"div",9),t.\u0275\u0275template(5,E,7,3,"div",10),t.\u0275\u0275template(6,C,5,2,"div",8),t.\u0275\u0275elementStart(7,"div",11)(8,"div",12)(9,"select",13,14),t.\u0275\u0275listener("change",function(){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().onFiltertypeChanged()})("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().filterdata.type=c}),t.\u0275\u0275elementStart(11,"option",15),t.\u0275\u0275text(12,"Treeview"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(13,"option",16),t.\u0275\u0275text(14,"Input"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(15,"option",17),t.\u0275\u0275text(16,"Date Picker"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275template(17,v,5,2,"label",18),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(18,"div",7)(19,"pulse-itempicker",19),t.\u0275\u0275listener("pickedItemsChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().pickedColumns=c})("pickedItemsChange",function(){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().validPick()}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(20,"div",7)(21,"label",20)(22,"label"),t.\u0275\u0275text(23," Add permission handling to user administration "),t.\u0275\u0275elementStart(24,"input",21),t.\u0275\u0275listener("ngModelChange",function(c){return t.\u0275\u0275restoreView(O),t.\u0275\u0275nextContext().filterdata.shouldSetPermission=c}),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(25,"span",22),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275template(26,h,4,1,"div",23),t.\u0275\u0275template(27,S,4,1,"div",23),t.\u0275\u0275elementEnd()}if(2&I){const O=t.\u0275\u0275nextContext();t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",!O.category),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!O.category),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",O.state===O.states.bind),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",O.state===O.states.new),t.\u0275\u0275advance(3),t.\u0275\u0275property("disabled",O.loading||O.state===O.states.bind)("ngModel",O.filterdata.type),t.\u0275\u0275advance(8),t.\u0275\u0275property("ngIf",O.filterdata.type<1),t.\u0275\u0275advance(2),t.\u0275\u0275property("pickedItems",O.pickedColumns)("items",O.filteredCols)("labelProperty","label")("isSearchboxLabeled",!1)("pickedItemsFilter","")("ngClass",t.\u0275\u0275pureFunction1(17,p,O.state===O.states.bind)),t.\u0275\u0275advance(5),t.\u0275\u0275property("ngModel",O.filterdata.shouldSetPermission)("disabled",O.state===O.states.bind),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",O.state===O.states.new),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",O.state===O.states.bind)}}function N(I,A){if(1&I){const O=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",40)(1,"button",41),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(O);const c=t.\u0275\u0275nextContext();return c.state=c.states.bind}),t.\u0275\u0275text(2,"Existing filter"),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(3," OR "),t.\u0275\u0275elementStart(4,"button",41),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(O);const c=t.\u0275\u0275nextContext();return c.state=c.states.new}),t.\u0275\u0275text(5,"New filter"),t.\u0275\u0275elementEnd()()}}var j=(()=>{return(I=j||(j={}))[I.pre=0]="pre",I[I.new=1]="new",I[I.bind=2]="bind",j;var I})();let P=(()=>{class I{constructor(O,T,c,M){this.datasourceService=O,this.filterConfigService=T,this.projectService=c,this.toasty=M,this.states=j,this.state=this.states.pre,this.loading=!1,this.suggestions=[],this.filterdata={category:"",categoryIcon:"",columns:[],groupId:NaN,name:"",order:0,type:0,shouldSetPermission:!1},this.columns=[],this.filteredCols=[]}ngOnInit(){this.filterConfigService.getSuggestions(this.projectService.projectId,this.groupId).then(O=>{this.suggestions=O,0===O.length&&(this.state=this.states.new)}),this.getColumnInformation()}setSuggestion(){const O=this.suggestions.find(T=>T.id===Number(this.selected));this.filterdata.id=O.id,this.filterdata.name=O.name,this.filterdata.hasAll=O.hasAll,this.filterdata.columns=O.column,this.filterdata.type=O.type,this.pickedColumns=[],this.filterCols(),O.column.forEach(T=>{const c=this.filteredCols.find(M=>M.label===T.name);this.pickedColumns.push(c)})}onFiltertypeChanged(){this.pickedColumns=[],this.filterCols()}validPick(){Number(this.filterdata.type)>0&&this.pickedColumns.length>1&&(this.pickedColumns=[this.pickedColumns[1]?this.pickedColumns[1]:this.pickedColumns[0]])}onSubmit(){this.filterdata.category=this.category?this.category:this.filterdata.category,this.filterdata.categoryIcon=this.categoryIcon?this.categoryIcon:this.filterdata.categoryIcon,this.filterdata.columns=this.pickedColumns.map((O,T)=>({name:O.label,order:T+1})),this.filterdata.groupId=this.groupId,this.filterdata.order=this.order,this.filterdata.hasAll=Number(this.filterdata.hasAll),this.callback(this.filterdata),this.dialog.close()}filterCols(){this.filteredCols=this.columns.filter(O=>4!==O.sqlDbType&&33!==O.sqlDbType&&(0===Number(this.filterdata.type)||1===Number(this.filterdata.type))||(4===O.sqlDbType||33===O.sqlDbType)&&2===Number(this.filterdata.type)).map((O,T)=>({id:T,label:O.name}))}getColumnInformation(){this.loading=!0,this.datasourceService.getColumns(this.datasourceInfo.servername,this.datasourceInfo.database,this.datasourceInfo.table).then(O=>{this.columns=O,this.filterCols(),this.loading=!1}).catch(O=>{this.loading=!1,this.toasty.error("Something went wrong.")})}}return I.\u0275fac=function(O){return new(O||I)(t.\u0275\u0275directiveInject(e.U),t.\u0275\u0275directiveInject(a.s),t.\u0275\u0275directiveInject(s.k),t.\u0275\u0275directiveInject(o._W))},I.\u0275cmp=t.\u0275\u0275defineComponent({type:I,selectors:[["pulse-create-filter-dialog"]],viewQuery:function(O,T){if(1&O&&t.\u0275\u0275viewQuery(d,7),2&O){let c;t.\u0275\u0275queryRefresh(c=t.\u0275\u0275loadQuery())&&(T.dialog=c.first)}},decls:8,vars:4,consts:[["dialog",""],[1,"modal-header","flex"],[4,"ngIf"],[3,"ngSubmit",4,"ngIf","ngIfElse"],["preconfig",""],[3,"ngSubmit"],["filterForm","ngForm"],[1,"form-group","filter-information-group"],["class","add-formfield",4,"ngIf"],["class","add-formfield category-icon",4,"ngIf"],["class","pulse-form-field add-formfield",4,"ngIf"],[1,"pulse-form-field","add-formfield"],[1,"pulse-select","full-width"],["name","type",1,"form-control",3,"disabled","ngModel","change","ngModelChange"],["type","ngModel"],["value","0"],["value","1"],["value","2"],["class","pulse-checkbox-container",4,"ngIf"],["fxLayout","column","fxFlex","100","itemsTypeTitle","columns",3,"pickedItems","items","labelProperty","isSearchboxLabeled","pickedItemsFilter","ngClass","pickedItemsChange"],[1,"pulse-checkbox-container"],["type","checkbox","name","hasAll",1,"pulse-checkbox",3,"ngModel","disabled","ngModelChange"],[1,"checkmark"],["class","create-button",4,"ngIf"],[1,"add-formfield"],["placeholder","Category","name","category","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["category","ngModel"],[1,"required-message",3,"hidden"],[1,"add-formfield","category-icon"],[3,"icon","picked"],["name","suggestion","required","",1,"form-control",3,"disabled","ngModel","change","ngModelChange"],["suggestion","ngModel"],["disabled","","selected","","hidden","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["placeholder","Filter name","name","name","required","",1,"form-control","pulse-input",3,"ngModel","ngModelChange"],["name","ngModel"],[1,"create-button"],["type","submit","fxFlex","20",1,"pulse-btn","save",3,"disabled"],[1,"icon-plus2"],[1,"preconfig-container"],["fxFlex","20",1,"pulse-btn","save",3,"click"]],template:function(O,T){if(1&O&&(t.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),t.\u0275\u0275template(3,u,2,0,"span",2),t.\u0275\u0275template(4,g,2,0,"span",2),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(5,L,28,19,"form",3),t.\u0275\u0275template(6,N,6,0,"ng-template",null,4,t.\u0275\u0275templateRefExtractor),t.\u0275\u0275elementEnd()),2&O){const c=t.\u0275\u0275reference(7);t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",!T.category),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",T.category),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",T.state!==T.states.pre)("ngIfElse",c)}},styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}.create-button[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end}.preconfig-container[_ngcontent-%COMP%]{text-align:center;align-items:center;justify-content:space-evenly;height:250px}.category-icon[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.picker-disabled[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none}.modal-header[_ngcontent-%COMP%]{margin-bottom:5px}"]}),I})()},10705:(Se,pe,r)=>{"use strict";r.d(pe,{Q:()=>u});var t=r(5e3),e=r(53403),a=r(22290);const s=["dialog"];function o(g,x){if(1&g){const i=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"label",18)(1,"label"),t.\u0275\u0275text(2," Has Select All "),t.\u0275\u0275elementStart(3,"input",19),t.\u0275\u0275listener("ngModelChange",function(E){return t.\u0275\u0275restoreView(i),t.\u0275\u0275nextContext().filter.hasAll=E})("change",function(){t.\u0275\u0275restoreView(i);const E=t.\u0275\u0275nextContext();return E.somethingChanged=!0,E.isDeleteTokens=!0}),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(4,"span",20),t.\u0275\u0275elementEnd()()}if(2&g){const i=t.\u0275\u0275nextContext();t.\u0275\u0275advance(3),t.\u0275\u0275property("ngModel",i.filter.hasAll)}}function d(g,x){1&g&&t.\u0275\u0275element(0,"i",21),2&g&&t.\u0275\u0275property("pulseTooltip","Also deleting all tokens")}let u=(()=>{class g{constructor(i,m){this.datasourceService=i,this.toasty=m,this.loading=!1,this.isDeleteTokens=!1,this.somethingChanged=!1,this.columns=[],this.filteredCols=[]}ngOnInit(){this.getColumnInformation()}getColumnInformation(){this.loading=!0,this.datasourceService.getColumns(this.datasourceInfo.servername,this.datasourceInfo.database,this.datasourceInfo.table).then(i=>{this.columns=i,this.filterCols(),this.pickedColumns=[],this.filter.column.forEach(m=>{const E=this.filteredCols.find(C=>C.label===m.name);this.pickedColumns.push(E)}),this.loading=!1}).catch(i=>{this.loading=!1,this.toasty.error("Something went wrong.")})}validPick(){Number(this.filter.type)>0&&this.pickedColumns.length>0&&(this.pickedColumns=[this.pickedColumns[1]?this.pickedColumns[1]:this.pickedColumns[0]])}filterCols(){this.filteredCols=this.columns.filter(i=>4!==i.sqlDbType&&33!==i.sqlDbType&&(0===Number(this.filter.type)||1===Number(this.filter.type))||(4===i.sqlDbType||33===i.sqlDbType)&&2===Number(this.filter.type)).map((i,m)=>({id:m,label:i.name}))}onSubmit(){this.filter.column=this.pickedColumns.map((i,m)=>({name:i.label,order:m+1})),this.filter.hasAll=Number(this.filter.hasAll),this.isDeleteTokens&&(this.filter.tokens=null),this.callback(this.filter),this.dialog.close()}}return g.\u0275fac=function(i){return new(i||g)(t.\u0275\u0275directiveInject(e.U),t.\u0275\u0275directiveInject(a._W))},g.\u0275cmp=t.\u0275\u0275defineComponent({type:g,selectors:[["pulse-edit-filter-dialog"]],viewQuery:function(i,m){if(1&i&&t.\u0275\u0275viewQuery(s,7),2&i){let E;t.\u0275\u0275queryRefresh(E=t.\u0275\u0275loadQuery())&&(m.dialog=E.first)}},decls:27,vars:11,consts:[["dialog",""],[1,"modal-header"],[1,"icon-edit"],[3,"ngSubmit"],["filterForm","ngForm"],[1,"form-group","filter-information-group"],[1,"add-formfield"],["fxFlex","100","placeholder","Filter name","name","name","required","",1,"form-control","pulse-input",3,"ngModel","keyup","ngModelChange"],["name","ngModel"],[1,"required-message",3,"hidden"],["fxFlex","100","placeholder","Filter Order","name","order",1,"form-control","pulse-input",3,"ngModel","keyup","ngModelChange"],["order","ngModel"],["class","pulse-checkbox-container",4,"ngIf"],["fxLayout","column","fxFlex","100","itemsTypeTitle","columns",3,"pickedItems","items","labelProperty","pickedItemsFilter","pickedItemsChange"],[1,"create-button"],[1,"info-message"],["type","submit","fxFlex","20",1,"pulse-btn","save",3,"disabled"],["class","icon-warning token-warning",3,"pulseTooltip",4,"ngIf"],[1,"pulse-checkbox-container"],["type","checkbox","name","isAll",1,"pulse-checkbox",3,"ngModel","ngModelChange","change"],[1,"checkmark"],[1,"icon-warning","token-warning",3,"pulseTooltip"]],template:function(i,m){if(1&i&&(t.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1),t.\u0275\u0275element(3,"i",2),t.\u0275\u0275text(4," Edit Filter "),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(5),t.\u0275\u0275elementStart(6,"form",3,4),t.\u0275\u0275listener("ngSubmit",function(){return m.onSubmit()}),t.\u0275\u0275elementStart(8,"div",5)(9,"div",6)(10,"input",7,8),t.\u0275\u0275listener("keyup",function(){return m.somethingChanged=!0})("ngModelChange",function(C){return m.filter.name=C}),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(12,"div",9),t.\u0275\u0275text(13," Name is required "),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(14,"div",6)(15,"input",10,11),t.\u0275\u0275listener("keyup",function(){return m.somethingChanged=!0})("ngModelChange",function(C){return m.filter.order=C}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275template(17,o,5,1,"label",12),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(18,"div",5)(19,"pulse-itempicker",13),t.\u0275\u0275listener("pickedItemsChange",function(C){return m.pickedColumns=C})("pickedItemsChange",function(){return m.somethingChanged=!0,m.validPick(),m.isDeleteTokens=!0}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(20,"div",14)(21,"span",15),t.\u0275\u0275text(22,"Info: Changes on name, hasAll and columns will effect all occurrences of this filter."),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(23,"button",16),t.\u0275\u0275element(24,"i",2),t.\u0275\u0275text(25,"Edit "),t.\u0275\u0275template(26,d,1,1,"i",17),t.\u0275\u0275elementEnd()()()()),2&i){const E=t.\u0275\u0275reference(7),C=t.\u0275\u0275reference(11);t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate1(" ",m.datasourceInfo.table," "),t.\u0275\u0275advance(5),t.\u0275\u0275property("ngModel",m.filter.name),t.\u0275\u0275advance(2),t.\u0275\u0275property("hidden",C.valid||C.pristine),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngModel",m.filter.order),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",0===m.filter.type),t.\u0275\u0275advance(2),t.\u0275\u0275property("pickedItems",m.pickedColumns)("items",m.filteredCols)("labelProperty","label")("pickedItemsFilter",""),t.\u0275\u0275advance(4),t.\u0275\u0275property("disabled",!E.form.valid||!m.somethingChanged),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",m.isDeleteTokens)}},styles:["#pulse-model-container{max-width:650px!important;padding:24px!important;background-color:#ebf0f5!important;min-height:inherit!important;overflow:visible!important} #pulse-model-container .pulse-modal-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} #pulse-model-container .pulse-modal-close:hover{color:#00737d!important}.flex[_ngcontent-%COMP%]{display:flex;align-items:center}.full-width[_ngcontent-%COMP%]{width:100%}.pointer[_ngcontent-%COMP%]{cursor:pointer}.filter-information-group[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%;margin:25px 0}.pulse-form-field[_ngcontent-%COMP%]{flex-direction:column!important;align-items:center!important;margin:0!important}.pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#2d373c;text-align:inherit!important;margin:10px 0 3px!important;padding:inherit!important}.add-formfield[_ngcontent-%COMP%]{width:48%;margin-bottom:10px}.add-formfield[_ngcontent-%COMP%] .required-message[_ngcontent-%COMP%]{padding:4px 15px;background:#dc0000;outline:1px #dc0000;color:#fff;width:auto}.create-button[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end}.create-button[_ngcontent-%COMP%] .info-message[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:30px;word-break:normal}.create-button[_ngcontent-%COMP%] .token-warning[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:18px;color:red;width:10%}"]}),g})()},45383:(Se,pe,r)=>{"use strict";r.d(pe,{s:()=>s});var t=r(5e3),e=r(62474),a=r(9133);let s=(()=>{class o{constructor(u,g){this.webApi=u,this.variablesService=g}createFilter(u){return new Promise((g,x)=>{this.webApi.post(this.variablesService.apiUrl+"/api/Filter/",u).then(i=>{g(i)},i=>x(i))})}getGlobalObjectsByProjectId(u,g){return new Promise((x,i)=>{this.webApi.get(this.variablesService.apiUrl+"/api/Filter/"+u+"/"+g).then(m=>{x(m)},m=>i(m))})}createGroup(u,g,x,i,m){return new Promise((E,C)=>{this.webApi.post(this.variablesService.apiUrl+"/api/Filter/group",{datasourceInfo:u,type:g,id:x,title:i,desc:m}).then(v=>{E(v)},v=>C(v))})}getGroupedFilter(u){return new Promise((g,x)=>{this.webApi.get(this.variablesService.apiUrl+"/api/Filter/getFilterByGroup/"+u).then(i=>{g(i)},i=>x(i))})}deleteFilter(u,g){return new Promise((x,i)=>{this.webApi.delete(this.variablesService.apiUrl+"/api/Filter/"+u+"/"+g).then(m=>{x(m)},m=>i(m))})}editFilter(u,g){return new Promise((x,i)=>{this.webApi.put(this.variablesService.apiUrl+"/api/Filter/edit/"+g,u).then(m=>{x(m)},m=>i(m))})}editCategory(u,g,x,i){return new Promise((m,E)=>{this.webApi.put(this.variablesService.apiUrl+"/api/Filter/editCategory",{groupId:u,oldCategory:g,category:x,categoryIcon:i}).then(C=>{m(C)},C=>E(C))})}getSuggestions(u,g){return new Promise((x,i)=>{this.webApi.get(this.variablesService.apiUrl+"/api/Filter/suggestions/"+u+"/"+g).then(m=>{x(m)},m=>i(m))})}editDatasource(u,g){return new Promise((x,i)=>{this.webApi.put(this.variablesService.apiUrl+"/api/Filter/editDatasource/",{datasource:u,groupId:g}).then(m=>{x(m)},m=>i(m))})}getTreeview(u){return new Promise((g,x)=>{this.webApi.get("/Customer/HierarchyFilter/GetFilter?filterId="+u).then(i=>{g(i)},i=>x(i))})}updateToken(u,g){return new Promise((x,i)=>{this.webApi.put(this.variablesService.apiUrl+"/api/Filter/updateTokens/",{filterId:u,tokens:g}).then(m=>{x(m)},m=>i(m))})}importConfiguration(u,g,x){return new Promise((i,m)=>{this.webApi.post(this.variablesService.apiUrl+"/api/Filter/importConfiguration/"+u+"/"+g+"/"+x,{}).then(E=>{i(E)},E=>m(E))})}}return o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.a))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac}),o})()},98649:(Se,pe,r)=>{"use strict";r.d(pe,{E:()=>x});var t=r(7845),e=r(46809),a=r(5e3),s=r(22739),o=r(4371),d=r(22290),u=r(69808);function g(i,m){if(1&i&&(a.\u0275\u0275elementStart(0,"div",7),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&i){const E=a.\u0275\u0275nextContext();a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate2(" ",E.filteredData.length," / ",E.dataset.length," ")}}let x=(()=>{class i{constructor(E,C,v){this.tmService=E,this.sideBarNavigationService=C,this.toast=v,this.dataset=new Array,this.hotRegisterer=new t.VY,this.id="hotInstance",this.menuOpen=!0,this.hotSettings={licenseId:"e150d-a25d8-6b8d0-b4a04-7cd17",filters:!0,allowInsertColumn:!0,dropdownMenu:["filter_by_condition","filter_by_value","filter_action_bar"],renderer:"html",customBorders:[{range:{from:{row:0,col:2},to:{row:this.dataset,col:2}},left:{color:"#becdd7"},right:{color:"#becdd7"},top:{color:"#becdd7"},bottom:{color:"#becdd7"}}],colWidths:200,height:window.innerHeight-125},this.afterChange=(h,S)=>{!h||h.forEach(([p,L,N,j])=>{if(N===j)return;const P=this.handsonTableInstance.getCell(p,2),I=this.handsonTableInstance.getData()[p];for(let A=0;A{T.didError?(null!==P&&(P.style.background="#D50000"),console.log(T.errorMessage)):(null!==P&&(P.style.background="#259b40"),setTimeout(function(){P.style.background="white"},1e3))}).catch(T=>{null!==P&&(P.style.background="#D50000"),this.toast.error(`${T.status} Error: ${T.error.key[0]}`)});break}console.log("Dataset",this.handsonTableInstance.getData()[p]),console.log("Change Detection:",p,L,N,j)})},this.handsonTableWidthSidebarExpanded=window.innerWidth-60-C.sideNavigationWidth,this.handsonTableWidthSidebarCollapsed=window.innerWidth-120}onResize(E){this.handsonTableInstance=this.hotRegisterer.getInstance(this.id),this.totalWidth=!0===this.menuOpen?window.innerWidth-60-280:window.innerWidth-120,this.calculateTableSize(this.totalWidth)}onClick(E){this.handsonTableInstance&&(this.filteredData=this.handsonTableInstance.getData())}calculateTableSize(E){const p={colWidths:[.15*E,.35*E,.35*E,.15*E],height:window.innerHeight-125};this.updateHansomeTableSettings(this.handsonTableInstance,p)}ngAfterViewInit(){this.handsonTableInstance=this.hotRegisterer.getInstance(this.id),this.sideBarNavigationService.expandSideNavigation.subscribe(E=>{this.menuOpen=E,this.handsonTableInstance&&(this.totalWidth=E?window.innerWidth-60-this.sideBarNavigationService.sideNavigationWidth:window.innerWidth-120,this.calculateTableSize(this.totalWidth))})}exportCSV(){this.handsonTableInstance.getPlugin("exportFile").downloadFile("csv",{columnHeaders:!0,filename:"Translations- "+this.comparisonLanguage+" - "+this.targetLanguage+"_[YYYY]-[MM]-[DD]"})}excelExport(){const E=this.handsonTableInstance.getData(),C=[{label:"Key",key:"key",columnStyle:{font:"",fontStyle:"bold",color:"",background:""},rows:[]},{label:this.tmService.selectedComparisonDisplayLanguage,key:"comparisonLanguage",columnStyle:{font:"",fontStyle:"bold",color:"",background:""},rows:[]},{label:this.tmService.selectedTargetDisplayLanguage,key:"targetLanguage",columnStyle:{font:"",fontStyle:"bold",color:"",background:""},rows:[]},{label:"Area",key:"area",columnStyle:{font:"",fontStyle:"bold",color:"",background:""},rows:[]}];for(let h=0;h{h&&h.length>0&&e.Z.downloadLink(h[0])}).catch(h=>{console.log(h)})}ngOnInit(){this.tmService.filterUpdate.subscribe(E=>{E&&(this.targetLanguage=this.tmService.selectedTargetLanguage,this.comparisonLanguage=this.tmService.selectedComparisonLanguage)}),this.tmService.dataUpdate.subscribe(E=>{E&&(this.dataset=E)})}updateHansomeTableSettings(E,C){E.updateSettings(C,!1)}getData(){return this.targetLanguage}showFiltered(){return!!(this.filteredData&&this.dataset&&this.filteredData.length{"use strict";r.d(pe,{h:()=>u});var t=r(591),e=r(5e3),a=r(62474),s=r(9133),o=r(98613),d=r(54620);let u=(()=>{class g{constructor(i,m,E,C){this.webApi=i,this.variables=m,this.userService=E,this.projectService=C,this.dataSubject=new t.X(null),this.targetLanguageSubject=new t.X(null),this.comparisonLanguageSubject=new t.X(null),this.filterUpdate=new t.X(!1),this.dataUpdate=new t.X(!1)}init(i,m){this.projectService.projectObserv.subscribe(E=>{this.currentProjectId=E.id;const C=new Array;C.push(this.getLanguagesForUser()),C.push(this.getDistinctLanguagesByProject(this.currentProjectId)),Promise.all(C).then(v=>{const S=v[1];this.userLanguages=v[0],this.selectedTargetLanguage=this.userLanguages[0].key,this.selectedTargetDisplayLanguage=this.userLanguages[0].language,this.comparisonLanguages=S;const p=this.comparisonLanguages.find(L=>"en"===L.key);this.selectedComparisonLanguage=p?p.key:this.comparisonLanguages[0].key,this.selectedComparisonDisplayLanguage=p?p.language:this.comparisonLanguages[0].language,this.filterUpdate.next(!0),this.filterData(this.selectedComparisonLanguage,this.selectedTargetLanguage)})})}filterData(i,m){this.getTranslationByLanguageAndProject(m,i).then(E=>{this.selectedTargetLanguage=m,this.selectedComparisonLanguage=i;for(let C=0;C{this.webApi.get(this.variables.apiUrl+"/api/Translation/user/permission/"+this.currentProjectId).then(E=>{E.didError?m(E.errorMessage):i(E.model)}).catch(E=>{m(E)})})}getDistinctLanguagesByProject(i){return new Promise((m,E)=>{this.webApi.get(this.variables.apiUrl+"/api/Translation/project/languages/"+this.currentProjectId).then(C=>{C.didError?E(C.errorMessage):m(C.model)}).catch(C=>{E(C)})})}getTranslationByLanguageAndProject(i,m){return new Promise((E,C)=>{this.webApi.get(this.variables.apiUrl+"/api/Translation/project/"+this.currentProjectId+"/from/"+m+"/to/"+i).then(v=>{v.didError?C(v.errorMessage):E(v.model)}).catch(v=>{C(v)})})}updateTranslation(i){return new Promise((m,E)=>{this.webApi.post(this.variables.apiUrl+"/api/Translation/project/translation",i).then(C=>{C.didError?E(C.errorMessage):m(C.model)}).catch(C=>{E(C)})})}exportExcel(i){return new Promise((m,E)=>{this.webApi.post(this.variables.apiUrl+"/api/Excel/exportFromJson",i).then(C=>{C.didError?E(C.errorMessage):m(C.model)}).catch(C=>{E(C)})})}}return g.\u0275fac=function(i){return new(i||g)(e.\u0275\u0275inject(a.f),e.\u0275\u0275inject(s.a),e.\u0275\u0275inject(o.K),e.\u0275\u0275inject(d.k))},g.\u0275prov=e.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac,providedIn:"root"}),g})()},3990:(Se,pe,r)=>{"use strict";r.d(pe,{L:()=>C});var t=r(5e3),e=r(98649),a=r(22739),s=r(98613),o=r(47626),d=r(54620);function u(v,h){if(1&v&&(t.\u0275\u0275elementStart(0,"option",9),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&v){const S=h.$implicit;t.\u0275\u0275property("value",S.key),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(S.language)}}function g(v,h){if(1&v&&(t.\u0275\u0275elementStart(0,"option",9),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&v){const S=h.$implicit;t.\u0275\u0275propertyInterpolate("value",S.key),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",S.language,"")}}function x(v,h){if(1&v){const S=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",4)(1,"div",5)(2,"label"),t.\u0275\u0275text(3,"Source Language"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"div",6)(5,"select",7),t.\u0275\u0275listener("ngModelChange",function(L){return t.\u0275\u0275restoreView(S),t.\u0275\u0275nextContext(2).tmService.selectedComparisonLanguage=L})("change",function(){t.\u0275\u0275restoreView(S);const L=t.\u0275\u0275nextContext(2);return L.tmService.filterData(L.tmService.selectedComparisonLanguage,L.tmService.selectedTargetLanguage)}),t.\u0275\u0275element(6,"option"),t.\u0275\u0275template(7,u,2,2,"option",8),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(8,"div",5)(9,"label"),t.\u0275\u0275text(10,"Target Language"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(11,"div",6)(12,"select",7),t.\u0275\u0275listener("ngModelChange",function(L){return t.\u0275\u0275restoreView(S),t.\u0275\u0275nextContext(2).tmService.selectedTargetLanguage=L})("change",function(){t.\u0275\u0275restoreView(S);const L=t.\u0275\u0275nextContext(2);return L.tmService.filterData(L.tmService.selectedComparisonLanguage,L.tmService.selectedTargetLanguage)}),t.\u0275\u0275element(13,"option"),t.\u0275\u0275template(14,g,2,2,"option",8),t.\u0275\u0275elementEnd()()()()}if(2&v){const S=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(5),t.\u0275\u0275property("ngModel",S.tmService.selectedComparisonLanguage),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",S.tmService.comparisonLanguages),t.\u0275\u0275advance(5),t.\u0275\u0275property("ngModel",S.tmService.selectedTargetLanguage),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",S.tmService.userLanguages)}}function i(v,h){1&v&&(t.\u0275\u0275elementStart(0,"div"),t.\u0275\u0275element(1,"pulse-translation-table"),t.\u0275\u0275elementEnd())}function m(v,h){1&v&&(t.\u0275\u0275elementStart(0,"div",1),t.\u0275\u0275text(1,"No Access"),t.\u0275\u0275elementEnd())}function E(v,h){if(1&v&&(t.\u0275\u0275elementStart(0,"div",1),t.\u0275\u0275template(1,x,15,4,"div",2),t.\u0275\u0275template(2,i,2,0,"div",3),t.\u0275\u0275template(3,m,2,0,"div",0),t.\u0275\u0275elementEnd()),2&v){const S=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",S.tmService.dataSubject),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",S.userService.roles&&S.userService.roles.indexOf("candotranslation")>-1&&null!=S.tmService.dataSubject),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",S.userService.roles&&-1==S.userService.roles.indexOf("candotranslation"))}}let C=(()=>{class v{constructor(S,p,L,N){this.tmService=S,this.userService=p,this.headerBarService=L,this.projectService=N,this.active=!1,this.visibilityToggled=new t.EventEmitter,this.tmService.init(0,0),this.headerBarService.showHeader=!0,this.initializeHeaders(),this.headerBarService.addAction(this.importExcelButton)}export(){this.translationTable.excelExport()}initializeHeaders(){this.importExcelButton={icon:"icon-download",callback:()=>{this.export()},label:"Export as Excel"}}ngAfterViewInit(){}isAdmin(){this.userService.getUserRoles(this.projectService.projectId,this.userService.user.value.id).then(S=>this.userService.hasRole("admin"))}ngOnInit(){}ngOnDestroy(){this.headerBarService.removeAction(this.importExcelButton)}}return v.\u0275fac=function(S){return new(S||v)(t.\u0275\u0275directiveInject(a.h),t.\u0275\u0275directiveInject(s.K),t.\u0275\u0275directiveInject(o.r),t.\u0275\u0275directiveInject(d.k))},v.\u0275cmp=t.\u0275\u0275defineComponent({type:v,selectors:[["pulse-translation-management"]],viewQuery:function(S,p){if(1&S&&t.\u0275\u0275viewQuery(e.E,5),2&S){let L;t.\u0275\u0275queryRefresh(L=t.\u0275\u0275loadQuery())&&(p.translationTable=L.first)}},inputs:{icon:"icon",remoteCtrl:"remoteCtrl"},outputs:{visibilityToggled:"visibilityToggled"},decls:1,vars:1,consts:[["class","pulse-container",4,"ngIf"],[1,"pulse-container"],["class","header-fixed-top",4,"ngIf"],[4,"ngIf"],[1,"header-fixed-top"],[1,"pulse-form-field","row"],[1,"pulse-select"],[3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(S,p){1&S&&t.\u0275\u0275template(0,E,4,3,"div",0),2&S&&t.\u0275\u0275property("ngIf",p.userService.roles&&p.userService.roles.indexOf("candotranslation")>-1)},styles:[".pulse-form-field[_ngcontent-%COMP%]{width:auto}.pulse-form-field[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{margin:3px 8px 0 0}.pulse-form-field[_ngcontent-%COMP%] > .pulse-select[_ngcontent-%COMP%]{width:200px}"]}),v})()},95346:(Se,pe,r)=>{"use strict";r.d(pe,{F:()=>u});var t=r(5e3),e=r(96995),a=r(69808),s=r(22324);function o(g,x){if(1&g&&(t.\u0275\u0275elementStart(0,"div",8)(1,"div",9),t.\u0275\u0275text(2),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",9),t.\u0275\u0275text(4),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"div",9),t.\u0275\u0275text(6),t.\u0275\u0275elementEnd()()),2&g){const i=x.$implicit;t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate(i.column),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate(i.error),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",i.location," ")}}function d(g,x){if(1&g&&(t.\u0275\u0275elementStart(0,"pulse-dialog",1)(1,"div",2),t.\u0275\u0275text(2,"Overall Result"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",3),t.\u0275\u0275text(4," Please find the error message below. Correct them and try to upload again. "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"div",4)(6,"div",5)(7,"div"),t.\u0275\u0275text(8,"Column"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(9,"div"),t.\u0275\u0275text(10,"Error"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(11,"div")(12,"span"),t.\u0275\u0275text(13,"Row Nr."),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(14,"div",6),t.\u0275\u0275template(15,o,7,3,"div",7),t.\u0275\u0275elementEnd()()()),2&g){const i=t.\u0275\u0275nextContext();t.\u0275\u0275property("closeIcon",!1),t.\u0275\u0275advance(15),t.\u0275\u0275property("ngForOf",i.data)}}let u=(()=>{class g{constructor(i){this.service=i}ngOnInit(){}ngOnDestroy(){}}return g.\u0275fac=function(i){return new(i||g)(t.\u0275\u0275directiveInject(e.o))},g.\u0275cmp=t.\u0275\u0275defineComponent({type:g,selectors:[["pulse-validator-log"]],decls:1,vars:1,consts:[[3,"closeIcon",4,"ngIf"],[3,"closeIcon"],[1,"log-title"],[1,"subtitle"],[1,"activity-table"],[1,"activity-header"],[1,"activity-body"],["class","activity-rows",4,"ngFor","ngForOf"],[1,"activity-rows"],[1,"activity-columns"]],template:function(i,m){1&i&&t.\u0275\u0275template(0,d,16,2,"pulse-dialog",0),2&i&&t.\u0275\u0275property("ngIf",m.data&&m.data.length>0)},directives:[a.O5,s.a,a.sg],styles:[".log-title[_ngcontent-%COMP%]{text-align:center;color:#00646e;font-size:24px;font-weight:500}.subtitle[_ngcontent-%COMP%]{text-align:center;color:#ea5a65;font-size:18px;font-weight:500}.activity-table[_ngcontent-%COMP%]{margin:15px 15px 20px}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%]{display:flex;height:40px;text-align:left;background-color:#6199ab;color:#fff;font-weight:500}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){width:25%}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){width:40%;display:flex}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{border-top:0;vertical-align:bottom;padding:8px;line-height:1.42857143;text-align:left}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){width:100%;display:inline-block}.activity-table[_ngcontent-%COMP%] .activity-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){display:inline-block;min-width:200px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%]{border-bottom:1px solid #9bafbe}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .category[_ngcontent-%COMP%]{height:40px;text-align:left;padding:8px;background-color:#6199ab;color:#fff;font-weight:500}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%]{min-height:40px;padding:5px 0;border-left:1px solid #9bafbe;border-right:1px solid #9bafbe;display:flex;text-align:left}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%]:nth-child(1){width:25%}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%]:nth-child(2){width:40%;display:flex;text-align:left}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%]{padding:8px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%] .user[_ngcontent-%COMP%]{color:#005f87}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%] .log-report[_ngcontent-%COMP%]{padding-left:5px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%] .log-report[_ngcontent-%COMP%] .icon-e-mail[_ngcontent-%COMP%]{position:relative;bottom:-3px;padding-right:5px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){width:100%;display:inline-block}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){display:inline-block;min-width:200px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2) .icon-file2[_ngcontent-%COMP%]:before{position:relative;top:3px;margin-right:5px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2) .download-excel[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2) .Buttons[_ngcontent-%COMP%]{display:flex;justify-content:center}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%] .activity-columns[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2) .Buttons[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%]{width:190px;height:32px;margin-bottom:5px}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%]:nth-child(odd){background-color:#fff}.activity-table[_ngcontent-%COMP%] .activity-body[_ngcontent-%COMP%] .activity-rows[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafa}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;max-width:100%;border-collapse:collapse}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(1){width:30%}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2){width:55%}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(3){width:15%;min-width:200px}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:0;vertical-align:bottom;border-bottom:1px solid #9bafbe;padding:8px;line-height:1.42857143;text-align:left;font-weight:500}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{border:1px solid #9bafbe}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#fff}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafa}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], .activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr.category[_ngcontent-%COMP%]{height:40px}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #cdd9e1;text-align:left;white-space:nowrap}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .icon-file2[_ngcontent-%COMP%]:before{position:relative;top:3px;margin-right:5px}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .download-excel[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .Buttons[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%]{width:250px;height:32px;margin-bottom:5px}.activity-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] div[_ngcontent-%COMP%] a.user[_ngcontent-%COMP%]{color:#005f87} #pulse-model-container{min-width:900px!important}"]}),g})()},96995:(Se,pe,r)=>{"use strict";r.d(pe,{o:()=>g});var t=r(5e3),e=r(62474),a=r(9133),s=r(22290),o=r(11735),d=r(54620),u=r(98613);let g=(()=>{class x{constructor(m,E,C,v,h,S){this.webApi=m,this.variables=E,this.toasty=C,this.router=v,this.projectService=h,this.userService=S,this.canAccessValidator=!1,this.canManageValidator=!1,this.isList=!0,this.searchKeys=["id","name"],this.selectedIndex=-1,this.cloneIndex=-1,this.projectService.projectObserv.subscribe(p=>{this.projectId=p.id})}getRules(){return new Promise((m,E)=>{this.webApi.get(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/templates").then(C=>{m(C)})})}test(){return new Promise((m,E)=>{this.webApi.get(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/rules").then(C=>{m(C)},C=>{E(C)})})}getPresignedUrl(m,E,C,v){return v?(this.toasty.show("You have requested to download the template Excel, it will start in a few seconds."),C="upload-management"):this.toasty.show("You have requested to download the validated file, it will start in a few seconds."),new Promise((h,S)=>{this.webApi.get(this.variables.apiUrl+"/api/Communicator/directory/getpresignfile?fileName="+m+"&directory="+E+"&bucket="+C).then(p=>{p.errorMessage||h(p.model)},p=>{S(p)})})}validateFile(m,E){return this.toasty.show("Start validation."),new Promise((C,v)=>{const h=new FormData;h.append("iFile",m,m.name),this.webApi.post(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/rule/"+E+"/validatenew",h).then(S=>{S&&S.errorMessage?this.toasty.warning("Validation has failed."):(C(S),JSON.parse(S.Config).log.Validated?this.toasty.success("Validation succeeded."):this.toasty.error("Validation failed. Please check the result in the table."))},S=>{this.toasty.warning("Validation has failed."),v(S)})})}deleteFile(m,E,C,v){return v&&this.toasty.show("You have requested to delete the validated file."),new Promise((h,S)=>{this.webApi.get(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/resourcenew/"+C+"/path/"+E+"/delete?fileName="+m).then(p=>{v&&this.toasty.info("File has been successfully deleted."),h(p)},p=>{console.log("error",p),v&&this.toasty.warning("Deleting file has failed."),S(p)})})}deleteFileConfig(m,E){return this.toasty.show("You have requested to delete the file."),new Promise((C,v)=>{this.webApi.delete(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/template/"+m+"/delete?globalObjectId="+E).then(h=>{h&&h.error?this.toasty.warning("Deleting file has failed."):(this.toasty.info("File has been successfully deleted."),C(h))},h=>{console.log("error",h),this.toasty.warning("Deleting file has failed."),v(h)})})}addFileConfig(m){const E=[];for(let v=0;v{this.webApi.post(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/template/new",C).then(S=>{S&&S.error?this.toasty.warning(S.error):(this.toasty.info("File has been successfully created."),v(S))},S=>{this.toasty.info("File has been successfully created."),h(S)})})}updateFileConfig(m){const E=[];for(let h=0;h0&&(p.Id=S.Id),E.push(p)}const C={config:{Name:m.Config.config.Name,SortOrder:this.validatorItem.length+1,TargetBucketName:m.Config.config.TargetBucketName?m.Config.config.TargetBucketName:"",TargetFileS3Location:m.Config.config.TargetFileS3Location?m.Config.config.TargetFileS3Location:"",OriginalFileS3Location:"",GlobalObjectId:m.GlobalObjectId,Wizzard:m.Config.config.Wizzard?m.Config.config.Wizzard:"false"},ruleSet:E},v=m.Id;return new Promise((h,S)=>{this.webApi.post(this.variables.apiUrl+"/api/Communicator/project/"+this.projectId+"/template/"+v,C).then(p=>{p&&p.error?this.toasty.warning(p.error):(this.toasty.info("File has been successfully updated."),h(p))},p=>{this.toasty.info("File has been successfully updated."),S(p)})})}APIResponseControl(m){let E=403,C="You are not authorized to view this page";switch(m){case"access":E=403,C="You are not authorized to view this page";break;case"server":E=500,C="Pulse has currently a downtime and we are working on the issues, will try to fix it as soon as possible."}this.router.navigate(["error",E],{queryParams:{msg:C}})}}return x.\u0275fac=function(m){return new(m||x)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.a),t.\u0275\u0275inject(s._W),t.\u0275\u0275inject(o.F0),t.\u0275\u0275inject(d.k),t.\u0275\u0275inject(u.K))},x.\u0275prov=t.\u0275\u0275defineInjectable({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},27766:(Se,pe,r)=>{"use strict";r.d(pe,{A:()=>i});var t=r(591),e=r(46809),a=r(77051),s=r(5e3),o=r(36885),d=r(62127),u=r(61035),g=r(11735),x=r(4371);class i{constructor(E,C,v,h,S){this.tableService=E,this.frtGlobalService=C,this.awsSignatureService=v,this.router=h,this.navigationservice=S,this._config={submenu:["user","notification-center","bookmark","language","contact"],useGroups:!0},this.tableObserv=new t.X(null),this.exportAction={icon:"icon-download2",order:2,callback:()=>{this.frtGlobalService.bookletexportDialog()},label:"Export Table"},this.prefix=`/${i.GetBase()}/`,this.projectId=i.GetConfig("projectId"),this.tableService.table.subscribe(p=>{this.setTable(p)}),v.bucketName="9jzn9jf4fc",v.awsService="execute-api",v.awsRegion="eu-west-1"}set configGroup(E){this._config.useGroups=E,this._config=JSON.parse(JSON.stringify(this._config))}get config(){return JSON.parse(JSON.stringify(this._config))}static GetConfig(...E){switch(this.GetBase()){case this.GfbMoBase:return e.Z.GetDeep(this.GfbMoConfig,...E);case this.GfbSeBase:return e.Z.GetDeep(this.GfbSeConfig,...E);default:return e.Z.GetDeep(this.GfbConfig,...E)}}static GetBase(){switch(e.Z.GetBase()){case this.GfbMoBase:return this.GfbMoBase;case this.GfbSeBase:return this.GfbSeBase;default:return this.GfbBase}}hasCompFootnote(){const E=this.frtGlobalService.getCurrent();if(E){const C=E.viewColumns.value;if(C)for(let v=0;vp.id===h);if(S&&S.label.toLowerCase().indexOf("comp")>-1)return!0}}return!1}setTable(E){this.table=E,this.tableObserv.next(E)}exportTable(E){return new Promise((C,v)=>{this.awsSignatureService.Post(JSON.stringify({table:E}),"/dev/gfb/table/download").subscribe(S=>{S&&S.data&&C(S.data)},S=>{v(S)})})}firstRouteChildSelectable(E){if(E.snapshot.routeConfig.children&&this.router.url.endsWith(E.snapshot.routeConfig.path)){this.setGlobalObjectsFromConfig(E.snapshot.routeConfig.children);for(let C=0;C{C.children&&C.children.length>0&&(C.children=this.setGlobalObjectsFromConfig(C.children)),C.data&&C.data.config&&(C.data.gos=[i.GetConfig(...C.data.config)])}),E}getTables(E,C){this.frtId=E,this.tableService.getTables(C)}}i.GfbBase="repint",i.GfbMoBase="gfb-mo",i.GfbSeBase="gfb-se",i.GfbSeConfig={projectId:5606,landingPageItems:[{title:"Overview",icon:"icon-tile-view",link:"/overview/cockpit"},{title:"Analytic",icon:"icon-table-large",link:"/overview/analytic"}],OVERVIEW:{analytic:{frtId:3697,tableId:2534,filterGroupId:1373}},Cockpit:{tableId:2534,filterGroupId:1374,charts:[3753,3745,3751,3755,3748,3750,3754,3746,3752,3756,3747,3749]}},i.GfbMoConfig={projectId:5511,landingPageItems:[{title:"Overview",icon:"icon-tile-view",link:"/overview/cockpit",role:"canSeeCFR"},{title:"Analytic",icon:"icon-table-large",link:"/overview/analytic",role:"canSeeCFR"}],OVERVIEW:{analytic:{frtId:2321,tableId:2351,filterGroupId:311}},Cockpit:{tableId:2351,filterGroupId:310,charts:[2353,2345,2351,2355,2348,2350,2354,2346,2352,2356,2347,2349]}},i.GfbConfig={projectId:5184,landingPageItems:[{title:"Overview",icon:"icon-tile-view",link:"/overview/cockpit",role:"canSeeCFR"},{title:"Analytic
(incl. PY V810)",icon:"icon-table-large",link:"/overview/analytic",role:"canSeeCFR"},{title:"RTP 2.0",icon:"icon-bank",link:"/rtp",role:"canSeeRtpTab"},{title:"Savings",icon:"icon-icon_savings",link:"/savings/overview",role:"canSeeCFR"},{title:"Management Kit",icon:"icon-newton_product-catalogue",link:"/managementkit/benchmarking",role:"canSeeCFR"},{title:"Contract Management App",icon:"icon-press-release",link:"/cmapp",linkBase:"root",role:"canSeeCmapp"},{title:"Financial Statement Analytic",icon:"icon-table-large",link:"/vthree",role:"canSeeV3Overview"}],chart:{colors:["#00646E","#41AAAA","#32838b","#a5e1e1","#CDD9E1"]},Cockpit:{tableId:48,filterGroupId:11,charts:[494,452,485,496,458,484,495,454,486,497,456,483]},PLAN20:{},PLAN21:{gbs:{frtId:3793,tableId:2570,filterGroupId:1394,uploadId:291},"report-gbs":{frtId:3806,tableId:2585,filterGroupId:1396,customExportConfig:{exportId:3806,label:"Esprit Export"}}},PLAN22:{gbs:{frtId:3964,tableId:2653,filterGroupId:1419},"report-gbs":{frtId:3965,tableId:2651,filterGroupId:1420,customExportConfig:{exportId:3965,label:"Esprit Export"}}},Analytic:{frtId:482,tableId:48,filterGroupId:12},FRT:{analytic:{frtId:482,tableId:48,filterGroupId:12},"reload-analytic":{frtId:4352,tableId:2754,filterGroupId:1457}},"V8-CHARTS":{goId:482},GrossCosts:{filterGroupId:14,chartId:[459,460,463,464,502]},Charges:{filterGroupId:15,chartId:[473,475,476,477,472]},NetCosts:{filterGroupId:17,chartId:[478,479,480,481,501,500,499]},Headcount:{filterGroupId:18,chartId:[466,467,470,503,462]},V850:{frtId:2015,tableId:1400,filterGroupId:61},ManagementKit:{Benchmarking:{tableId:48,filterGroupId:12,goId:[2565]},OverviewTable:{tableId:48,filterGroupId:12,goId:[3721]},KPI:{tableId:48,filterGroupId:12,goId:[2566]},WorldMap:{tableId:48,filterGroupId:12,goId:[2567]},Benchmark:{tableId:48,filterGroupId:12,goId:[2568]},CHCMReporting:{tableId:[2572,2768],filterGroupIds:[1391,1463],chartId:[3657,3658,3659,3660,3661,3664,3665,3666,3667,3668,3779]}},RTPIntern:{frtId:498,tableId:49,filterGroupId:22},RTPExtern:{frtId:654,tableId:163,filterGroupId:24},Saving:{frtId:773,tableId:194,filterGroupId:27,chartId:[775,776,777,786],Treemap:{chartId:[793]},EfficiencyTarget:{frtId:3616,tableId:2518,filterGroupId:1355,chartId:[3463,3464,3465,3466,3467,3468,3469]}},Vthree:{frtId:3798,tableId:2573,filterGroupId:1395,"dash-fc-accuracy-executive":{goId:5667,tableId:2573,filterGroupId:null},"dash-fc-accuracy-controller":{goId:5668,tableId:2573,filterGroupId:null},"dash-fc-accuracy-accounts":{goId:5670,tableId:2573,filterGroupId:null},"dash-fc-accuracy-mtd":{goId:5671,tableId:2573,filterGroupId:null},"dash-ra-revenue-analysis":{goId:6042,tableId:2573,filterGroupId:null},"dash-ra-customer-revenue-analysis-cr":{goId:6100,tableId:2573,filterGroupId:null},Analytic:{frtId:4392,tableId:2555,filterGroupId:1385},"ba-analytic":{frtId:4124,tableId:2709,filterGroupId:1435},Saving:{frtId:3867,tableId:2614,filterGroupId:1410,chartId:[3868,3869,3870,3871],Treemap:{chartId:[3872]},EfficiencyTarget:{frtId:3882,tableId:2615,filterGroupId:1411,chartId:[3877,3876,3875,3878,3879,3880,3881,3931,3930,3929,3932,3933,3934,3935]}}},PLANNING:{"fy24-input-scm":{frtId:3962,tableId:2660,filterGroupId:1417,uploadId:477},"fy24-report-scm":{frtId:3963,tableId:2649,filterGroupId:1418},"fy23-report-scm":{frtId:6107,tableId:3978,filterGroupId:1526}},"FSR-PLANNING":{"fy24-bdg-input-gbs":{frtId:6099,tableId:3974,filterGroupId:1524,uploadId:473,filterConfig:{selectFilterBeforeTableLoads:!0,message:"Please select a Filter to display the results"},customExportConfig:{exportId:6099,label:"Esprit Export"}},"fy24-bdg-report-gbs":{frtId:6111,tableId:3980,filterGroupId:1528},"fy23-bdg-input-gbs":{frtId:5655,tableId:3836,filterGroupId:1495,uploadId:422},"fy23-bdg-report-gbs":{frtId:5871,tableId:3839,filterGroupId:1497,chartIds:[5872,5876,5873,5875,5877,5878,5874],chartConfig:{5872:{label:"Revenue",excludeScale:!1,cached:!1},5873:{label:"Cost of Sales",excludeScale:!1,cached:!1},5874:{label:"Headcount",excludeScale:!1,cached:!1},5875:{label:"Gross Profit Margin %",excludeScale:!1,cached:!1},5876:{label:"Revenue Margin %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},5877:{label:"Profit Margin %",excludeScale:!1,cached:!1},5878:{label:"Productivity %",excludeScale:!1,cached:!1}},lcChartId:[5879,5880],viewType:a.X.CLASSICCMAPP,customExportConfig:{exportId:5871,label:"Esprit Export"}},"fy22-fc-input-gbs":{frtId:5505,tableId:3797,filterGroupId:1474,uploadId:387,customExportConfig:{exportId:5505,label:"Esprit Export"}},"fy23-fc-input-gbs":{frtId:6038,tableId:3947,filterGroupId:1514,uploadId:464,filterConfig:{selectFilterBeforeTableLoads:!0,message:"Please select a Region and Depthstructure to display the results"},customExportConfig:{exportId:6038,label:"Esprit Export"}},"fy23-fc-live-view-gbs":{frtId:6039,tableId:3948,filterGroupId:1515},"fy22-fc-report-gbs":{frtId:5557,tableId:3811,filterGroupId:1487},"billing-backlog":{goId:6063,tableId:3964,filterGroupId:1525}},FY21:{"report-scm":{frtId:3379,tableId:2466,filterGroupId:1318},"report-se":{frtId:3380,tableId:2467,filterGroupId:1316},"report-gbs":{frtId:3378,tableId:2465,filterGroupId:1317,customExportConfig:{exportId:3378,label:"Esprit Export"}},"customer-report-gbs":{frtId:3573,tableId:2509,filterGroupId:1348},"bridge-report-gbs":{frtId:3542,tableId:2502,filterGroupId:1340,chartIds:[3533,3534,3535,3536,3537,3538,3539],chartLabels:["Revenue","Gross Cost","EBITA","Margin (%)","Headcount","Efficiency (%)","Efficiency (abs.)"],lcChartId:[3567,3566],viewType:a.X.CLASSICCMAPP},"input-gbs":{frtId:2507,tableId:2456,filterGroupId:339},"input-scm":{frtId:2508,tableId:2457,filterGroupId:340},"input-se":{frtId:2509,tableId:2458,filterGroupId:341},"fy22-bdg-input-gbs":{frtId:3964,tableId:2653,filterGroupId:1419,uploadId:323},"fy22-bdg-report-gbs":{frtId:3965,tableId:2651,filterGroupId:1420,chartIds:[4024,4025,4026,4027,4028,4029,4030],chartConfig:{4024:{label:"Revenue",excludeScale:!1,cached:!1},4025:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4026:{label:"Headcount",excludeScale:!1,cached:!1},4027:{label:"Operational Margin %",excludeScale:!1,cached:!1},4028:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4029:{label:"Unfunded invest",excludeScale:!1,cached:!1},4030:{label:"Total transformation costs",excludeScale:!1,cached:!1}},lcChartId:[4031,4032],viewType:a.X.CLASSICCMAPP,customExportConfig:{exportId:3965,label:"Esprit Export"}},"fy22-bdg-customerreport-gbs":{frtId:4099,tableId:2693,filterGroupId:1434},"fy21-fc-input-gbs":{frtId:3793,tableId:2570,filterGroupId:1394,uploadId:291},"fy21-fc-report-gbs":{frtId:3806,tableId:2585,filterGroupId:1396,customExportConfig:{exportId:3806,label:"Esprit Export"}}},FY20:{"input-sop-scm":{frtId:1189,tableId:1262,filterGroupId:37},"input-scm-opco":{frtId:1192,tableId:1268,filterGroupId:38},"world-report-gbs":{tableId:1370,frtId:1450,filterGroupId:54},"custumer-report-gbs":{tableId:1391,frtId:1978,filterGroupId:60},"are-report-gbs":{tableId:1271,frtId:1196,filterGroupId:40},"business-line-report-gbs":{tableId:1272,frtId:1197,filterGroupId:41},"service-line-report-gbs":{tableId:1273,frtId:1198,filterGroupId:42},"are-report-sop-scm":{tableId:1283,frtId:1199,filterGroupId:47},"gcc-report-sop-scm":{tableId:1284,frtId:1200,filterGroupId:48},"world-report-sop-scm":{tableId:1376,frtId:1451,filterGroupId:56},"opco-report-scm-opco":{tableId:1285,frtId:1201,filterGroupId:49},"bu-report-scm-opco":{tableId:1286,frtId:1202,filterGroupId:50},"world-report-scm-opco":{tableId:1377,frtId:1452,filterGroupId:57}},"FSR-FRT":{analytic:{frtId:3798,tableId:2573,filterGroupId:1395},"analytic-core":{frtId:5533,tableId:2573,filterGroupId:1480},reporting:{frtId:3760,tableId:2555,filterGroupId:1385},"ba-analytic":{frtId:4124,tableId:2709,filterGroupId:1435},"customer-report":{frtId:5601,tableId:3825,filterGroupId:1493}},"FY23-BDG-REVENUE-BRIDGES":{infoMsg:"Please select an ARE and Business Line to display the results","bridge-regional":{goId:5913,tableId:3871,filterGroupId:1503,uploadId:435},"bridge-bu":{infoMsg:"Please select a Business Line and a Receiver to display the results",goId:5914,tableId:3872,filterGroupId:1504,uploadId:436},"bridge-gbs":{infoMsg:"Please select a Receiver to display the results",goId:5915,tableId:3873,filterGroupId:1505,uploadId:437},"bridge-customer":{infoMsg:"Please select a Receiver to display the results",goId:5916,tableId:3874,filterGroupId:1506,uploadId:438}},"FY22-REGIONAL-BRIDGES":{infoMsg:"Please select an ARE and Business Line to display the results","bridge-revenue":{goId:3996,frtId:3965,tableId:2682,filterGroupId:1427,uploadId:333,chartIds:[4058,4059,4060,4061,4062,4063,4064],chartConfig:{4058:{label:"Revenue",excludeScale:!1,cached:!1},4059:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4060:{label:"Headcount",excludeScale:!1,cached:!1},4061:{label:"Operational Margin %",excludeScale:!1,cached:!1},4062:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4063:{label:"Unfunded invest",excludeScale:!1,cached:!1},4064:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-ebita":{goId:3997,tableId:2685,filterGroupId:1428,uploadId:338,chartIds:[4083,4084,4085,4086,4087,4088,4089],chartConfig:{4083:{label:"Revenue",excludeScale:!1,cached:!1},4084:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4085:{label:"Headcount",excludeScale:!1,cached:!1},4086:{label:"Operational Margin %",excludeScale:!1,cached:!1},4087:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4088:{label:"Unfunded invest",excludeScale:!1,cached:!1},4089:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-headcount":{goId:3998,tableId:2686,filterGroupId:1429,uploadId:343,scale:"Integer",chartIds:[4090,4091,4092,4093,4094,4095,4096],chartConfig:{4090:{label:"Revenue",excludeScale:!1,cached:!1},4091:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4092:{label:"Headcount",excludeScale:!1,cached:!1},4093:{label:"Operational Margin %",excludeScale:!1,cached:!1},4094:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4095:{label:"Unfunded invest",excludeScale:!1,cached:!1},4096:{label:"Total transformation costs",excludeScale:!1,cached:!1}}}},"FY22-SL-BRIDGES":{infoMsg:"Please select a Service Line to display the results","bridge-revenue":{goId:4125,frtId:3965,tableId:2710,filterGroupId:1436,uploadId:334,chartIds:[4144,4145,4146,4147,4148,4149,4150],chartConfig:{4144:{label:"Revenue",excludeScale:!1,cached:!1},4145:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4146:{label:"Headcount",excludeScale:!1,cached:!1},4147:{label:"Operational Margin %",excludeScale:!1,cached:!1},4148:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4149:{label:"Unfunded invest",excludeScale:!1,cached:!1},4150:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-ebita":{goId:4126,tableId:2711,filterGroupId:1437,uploadId:339,chartIds:[4151,4152,4153,4154,4155,4156,4157],chartConfig:{4151:{label:"Revenue",excludeScale:!1,cached:!1},4152:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4153:{label:"Headcount",excludeScale:!1,cached:!1},4154:{label:"Operational Margin %",excludeScale:!1,cached:!1},4155:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4156:{label:"Unfunded invest",excludeScale:!1,cached:!1},4157:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-headcount":{goId:4128,tableId:2712,filterGroupId:1438,uploadId:344,scale:"Integer",chartIds:[4158,4159,4160,4161,4162,4163,4164],chartConfig:{4158:{label:"Revenue",excludeScale:!1,cached:!1},4159:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4160:{label:"Headcount",excludeScale:!1,cached:!1},4161:{label:"Operational Margin %",excludeScale:!1,cached:!1},4162:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4163:{label:"Unfunded invest",excludeScale:!1,cached:!1},4164:{label:"Total transformation costs",excludeScale:!1,cached:!1}}}},"FY22-BL-BRIDGES":{infoMsg:"Please select a Business Line to display the results","bridge-revenue":{goId:4138,tableId:2721,filterGroupId:1439,uploadId:335,chartIds:[4165,4166,4167,4168,4169,4170,4171],chartConfig:{4165:{label:"Revenue",excludeScale:!1,cached:!1},4166:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4167:{label:"Headcount",excludeScale:!1,cached:!1},4168:{label:"Operational Margin %",excludeScale:!1,cached:!1},4169:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4170:{label:"Unfunded invest",excludeScale:!1,cached:!1},4171:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-ebita":{goId:4139,tableId:2722,filterGroupId:1440,uploadId:340,chartIds:[4172,4173,4174,4175,4176,4177,4178],chartConfig:{4172:{label:"Revenue",excludeScale:!1,cached:!1},4173:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4174:{label:"Headcount",excludeScale:!1,cached:!1},4175:{label:"Operational Margin %",excludeScale:!1,cached:!1},4176:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4177:{label:"Unfunded invest",excludeScale:!1,cached:!1},4178:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-headcount":{goId:4140,tableId:2723,filterGroupId:1441,uploadId:345,scale:"Integer",chartIds:[4179,4180,4181,4182,4183,4184,4185],chartConfig:{4179:{label:"Revenue",excludeScale:!1,cached:!1},4180:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4181:{label:"Headcount",excludeScale:!1,cached:!1},4182:{label:"Operational Margin %",excludeScale:!1,cached:!1},4183:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4184:{label:"Unfunded invest",excludeScale:!1,cached:!1},4185:{label:"Total transformation costs",excludeScale:!1,cached:!1}}}},"FY22-GBS-BRIDGES":{"bridge-revenue":{goId:4212,tableId:2732,uploadId:336,chartIds:[4215,4216,4217,4218,4219,4220,4221],chartConfig:{4215:{label:"Revenue",excludeScale:!1,cached:!1},4216:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4217:{label:"Headcount",excludeScale:!1,cached:!1},4218:{label:"Operational Margin %",excludeScale:!1,cached:!1},4219:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4220:{label:"Unfunded invest",excludeScale:!1,cached:!1},4221:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-ebita":{goId:4213,tableId:2733,uploadId:341,chartIds:[4222,4223,4224,4225,4226,4227,4228],chartConfig:{4222:{label:"Revenue",excludeScale:!1,cached:!1},4223:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4224:{label:"Headcount",excludeScale:!1,cached:!1},4225:{label:"Operational Margin %",excludeScale:!1,cached:!1},4226:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4227:{label:"Unfunded invest",excludeScale:!1,cached:!1},4228:{label:"Total transformation costs",excludeScale:!1,cached:!1}}},"bridge-headcount":{goId:4214,tableId:2734,uploadId:346,scale:"Integer",chartIds:[4229,4230,4231,4232,4233,4234,4235],chartConfig:{4229:{label:"Revenue",excludeScale:!1,cached:!1},4230:{label:"Adj. EBITA",excludeScale:!1,cached:!1},4231:{label:"Headcount",excludeScale:!1,cached:!1},4232:{label:"Operational Margin %",excludeScale:!1,cached:!1},4233:{label:"Efficiency total %",excludeScale:!0,cached:!1,labelFontSizes:{min:16,max:46}},4234:{label:"Unfunded invest",excludeScale:!1,cached:!1},4235:{label:"Total transformation costs",excludeScale:!1,cached:!1}}}},"FY23-FUNCTIONS-BRIDGES":{infoMsg:"Please select a Function to display the results","bridge-presentation":{goId:5568},"bridge-grosscost":{goId:5568,tableId:3815,filterGroupId:1488,uploadId:399,chartIds:[5584,5587,5586,6067],chartConfig:{5584:{label:"Gross Cost",excludeScale:!1,cached:!1},5587:{label:"Net Costs",excludeScale:!1,cached:!1},5586:{label:"FC change",excludeScale:!1,cached:!1},6067:{label:"Run Rate deviation",excludeScale:!1,cached:!1}}},"bridge-headcount":{infoMsg:"Please select a Function to display the results",goId:5569,tableId:3816,filterGroupId:1489,uploadId:398,scale:"Integer",chartIds:[5591,6112,5589,5592],chartConfig:{5591:{label:"Headcount",excludeScale:!0,cached:!1},6112:{label:"Headcount",excludeScale:!0,cached:!1},5589:{label:"FC change",excludeScale:!0,cached:!1},5592:{label:"Actual vs. FC deviation",excludeScale:!0,cached:!1}}},"bridge-netcost":{infoMsg:"Please select a Function to display the results",goId:5570,tableId:3817,filterGroupId:1490,uploadId:400,chartIds:[5594,5597,5596,6068],chartConfig:{5594:{label:"Gross Cost",excludeScale:!1,cached:!1},5597:{label:"Net Costs",excludeScale:!1,cached:!1},5596:{label:"FC change",excludeScale:!1,cached:!1},6068:{label:"Run Rate deviation",excludeScale:!1,cached:!1}}}},"FY23-GLOBAL-BRIDGES":{"bridge-grosscost":{goId:5571,tableId:3818,uploadId:402,chartIds:[5622,5624,5623,6069],chartConfig:{5622:{label:"Gross Costs",cached:!1},5624:{label:"Net Costs",cached:!1},5623:{label:"FC change",cached:!1},6069:{label:"Run Rate deviation",cached:!1}}},"bridge-headcount":{goId:5572,tableId:3819,uploadId:401,scale:"Integer",chartIds:[5628,5629,5627],chartConfig:{5628:{label:"Headcount",excludeScale:!0,cached:!1},5629:{label:"FC change",cached:!1},5627:{label:"Actual vs. FC deviation",cached:!1}}},"bridge-netcost":{goId:5573,tableId:3820,uploadId:403,chartIds:[5632,5634,5633,6070],chartConfig:{5632:{label:"Gross Costs",cached:!1},5634:{label:"Net Costs",cached:!1},5633:{label:"FC change",cached:!1},6070:{label:"Run Rate deviation",cached:!1}}}},"FY23-FC-RELOAD":{"fy23-fc-input-reload":{frtId:5652,tableId:3841,filterGroupId:1496,uploadId:428,customExportConfig:{exportId:5652,label:"Esprit Export"},filterConfig:{selectFilterBeforeTableLoads:!0,message:"Please select a Filter to display the results"}}},"FY23-RELOAD":{"fy23-input-reload":{frtId:6033,tableId:3944,filterGroupId:1512,uploadId:463}},"FY24-RELOAD":{"fy24-input-reload":{frtId:6076,tableId:3970,filterGroupId:1522,uploadId:472,customExportConfig:{exportId:6076,label:"Esprit Export"},filterConfig:{selectFilterBeforeTableLoads:!0,message:"Please select a Filter to display the results"}}}},i.\u0275fac=function(E){return new(E||i)(s.\u0275\u0275inject(o._),s.\u0275\u0275inject(d.I),s.\u0275\u0275inject(u.X),s.\u0275\u0275inject(g.F0),s.\u0275\u0275inject(x.R))},i.\u0275prov=s.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac})},5403:(Se,pe,r)=>{"use strict";r.d(pe,{X:()=>o});var t=r(5e3),e=r(22324),a=r(77093),s=r(87436);let o=(()=>{class d{constructor(){}ngOnInit(){}triggerCallback(){this.callback.next(!0)}}return d.\u0275fac=function(g){return new(g||d)},d.\u0275cmp=t.\u0275\u0275defineComponent({type:d,selectors:[["pulse-prm-dialog"]],inputs:{dialogTitle:"dialogTitle",dialogText:"dialogText",callback:"callback"},decls:15,vars:8,consts:[["dialog",""],[3,"innerHTML"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],["fxFlex","25%",1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"]],template:function(g,x){if(1&g){const i=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3"),t.\u0275\u0275text(3),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(4,"div",1),t.\u0275\u0275elementStart(5,"div",2)(6,"div",3)(7,"button",4),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(i),t.\u0275\u0275reference(1).close()}),t.\u0275\u0275element(8,"i",5),t.\u0275\u0275text(9),t.\u0275\u0275pipe(10,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(11,"button",6),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(i);const E=t.\u0275\u0275reference(1);return x.triggerCallback(),E.close()}),t.\u0275\u0275element(12,"i",7),t.\u0275\u0275text(13),t.\u0275\u0275pipe(14,"translate"),t.\u0275\u0275elementEnd()()()()}2&g&&(t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",x.dialogTitle," "),t.\u0275\u0275advance(1),t.\u0275\u0275property("innerHTML",x.dialogText,t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(10,4,"PRM.DISCLAIMER.NO"),""),t.\u0275\u0275advance(4),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(14,6,"PRM.DISCLAIMER.YES"),""))},directives:[e.a,a.xw,a.Wh,a.SQ,a.yH],pipes:[s.k],styles:[""]}),d})()},62188:(Se,pe,r)=>{"use strict";r.d(pe,{p:()=>t});const t={"00":"01","04":"02","06":"03","07":"04","08":"05",10:"06",12:"07",15:"08",16:"09",18:"10",22:"11",24:"12",25:"13",29:"14"}},90303:(Se,pe,r)=>{"use strict";r.d(pe,{J:()=>le});var t=r(591),e=r(8929),a=r(61737),s=r(21086),o=r(27221),d=r(5403),u=r(5e3),g=r(75531),x=r(22324),i=r(77093),m=r(87436);let E=(()=>{class de{constructor(te){this.langService=te}ngOnInit(){}}return de.\u0275fac=function(te){return new(te||de)(u.\u0275\u0275directiveInject(g.T))},de.\u0275cmp=u.\u0275\u0275defineComponent({type:de,selectors:[["pulse-prm-disclaimer-error"]],inputs:{body:"body"},decls:13,vars:7,consts:[["dialog",""],[1,"container-fluid"],[3,"innerHTML"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"]],template:function(te,ce){if(1&te){const oe=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),u.\u0275\u0275text(4),u.\u0275\u0275pipe(5,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275element(6,"div",2),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(7,"div",3)(8,"div",4)(9,"button",5),u.\u0275\u0275listener("click",function(){return u.\u0275\u0275restoreView(oe),u.\u0275\u0275reference(1).close()}),u.\u0275\u0275element(10,"i",6),u.\u0275\u0275text(11),u.\u0275\u0275pipe(12,"translate"),u.\u0275\u0275elementEnd()()()()}2&te&&(u.\u0275\u0275advance(4),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(5,3,"PRM.DISCLAIMERERROR.TITLE")," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("innerHTML",ce.langService.translateHTML(ce.body),u.\u0275\u0275sanitizeHtml),u.\u0275\u0275advance(5),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(12,5,"PRM.DISCLAIMER.OK"),""))},directives:[x.a,i.xw,i.Wh,i.SQ,i.yH],pipes:[m.k],styles:[""]}),de})();var C=r(15439),v=r.n(C),h=r(69808),S=r(93075),p=r(45622),L=r(85083);function N(de,fe){if(1&de&&(u.\u0275\u0275elementStart(0,"div")(1,"h3"),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275element(4,"div",9),u.\u0275\u0275elementEnd()),2&de){const te=u.\u0275\u0275nextContext();u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,2,te.title1)," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("innerHTML",te.langService.translateHTML(te.body1),u.\u0275\u0275sanitizeHtml)}}function j(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"div",10)(1,"label",11),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(4,"pulse-datepicker",22),u.\u0275\u0275listener("ngModelChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(2).timeRange=oe}),u.\u0275\u0275elementEnd()()}if(2&de){const te=u.\u0275\u0275nextContext(2);u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate(u.\u0275\u0275pipeBind1(3,4,"PRM.DISCLAIMER.TIMERANGE")),u.\u0275\u0275advance(2),u.\u0275\u0275property("dateConstraint",te.dateConstraint)("ngModel",te.timeRange)("tokens",te.dateTokens)}}function P(de,fe){1&de&&(u.\u0275\u0275elementStart(0,"div",25),u.\u0275\u0275text(1),u.\u0275\u0275pipe(2,"translate"),u.\u0275\u0275elementEnd()),2&de&&(u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(2,1,"PRM.DISCLAIMER.ITSOVER200")," "))}function I(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"div",10)(1,"label",11),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(4,"pulse-treeview",23),u.\u0275\u0275listener("selectionChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(2).customInformation=oe})("selectionChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(2).onSelectionChanged(oe)}),u.\u0275\u0275elementEnd(),u.\u0275\u0275template(5,P,3,3,"div",24),u.\u0275\u0275elementEnd()}if(2&de){const te=u.\u0275\u0275nextContext(2);u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,9,"PRM.DISCLAIMER.BU")," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("isFilterTypeahead",!0)("dropdownMaxHeight",350)("selectAll",!0)("unselectAll",!0)("tree",te.customInformationCopy)("isInheader",!1)("selection",te.customInformation),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",!te.isEdit&&te.path&&"pulse-check-covid-19"===te.path&&te.getCustomInformationCount()>=200)}}function A(de,fe){if(1&de&&(u.\u0275\u0275elementStart(0,"option",29),u.\u0275\u0275text(1),u.\u0275\u0275elementEnd()),2&de){const te=fe.$implicit;u.\u0275\u0275property("value",te.id),u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate1(" ",te.name," ")}}function O(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"div",10)(1,"label",11),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(4,"div",26)(5,"select",27),u.\u0275\u0275listener("ngModelChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(2).parentSurveyId=oe})("selectionChange",function(){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(2).isDisabled()}),u.\u0275\u0275template(6,A,2,2,"option",28),u.\u0275\u0275elementEnd()()()}if(2&de){const te=u.\u0275\u0275nextContext(2);u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,3,"PRM.DISCLAIMER.SURVEYLIST")," "),u.\u0275\u0275advance(3),u.\u0275\u0275property("ngModel",te.parentSurveyId),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngForOf",te.surveyInstances)}}function T(de,fe){1&de&&(u.\u0275\u0275elementStart(0,"div",30),u.\u0275\u0275element(1,"hr"),u.\u0275\u0275elementEnd())}function c(de,fe){if(1&de&&u.\u0275\u0275element(0,"div",31),2&de){const te=u.\u0275\u0275nextContext(2);u.\u0275\u0275property("innerHTML",te.langService.translateHTML("PRM.DISCLAIMER.COSTINFORMATION"),u.\u0275\u0275sanitizeHtml)}}function M(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"div")(1,"h3"),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275element(4,"div",9)(5,"hr"),u.\u0275\u0275elementStart(6,"div",10)(7,"label",11),u.\u0275\u0275text(8),u.\u0275\u0275pipe(9,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(10,"input",12,13),u.\u0275\u0275listener("ngModelChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext().name=oe}),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(12,"div",14),u.\u0275\u0275text(13),u.\u0275\u0275pipe(14,"translate"),u.\u0275\u0275elementEnd()(),u.\u0275\u0275elementStart(15,"div",15),u.\u0275\u0275template(16,j,5,6,"div",16),u.\u0275\u0275template(17,I,6,11,"div",16),u.\u0275\u0275template(18,O,7,5,"div",16),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(19,"div",17)(20,"div",10)(21,"label",11),u.\u0275\u0275text(22),u.\u0275\u0275pipe(23,"translate"),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(24,"textarea",18,19),u.\u0275\u0275listener("ngModelChange",function(oe){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext().description=oe}),u.\u0275\u0275text(26," "),u.\u0275\u0275elementEnd()()(),u.\u0275\u0275template(27,T,2,0,"div",20),u.\u0275\u0275template(28,c,1,1,"div",21),u.\u0275\u0275elementEnd()}if(2&de){const te=u.\u0275\u0275reference(11),ce=u.\u0275\u0275nextContext();u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,14,ce.title2)," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("innerHTML",ce.langService.translateHTML(ce.body2),u.\u0275\u0275sanitizeHtml),u.\u0275\u0275advance(4),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(9,16,"PRM.DISCLAIMER.NAME")," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("ngModel",ce.name),u.\u0275\u0275advance(2),u.\u0275\u0275property("hidden",te.valid||te.pristine),u.\u0275\u0275advance(1),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(14,18,"PRM.DISCLAIMER.NAME.NOTSET"),"\xa0"),u.\u0275\u0275advance(3),u.\u0275\u0275property("ngIf",!ce.isEdit),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",!ce.isEdit&&!ce.isEffectivenessCheck),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",ce.isEffectivenessCheck),u.\u0275\u0275advance(4),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(23,20,"PRM.DISCLAIMER.DESCRIPTION")," "),u.\u0275\u0275advance(2),u.\u0275\u0275property("placeholder",ce.placeholderDesc)("ngModel",ce.description),u.\u0275\u0275advance(3),u.\u0275\u0275property("ngIf",!ce.isEdit&&ce.path&&"pulse-check-covid-19"===ce.path),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",!ce.isEdit&&ce.path&&"pulse-check-covid-19"===ce.path)}}function w(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"button",32),u.\u0275\u0275listener("click",function(){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(),u.\u0275\u0275reference(1).close()}),u.\u0275\u0275element(1,"i",33),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd()}2&de&&(u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,1,"PRM.DISCLAIMER.DISCLAIM"),""))}function R(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"button",34),u.\u0275\u0275listener("click",function(){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext().page=2}),u.\u0275\u0275element(1,"i",35),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd()}2&de&&(u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,1,"PRM.DISCLAIMER.ACCEPT"),""))}function D(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"button",32),u.\u0275\u0275listener("click",function(){return u.\u0275\u0275restoreView(te),u.\u0275\u0275nextContext(),u.\u0275\u0275reference(1).close()}),u.\u0275\u0275element(1,"i",33),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd()}2&de&&(u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,1,"PRM.DISCLAIMER.ABORT"),""))}function Y(de,fe){if(1&de){const te=u.\u0275\u0275getCurrentView();u.\u0275\u0275elementStart(0,"button",36),u.\u0275\u0275listener("click",function(){u.\u0275\u0275restoreView(te);const oe=u.\u0275\u0275nextContext(),se=u.\u0275\u0275reference(1);return oe.addSurveyInstance(),se.close()}),u.\u0275\u0275element(1,"i",35),u.\u0275\u0275text(2),u.\u0275\u0275pipe(3,"translate"),u.\u0275\u0275elementEnd()}if(2&de){const te=u.\u0275\u0275nextContext();u.\u0275\u0275property("disabled",te.isDisabled()),u.\u0275\u0275advance(2),u.\u0275\u0275textInterpolate1(" ",u.\u0275\u0275pipeBind1(3,2,"PRM.DISCLAIMER.SAVE"),"")}}let _=(()=>{class de{constructor(te){this.langService=te,this.title1="PRM.DISCLAIMER.TITLE1",this.body1="PRM.DISCLAIMER.CONTENT1",this.title2="PRM.DISCLAIMER.TITLE2",this.body2="PRM.DISCLAIMER.CONTENT2",this.page=1,this.isEdit=!1,this.surveyInstances=[],this.isEffectivenessCheck=!1,this.isEventRelated=!1,this.name="",this.description="",this.orgId="",this.ordernumber="",this.timeRange={startDate:new Date((new Date).setDate((new Date).getDate()+1)),endDate:new Date((new Date).setDate((new Date).getDate()+21))},this.today=new Date((new Date).setDate((new Date).getDate()+1)),this.dd=String(this.today.getDate()).padStart(2,"0"),this.mm=String(this.today.getMonth()+1).padStart(2,"0"),this.yyyy=this.today.getFullYear(),this.currentDay=this.mm+"."+this.dd+"."+this.yyyy,this.dateTokens=[{name:"1ONE.WEEK",value:{startDate:this.currentDay,endDate:new Date((new Date).setDate((new Date).getDate()+7))}},{name:"2TWO.WEEK",value:{startDate:this.currentDay,endDate:new Date((new Date).setDate((new Date).getDate()+14))}},{name:"3THREE.WEEK",value:{startDate:this.currentDay,endDate:new Date((new Date).setDate((new Date).getDate()+21))}}],this.dateConstraint={minDate:v()(),maxDate:void 0},this.orgIdRegex=new RegExp("^[A-Z][A-Z]\\d{6}$"),this.orderNumberRegex=new RegExp("^c=[A-Z|0-9]{5}[*]g=[0-9]{8}$")}ngOnInit(){this.isEventRelated&&(this.timeRange={startDate:new Date((new Date).setDate((new Date).getDate()+1)),endDate:new Date((new Date).setDate((new Date).getDate()+7))},this.dateTokens=[]),this.isEdit&&(this.page=2),this.customInformation&&(this.customInformationCopy=JSON.parse(JSON.stringify(this.customInformation)),this.customInformationCopy.forEach(te=>{te.label=te.name+" ("+te.count+")"})),""===this.name&&!this.isEffectivenessCheck&&!this.isEventRelated&&(this.name=this.langService.translate("PRM.DISCLAIMER.PLACEHOLDER.NAME")),""===this.name&&this.isEventRelated&&!this.isEffectivenessCheck&&(this.name=this.langService.translate("PRM.DISCLAIMER.PLACEHOLDER.NAME.EVENTRELATED")),""===this.name&&this.isEffectivenessCheck&&!this.isEventRelated&&(this.name=this.langService.translate("PRM.DISCLAIMER.PLACEHOLDER.NAME.EFFECT")),this.placeholderDesc=this.langService.translate("PRM.DISCLAIMER.PLACEHOLDER.DESC")}ngOnDestroy(){}addSurveyInstance(){this.callback(this.name,this.timeRange,this.description,this.customInformation,this.parentSurveyId,this.orgId,this.ordernumber,this.isEventRelated)}onSelectionChanged(te){this.customInformation=te}isDisabled(){let te=0;return this.customInformation&&this.customInformation.length>0&&this.customInformation.forEach(ce=>{te+=ce.count}),!0===this.isEffectivenessCheck&&void 0===this.parentSurveyId&&!this.isEdit||(""===this.name||""===this.customInformation&&void 0===this.parentSurveyId?!(this.isEdit&&""!==this.name&&""!==this.description):!1===this.isEffectivenessCheck&&0===te&&!this.isEdit||!this.isEdit&&"pulse-check-covid-19"===this.path&&te>200)}getCustomInformationCount(){let te=0;return this.customInformation&&this.customInformation.length>0&&this.customInformation.forEach(ce=>{te+=ce.count}),te}}return de.\u0275fac=function(te){return new(te||de)(u.\u0275\u0275directiveInject(g.T))},de.\u0275cmp=u.\u0275\u0275defineComponent({type:de,selectors:[["pulse-prm-disclaimer"]],inputs:{title1:"title1",body1:"body1",title2:"title2",body2:"body2",callback:"callback",page:"page",isEdit:"isEdit",surveyInstances:"surveyInstances",isEffectivenessCheck:"isEffectivenessCheck",path:"path",isEventRelated:"isEventRelated",name:"name",description:"description",customInformation:"customInformation",surveyStatus:"surveyStatus",orgId:"orgId",ordernumber:"ordernumber"},decls:11,vars:7,consts:[[3,"noCloseOutside"],["dialog",""],[1,"container-fluid"],[4,"ngIf"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%","class","pulse-btn cancel",3,"click",4,"ngIf"],["fxFlex","25%","class","pulse-btn save",3,"click",4,"ngIf"],["fxFlex","25%","class","pulse-btn save",3,"disabled","click",4,"ngIf"],[3,"innerHTML"],[1,"pulse-form-field"],["for",""],["required","","name","titel","type","text",1,"pulse-input",3,"ngModel","ngModelChange"],["titel","ngModel"],[1,"alert",3,"hidden"],["fxLayout","","fxLayoutGap","20px"],["class","pulse-form-field",4,"ngIf"],["fxLayout",""],["name","desc","type","text",1,"pulse-textarea",3,"placeholder","ngModel","ngModelChange"],["desc","ngModel"],["class","top-space",4,"ngIf"],["fxLayout","",3,"innerHTML",4,"ngIf"],[3,"dateConstraint","ngModel","tokens","ngModelChange"],["isDropdown","true","selectionKeys","name|count","dropdownMaxWidth","220px",3,"isFilterTypeahead","dropdownMaxHeight","selectAll","unselectAll","tree","isInheader","selection","selectionChange"],["class","over-9000","fxLayout","",4,"ngIf"],["fxLayout","",1,"over-9000"],[1,"pulse-select"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"top-space"],["fxLayout","",3,"innerHTML"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],["fxFlex","25%",1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"],["fxFlex","25%",1,"pulse-btn","save",3,"disabled","click"]],template:function(te,ce){1&te&&(u.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"div",2),u.\u0275\u0275template(3,N,5,4,"div",3),u.\u0275\u0275template(4,M,29,22,"div",3),u.\u0275\u0275elementEnd(),u.\u0275\u0275elementStart(5,"div",4)(6,"div",5),u.\u0275\u0275template(7,w,4,3,"button",6),u.\u0275\u0275template(8,R,4,3,"button",7),u.\u0275\u0275template(9,D,4,3,"button",6),u.\u0275\u0275template(10,Y,4,4,"button",8),u.\u0275\u0275elementEnd()()()),2&te&&(u.\u0275\u0275property("noCloseOutside",!0),u.\u0275\u0275advance(3),u.\u0275\u0275property("ngIf",1===ce.page),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",2===ce.page),u.\u0275\u0275advance(3),u.\u0275\u0275property("ngIf",1===ce.page),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",1===ce.page),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",2===ce.page),u.\u0275\u0275advance(1),u.\u0275\u0275property("ngIf",2===ce.page))},directives:[x.a,h.O5,S.DefaultValueAccessor,S.RequiredValidator,S.NgControlStatus,S.NgModel,i.xw,i.SQ,p.Q,L.G,S.SelectControlValueAccessor,h.sg,S.NgSelectOption,S.\u0275NgSelectMultipleOption,i.Wh,i.yH],pipes:[m.k],styles:[".alert[_ngcontent-%COMP%]{color:red;font-size:12px}.pulse-input[_ngcontent-%COMP%]{font-size:14px}pulse-treeview[_ngcontent-%COMP%]{background:white}.top-space[_ngcontent-%COMP%]{margin-top:25px}.bottom-space[_ngcontent-%COMP%]{margin-bottom:15px}.over-9000[_ngcontent-%COMP%]{color:red}"]}),de})();var y=r(62188),H=r(62474),$=r(22290),K=r(9133),z=r(74564),G=r(11735),Z=r(23328),B=r(47626),X=r(61035),ee=r(40520);let le=(()=>{class de{constructor(te,ce,oe,se,ue,_e,Ce,me,we,Re){this.webApi=te,this.toasty=ce,this.langService=oe,this.variables=se,this.dialogService=ue,this.router=_e,this.awsService=Ce,this.headerService=me,this.awsSignatureService=we,this.http=Re,this.surveyInstances$=new t.X([]),this.reportDataSubject$=new t.X(void 0),this.selectedSurveyInstance$=new t.X({}),this.reportList$=new t.X([]),this.reportDataComments$=new t.X(void 0),this.nonrating=[],this.subs=[],this.sub=new e.xQ,this.obs=this.sub,this.canStartSurvey=new t.X(!1),this.bucketName="pulse-project",we.bucketName="oyo0vb4ku6",we.awsService="execute-api",we.awsRegion="eu-west-1",this.selectedSurveyInstance$.subscribe(Ne=>{this.isSurveyStartPossible(Ne)})}getPulseSurveyInstanceSubInformation(te){if(te){const ce=this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceQuestions/"+te.id),oe=this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceContacts/"+te.id),se=this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceReceivers/"+te.id),ue=this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceEmailTemplate/"+te.id);Promise.all([ce,oe,se,ue]).then(([_e,Ce,me,we])=>{te.contacts=Ce,te.questions=_e,te.receivers=me,te.emailTemplates=we,te.contacts&&te.emailTemplates&&te.questions&&(te.isEventRelated&&te.questions.forEach(Re=>{Re.customInformation=y.p[Re.customInformation]}),this.selectedSurveyInstance$.next(te),(2===te.status||te.numberOfResponses>=6)&&(de.disableCurrentReportingRoutes=!1))})}}areSurveyRoutesDisabled(){return de.disableSurveyRoutes}areReportRoutesDisabled(){return de.disableReportRoutes}arePathOfReportingDisabled(){return de.disableCurrentReportingRoutes}getReportData(te,ce=!1){this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceCustomReport/"+te+"/"+ce).then(oe=>{this.reportDataSubject$.next(oe),de.disableReportRoutes=!ce,de.disableSurveyRoutes=ce},oe=>this.reportDataSubject$.next({}))}getReportComments(te,ce=!1){this.reportDataComments$.value||this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceCustomReportComments/"+te+"/"+ce).then(oe=>{this.reportDataComments$.next(oe)})}setSurveyInstances(){this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceInformationList").then(te=>{console.log(te),this.surveyInstances$.next(te)},te=>this.surveyInstances$.next([]))}getReportList(){this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceReportReceiverList").then(te=>{this.reportList$.next(te)},te=>this.reportList$.next([]))}editSurveyInstance(te){this.dialogService.open(_,{callback:(oe,se,ue)=>{this.onEditSurveyInstance(oe,ue,te)},isEffectivenessCheck:!1,isEdit:!0,name:te.name,description:te.description,surveyStatus:te.status,title2:"PRM.DISCLAIMER.EDIT.TITLE",body2:"PRM.DISCLAIMER.EDIT.TEXT",path:this.currentLink})}deleteSurveyInstance(te){const ce=new e.xQ;ce.subscribe(oe=>{this.onDeleteSurvey(te),ce.unsubscribe()}),this.dialogService.open(d.X,{callback:ce,dialogTitle:this.langService.translate("PRM.DIALOG.DELETESURVEY.TITLE"),dialogText:this.langService.translateHTML("PRM.DIALOG.DELETESURVEY.TEXT")})}stopSurveyInstance(te){const ce=new e.xQ;ce.subscribe(oe=>{this.onStopSurvey(te),ce.unsubscribe()}),this.dialogService.open(d.X,{callback:ce,dialogTitle:this.langService.translate("PRM.DIALOG.STOPSURVEY.TITLE"),dialogText:this.langService.translateHTML("PRM.DIALOG.STOPSURVEY.TEXT")})}onStopSurvey(te){this.webApi.put(this.variables.apiUrl+"/api/PulseSurvey/StopPulseSurveyInstance/"+te.id,{}).then(ce=>{if(ce){this.selectedSurveyInstance$.next(ce),2===ce.status&&ce.numberOfResponses>=6&&(de.disableCurrentReportingRoutes=!1);const oe=this.surveyInstances$.value;for(let se=0;se{this.toasty.error("",this.langService.translate("PRM.STOP.ERROR"))})}deleteAction(te){const ce=new e.xQ;ce.subscribe(oe=>{this.onDeleteAction(te),ce.unsubscribe()}),this.dialogService.open(d.X,{callback:ce,dialogTitle:this.langService.translate("PRM.DIALOG.DELETEACTION.TITLE"),dialogText:this.langService.translateHTML("PRM.DIALOG.DELETEACTION.TEXT")})}onDeleteAction(te){this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/Actions/"+te.questionId+"/"+te.variableId+"/"+te.pulseSurveyInstanceId).then(ce=>{if(ce){const oe=this.reportDataSubject$.value;oe.questionResult.forEach(se=>{se.action&&se.action.questionId===te.questionId&&se.action.variableId===te.variableId&&(se.action=null)}),this.reportDataSubject$.next(oe),this.toasty.success("",this.langService.translate("PRM.DELETEACTION.SUCCESS"))}else this.toasty.error("",this.langService.translate("PRM.DELETEACTION.ERROR"))})}addAction(te){return this.webApi.post(this.variables.apiUrl+"/api/PulseSurvey/Actions",te)}editAction(te){return this.toasty.success("",this.langService.translate("PRM.EDITACTION.SUCCESS")),this.webApi.put(this.variables.apiUrl+"/api/PulseSurvey/Actions",te)}onDeleteSurvey(te){this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstance/"+te.id).then(ce=>{if(ce){for(let oe=0;oe{this.toasty.error("",this.langService.translate("PRM.DELETE.ERROR"))})}onEditSurveyInstance(te,ce,oe){const se={id:oe.id,name:te,description:ce};oe.name===te&&oe.description===ce?this.toasty.success("",this.langService.translate("PRM.EDITSURVEY.SUCCESS")):this.webApi.put(this.variables.apiUrl+"/api/PulseSurvey/EditPulseSurveyInstance",se).then(ue=>{this.selectedSurveyInstance$.next(ue),this.getPulseSurveyInstanceSubInformation(ue),this.toasty.success("",this.langService.translate("PRM.EDITSURVEY.SUCCESS"))},ue=>{this.toasty.error("",this.langService.translate("PRM.EDITSURVEY.ERROR"))})}getSurveyInstanceDisclaimer(te=!1,ce=!1){const oe=(se,ue,_e,Ce,me,we,Re,Ne)=>this.onAddSurveyInstance(se,ue,_e,Ce?Ce.map(Ge=>Ge.name):[],me,we,Re,Ne);te?this.surveyInstances$.subscribe(se=>{const ue=se.filter(_e=>{if(_e.numberOfResponses>5&&_e.status>=2&&(0===_e.parentSurveyInstanceId||null===_e.parentSurveyInstanceId)&&0==_e.isEventRelated)return _e});0===ue.length?this.dialogService.open(E,{body:"PRM.DISCLAIMERERROR.NOEFFECTIVENESS"}):this.dialogService.open(_,{title2:"PRM.DISCLAIMER.TITLE.EFFECT",body2:"PRM.DISCLAIMER.BODY.EFFECT",callback:oe,surveyInstances:ue,isEffectivenessCheck:te,path:this.currentLink})}).unsubscribe():this.webApi.get(this.variables.apiUrl+"/api/PulseSurvey/OrgCodeByManagerId").then(se=>{null===se||0===se.length?this.dialogService.open(E,{body:"PRM.DISCLAIMERERROR.NOINITIALSURVEY"}):this.dialogService.open(_,{callback:oe,isEffectivenessCheck:te,customInformation:se,path:this.currentLink,isEventRelated:ce,body2:ce?"PRM.DISCLAIMER.EVENTRELATED":"PRM.DISCLAIMER.CONTENT2"})})}resetEmailTemplate(te,ce){return this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceEmailTemplate/"+te+"/"+ce)}onAddSurveyInstance(te,ce,oe,se,ue,_e,Ce,me){""!==te&&this.addSurveyInstance(te,ce,oe,se,ue,_e,Ce,me).subscribe(we=>{we.countInvited=0,we.reportReceiver=[],this.surveyInstances$.value.push(we);let Re=[];this.surveyInstances$.value.forEach(Ne=>{if(!Re.find(Ge=>Ge.id===Ne.id)&&!Ne.parentSurveyInstanceId){Re.push(Ne);const Ge=this.surveyInstances$.value.filter(Pe=>Pe.parentSurveyInstanceId===Ne.id);Re=Re.concat(Ge)}}),this.surveyInstances$.next(Re),this.headerService.showHeader=!0,this.router.navigateByUrl("/"+this.currentLink+"/survey/"+we.id+"/overview"),de.disableCurrentReportingRoutes=!0},we=>{console.log("an error occured",we.message)})}addSurveyInstance(te,ce,oe,se,ue,_e,Ce,me){return this.webApi.postObserv(this.variables.apiUrl+"/api/PulseSurvey/CreatePulseSurveyInstance",{name:te,startDate:ce.startDate,endDate:ce.endDate,description:oe,customInformation:se,parentSurveyInstanceId:ue,orgId:_e,orderinformation:Ce,isEventRelated:me}).pipe((0,o.K)(we=>(0,a._)(we)))}changeQuestionStatus(te,ce,oe,se){return te.status>0||(se?this.webApi.post(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceQuestion/"+te.id+"/"+oe+"/"+ce,{}).then(ue=>(this.selectedSurveyInstance$.next(te),(0,s.of)(ue)),ue=>(0,s.of)(!1)):this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceQuestion/"+te.id+"/"+ce+"/"+oe,{}).then(ue=>(this.selectedSurveyInstance$.next(te),(0,s.of)(ue)),ue=>(0,s.of)(!1))),(0,s.of)(!1)}removeReceiver(te,ce){return this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceReceiver/"+te+"/"+ce)}removeContact(te,ce){return this.webApi.delete(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceContact/"+te+"/"+ce)}changeContact(te,ce){return this.webApi.put(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceContact/"+te,ce)}changeReceiver(te,ce){return this.webApi.put(this.variables.apiUrl+"/api/PulseSurvey/SurveyInstanceReceiver/"+te,ce)}saveInstanceEmailTemplate(te,ce){return this.webApi.post(this.variables.apiUrl+"/api/PulseSurvey/PulseSurveyInstanceEmailTemplate/"+te,ce)}createHomeCardItems(te){return"pulse-check-covid-19"===this.currentLink?[{icon:"icon-playlist-plus",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_addsurveyinstance"),title:"PRM.HOME.ADDSURVEY",description:"PRM.HOME.ADDSURVEY.INFO",showExpandCardDescriptionOption:!0,callback:()=>{this.getSurveyInstanceDisclaimer()}},{icon:"icon-facts-and-forecasts",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_mysurveys"),title:"PRM.HOME.MYSURVEYLIST",showExpandCardDescriptionOption:!0,description:"PRM.HOME.MYSURVEYLIST.INFO",callback:()=>{this.router.navigateByUrl("/pulse-check-covid-19/surveylist")}}]:[{icon:"icon-playlist-plus",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_addsurveyinstance"),title:"PRM.HOME.ADDSURVEY",description:"PRM.HOME.ADDSURVEY.INFO",showExpandCardDescriptionOption:!0,callback:()=>{this.getSurveyInstanceDisclaimer()}},{icon:"icon-playlist-check",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_addeffectivenesscheck"),title:"PRM.HOME.ADDEFFECTIVENESSCHECK",showExpandCardDescriptionOption:!0,description:"PRM.HOME.ADDEFFECTIVENESSCHECK.INFO",callback:()=>{this.getSurveyInstanceDisclaimer(!0)}},{icon:"icon-facts-and-forecasts",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_mysurveys"),title:"PRM.HOME.MYSURVEYLIST",showExpandCardDescriptionOption:!0,description:"PRM.HOME.MYSURVEYLIST.INFO",callback:()=>{this.router.navigateByUrl("/prm/surveylist")}}]}createReportingInfoCards(te){return[{icon:"icon-Automation_Icon",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_prozess_"+this.langService._languageCode),title:"PRM.REPORING.CARD.PROCESS.T",description:"PRM.REPORING.CARD.PROCESS.D",showExpandCardDescriptionOption:!0,callback:()=>{}},{icon:"icon-question",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_question"),title:"PRM.REPORING.CARD.QUESTIONS.T",description:"PRM.REPORING.CARD.QUESTIONS.D",showExpandCardDescriptionOption:!0,callback:()=>{}},{icon:"icon-note-multiple-outline",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_doc"),title:"PRM.REPORING.CARD.DOC.T",description:"PRM.REPORING.CARD.DOC.D",showExpandCardDescriptionOption:!0,callback:()=>{}},{icon:"icon-legal-notice",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_basic"),title:"PRM.REPORING.CARD.BASICS.T",description:"PRM.REPORING.CARD.BASICS.D",showExpandCardDescriptionOption:!0,callback:()=>{}},{icon:"icon-information",imgUrl:this.awsService.getPreSignURLFromS3(this.bucketName,te.id+"/custom_prm_information"),title:"PRM.REPORING.CARD.INFORMATION.T",description:"PRM.REPORING.CARD.INFORMATION.D",showExpandCardDescriptionOption:!0,callback:()=>{}}]}startPulseSurveyInstance(te){this.webApi.post(this.variables.apiUrl+"/api/PulseSurvey/StartSurveyInstance/"+te,{}).then(ce=>{this.surveyInstances$.next(ce),ce.forEach(oe=>{oe.id===te&&this.getPulseSurveyInstanceSubInformation(oe)}),this.toasty.success("",this.langService.translate("PRM.SURVEYSTART.SUCCESS.TOASTY")),setTimeout(()=>{this.router.navigate([this.currentLink,"survey",te])},500)},ce=>{this.toasty.error("",this.langService.translate("PRM.SURVEYSTART.ERROR.TOASTY"))})}isSurveyStartPossible(te){if(te.status<1){const ce=this.isPulseSurveyInstanceQuestionListValid(te.questions),oe=this.isPulseSurveyInstanceContactListValid(te.contacts);this.canStartSurvey.next(!(!ce||!oe))}else this.canStartSurvey.next(!1)}isPulseSurveyInstanceQuestionListValid(te){if(!te)return!1;let ce=0,oe=0;return te.forEach(se=>{se.isMandatory&&ce++,se.active&&oe++}),1===oe&&!1===this.canStartSurvey.value&&this.toasty.info("",this.langService.translate("PRM.SURVEY.TOASTY.STARTSURVEY")),ce<=oe&&oe>0}isPulseSurveyInstanceContactListValid(te){return!!te&&te.length>=6}}return de.disableSurveyRoutes=!0,de.disableReportRoutes=!0,de.disableCurrentReportingRoutes=!0,de.\u0275fac=function(te){return new(te||de)(u.\u0275\u0275inject(H.f),u.\u0275\u0275inject($._W),u.\u0275\u0275inject(g.T),u.\u0275\u0275inject(K.a),u.\u0275\u0275inject(z.x),u.\u0275\u0275inject(G.F0),u.\u0275\u0275inject(Z.s),u.\u0275\u0275inject(B.r),u.\u0275\u0275inject(X.X),u.\u0275\u0275inject(ee.eN))},de.\u0275prov=u.\u0275\u0275defineInjectable({token:de,factory:de.\u0275fac}),de})()},86217:(Se,pe,r)=>{"use strict";r.d(pe,{_:()=>O});var t=r(591),e=r(5252),a=r(5e3),s=r(17835),o=r(7259),d=r(74564),u=r(22290);let g=(()=>{class T{constructor(M,w,R,D){this.propService=M,this.actionService=w,this.dialogService=R,this.toaster=D,this.actionCreated$=new t.X(!1)}handleActionCreation(M){const D={props:this.propService.getPropsByNames("title","statusId","priorityId"),templates:M,callback:Y=>this.createAction(Y),actionCreated$:this.actionCreated$};this.dialogService.open(e.M,D)}createAction(M){this.actionService.createAction(M).subscribe(w=>{this.actionCreated$.next(!0),this.actionService.selectedAction$.next(w)},w=>{this.actionCreated$.next(!1),this.toaster.error("an error occured while creating the action","",{timeOut:3e3})})}}return T.\u0275fac=function(M){return new(M||T)(a.\u0275\u0275inject(s.R),a.\u0275\u0275inject(o.c),a.\u0275\u0275inject(d.x),a.\u0275\u0275inject(u._W))},T.\u0275prov=a.\u0275\u0275defineInjectable({token:T,factory:T.\u0275fac}),T})();var x=r(34021),i=r(14356);let E=(()=>{class T{constructor(M,w,R){this.actionService=M,this.loadingBarService=w,this.toaster=R}export(M){return function(T,c,M,w){return new(M||(M=Promise))(function(D,Y){function _($){try{H(w.next($))}catch(K){Y(K)}}function y($){try{H(w.throw($))}catch(K){Y(K)}}function H($){$.done?D($.value):function R(D){return D instanceof M?D:new M(function(Y){Y(D)})}($.value).then(_,y)}H((w=w.apply(T,c||[])).next())})}(this,void 0,void 0,function*(){const w=this.actionService.actions$.value.map(R=>R.id);if(w.length){this.loadingBarService.start();const R=yield this.actionService.getActionExportUrl(M,w).toPromise();R&&(this.download(R.ExportFileUrl),this.loadingBarService.complete())}})}download(M){if(M){const w=document.createElement("a");w.href=M,w.click()}else this.toaster.error("an error occured while downloading the file")}}return T.\u0275fac=function(M){return new(M||T)(a.\u0275\u0275inject(o.c),a.\u0275\u0275inject(i.dL),a.\u0275\u0275inject(u._W))},T.\u0275prov=a.\u0275\u0275defineInjectable({token:T,factory:T.\u0275fac}),T})();var C=r(41746),v=r(24850),h=r(92198),S=r(91732),p=r(47626);let L=(()=>{class T{constructor(){this.showDashboard=!1,this.isFirstLoad=!0,this.showDashboard$=new t.X(!1)}}return T.\u0275fac=function(M){return new(M||T)},T.\u0275prov=a.\u0275\u0275defineInjectable({token:T,factory:T.\u0275fac}),T})(),N=(()=>{class T{constructor(M,w,R,D,Y,_){this.headerService=M,this.propService=w,this.actionService=R,this.actionExpoter=D,this.actionCreator=Y,this.actionManagementService=_,this.isHeaderConfigured=!1,this.isFirstLoad=!0}configure(){this.headerService.showHeader=!0,this.headerDependencies$=this.provideHeaderDependencies(),this.headerDependencies$.pipe((0,v.U)(M=>this.mapDependencies(M))).subscribe(M=>{this.configureHeader(M)})}cleanUp(){this.headerService.showHeader=!1,this.headerService.removeAction(...this.actions)}provideHeaderDependencies(){return(0,C.$R)(this.getActionProperties(),this.actionService.getExportTypes(),this.actionService.getTemplates())}mapDependencies(M){return[M[0].map(D=>({label:D.label,value:D.name,selected:D.show})),M[1].map(D=>({label:D.title,value:D.id})),M[2]]}configureHeader(M){this.prepareHandlers(M),this.actions=this.resolveActions(M),this.headerService.addAction(...this.actions),this.isHeaderConfigured=!0}getActionProperties(){return this.propService.properties$.pipe((0,h.h)(M=>0!==M.length),(0,v.U)(M=>M.filter(w=>!["id","escalationDate"].includes(w.name))),(0,v.U)(M=>this.propService.filterOutCustomFieldAsContactField(M)),(0,v.U)(M=>this.isFirstLoad?(this.isFirstLoad=!1,this.propService.getPropertiesFromStorage(M)):M))}prepareHandlers(M){this.addColumnActionHandler=w=>{const R=w.options.filter(D=>D.selected);this.propService.updatePropsVisibility(R)},this.exportActionsActionHandler=w=>{this.actionExpoter.export(w.value)},this.createActionActionHandler=()=>{this.actionCreator.handleActionCreation(M[2])},this.switchViewActionHandler=w=>{void 0!==w.value&&(this.actionManagementService.showDashboard$.next(w.value),w.value||(this.actionManagementService.isFirstLoad=!0))}}resolveActions(M){const w=[],R=M[0],D=M[1];if(M[2].length){const $=S.o.createActionAction;$.callback=this.createActionActionHandler,w.push($)}const _=S.o.addColumnAction;_.options=R,_.callback=this.addColumnActionHandler,w.push(_);const y=S.o.exportActionsAction;y.options=D,y.callback=this.exportActionsActionHandler,w.push(y);const H=S.o.switchViewAction;return H.value=this.actionManagementService.showDashboard,H.callback=this.switchViewActionHandler,w.push(H),w}}return T.\u0275fac=function(M){return new(M||T)(a.\u0275\u0275inject(p.r),a.\u0275\u0275inject(s.R),a.\u0275\u0275inject(o.c),a.\u0275\u0275inject(E),a.\u0275\u0275inject(g),a.\u0275\u0275inject(L))},T.\u0275prov=a.\u0275\u0275defineInjectable({token:T,factory:T.\u0275fac}),T})();var j=r(4371);function P(T,c){1&T&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275element(1,"pulse-action-dashboard"),a.\u0275\u0275elementContainerEnd())}function I(T,c){if(1&T&&a.\u0275\u0275element(0,"pulse-actions-area"),2&T){const M=a.\u0275\u0275nextContext();a.\u0275\u0275classProp("hidden",M.actionManagementService.showDashboard)}}const A=function(T){return{"sidenav--collapsed":T}};let O=(()=>{class T{constructor(M,w,R,D,Y,_){this.actionService=M,this.renderer=w,this.actionManagementService=R,this.headerConfigurator=D,this.sidenavService=Y,this.actionDashboardService=_}ngOnInit(){this.headerConfigurator.configure(),this.actionManagementService.showDashboard$.subscribe(M=>{this.renderer.setStyle(document.getElementById("scrolledContent"),"overflow",!1===M?"hidden":"auto"),this.actionManagementService.showDashboard=M})}ngOnDestroy(){this.headerConfigurator.cleanUp(),this.renderer.setStyle(document.getElementById("scrolledContent"),"overflow","auto"),this.actionManagementService.showDashboard$.unsubscribe()}onFilterSelectionChange(M){this.actionService.filter(M)}}return T.\u0275fac=function(M){return new(M||T)(a.\u0275\u0275directiveInject(o.c),a.\u0275\u0275directiveInject(a.Renderer2),a.\u0275\u0275directiveInject(L),a.\u0275\u0275directiveInject(N),a.\u0275\u0275directiveInject(j.R),a.\u0275\u0275directiveInject(x.r))},T.\u0275cmp=a.\u0275\u0275defineComponent({type:T,selectors:[["pulse-action-management"]],features:[a.\u0275\u0275ProvidersFeature([o.c,E,g,s.R,N,L,x.r])],decls:5,vars:7,consts:[[3,"selectionChange"],[3,"ngClass"],[4,"ngIf"],[3,"hidden",4,"ngIf"]],template:function(M,w){1&M&&(a.\u0275\u0275elementStart(0,"pulse-action-filter",0),a.\u0275\u0275listener("selectionChange",function(D){return w.onFilterSelectionChange(D)}),a.\u0275\u0275elementEnd(),a.\u0275\u0275element(1,"pulse-action-stat-and-search",1),a.\u0275\u0275pipe(2,"async"),a.\u0275\u0275template(3,P,2,0,"ng-container",2),a.\u0275\u0275template(4,I,1,2,"pulse-actions-area",3)),2&M&&(a.\u0275\u0275advance(1),a.\u0275\u0275property("ngClass",a.\u0275\u0275pureFunction1(5,A,!a.\u0275\u0275pipeBind1(2,3,w.sidenavService.expandSideNavigation))),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",w.actionManagementService.showDashboard),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",w.actionManagementService.isFirstLoad))},styles:[".list .list-item__container{width:100%;padding:10px 5px;border-bottom:1px solid #dfe6ed;display:flex}.list .list-item__container:last-child{border-bottom:none}.list .list-item__container *{flex-grow:0}.list .list-item__container .spacer{flex-grow:1}.list .list-item__container .list-item-group__container{display:flex;align-items:center}.list .list-item__container .list-item-group__container:hover{color:#00646e}.list .list-item__container .list-item-group__container .list-item__icon{margin:5px;font-size:24px}.list .list-item__container .list-item-actions__container{display:flex;align-items:center}.list .list-item__container .list-item__icon{position:relative;top:3px}.list .list-item__container .list-item__icon:hover{color:#00646e}.empty-state{position:absolute;top:40%;left:40%;text-align:center;color:#cdd9e1}.empty-state.empty-state--static{position:static;margin-top:40%}.empty-state.empty-state--static.empty-state--fixed-height{height:100%;margin:auto;padding-top:55px}.empty-state.empty-state--static.empty-state--fixed-height .empty-state__title{width:400px;font-size:20px}.empty-state.empty-state--static.empty-state--small{margin-top:0}.empty-state.empty-state--static.empty-state--small i{font-size:60px;padding-bottom:5px}.empty-state.empty-state--static.empty-state--small .empty-state__title{font-size:16px}.empty-state i{display:block;font-size:150px;padding-bottom:30px}.empty-state i.empty-state--small{font-size:60px}.empty-state .empty-state__title{font-size:50px}.pointer{cursor:pointer}.hidden{display:none}.pos--relative{position:relative}pulse-action-stat-and-search{position:fixed;top:-2px;left:380px}pulse-action-stat-and-search.sidenav--collapsed{left:155px}.custom-scrollbar::-webkit-scrollbar{width:12px}.custom-scrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.custom-scrollbar::-webkit-scrollbar-thumb{border-radius:9px;background:rgba(0,0,0,.5)}.action-management-container{height:100%;border-top:1px solid #cdd9e1;background-color:#fff}.section-action-history{padding:3px 15px;background-color:#fff;overflow-y:auto}.section-action-detail{border:1px solid #697882;background-color:#fff;overflow-y:auto}.section-title{height:21px;margin-bottom:20px;border-bottom:2px solid #becdd7;line-height:39px;font-size:1.2rem}.datatable-row{width:100%;min-height:35px;padding-left:15px;padding-right:15px;border-top:1px solid #becdd7}.datatable-row.header{border-top:none;font-weight:700}.status-label{width:88px;padding:.2em .6em .3em;border-radius:.25em;background-color:#697882;display:inline-block;font-weight:400;vertical-align:middle!important;text-align:center;line-height:1;color:#fff!important}.status-label.inverted{color:#697882!important;background-color:#ebf0f5!important}.status-label.in-table{width:auto}.label-low{background-color:#5cb85c;color:#fff!important;width:30px;margin-left:auto;margin-right:auto;padding:4px;border-radius:3px;display:inline-block;text-align:center!important;line-height:1}.label-low.inverted{color:#5cb85c!important;background-color:#ebf0f5!important}.label-medium{background-color:#f0ad4e;color:#fff!important;width:30px;margin-left:auto;margin-right:auto;padding:4px;border-radius:3px;display:inline-block;text-align:center!important;line-height:1}.label-medium.inverted{color:#f0ad4e!important;background-color:#ebf0f5!important}.label-high{background-color:#d9534f;color:#fff!important;width:30px;margin-left:auto;margin-right:auto;padding:4px;border-radius:3px;display:inline-block;text-align:center!important;line-height:1}.label-high.inverted{color:#d9534f!important;background-color:#ebf0f5!important}\n"],encapsulation:2}),T})()},5252:(Se,pe,r)=>{"use strict";r.d(pe,{M:()=>ue});var t=r(93075),e=r(21086),a=r(23753),s=r(5254),o=r(43489);class u{constructor(Ce,me){this.predicate=Ce,this.inclusive=me}call(Ce,me){return me.subscribe(new g(Ce,this.predicate,this.inclusive))}}class g extends o.L{constructor(Ce,me,we){super(Ce),this.predicate=me,this.inclusive=we,this.index=0}_next(Ce){const me=this.destination;let we;try{we=this.predicate(Ce,this.index++)}catch(Re){return void me.error(Re)}this.nextOrComplete(Ce,we)}nextOrComplete(Ce,me){const we=this.destination;Boolean(me)?we.next(Ce):(this.inclusive&&we.next(Ce),we.complete())}}var x=r(80013),i=r(75778),m=r(22868),E=r(92198),C=r(87545),v=r(24850),h=r(94417),S=r(43200),p=r(5e3),L=r(91123),N=r(98613),j=r(65305),P=r(75531),I=r(22324),A=r(69808),O=r(23322),T=r(32925),c=r(8971),M=r(87436);const w=["dialog"],R=["responsibleInputRef"],D=["contactInputRef"];function Y(_e,Ce){if(1&_e&&(p.\u0275\u0275elementStart(0,"label",35),p.\u0275\u0275element(1,"input",36),p.\u0275\u0275elementStart(2,"span"),p.\u0275\u0275text(3),p.\u0275\u0275elementEnd()()),2&_e){const me=Ce.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275property("value",me.id),p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate1(" ",me.title," ")}}function _(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"i",37),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(me),p.\u0275\u0275nextContext().clearControl("titleCtrl")}),p.\u0275\u0275elementEnd()}}function y(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"i",37),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(me),p.\u0275\u0275nextContext().clearControl("responsibleCtrl")}),p.\u0275\u0275elementEnd()}}function H(_e,Ce){1&_e&&(p.\u0275\u0275elementStart(0,"li"),p.\u0275\u0275element(1,"pulse-spinner"),p.\u0275\u0275elementEnd())}function $(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"li",41),p.\u0275\u0275listener("click",function(){const Ne=p.\u0275\u0275restoreView(me).$implicit;return p.\u0275\u0275nextContext(3).updateResponsible(Ne)}),p.\u0275\u0275text(1),p.\u0275\u0275elementEnd()}if(2&_e){const me=Ce.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" ",me.lastName+", "+me.firstName+" ("+me.orgId+")"," ")}}function K(_e,Ce){1&_e&&(p.\u0275\u0275elementStart(0,"li"),p.\u0275\u0275text(1," no user found "),p.\u0275\u0275elementEnd())}function z(_e,Ce){if(1&_e&&(p.\u0275\u0275elementContainerStart(0),p.\u0275\u0275template(1,$,2,1,"li",22),p.\u0275\u0275template(2,K,2,0,"li",40),p.\u0275\u0275elementContainerEnd()),2&_e){const me=p.\u0275\u0275nextContext(2);p.\u0275\u0275advance(1),p.\u0275\u0275property("ngForOf",me.resultContainers.userResult),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!me.resultContainers.userResult.length&&me.responsibleCtrl.value.length>=4)}}const G=function(_e){return{hide:_e}};function Z(_e,Ce){if(1&_e&&(p.\u0275\u0275elementStart(0,"div",38)(1,"ul",39),p.\u0275\u0275template(2,H,2,0,"li",40),p.\u0275\u0275template(3,z,3,2,"ng-container",40),p.\u0275\u0275elementEnd()()),2&_e){const me=p.\u0275\u0275nextContext();p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(3,G,me.responsibleAutocompRef.hideDropdown)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",me.isSearchLoading),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!me.isSearchLoading)}}function B(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"li",41),p.\u0275\u0275listener("click",function(){const Ne=p.\u0275\u0275restoreView(me).$implicit;return p.\u0275\u0275nextContext().setProp("priorityId",Ne.id)}),p.\u0275\u0275element(1,"span",18),p.\u0275\u0275elementEnd()}if(2&_e){const me=Ce.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275property("innerHTML",null==me?null:me.html,p.\u0275\u0275sanitizeHtml)}}function X(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"li",41),p.\u0275\u0275listener("click",function(){const Ne=p.\u0275\u0275restoreView(me).$implicit;return p.\u0275\u0275nextContext().setProp("statusId",Ne.id)}),p.\u0275\u0275element(1,"span",18),p.\u0275\u0275elementEnd()}if(2&_e){const me=Ce.$implicit,we=p.\u0275\u0275nextContext();p.\u0275\u0275advance(1),p.\u0275\u0275property("innerHTML",null==me?null:me.getHtml(we.translator),p.\u0275\u0275sanitizeHtml)}}function ee(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"i",37),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(me),p.\u0275\u0275nextContext().clearControl("contactCtrl")}),p.\u0275\u0275elementEnd()}}function le(_e,Ce){1&_e&&(p.\u0275\u0275elementStart(0,"li"),p.\u0275\u0275element(1,"pulse-spinner"),p.\u0275\u0275elementEnd())}function de(_e,Ce){if(1&_e&&(p.\u0275\u0275elementContainerStart(0),p.\u0275\u0275text(1),p.\u0275\u0275pipe(2,"date"),p.\u0275\u0275elementContainerEnd()),2&_e){const me=p.\u0275\u0275nextContext().$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" InterviewDate: ",p.\u0275\u0275pipeBind2(2,1,null==me?null:me.InterviewDate,"yyyy-MM-dd")," ")}}function fe(_e,Ce){if(1&_e){const me=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"li",41),p.\u0275\u0275listener("click",function(){const Ne=p.\u0275\u0275restoreView(me).$implicit;return p.\u0275\u0275nextContext(3).updateContact(Ne)}),p.\u0275\u0275template(1,de,3,4,"ng-container",40),p.\u0275\u0275text(2),p.\u0275\u0275elementEnd()}if(2&_e){const me=Ce.$implicit;p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",null==me?null:me.InterviewDate),p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" ",me.LastName+", "+me.FirstName+" ("+me.Email+")"," ")}}function te(_e,Ce){1&_e&&(p.\u0275\u0275elementStart(0,"li"),p.\u0275\u0275text(1," no contact found "),p.\u0275\u0275elementEnd())}function ce(_e,Ce){if(1&_e&&(p.\u0275\u0275elementContainerStart(0),p.\u0275\u0275template(1,fe,3,2,"li",22),p.\u0275\u0275template(2,te,2,0,"li",40),p.\u0275\u0275elementContainerEnd()),2&_e){const me=p.\u0275\u0275nextContext(2);p.\u0275\u0275advance(1),p.\u0275\u0275property("ngForOf",me.resultContainers.contactResult),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!me.resultContainers.contactResult.length&&me.contactCtrl.value.length>=4)}}function oe(_e,Ce){if(1&_e&&(p.\u0275\u0275elementStart(0,"div",38)(1,"ul",39),p.\u0275\u0275template(2,le,2,0,"li",40),p.\u0275\u0275template(3,ce,3,2,"ng-container",40),p.\u0275\u0275elementEnd()()),2&_e){const me=p.\u0275\u0275nextContext();p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(3,G,me.contactAutocompRef.hideDropdown)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",me.isSearchLoading),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!me.isSearchLoading)}}const se=function(_e){return{opacity:_e}};let ue=(()=>{class _e{constructor(me,we,Re,Ne){this.scdService=me,this.userService=we,this.contactService=Re,this.translator=Ne,this.resultContainers={},this.templates=[],this.haveContact=!1,this.subs=[],this.isSearchLoading=!1,this.isActionCreating=!1,this.actionCreationFailedRetryCount=2,this.action=h.m.createEmptyAction()}initForm(){this.fGroup=(new t.FormBuilder).group({templateCtrl:[this.templates[0].id,t.Validators.required],titleCtrl:[this.templates[0].title,t.Validators.required],responsibleCtrl:["",[t.Validators.required,S.h]],contactCtrl:["",[t.Validators.required,S.k]]}),this.templateCtrl=this.fGroup.controls.templateCtrl,this.titleCtrl=this.fGroup.controls.titleCtrl,this.responsibleCtrl=this.fGroup.controls.responsibleCtrl,this.contactCtrl=this.fGroup.controls.contactCtrl}ngOnInit(){this.initForm(),this.subs.push(this.userService.user.subscribe(Re=>this.observeUser(Re)));const we=this.contactCtrl.valueChanges;this.responsibleAutocompRef={inputRef:this.responsibleInputRef,resultContainerKey:"userResult",hideDropdown:!1,inputStream:this.responsibleCtrl.valueChanges},this.contactAutocompRef={inputRef:this.contactInputRef,resultContainerKey:"contactResult",hideDropdown:!1,inputStream:we},this.resultContainers[this.responsibleAutocompRef.resultContainerKey]=[],this.resultContainers[this.contactAutocompRef.resultContainerKey]=[],this.registerAutocompleteOnInputs(this.responsibleAutocompRef),this.registerAutocompleteOnInputs(this.contactAutocompRef),this.syncForm(),this.templateCtrl.setValue(this.templateCtrl.value),this.titleCtrl.setValue(this.titleCtrl.value),this.updateForm(),this.actionCreated$.pipe(function d(_e,Ce=!1){return me=>me.lift(new u(_e,Ce))}(()=>this.actionCreationFailedRetryCount>=0)).subscribe(Re=>{this.isActionCreating=!1,Re||0===this.actionCreationFailedRetryCount?this.dialog.close():this.actionCreationFailedRetryCount--})}syncForm(){this.templateCtrl.valueChanges.subscribe(me=>this.updateTemplateCtrl(me)),this.titleCtrl.valueChanges.subscribe(me=>this.updateTitleCtrl(me))}registerAutocompleteOnInputs(me){this.subs.push(me.inputStream.pipe((0,x.b)(300),(0,i.x)(),(0,m.b)(we=>{const Re=me.resultContainerKey;this.resultContainers[Re]=""===we?[]:this.resultContainers[Re]}),(0,E.h)(we=>""!==we),(0,C.w)(we=>(this.isSearchLoading=!0,""===we?(0,e.of)([]):"contactResult"===me.resultContainerKey?this.searchContact(we):this.searchUser(we))),(0,v.U)(we=>(this.isSearchLoading=!1,we.slice(0,10)))).subscribe(we=>this.resultContainers[me.resultContainerKey]=we)),this.observeInputEvents(me)}observeInputEvents(me){const we=(0,a.R)(me.inputRef.nativeElement,"blur"),Re=(0,a.R)(me.inputRef.nativeElement,"focus");this.subs=[...this.subs,we.subscribe(Ne=>{setTimeout(()=>me.hideDropdown=!0,100)}),Re.subscribe(Ne=>{me.hideDropdown=!1})]}getPropLabel(me){const we=this.props.find(Re=>Re.name===me);return we?we.label:""}getProp(me){return this.props.find(we=>we.name===me)}observeUser(me){this.user=me,this.responsibleCtrl.setValue(`${me.lastName}, ${me.firstName} (${me.email})`),this.action.responsibleEmail=me.email}updateTemplateCtrl(me){const we=this.templates.find(Re=>Re.id===me);this.action.templateId=we.id,this.action.priorityId=we.priorityId?we.priorityId:4,this.action.categoryId=we.categoryId,this.titleCtrl.setValue(this.templates.find(Re=>Re.id===me).title),this.updateForm()}updateTitleCtrl(me){this.action.title=this.titleCtrl.value}updateResponsible(me){this.responsibleCtrl.setValue(`${me.lastName}, ${me.firstName} (${me.email})`),this.action.responsibleEmail=me.email}updateContact(me){this.contactCtrl.setValue(`${me.LastName}, ${me.FirstName} (${me.Email})`),this.action.contactId=me.Id}updateForm(){12===this.templates.find(we=>we.id===this.templateCtrl.value).categoryId?(this.haveContact=!0,this.contactCtrl.setValidators([t.Validators.required,S.k])):(this.haveContact=!1,this.contactCtrl.clearValidators()),this.contactCtrl.updateValueAndValidity()}setProp(me,we){this.action[me]=we}searchUser(me){return(0,s.D)(this.scdService.search(me))}searchContact(me){return(0,s.D)(this.contactService.search(me))}clearControl(me){this.fGroup.controls[me].setValue("")}ngOnDestroy(){this.subs.forEach(me=>{me.unsubscribe()})}submit(){const me={};me.TemplateId=this.action.templateId,me.Title=this.action.title,me.PriorityId=4===this.action.priorityId?null:this.action.priorityId,me.StatusId=this.action.statusId,me.CategoryId=this.action.categoryId,me.ContactId=this.action.contactId,me.ResponsibleEmail=this.action.responsibleEmail,me.RequiredCustomFields={},this.callback(me),this.isActionCreating=!0}}return _e.\u0275fac=function(me){return new(me||_e)(p.\u0275\u0275directiveInject(L.d),p.\u0275\u0275directiveInject(N.K),p.\u0275\u0275directiveInject(j.y),p.\u0275\u0275directiveInject(P.T))},_e.\u0275cmp=p.\u0275\u0275defineComponent({type:_e,selectors:[["pulse-action-create"]],viewQuery:function(me,we){if(1&me&&(p.\u0275\u0275viewQuery(w,7),p.\u0275\u0275viewQuery(R,7),p.\u0275\u0275viewQuery(D,7)),2&me){let Re;p.\u0275\u0275queryRefresh(Re=p.\u0275\u0275loadQuery())&&(we.dialog=Re.first),p.\u0275\u0275queryRefresh(Re=p.\u0275\u0275loadQuery())&&(we.responsibleInputRef=Re.first),p.\u0275\u0275queryRefresh(Re=p.\u0275\u0275loadQuery())&&(we.contactInputRef=Re.first)}},decls:69,vars:48,consts:[["dialog",""],[1,"modal-header"],[1,"icon-file-check"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"form-fields-container"],[1,"pulse-form-field"],["class","pulse-form-radiobox-group",4,"ngFor","ngForOf"],["for","title"],["type","text","id","title","formControlName","titleCtrl",1,"pulse-input"],["class","icon-close2",3,"click",4,"ngIf"],[1,"pulse-form-field","pulse-select-container"],["for","resp"],["type","text","id","title","formControlName","responsibleCtrl","autocomplete","off",1,"pulse-input",3,"placeholder"],["responsibleInputRef",""],["class","pulse-dropdown for-input",3,"ngClass",4,"ngIf"],["pulseDropdown","",1,"pulse-dropdown-toggle",3,"pulseDropdownMenu"],["toggleRef","pulseDropdown"],[3,"innerHTML"],["dropdownMenuRef",""],[1,"pulse-dropdown"],[1,"pulse-dropdown-menu",3,"click"],[3,"click",4,"ngFor","ngForOf"],["toggleRef2","pulseDropdown"],["dropdownMenuRef2",""],[1,"pulse-form-field","pulse-select-container",3,"ngClass"],["for","contact"],["type","text","id","contact","formControlName","contactCtrl","autocomplete","off","placeholder","search contact by name",1,"pulse-input"],["contactInputRef",""],[1,"spacer"],[1,"modal-buttons"],[1,"pulse-btn","save",3,"disabled","ngStyle","click"],["title","Ok",3,"ngClass"],[1,"pulse-btn","cancel",3,"click"],["title","Cancel",1,"icon-close2"],[1,"pulse-form-radiobox-group"],["type","radio","formControlName","templateCtrl",1,"radio",3,"value"],[1,"icon-close2",3,"click"],[1,"pulse-dropdown","for-input",3,"ngClass"],[1,"pulse-dropdown-menu"],[4,"ngIf"],[3,"click"]],template:function(me,we){if(1&me){const Re=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),p.\u0275\u0275element(4,"i",2),p.\u0275\u0275text(5),p.\u0275\u0275pipe(6,"translate"),p.\u0275\u0275elementEnd()(),p.\u0275\u0275elementStart(7,"div",3)(8,"form",4)(9,"div",5)(10,"div",6),p.\u0275\u0275template(11,Y,4,2,"label",7),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(12,"div",6)(13,"label",8),p.\u0275\u0275text(14),p.\u0275\u0275pipe(15,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275element(16,"input",9),p.\u0275\u0275template(17,_,1,0,"i",10),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(18,"div",11)(19,"label",12),p.\u0275\u0275text(20),p.\u0275\u0275pipe(21,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275element(22,"input",13,14),p.\u0275\u0275pipe(24,"translate"),p.\u0275\u0275template(25,y,1,0,"i",10),p.\u0275\u0275template(26,Z,4,5,"div",15),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(27,"div",11)(28,"label",8),p.\u0275\u0275text(29),p.\u0275\u0275pipe(30,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(31,"div",16,17),p.\u0275\u0275element(33,"span",18),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(34,"div",null,19)(36,"div",20)(37,"ul",21),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(Re),p.\u0275\u0275reference(32).close()}),p.\u0275\u0275template(38,B,2,1,"li",22),p.\u0275\u0275elementEnd()()()(),p.\u0275\u0275elementStart(39,"div",11)(40,"label",8),p.\u0275\u0275text(41),p.\u0275\u0275pipe(42,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(43,"div",16,23),p.\u0275\u0275element(45,"span",18),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(46,"div",null,24)(48,"div",20)(49,"ul",21),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(Re),p.\u0275\u0275reference(44).close()}),p.\u0275\u0275template(50,X,2,1,"li",22),p.\u0275\u0275elementEnd()()()(),p.\u0275\u0275elementStart(51,"div",25)(52,"label",26),p.\u0275\u0275text(53),p.\u0275\u0275pipe(54,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275element(55,"input",27,28),p.\u0275\u0275template(57,ee,1,0,"i",10),p.\u0275\u0275template(58,oe,4,5,"div",15),p.\u0275\u0275elementEnd()(),p.\u0275\u0275element(59,"div",29),p.\u0275\u0275elementStart(60,"div",30)(61,"button",31),p.\u0275\u0275listener("click",function(){return we.submit()}),p.\u0275\u0275element(62,"i",32),p.\u0275\u0275text(63),p.\u0275\u0275pipe(64,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(65,"button",33),p.\u0275\u0275listener("click",function(){return p.\u0275\u0275restoreView(Re),p.\u0275\u0275reference(1).close()}),p.\u0275\u0275element(66,"i",34),p.\u0275\u0275text(67),p.\u0275\u0275pipe(68,"translate"),p.\u0275\u0275elementEnd()()()()()}if(2&me){const Re=p.\u0275\u0275reference(35),Ne=p.\u0275\u0275reference(47);p.\u0275\u0275advance(5),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(6,26,"{ActionModule.CreateAction}")," "),p.\u0275\u0275advance(3),p.\u0275\u0275property("formGroup",we.fGroup),p.\u0275\u0275advance(3),p.\u0275\u0275property("ngForOf",we.templates),p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(15,28,"{ActionModule.Title}")," "),p.\u0275\u0275advance(3),p.\u0275\u0275property("ngIf",""!==we.titleCtrl.value),p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(21,30,"{ActionModule.Responsible}")," "),p.\u0275\u0275advance(2),p.\u0275\u0275propertyInterpolate("placeholder",p.\u0275\u0275pipeBind1(24,32,"{searchScdUser}")),p.\u0275\u0275advance(3),p.\u0275\u0275property("ngIf",""!==we.responsibleCtrl.value),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",we.resultContainers.userResult&&""!==we.responsibleCtrl.value&&we.responsibleCtrl.dirty),p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(30,34,"{ActionModule.Priority}")," "),p.\u0275\u0275advance(2),p.\u0275\u0275property("pulseDropdownMenu",Re),p.\u0275\u0275advance(2),p.\u0275\u0275property("innerHTML",null==we.getProp("priorityId").values[we.action.priorityId-1]?null:we.getProp("priorityId").values[we.action.priorityId-1].html,p.\u0275\u0275sanitizeHtml),p.\u0275\u0275advance(5),p.\u0275\u0275property("ngForOf",we.getProp("priorityId").values),p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(42,36,"{ActionModule.Status}")," "),p.\u0275\u0275advance(2),p.\u0275\u0275property("pulseDropdownMenu",Ne),p.\u0275\u0275advance(2),p.\u0275\u0275property("innerHTML",null==we.getProp("statusId").values[we.action.statusId-1]?null:we.getProp("statusId").values[we.action.statusId-1].getHtml(we.translator),p.\u0275\u0275sanitizeHtml),p.\u0275\u0275advance(5),p.\u0275\u0275property("ngForOf",we.getProp("statusId").values),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(44,G,!we.haveContact)),p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(54,38,"{ActionModule.Contact}")," "),p.\u0275\u0275advance(4),p.\u0275\u0275property("ngIf",""!==(null==we.contactCtrl?null:we.contactCtrl.value)),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",we.resultContainers.contactResult&&""!==we.contactCtrl.value),p.\u0275\u0275advance(3),p.\u0275\u0275property("disabled",we.fGroup.invalid||we.isActionCreating)("ngStyle",p.\u0275\u0275pureFunction1(46,se,we.isActionCreating?.5:1)),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngClass",we.isActionCreating?"icon-loading spin":"icon-check-mark"),p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(64,40,"{ActionModule.CreateAction}")," "),p.\u0275\u0275advance(4),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(68,42,"{ActionModule.Close}")," ")}},directives:[I.a,t.\u0275NgNoValidate,t.NgControlStatusGroup,t.FormGroupDirective,A.sg,t.RadioControlValueAccessor,t.DefaultValueAccessor,t.NgControlStatus,t.FormControlName,A.O5,A.mk,O.oO,T.O,c.w,A.PC,O.Zl],pipes:[M.k,A.uU],styles:[""]}),_e})()},43200:(Se,pe,r)=>{"use strict";function t(s){const o=s.value,d=o.indexOf("("),u=o.indexOf(")");return function a(s){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(s).toLowerCase())}(o.slice(d+1,u).trim())?null:{invalidUser:!0}}function e(s){return null}r.d(pe,{h:()=>t,k:()=>e})},71690:(Se,pe,r)=>{"use strict";r.d(pe,{n:()=>c});var t=r(5e3),e=r(39050);let a=(()=>{class M{constructor(){}getColor(R){switch(R){case 1:return"blue";case 2:return"green";case 3:return"red";case 4:return"orange";default:return"black"}}log(R,D,Y,_){this.getColor(Y)}}return M.\u0275fac=function(R){return new(R||M)},M.\u0275prov=t.\u0275\u0275defineInjectable({token:M,factory:M.\u0275fac,providedIn:"root"}),M})();var s=r(69808),o=r(23322),d=r(87436);let u=(()=>{class M{transform(R,D){const Y=D.split(".");let _=R,y="";for(let H=0;H{class M{constructor(R,D){this.sortService=R,this.logger=D,this.date=new Date}ngOnInit(){}orderBy(R){this.sortState={property:R,isDesc:R!==this.sortState.property||!this.sortState.isDesc},this.data=this.sortService.orderBy(this.data,this.sortState)}}return M.\u0275fac=function(R){return new(R||M)(t.\u0275\u0275directiveInject(e.K),t.\u0275\u0275directiveInject(a))},M.\u0275cmp=t.\u0275\u0275defineComponent({type:M,selectors:[["pulse-datatable"]],inputs:{headerDefinitions:"headerDefinitions",data:"data",sortState:"sortState"},decls:6,vars:2,consts:[[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row",2,"background-color","#FFF","border-bottom","1px solid #cdd9e1"],["style","cursor: pointer; border-bottom: none;",3,"class","click",4,"ngFor","ngForOf"],[1,"pulse-table-body"],["class","pulse-table-row","style","background-color: #FFF; border-bottom: 1px solid #cdd9e1;",4,"ngFor","ngForOf"],[2,"cursor","pointer","border-bottom","none",3,"click"],["class","pulse-sort",3,"ngClass",4,"ngIf"],[1,"pulse-sort",3,"ngClass"],["style","border-bottom: none;",3,"class",4,"ngFor","ngForOf"],[2,"border-bottom","none"],[3,"ngSwitch"],[4,"ngSwitchCase"],["style","cursor: pointer",3,"click",4,"ngIf","ngIfElse"],["elseBlock",""],[2,"cursor","pointer",3,"click"],[3,"innerHTML"],[3,"title"],[4,"ngIf"],[4,"ngFor","ngForOf"],["style","padding: 5px; cursor: pointer;",3,"class","click",4,"ngIf"],[2,"padding","5px","cursor","pointer",3,"click"]],template:function(R,D){1&R&&(t.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2),t.\u0275\u0275template(3,i,5,7,"div",3),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(4,"div",4),t.\u0275\u0275template(5,T,2,1,"div",5),t.\u0275\u0275elementEnd()()),2&R&&(t.\u0275\u0275advance(3),t.\u0275\u0275property("ngForOf",D.headerDefinitions),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",D.data))},directives:[s.sg,s.O5,s.mk,o.oO,s.RF,s.n9],pipes:[d.k,u,s.uU],styles:["[_nghost-%COMP%]{word-break:break-word;word-wrap:break-word}.pulse-table[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]{padding-left:5px;padding-right:2px;padding-bottom:2px;font-size:12px}form[_ngcontent-%COMP%]{margin:20px;width:300px}"]}),M})()},26339:(Se,pe,r)=>{"use strict";r.d(pe,{V:()=>e});var t=r(38084);class e{constructor(s){this.showFullDesc=!0,this.canbeChange=!1,s?(this.id=s.Id,this.description=s.Description?s.Description:"",this.type=this.mapActionActivityType(s.TypeId),this.creationDate=s.Created,this.user={id:s.User.Id,firstName:s.User.FirstName,lastName:s.User.LastName,shortName:s.User.FirstName[0]+". "+s.User.LastName}):(this.description="",this.type=t.Qg[3])}setCanbeChange(s){this.canbeChange=!!this.user&&s===this.user.id}set description(s){this.shortDescription=s.slice(0,200)!==s?s.slice(0,200)+"...":s,this.fullDescription=s}get description(){return this.showFullDesc?this.fullDescription:this.shortDescription}mapActionActivityType(s){return{id:s,label:1===s?"{ActionModule.Call}":2===s?"{ActionModule.Visit}":3===s?"{ActionModule.Mail}":4===s?"{ActionModule.Other}":"",icon:1===s?"icon-phone":2===s?"icon-forum2":3===s?"icon-e-mail":4===s?"icon-plus":""}}edit(){this._edit()}delete(){this._delete()}}},8554:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>a});var t=r(38084),e=r(94938);class a extends e.x{constructor(o){const d=a.resolvePropName(o.FieldName?o.FieldName:o.DisplayName),u=d,g=o.DisplayName,i=o.DropdownValues?o.DropdownValues.map(C=>({value:C,text:C})):1===o.TypeId?[{value:"true",text:"true"},{value:"false",text:"false"}]:[],m=new Map;m.set(1,o.AutomaticallyAction),m.set(2,o.ManuallyCustomerBasedAction),m.set(3,o.ManuallyNotCustomerBasedAction);const E=new Map;E.set("detailView",o.ActionDetailView),E.set("filterView",o.SearchAndFilterSettings),super(d,u,g,!1,i,m,E),this.type=o.TypeId?o.TypeId:o.DropdownValues?2:0,this.id=o.Id,this.fieldName=o.FieldName?o.FieldName:o.DisplayName?o.DisplayName.toUpperCase():null,this.canbeFilter=o.SearchAndFilterSettings,this.isContactAsCustomProp=!!o.existsAsCustomField,this.isContactField=o.isContactField,this.values=this.values?this.values.filter(C=>"None"!==C.text):[]}static resolvePropName(o){return a.ensureUnicity(a.slugify(o))}static slugify(o){return o.replace(/ /g,"").replace(/\./g,"").toLowerCase()}static ensureUnicity(o){return t.vn.some(d=>d.name===o)?o+"b":o}}},94417:(Se,pe,r)=>{"use strict";r.d(pe,{m:()=>a});var t=r(26339);class e{constructor(){}set _dueDate(o){this.dueDate=o,this.dates.set(2,Object.assign(Object.assign({},this.dates.get(2)),{dateValue:o}))}set _creationDate(o){this.dates.set(1,o)}set _closingDate(o){this.dates.set(4,o)}set _escalationDate(o){this.escalationDate=o,this.dates.set(3,Object.assign(Object.assign({},this.dates.get(3)),{dateValue:o}))}get isOverdue(){return this.isDueDateExpired()}get responsibleMail(){return this.members?this.members.find(o=>o.isResponsible).email:null}get membersMails(){return this.members?this.members.map(o=>o.email):null}addDetail(o){this.description=o.Header.Description?o.Header.Description:"",this.creationDate=o.MetaDates.Created,this.closingDate=o.MetaDates.Closed,this.escalationDate=o.Dates.EscalationDate,this.dates=this.mapActionDates(o),this.activities=o.Activities.map(d=>new t.V(d)),this.members=[this.mapActionMember(o.People.Responsible,!0)].concat(o.People.Members.map(d=>this.mapActionMember(d,!1))),this.escalates=o.People.Escalates.map(d=>this.mapEscalate(d)),this.attachments=o.Attachments.map(d=>this.mapActionAttachment(d))}addHistory(o){this.history=o}addInterview(o){this.interview=o}addProperties(o){for(const[d,u]of o)this[d]=u}addActivity(o){this.activities.unshift(o)}isDueDateExpired(){if(this.dueDate){const o=this.addDays(this.dueDate,1),d=new Date(o.toString()).getTime();return(3!==this.statusId?(new Date).getTime():this.closingDate?new Date(this.closingDate.toString()).getTime():0)>=d}return!1}addDays(o,d){const u=new Date(o);return new Date(u.setDate(u.getDate()+d))}hasDetail(){return void 0!==this.creationDate}hasHistory(){return void 0!==this.history}hasInterview(){return void 0!==this.interview}mapActionDates(o){const d=new Map;return d.set(1,{dateLabel:"{ActionModule.CreatedDate}",dateValue:o.MetaDates.Created,dateProperty:"_creationDate"}),o.EmailTemplates.DueTemplateDefined&&d.set(2,{dateLabel:"{ActionModule.DueDate}",dateValue:o.Dates.DueDate,dateProperty:"dueDate"}),o.EmailTemplates.EscalationTemplateDefined&&d.set(3,{dateLabel:"{ActionModule.EscalationDate}",dateValue:o.Dates.EscalationDate,dateProperty:"escalationDate"}),3===o.Flags.StatusId&&d.set(4,{dateLabel:"{ActionModule.ClosedDate}",dateValue:o.MetaDates.Closed,dateProperty:"_closingDate"}),d}mapActionMember(o,d){return{id:o.Id,gid:o.Gid,firstName:o.FirstName,lastName:o.LastName,email:o.Email,orgId:o.OrgId,country:o.Country,roleId:o.RoleId,isResponsible:d||!1}}mapEscalate(o){return{id:o.Id,gid:o.Gid,firstName:o.FirstName,lastName:o.LastName,email:o.Email,orgId:o.OrgId,country:o.Country,roleId:o.RoleId}}mapActionAttachment(o){return{id:o.Id,extension:o.Extension,fileName:o.FileName}}}class a{static createAction(o,d){const u=new e;u.id=o.Id,u.title=o.Title,u.contact=o.Contact?{firstName:o.Contact.FirstName,lastName:o.Contact.LastName,company:o.Contact.Company}:null,u.categoryId=o.CategoryId,u.statusId=o.StatusId,u.priorityId=o.PriorityId?o.PriorityId:4,u.isActive=o.IsActive,u.dueDate=o.DueDate,u.creationDate=o.CreateDate,u.closingDate=o.ClosedDate,u.typeId=o.TypeId,u.isEditable=1!==o.TypeId&&!![2,3].includes(o.TypeId);let g=0===Object.keys(o.ContactData).length&&o.ContactData.constructor===Object;return 0===Object.keys(o.ContactData).length&&o.ContactData.constructor===Object||u.addProperties(a.getPropsFromContactData(o.ContactData,d)),u.addProperties(a.getDynamicProperties(a.getDynamicPropertiesValues(o.CustomFields),d)),3===u.typeId&&d&&d.filter(i=>i.isContactAsCustomProp).forEach(i=>{const m=d.filter(E=>!E.isContactAsCustomProp).find(E=>E.label===i.label);o.ContactData[i.fieldName]=u[m.name]}),g=0===Object.keys(o.ContactData).length&&o.ContactData.constructor===Object,0===Object.keys(o.ContactData).length&&o.ContactData.constructor===Object||u.addProperties(a.getPropsFromContactData(o.ContactData,d)),u.contactFirstName=o.Contact?o.Contact.FirstName:"",u.contactLastName=o.Contact?o.Contact.LastName:"",u.contactCompany=o.Contact?o.Contact.Company:"",u}static getPropsFromContactData(o,d){const u=new Map;return d.forEach(g=>{const x=Object.keys(o).find(i=>i===g.fieldName);x&&u.set(g.name,o[x])}),u}static createEmptyAction(){const o=new e;return o.priorityId=4,o.statusId=1,o}static getDynamicPropertiesValues(o){const d=new Map([]);if(o)return o.forEach(u=>{switch(u.Type){case 0:d.set(u.ConfigurationId,u.FreeTextValue);break;case 1:d.set(u.ConfigurationId,u.CheckboxValue);break;case 2:d.set(u.ConfigurationId,u.DropdownValue)}}),d}static getDynamicProperties(o,d){const u=new Map;for(const[g,x]of o)if(d.filter(i=>i.id===g)[0]){const i=d.filter(m=>m.id===g)[0].name;u.set(i,x)}return u}}},94938:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>t});class t{constructor(a,s,o,d,u,g,x){this.name=a,this.sortName=s,this.label=o,this.show=d,this.values=u,this.typeBasedVisibilityMap=g,this.viewBasedVisilibityMap=x}}},29527:(Se,pe,r)=>{"use strict";r.d(pe,{_:()=>t});class t{}},91732:(Se,pe,r)=>{"use strict";r.d(pe,{o:()=>e});var t=r(19083);const e={switchViewAction:{type:t.q.toggle,label:"Dashboard :",options:["dashboard","area"],order:3,callback:()=>{}},createActionAction:{icon:"icon-plus",label:"{ActionModule.CreateAction}",order:2,callback:()=>{}},exportActionsAction:{icon:"icon-download",label:"{ActionModule.Export}",type:t.q.dropdown,order:1,callback:()=>{}},addColumnAction:{icon:"icon-table-column-plus-after",label:"{ActionModule.OptionalColumns}",type:t.q.multiselect,open:!1,order:0,callback:()=>{}},exportPptx:{label:"ppt download",icon:"icon-file-ppt",order:7,callback:()=>{}},exportPdf:{label:"pdf download",icon:"icon-file-pdf2",order:8,callback:()=>{}}}},38084:(Se,pe,r)=>{"use strict";r.d(pe,{Qg:()=>o,pY:()=>d,vn:()=>x,Gv:()=>E,wE:()=>i,wD:()=>m});var t=r(29527);class e extends t._{constructor(v,h,S,p){super(),this.id=v,this.label=h,this.initial=S,this.cssClass=p}get inTablehtml(){return this._html=` ${this.initial} `,this._html}set html(v){this._html=v}get html(){return this._html=` ${this.initial} ${this.label} `,this._html}get invertedHtml(){return this._html=` ${this.initial} `,this._html}}var a=r(94938);class s extends t._{constructor(v,h,S){super(),this.id=v,this.label=h,this.cssClass=S}get html(){return this._html=` ${this.label} `,"toTranslate"}set html(v){this._html=v}getHtml(v){return this._html=` ${v.translate(this.label)} `,this._html}getIntableHtml(v){return this._html=` ${v.translate(this.label)} `,this._html}getInvertedHtml(v){return this._html=` ${v.translate(this.label)} `,this._html}}const o=[{id:1,label:"{ActionModule.Call}",icon:"icon-phone"},{id:2,label:"{ActionModule.Visit}",icon:"icon-forum2"},{id:3,label:"{ActionModule.Mail}",icon:"icon-e-mail"},{id:4,label:"{ActionModule.Other}",icon:"icon-plus"}],d=[{name:"Red Alert",iconColor:"#D9534F",iconClass:"icon-alert-outline"},{name:"Orange Alert",iconColor:"#F0AD4E",iconClass:"icon-radiobox-marked"},{name:"Finished Interview",iconColor:"#5BC0DE",iconClass:"icon-information"},{name:"Manual action (customer based)",iconColor:"#0099CC",iconClass:"icon-thumb-up"},{name:"Manual action (process related)",iconColor:"#0033CC",iconClass:"icon-thumb-up"}],u=[new s(1,"{ActionModule.Open}","status-label"),new s(2,"{ActionModule.InProgress}","status-label"),new s(3,"{ActionModule.Closed}","status-label")],g=[new e(1,"High","H","label-high"),new e(2,"Medium","M","label-medium"),new e(3,"Low","L","label-low"),new e(4,"None"," ","")],x=[new a.x("id","id","ID",!0),new a.x("statusId","statusId","{ActionModule.Status}",!0,u),new a.x("priorityId","priorityId","{ActionModule.Priority}",!0,g),new a.x("title","title","{ActionModule.Title}",!0),new a.x("contact","contact.firstName","{ActionModule.Contact}",!0),new a.x("dueDate","dueDate","{ActionModule.DueDate}",!0),new a.x("escalationDate","escalationDate","{ActionModule.EscalationDate}",!1),new a.x("description","description","Description",!1)];let i={minYear:2015,maxYear:2030,format:"DD[.]MM[.]YYYY",formatTitle:"MMMM YYYY",formatDays:"dd",firstCalendarDay:0,inputClass:"inline-form",placeholder:"Select a date"};const m=[{property:"date",label:"{ActionModule.Date}",class:"center col-span-4",template:"date",sortProperty:"timestamp"},{property:"user.shortName",label:"{ActionModule.MadeBy}",class:"center col-span-4",template:"object",sortProperty:"user.firstName"},{property:"modifiedProperty",label:"{ActionModule.Field}",class:"center col-span-4",template:"text",sortProperty:"modifiedProperty"},{property:"oldValue",label:"{ActionModule.OldValue}",class:"center col-span-4",template:"text",sortProperty:"oldValue"},{property:"newValue",label:"{ActionModule.NewValue}",class:"center col-span-4",template:"text",sortProperty:"newValue"}],E=[{property:"creationDate",label:"{ActionModule.Date}",class:"center col-span-4",template:"date",sortProperty:"creationDate"},{property:"user.shortName",label:"{ActionModule.CreatedBy}",class:"center col-span-3",template:"object",sortProperty:"user.shortName"},{property:"type",label:"{ActionModule.Type}",class:"center col-span-2",template:"icon",sortProperty:"type"},{property:"description",label:"{ActionModule.Description}",class:"left col-span-6",template:"text",sortProperty:"description"},{property:"creationDate",label:"",class:"left col-span-2",template:"actions",sortProperty:"creationDate",actions:[{icon:"icon-edit",label:"edit",callback:"edit"},{icon:"icon-delete",label:"delete",callback:"delete"}]}]},34021:(Se,pe,r)=>{"use strict";r.d(pe,{r:()=>d});var t=r(591),e=r(5e3),a=r(62474),s=r(7259),o=r(65351);let d=(()=>{class u{constructor(x,i,m){this.webApi=x,this.actionService=i,this.groupBy=m,this.actionTrackingSub$=new t.X(void 0),this.tableDataSub$=new t.X(void 0),this.possibleDrilldowns$=new t.X(void 0),this.actionCategories$=new t.X(void 0),this.isChartViewActive=!0,this.subs=[],this.filters=[[]],this.setupFiltering()}setupFiltering(){this.subs.push(this.actionService.areActionsloaded$.subscribe(x=>{x&&this.subs.push(this.actionService.actions$.subscribe(i=>{const m=this.groupBy.transform(i,"categoryId");this.actionCategories$.next(m.map(E=>({name:E.key.toString(),data:[E.value.length]}))),this.setFilter(i.map(E=>E.id))}))}))}setFilter(x){this.filters=x,this.isChartViewActive?(this.actionTrackingSub$.next(void 0),this.getChartData(!0)):this.isChartViewActive||void 0===this.splitter?this.getTable():this.recalculateTable(this.splitter)}getInterviewCount(){return this.webApi.post("/api/ActionTrackingDashboard/InterviewCount",this.filters)}getChartData(x=!1){(void 0===this.actionTrackingSub$.value||x)&&this.webApi.post("/api/ActionTrackingDashboard",this.filters).then(i=>{this.actionTrackingSub$.next(i)})}getTable(){this.webApi.get("/api/ActionTrackingDashboard/contactFieldConfiguration").then(x=>{this.possibleDrilldowns$.next(x),this.webApi.post("/api/ActionTrackingDashboard/getTableData",{splitter:{level1:x[0].FieldName,level2:""},filterData:this.filters}).then(m=>{const E=m&&this.summarizeTable(m);this.tableDataSub$.next(E)})})}recalculateTable(x){this.splitter=x,this.webApi.post("/api/ActionTrackingDashboard/getTableData",{splitter:x,filterData:this.filters}).then(m=>{const E=m&&this.summarizeTable(m);this.tableDataSub$.next(E)})}summarizeTable(x){return this.summarizeColumns(this.summarizeRows(x))}summarizeRows(x){return x.forEach(m=>{let E=0;for(const C in m)m.hasOwnProperty(C)&&(E+=C.toLowerCase().includes("splitter")?0:m[C]);m.total=E}),[...x]}summarizeColumns(x){const i={};for(const E in x[0])if(x[0].hasOwnProperty(E)){const C=0===Object.keys(x[0]).indexOf(E),v=0===Object.keys(x[0]).indexOf(E)||E.toLowerCase().includes("splitter");i[E]=C?"Total":v?"":x.reduce((h,S)=>h+S[E],0)}const m=[...x];return m.push(i),m}}return u.\u0275fac=function(x){return new(x||u)(e.\u0275\u0275inject(a.f),e.\u0275\u0275inject(s.c),e.\u0275\u0275inject(o.l))},u.\u0275prov=e.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac}),u})()},17835:(Se,pe,r)=>{"use strict";r.d(pe,{R:()=>i});var t=r(591),e=r(38084),a=r(29527);class s extends a._{constructor(E){super(),this.id=E.Id,this.label=E.Name,this.type=E.ActionType,this.value=""+this.id,this.iconClass=this.getClass(E),this.iconColor=this.getColor(E)}get html(){return this._html=` ${this.label} `,this._html}set html(E){this._html=E}get iconHtml(){return this._iconHtml=``,this._iconHtml}get labelHtml(){return this._labelHtml=` ${this.label} `,this._labelHtml}getClass(E){const C=e.pY.find(v=>v.name===E.Name);return C?C.iconClass:""}getColor(E){const C=e.pY.find(v=>v.name===E.Name);return C?C.iconColor:""}}var o=r(8554),d=r(94938),u=r(5e3),g=r(22313),x=r(54620);let i=(()=>{class m{constructor(C,v){this.sanitizer=C,this.projectService=v,this.properties$=new t.X([])}loadProperties(C,v){const h=this.resolveCategoryProp(C),L=[...this.resolveFixedProps(),...this.resolveDynamicProps(v)];L.splice(3,0,h),this.sanitizeHTML(L),this._props=L,this.properties$.next(L)}getPropsByNames(...C){let v=[];return v=this._props.filter(h=>C.includes(h.name)),v}resolveDynamicProps(C){return C.map(v=>new o.i(v))}resolveFixedProps(){return e.vn}resolveCategoryProp(C){const v=C.map(S=>new s(S));return new d.x("categoryId","categoryId","{ActionModule.ActionCategory}",!0,v)}sanitizeHTML(C){C.forEach(v=>{v.values&&(v.values=v.values.map(h=>("boolean"!=typeof h&&(h.html=this.sanitizer.bypassSecurityTrustHtml(h.html)),h)))})}filterCategoryPropValues(C){this._props[3].values=this._props[3].values.filter(v=>C.includes(v.id)),this.properties$.next(this._props)}getFilterCategoryLabel(C){if(C){const v=this._props[3].values.find(h=>C===h.id);return v?v.label:null}}getPropertyNameFromFieldName(C){const h=this._props.filter(S=>S instanceof o.i).find(S=>S.fieldName===C);return h&&h.name?h.name:null}getPropByName(C){if(this._props)return this._props.find(v=>v.name===C)}updatePropertyValues(C){const v=this._props.filter(h=>h instanceof o.i).filter(h=>0===h.type);v.forEach(h=>{const p=C.map(L=>L[h.name]).filter((L,N,j)=>j.indexOf(L)===N);h.values=p.map(L=>({value:L,text:L})).filter(L=>L.value)}),this._props.forEach(h=>{h instanceof o.i&&v.map(S=>S.id).includes(h.id)&&(h=v.find(S=>S.id===h.id))}),this.properties$.next(this._props)}addProps(C){this._props=[...this.properties$.value,...C],this.properties$.next([...this.properties$.value,...C])}filterOutCustomFieldAsContactField(C){const v=C.filter(p=>p instanceof o.i&&!p.isContactField),h=C.filter(p=>p instanceof o.i&&p.isContactField);return C.filter(p=>!v.includes(p)||!h.map(L=>L.label).includes(p.label))}getPropertiesFromStorage(C){const v=this.projectService.projectId,h=C.slice(),S=JSON.parse(localStorage.getItem("actionsColumnDefs"));return S&&S.projectId===v&&S.columnDefs.forEach(p=>{const L=C.map(N=>N.name).indexOf(p.name);-1!==L&&(h[L].show=p.show)}),h}updatePropsVisibility(C){this.properties$.value.filter(v=>!["id","escalationDate"].includes(v.name)).forEach(v=>{v.show=C.some(h=>h.value===v.name)}),this.properties$.next(this.properties$.value)}}return m.\u0275fac=function(C){return new(C||m)(u.\u0275\u0275inject(g.DomSanitizer),u.\u0275\u0275inject(x.k))},m.\u0275prov=u.\u0275\u0275defineInjectable({token:m,factory:m.\u0275fac}),m})()},7259:(Se,pe,r)=>{"use strict";r.d(pe,{c:()=>R});var t=r(40520),e=r(591),a=r(8929),s=r(30567),o=r(21086),d=r(24850),u=r(27221),g=r(87224),x=r(22868),i=r(92198),m=r(53716),E=r(75229),C=(()=>((C||(C={})).GetManualActionTemplates="/actionTemplate/manual",C))(),v=r(26339);class h{constructor(Y){this.date=Y.Timestamp,this.user=Y.User?{shortName:`${Y.User.FirstName[0]}. ${Y.User.LastName}`,firstName:Y.User.FirstName,lastName:Y.User.LastName,email:Y.User.Email}:null,this.isSystemChange=!Y.User,this.systemChangeNotification=Y.User?void 0:Y.FieldName,this.isModificationChange=!(!Y.OldValue&&!Y.NewValue),this.modifiedProperty=Y.FieldName,this.oldValue=this.isObject(Y.OldValue)?Y.OldValue.Email:Y.OldValue,this.newValue=this.isObject(Y.NewValue)?Y.NewValue.Email:Y.NewValue}get changeMessage(){return this._changeMessage="",this.isSystemChange?(this._changeMessage=this.systemChangeNotification,this._changeMessage):(this._changeMessage=this.oldValue&&""!==this.oldValue?`${this.user.shortName} modified ${this.cleanedModifiedProperty()} from ${this.oldValue} to ${this.newValue}`:"Member"===this.cleanedModifiedProperty()||"Activity"===this.cleanedModifiedProperty()?`${this.user.shortName} added ${this.newValue} to ${this.cleanedModifiedProperty()}`:`${this.user.shortName} set ${this.cleanedModifiedProperty()} to ${this.newValue} `,this._changeMessage)}cleanedModifiedProperty(){return this.modifiedProperty=this.modifiedProperty.replace(" changed",""),this.modifiedProperty=this.modifiedProperty.replace(" added",""),this.modifiedProperty}isObject(Y){return"object"==typeof Y}}var S=r(8554),p=r(94417),L=r(5e3),N=r(94761),j=r(39050),P=r(17835),I=r(54620),A=r(35857),O=r(22313),T=r(22290);const M="api/followUp/project",w="api/followUp/projects";let R=(()=>{class D{constructor(_,y,H,$,K,z,G){this.apiService=_,this.sortService=y,this.propService=H,this.projectGlobalService=$,this.filterService=K,this.sanitizer=z,this.toaster=G,this._actions=[],this.actions$=new e.X([]),this.selectedAction$=new e.X(null),this.manualTemplates$=new e.X([]),this.actionCount$=new e.X(0),this.filteredActionCount$=new e.X(0),this.isInterviewPending$=new e.X(!1),this.isDetailPending$=new e.X(!1),this.isHistoryPending$=new e.X(!1),this.areActionsPending$=new e.X(!0),this.areActionsloaded$=new e.X(!1),this.fiscalYears$=new a.xQ,this.observeProject(),this.fetchInitData()}observeProject(){this.projectId=this.projectGlobalService.projectId,this.projectGlobalService.projectObserv.subscribe(_=>{_&&(this.projectId=_.id)})}fetchInitData(){const _=this.apiService.get("/api/followUp/actionCategory"),y=this.apiService.get(`/${M}/${this.projectId}/contactFieldConfiguration`),H=this.apiService.get(`/${M}/${this.projectId}/customFieldConfiguration`),$=this.apiService.post(`/${w}/${this.projectId}/actions/overview?useOptimizedQuery=true`,{}),K=this.apiService.get(`/${M}/${this.projectId}/contactFieldConfiguration/contact_data_values`),z=(0,s.D)(_,y,H,K,$);this.areActionsPending$.next(!0),z.subscribe(G=>{this.areActionsPending$.next(!1),this.loadProperties(G[0],G[1],G[2],G[3]),this.loadActions(G[4].Actions)})}updateAction(_,y){return this.apiService.post(`/${w}/${this.projectId}/actions/${_}`,y).pipe((0,d.U)($=>!0),(0,u.K)($=>(this.toaster.error($.error.Message),(0,o.of)(!1))))}createAction(_){return this.apiService.post(`/${w}/${this.projectId}/actions`,_).pipe((0,g.P)(),(0,d.U)(y=>this.addAction(y)))}addAction(_){const y=this.propService.properties$.value.filter($=>$ instanceof S.i),H=p.m.createAction(_,y);return this.actions$.value.unshift(H),this.actions$.next(this.actions$.value),this.actionCount$.next(this.actionCount$.value+1),this.filteredActionCount$.next(this.filteredActionCount$.value+1),this.toaster.success("action successfully created"),this._actions=this.actions$.value,H}updateCustomField(_,y){return this.apiService.post(`/${w}/${this.projectId}/actions/${_}/customFields`,y)}addActivity(_,y){this.apiService.post(`/${w}/${this.projectId}/actions/${_}/activities`,{TypeId:y.type.id,Description:y.description}).subscribe(K=>{this.actions$.value.find(G=>G.id===_).addActivity(new v.V(K)),this.actions$.next(this.actions$.value)})}updateActivity(_,y,H){this.apiService.post(`/${w}/${this.projectId}/actions/${_}/activities/${y}`,{TypeId:H.type.id,Description:H.description}).subscribe(z=>{if(z){const G=this.actions$.value.find(B=>B.id===_),Z=G.activities.findIndex(B=>B.id===y);G.activities[Z]=new v.V(z)}})}deleteActivity(_,y){this.apiService.delete(`/${w}/${this.projectId}/actions/${_}/activities/${y}`).pipe((0,x.b)(()=>{const $=this.actions$.value.find(z=>z.id===_),K=$.activities.find(z=>z.id===y);$.activities.splice($.activities.indexOf(K),1)})).subscribe(()=>!0)}getActionExportUrl(_,y){return this.apiService.post(`/${w}/${this.projectId}/exports/${_}`,y)}setAsResponsible(_,y){return this.apiService.post(`/${w}/${this.projectId}/actions/${_}/responsible`,{UserId:y})}downloadInterview(_){const y=this.apiService.get(`/api/SurveySingleInterview/GetInterviewAsPdf/${this.projectId}/${_}`,{responseType:"text"}),H=new e.X(!0);return y.subscribe($=>{m.p.downloadFile($,"application/pdf","pulseInterview.pdf"),this.completeStream(H)},$=>{this.toaster.error("an error occured during interview download"),this.completeStream(H)}),H}completeStream(_){_.next(!1),_.complete()}addPerson(_,y,H){this.apiService.post(`/${w}/${this.projectId}/actions/${_}/${H.isEscalate?"escalates":"members"}`,{UserEmail:y.email,sendActionCreationEmail:H.shouldSendEmail,PersonalNote:H.note}).subscribe(G=>{const Z=this.actions$.value.find(B=>B.id===_);H.isEscalate?Z.escalates.push(Object.assign({id:G.id},y)):Z.members.push(Object.assign({id:G.id,isResponsible:!1},y))},G=>{this.toaster.error(G.error.Message)})}deletePerson(_,y,H){this.apiService.delete(`/${w}/${this.projectId}/actions/${_}/${H?"escalates":"members"}/${y}`).subscribe(()=>{const K=this.actions$.value.find(G=>G.id===_),z=H?K.escalates.find(G=>G.id===y):K.members.find(G=>G.id===y);H?K.escalates.splice(K.escalates.indexOf(z),1):K.members.splice(K.members.indexOf(z),1)})}getDetail(_){return this.apiService.get(`/${w}/${this.projectId}/actions/${_}`).pipe((0,x.b)(y=>this.actions$.value.find(H=>H.id===y.Id).addDetail(y)),(0,d.U)(y=>this.actions$.value.find(H=>H.id===y.Id)))}addHistory(_){this.apiService.get(`/${w}/${this.projectId}/actions/${_}/changes`).subscribe(y=>{const H=this.actions$.value.find($=>$.id===_);y=y.map($=>new h($)),H.addHistory(y)})}addInterview(_){this.isInterviewPending$.next(!0),this.apiService.get(`/api/SurveySingleInterview/GetActionDetail/${this.projectId}/${_}`).subscribe(y=>{this.isInterviewPending$.next(!1),this.actions$.value.find($=>$.id===_).addInterview(new E.D(y,this.sanitizer))},y=>{this.isInterviewPending$.next(!1)})}addOrUpdateDetail(_){return this.isDetailPending$.next(!0),this.apiService.get(`/${w}/${this.projectId}/actions/${_}`).pipe((0,g.P)(),(0,x.b)(y=>{this.isDetailPending$.next(!1),this.actions$.value.find($=>$.id===_).addDetail(y)}),(0,d.U)(y=>!0),(0,u.K)(y=>(this.isDetailPending$.next(!1),y)))}addOrUpdateHistory(_){return this.isHistoryPending$.next(!0),this.apiService.get(`/${w}/${this.projectId}/actions/${_}/changes`).pipe((0,g.P)(),(0,x.b)(y=>{const H=this.actions$.value.find($=>$.id===_);y=y.map($=>new h($)),H.addHistory(y),this.isHistoryPending$.next(!1)}),(0,d.U)(y=>!0),(0,u.K)(y=>(this.isDetailPending$.next(!1),y)))}getTemplates(){return this.apiService.get("/"+M+"/"+this.projectId+C.GetManualActionTemplates).pipe((0,d.U)(y=>this.mapActionManualTemplates(y)))}getExportTypes(){return this.apiService.get(`/${w}/${this.projectId}/exports`).pipe((0,d.U)(_=>this.mapActionExportTypes(_)))}generateAddProps(_,y){const H=[],$=Object.keys(_.ContactData),K=y.filter(z=>z.fieldName).map(z=>z.fieldName);return $.forEach(z=>{K.includes(z)||H.push({FieldName:z,DisplayName:z,Id:1e3-Math.floor(Math.random()*Math.floor(100)),SearchAndFilterSettings:!1,isContactField:!0})}),H}loadActions(_){if(_.length){this.checkAndUpdateMissingProps(_[0]);const y=this.propService.properties$.value.filter(G=>G instanceof S.i),H=_.map(G=>p.m.createAction(G,y));this._actions=H;const $=H.map(G=>G.categoryId).filter((G,Z,B)=>B.indexOf(G)===Z);this.propService.filterCategoryPropValues($);const K=H.map(G=>G);this.propService.updatePropertyValues(K);const z=this._actions.map(G=>this.getFiscalYear(new Date(G.creationDate))).filter((G,Z,B)=>B.indexOf(G)===Z);this.fiscalYears$.next(z),this.actionCount$.next(H.length),this.filteredActionCount$.next(H.length),this.actions$.next(H),this.areActionsloaded$.next(!0)}else this.actions$.next([])}getFiscalYear(_){const y=_.getFullYear(),H=new Date(y-1,9,1),$=new Date(y,8,31);return _>H&&_<$?y:y+1}checkAndUpdateMissingProps(_){const y=this.propService.properties$.value.filter(K=>K instanceof S.i),H=[];this.generateAddProps(_,y).forEach(K=>{H.push(new S.i(K))}),H.length>0&&this.propService.addProps(H)}loadProperties(_,y,H,$){const K=this.postProcessDynamicProperties(y,H,$);this.propService.loadProperties(_,K)}mapManualActionTemplate(_){return{id:_.Id,category:_.Category,isActive:_.IsActive,title:_.Title,type:_.Type}}mapActionManualTemplates(_){const y={Low:3,Medium:2,High:1};return _.map(H=>({id:H.Id,title:H.Title,categoryId:"Manual action (customer based)"===H.Category?12:13,priorityId:y[H.Priority]}))}mapActionExportTypes(_){let y=[];return y=_.map(H=>({id:H.Id,title:H.Title})),y}sort(_){const y=this.sortService.orderBy(this.actions$.value,_);this.actions$.next(y)}getActions(_){return this.apiService.post(`/${w}/${this.projectId}/actions/overview`,_)}filter(_){const y=_.find(H=>H.UserId);if(y)this.getActions([{ParameterType:"ActionUser",Parameters:y}]).subscribe($=>{const K=$.Actions?$.Actions.map(z=>z.Id):[];if(K.length>0){let z=this._actions.filter(Z=>K.includes(Z.id));const G=_.filter(Z=>!Z.UserId);G.length>0&&(z=this.filterService.filter(z,G)),this.actions$.next(z),this.filteredActionCount$.next(z.length)}else this.actions$.next([]),this.filteredActionCount$.next(0)},$=>{this.toaster.error("error occured while fechting actions data")});else{const H=this.filterService.filter(this._actions,_);this.actions$.next(H),this.filteredActionCount$.next(H.length)}}filterByTerm(_){const y=this.filterService.filterByTerm(this._actions,_,["id","title","contactFirstName","contactLastName","contactCompany"]);this.actions$.next(y),this.filteredActionCount$.next(y.length)}destroy(){this._actions=[],this.actions$.next([]),this.actionCount$.next(0)}postFile(_,y){const $=new FormData;$.append("actionId",""+y),$.append("file",_,_.name);const K=new t.aW("POST","/ActionAttachment/Upload",$);return this.apiService.postRequest(K).pipe((0,i.h)(z=>z.body),(0,d.U)(z=>z.body))}postProcessDynamicProperties(_,y,H){const $=_.map(G=>({Id:G.Id,DisplayName:G.DisplayName,DropdownValues:H[G.FieldName]?H[G.FieldName]:[],FieldName:G.FieldName,SearchAndFilterSettings:G.SearchAndFilterSettings,ActionDetailView:G.ActionDetailView,AutomaticallyAction:G.AutomaticallyAction,ManuallyCustomerBasedAction:G.ManuallyCustomerBasedAction,ManuallyNotCustomerBasedAction:G.ManuallyNotCustomerBasedAction,existsAsCustomField:y.map(Z=>Z.DisplayName).includes(G.DisplayName),isContactField:!0})),z=y.map(G=>({Id:G.Id,DisplayName:G.DisplayName,DropdownValues:G.DropdownValues,SearchAndFilterSettings:G.SearchAndFilterSettings,TypeId:G.Type,ActionDetailView:G.ActionDetailView,AutomaticallyAction:G.AutomaticallyAction,ManuallyCustomerBasedAction:G.ManuallyCustomerBasedAction,ManuallyNotCustomerBasedAction:G.ManuallyNotCustomerBasedAction,isContactField:!1}));return this.ensureDynamicPropUnicity(z,$),[...$,...z]}ensureDynamicPropUnicity(_,y){if(_.map(H=>H.Id).some(H=>y.map($=>$.Id).includes(H))){const H=y.find($=>_.map(z=>z.Id).includes($.Id));H.Id=parseInt(H.Id+"1",10)}}removeAttachment(_,y){this.apiService.post(`/ActionAttachment/DeleteAttachment/${y}`,{}).subscribe(()=>{const H=this.actions$.value.find(K=>K.id===_),$=H.attachments.indexOf(H.attachments.find(K=>K.id===y));H.attachments.splice($,1),this.toaster.info("attachment removed")})}}return D.\u0275fac=function(_){return new(_||D)(L.\u0275\u0275inject(N.s),L.\u0275\u0275inject(j.K),L.\u0275\u0275inject(P.R),L.\u0275\u0275inject(I.k),L.\u0275\u0275inject(A.i),L.\u0275\u0275inject(O.DomSanitizer),L.\u0275\u0275inject(T._W))},D.\u0275prov=L.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})()},65305:(Se,pe,r)=>{"use strict";r.d(pe,{y:()=>o});var t=r(5e3),e=r(94761),a=r(54620);let o=(()=>{class d{constructor(g,x){this.apiService=g,this.projectGlobalService=x,this.syncProjectId()}syncProjectId(){this.projectId=this.projectGlobalService.projectId,this.projectGlobalService.projectObserv.subscribe(g=>{g&&(this.projectId=g.id)})}search(g){return this.apiService.get(`/api/followUp/projects/${this.projectId}/contacts?search=${g}`,{search:g})}}return d.\u0275fac=function(g){return new(g||d)(t.\u0275\u0275inject(e.s),t.\u0275\u0275inject(a.k))},d.\u0275prov=t.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac}),d})()},35857:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(){}filter(o,d){return o.length?o.filter(g=>this.doesMatchSelections(g,d)):[]}doesMatchSelections(o,d){for(const u of d)if(u.range){const g=o[u.property];if(!g)return!1;{const x=new Date(g),m=x>u.range.max;if(x-1!==Object.keys(x).filter(i=>u.includes(i)).map(i=>String(x[i])).join("|").toLowerCase().indexOf(d.toLowerCase())||!d),g}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=t.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})()},39050:(Se,pe,r)=>{"use strict";r.d(pe,{K:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(){}getCompareResult(o){return o?o?this.athis.b?-1:0:void 0:this.a>this.b?1:this.a(u.setValuesToCompare(g,x),u.isPropertyPath(d.property)?u.setValuesFromChild(d.property):u.setValuesFromProperty(d.property),u.lowerCaseValues(),void 0===u.a||void 0===u.b?u.getCompareResultWithUndefined(d.isDesc):u.getCompareResult(d.isDesc))).slice()}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=t.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"}),a})()},69497:(Se,pe,r)=>{"use strict";r.d(pe,{s:()=>o});var t=r(5e3),e=r(62474),a=r(9133),s=function(d,u,g,x){return new(g||(g=Promise))(function(m,E){function C(S){try{h(x.next(S))}catch(p){E(p)}}function v(S){try{h(x.throw(S))}catch(p){E(p)}}function h(S){S.done?m(S.value):function i(m){return m instanceof g?m:new g(function(E){E(m)})}(S.value).then(C,v)}h((x=x.apply(d,u||[])).next())})};let o=(()=>{class d{constructor(g,x){this.requestExecutor=g,this.variableService=x,this.dashboards=[]}getDashboard(g){return new Promise((x,i)=>{this.requestExecutor.get("/api/dashboard/go/"+g).then(m=>s(this,void 0,void 0,function*(){if("TABLEAU DASHBOARD"===m.systemType){const E=yield this.requestExecutor.get(this.variableService.apiUrl+"/api/Tableau/views/"+m.guid);E?m.view=E:console.warn("output: no view id found for dashboard",m),x(m)}else x(m)}))})}prefetchDashboards(g){g.forEach(x=>s(this,void 0,void 0,function*(){const i=yield this.getDashboard(x.goId);if("TABLEAU DASHBOARD"===i.systemType){const m=yield this.requestExecutor.get(this.variableService.apiUrl+"/api/Tableau/views/"+i.guid);i.view=m}this.dashboards.push(i)}))}}return d.\u0275fac=function(g){return new(g||d)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.a))},d.\u0275prov=t.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()},27737:(Se,pe,r)=>{"use strict";r.d(pe,{S:()=>t});var t=(()=>{return(e=t||(t={})).group="group",e.dashboard="dash",e.FRT="FRT",e.bsc="bsc",e.link="link",e.sa="SurveyAnalytics",e.sa2="sa",e.txt="TextAnalytics",e.formview="Formview",e.default="Custom",t;var e})()},20731:(Se,pe,r)=>{"use strict";r.d(pe,{Y:()=>L});var t=r(591),e=r(61130),a=r(16458),s=r(32763),o=r(8805),d=r(46809),u=r(86217),g=r(71690),x=r(27737),i=r(5e3),m=r(62474),E=r(4371),C=r(54620),v=r(69808),h=r(9133),S=r(98613),p=r(69497);let L=(()=>{class N{constructor(P,I,A,O,T,c,M){this.webApi=P,this.navigationService=I,this.projectService=A,this.location=O,this.variables=T,this.userService=c,this.dashboardService=M,this.projectItems=new t.X(null),this.result={},this.documents=new e.t(1),this.announcements=new e.t(1),this.bucketName="pulse-project",this.navigationService.navigationItemsTop=[],this.sub=[this.projectItems.subscribe(w=>{w&&w.length>0&&(void 0!==this.projectItemInterceptor&&(w=this.projectItemInterceptor(w)),w.forEach(R=>{this.navigationService.navigationItemsTop.push(R)}))}),this.projectService.projectObserv.subscribe(w=>{w&&w.isSurvey&&this.filterRoutes().forEach(D=>this.navigationService.navigationItemsTop.push(D))})]}static getIcon(P){switch(P){case x.S.group:return"icon-folder-open";case x.S.dashboard:return"icon-chart-arc";case x.S.FRT:return"icon-table";case x.S.bsc:return"icon-view-module";case x.S.link:return"icon-globe";case x.S.sa:case x.S.sa2:return"icon-chart-bar";case x.S.formview:return"icon-view-module"}return console.warn("no icon for type: ",P),"icon-circle"}static getGroupName(P){switch(P){case x.S.group:return"Group";case x.S.dashboard:return"Dashboard";case x.S.FRT:return"Table";case x.S.bsc:return"Scorecard";case x.S.sa:case x.S.sa2:return"Survey Analytics";case x.S.link:return"Link";case x.S.formview:return"Formview"}return console.warn("no icon for type: ",P),""}ngOnInit(){}ngOnDestroy(){this.sub.forEach(P=>P.unsubscribe())}setProject(P,I){return new Promise((A,O)=>{this.projectItems.next(null),this.navigationService.navigationItemsBottom.length<=0&&(this.navigationService.navigationItemsBottom=[a.j.Config,s.x.Config]),this.projectService.setProject(P).then(T=>{if(this.project=T,P!==this.projectService.projectAlias&&void 0!==this.projectService.projectAlias){const w=this.location.path();this.location.replaceState(w.replace("/project/"+this.projectService.projectId,"/project/"+this.projectService.projectAlias))}this.getLandingpageItems(I),this.projectService.getHasMenuItems(),this.projectService.project.isSurvey&&this.navigationService.navigationItemsBottom.push(o.N.Config),this.userService.getUser();const M=+atob(this.variables.getCredentials()).split(";")[3];M&&M!==T.id&&(localStorage.removeItem("credentials"),location.reload()),A(T)}).catch(T=>O(T))})}getLandingpageItems(P){this.projectService.getItems(this.projectService.projectId).then(I=>{if(I){let A=I.sort((c,M)=>M-c).filter(c=>!c.groupId);A.filter(c=>"group"===c.type).forEach(c=>{c.children=I.filter(M=>"group"!==M.type&&M.groupId===c.id)}),A=A.filter(c=>"group"!==c.type||"group"===c.type&&c.children&&c.children.length>0);const T=this.getMappedItems(A,P||"/project/"+this.projectService.projectAlias);this.projectItems.next(T)}})}getAnnouncements(){this.webApi.get(`/api/project/${this.projectService.projectId}/announcement`).then(P=>{this.announcements.next(P)})}getDocuments(){this.webApi.get(`/api/project/${this.projectService.projectId}/document`).then(P=>{P.map(I=>{I.groupName?I.GlobalObject.mimeType=I.mimeType:I.mimeType=I.mimeType}),this.documents.next(P)})}filterRoutes(){return d.Z.detectDevice("iPad")?(N.Migration.find(I=>"action"===I.path),N.Migration):d.Z.detectMobile()?N.Migration.filter(P=>"actions"===P.path):N.Migration}getRole(P){}setLink(P,I){return P.type===x.S.group?P.directPath=`${I}/${P.id}`:P.type===x.S.sa||P.type===x.S.sa2?P.directPath=`${I}/sa/${P.id}`:P.type===x.S.bsc?P.directPath=`${I}/bsc/${P.id}`:P.type===x.S.dashboard?P.directPath=`${I}/dash/${P.id}`:0===P.path.indexOf("http")?(P.directPath=P.path,P.data.old=P.path):P.directPath=`${I}/${P.path}`,""}getMappedItems(P,I){if(P)return P.sort((A,O)=>A.order-O.order).map(A=>(A.data={navigation:A.name,icon:N.getIcon(A.type),groupName:N.getGroupName(A.type),role:this.getRole(A.type)},this.setLink(A,I),A.children&&(A.children=this.getMappedItems(A.children,I)),A))}}return N.Migration=[{path:"action",data:{icon:"icon-file-check",navigation:"Action Management",role:"canAccessActionsModule"},children:[{path:"management",component:u._,children:[{path:"datatable",component:g.n}],data:{navigation:"Action",icon:"icon-file-check",role:"canAccessActionsModule"}},{path:"management/:id",component:u._,children:[{path:"datatable",component:g.n}],data:{navigation:"Action",icon:"icon-file-check",role:"canAccessActionsModule",disabled:!0}}]}],N.\u0275fac=function(P){return new(P||N)(i.\u0275\u0275inject(m.f),i.\u0275\u0275inject(E.R),i.\u0275\u0275inject(C.k),i.\u0275\u0275inject(v.Ye),i.\u0275\u0275inject(h.a),i.\u0275\u0275inject(S.K),i.\u0275\u0275inject(p.s))},N.\u0275prov=i.\u0275\u0275defineInjectable({token:N,factory:N.\u0275fac}),N})()},92491:(Se,pe,r)=>{"use strict";r.d(pe,{F:()=>i});var t=r(5e3),e=r(62474),a=r(54620),s=r(22290),o=r(69808),d=r(5268),u=r(77093),g=r(87436);function x(m,E){if(1&m&&t.\u0275\u0275element(0,"pulse-survey-interview",10),2&m){const C=t.\u0275\u0275nextContext();t.\u0275\u0275property("projectId",C.projectService.getProjectId())("interviewId",C.interviewId)}}let i=(()=>{class m{constructor(C,v,h){this.webService=C,this.projectService=v,this.toasty=h,this.subs=[],this.closeInterview=new t.EventEmitter}ngOnInit(){this.interviewId=this.interviewIds[this.selectedIndex]}ngOnDestroy(){this.subs.forEach(C=>C.unsubscribe())}nextInterview(){this.selectedIndex++,this.interviewId=this.interviewIds[this.selectedIndex]}previousInterview(){this.selectedIndex--,this.interviewId=this.interviewIds[this.selectedIndex]}downloadPdf(){const C=this;this.interviewPending=!0,this.toasty.info("Started","Download: "),this.webService.getObserv("/api/SurveySingleInterview/GetInterviewAsPdfByInterviewId/"+this.projectService.projectId+"/"+this.interviewIds[this.selectedIndex],{responseType:"text"}).subscribe(v=>{const h=document.createElement("a");h.href="data:application/pdf;base64,"+v,h.download="pulseInterview.pdf",document.body.appendChild(h),h.click(),document.body.removeChild(h),C.interviewPending=!1},v=>{this.toasty.info("An Error occured","Download: "),this.interviewPending=!0})}}return m.\u0275fac=function(C){return new(C||m)(t.\u0275\u0275directiveInject(e.f),t.\u0275\u0275directiveInject(a.k),t.\u0275\u0275directiveInject(s._W))},m.\u0275cmp=t.\u0275\u0275defineComponent({type:m,selectors:[["pulse-sa-interview"]],inputs:{selectedIndex:"selectedIndex",interviewIds:"interviewIds",closeButton:"closeButton",projectId:"projectId"},outputs:{closeInterview:"closeInterview"},decls:18,vars:10,consts:[[1,"interview-tabular"],[3,"projectId","interviewId",4,"ngIf"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","cancel",3,"disabled","click"],["title","Previous",1,"icon-arrow-link-large-left"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],["title","Back",1,"icon-arrow-link-large-down"],["title","Back",1,"icon-file-pdf2"],["title","Next",1,"icon-arrow-link-large-right"],[3,"projectId","interviewId"]],template:function(C,v){1&C&&(t.\u0275\u0275elementStart(0,"div",0),t.\u0275\u0275template(1,x,1,2,"pulse-survey-interview",1),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(2,"div",2)(3,"div",3)(4,"button",4),t.\u0275\u0275listener("click",function(){return v.previousInterview()}),t.\u0275\u0275element(5,"i",5),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(8,"button",6),t.\u0275\u0275listener("click",function(){return v.closeInterview.emit()}),t.\u0275\u0275element(9,"i",7),t.\u0275\u0275text(10),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(11,"button",6),t.\u0275\u0275listener("click",function(){return v.downloadPdf()}),t.\u0275\u0275element(12,"i",8),t.\u0275\u0275text(13),t.\u0275\u0275pipe(14,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(15,"button",4),t.\u0275\u0275listener("click",function(){return v.nextInterview()}),t.\u0275\u0275element(16,"i",9),t.\u0275\u0275text(17," Next "),t.\u0275\u0275elementEnd()()()),2&C&&(t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",v.interviewId),t.\u0275\u0275advance(3),t.\u0275\u0275property("disabled",v.selectedIndex<=0),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(7,6,"Previous")," "),t.\u0275\u0275advance(4),t.\u0275\u0275textInterpolate1(" ",v.closeButton," "),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(14,8,"Download PDF")," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("disabled",v.selectedIndex>=v.interviewIds.length))},directives:[o.O5,d.e,u.xw,u.Wh,u.SQ,u.yH],pipes:[g.k],styles:[".interview-tabular[_ngcontent-%COMP%]{overflow:auto}"]}),m})()},12131:(Se,pe,r)=>{"use strict";r.d(pe,{K:()=>e});var t=r(73386);class e{static checkLabelItem(s,o){return![t.Oj.ONLPIE,t.Oj.SPIDER,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.ONLLIN,t.Oj.ONLCOL,t.Oj.TABLE,void 0].includes(s)&&!1===o}static checkScaleItem(s){return[t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.AVGLIN,t.Oj.AVGCOL,t.Oj.ONLCOL,t.Oj.STACKEDCOL,t.Oj.ONLLIN].includes(s)}static checkInvertItem(s){return[t.Oj.NPSDIS,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.AVGLIN,t.Oj.AVGCOL,t.Oj.AVGDIS,t.Oj.ONLCOL,t.Oj.STACKEDCOL,t.Oj.ONLLIN].includes(s)}static checkSort(s,o,d){return!o&&!d&&[t.Oj.NPSDIS,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.AVGLIN,t.Oj.AVGCOL,t.Oj.AVGDIS,t.Oj.ONLCOL,t.Oj.STACKEDCOL,t.Oj.ONLLIN,t.Oj.ONLPIE,t.Oj.SPIDER].includes(s)}static checkSortByValue(s,o,d,u){return!o&&!d&&[t.Oj.NPSDIS,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.AVGLIN,t.Oj.AVGCOL,t.Oj.AVGDIS,t.Oj.ONLCOL,t.Oj.STACKEDCOL,t.Oj.ONLLIN,t.Oj.ONLPIE,t.Oj.SPIDER].includes(s)&&!u}static checkSortAsc(s,o,d,u){return!o&&!d&&[t.Oj.NPSDIS,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.AVGLIN,t.Oj.AVGCOL,t.Oj.AVGDIS,t.Oj.ONLCOL,t.Oj.STACKEDCOL,t.Oj.ONLLIN,t.Oj.SPIDER].includes(s)&&!u}static checkCotegorySort(s,o,d,u,g){return!o&&!d&&!u&&[t.Oj.ONLCOL,t.Oj.STACKEDCOL].includes(s)&&[t.j3.CLUCOM,t.j3.CATEGO].includes(g)}static checkInternSort(s,o,d,u,g,x){return!o&&!d&&!u&&[t.Oj.ONLCOL,t.Oj.STACKEDCOL].includes(s)&&[t.j3.CLUCOM,t.j3.CATEGO].includes(g)}}},92510:(Se,pe,r)=>{"use strict";r.d(pe,{Q:()=>a,f:()=>e});var t=r(73386);class e{static getVisualizationDisplayOptions(o,d){let u;switch(o){case t.j3.SCALEQ:u=e._scaleOptions;break;case t.j3.CATEGO:u=e._categoryOptions;break;case t.j3.CATCOM:u=e._categoryCommentOptions;break;case t.j3.CLUCOM:u=e._clusteredCommentOptions;break;case t.j3.NPSQUE:u=e._npsOptions;break;case t.j3.COMMEN:u=e._commentOptions;break;case t.j3.MERGEQ:u=e._otherMergeOptions}return u.sortingEnabled=e._sortingEnabled,u.availableFontSizes=["8px","9px","10px","11px","12px","13px","14px","15px","16px"],u.defaultLabelSize="11px",u.defaultLabel=t.wL.VALBAS,u.defaultAxisSize="11px",u.availablePageSizes=[10,15,20,25,30],u.defaultPageOffset=0,u.defaultPageSize=10,u.defaultPage=1,JSON.parse(JSON.stringify(u))}}e._sortingEnabled=[t.Oj.AVGCOL,t.Oj.AVGLIN],e._scaleOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.AVGDIS,visualizationTypes:[t.Oj.AVGCOL,t.Oj.AVGLIN,t.Oj.AVGDIS,t.Oj.SPIDER],availableLabels:[t.wL.NONE,t.wL.VALUE,t.wL.VALBAS],fiscalYearComparisonType:[t.Oj.SPIDER]},e._categoryOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.ONLCOL,visualizationTypes:[t.Oj.ONLCOL,t.Oj.ONLLIN,t.Oj.ONLPIE,t.Oj.SPIDER,t.Oj.STACKEDCOL],availableLabels:[t.wL.NONE,t.wL.TOTAL]},e._categoryCommentOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.AVGCOL,visualizationTypes:[t.Oj.ONLCOL,t.Oj.ONLLIN,t.Oj.ONLPIE,t.Oj.SPIDER,t.Oj.STACKEDCOL],availableLabels:[t.wL.NONE,t.wL.TOTAL]},e._clusteredCommentOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.ONLCOL,visualizationTypes:[t.Oj.ONLCOL,t.Oj.ONLLIN,t.Oj.ONLPIE,t.Oj.TABLE,t.Oj.SPIDER,t.Oj.STACKEDCOL],availableLabels:[t.wL.NONE,t.wL.TOTAL]},e._npsOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.NPSDIS,visualizationTypes:[t.Oj.AVGCOL,t.Oj.AVGLIN,t.Oj.AVGDIS,t.Oj.NPSDIS,t.Oj.NPSCOL,t.Oj.NPSLIN,t.Oj.SPIDER],availableLabels:[t.wL.NONE,t.wL.VALUE,t.wL.VALBAS],fiscalYearComparisonType:[t.Oj.SPIDER]},e._commentOptions={defaultVisualization:t.Oj.TABLE,visualizationTypes:[t.Oj.TABLE],availableLabels:[]},e._otherMergeOptions={sortAsc:!0,sortByValue:!1,defaultVisualization:t.Oj.AVGDIS,visualizationTypes:[t.Oj.AVGCOL,t.Oj.AVGLIN,t.Oj.AVGDIS],availableLabels:[t.wL.NONE,t.wL.VALUE,t.wL.VALBAS]},e._fiscalYearComparisonType={Scale:{visualizationTypes:[t.Oj.SPIDER],NPS:{visualizationTypes:[t.Oj.SPIDER]},"Other Merge":{visualizationTypes:[t.Oj.SPIDER]}}};class a{}},6739:(Se,pe,r)=>{"use strict";r.d(pe,{Y:()=>e});var t=r(73386);class e{static getVisualizationApiConfig(s,o){switch(s){case t.Oj.ONLPIE:return e._pie;case t.Oj.ONLCOL:case t.Oj.STACKEDCOL:return e._column;case t.Oj.ONLLIN:return e._line;case t.Oj.AVGCOL:return e._averageColumn;case t.Oj.AVGLIN:return e._averageLine;case t.Oj.AVGDIS:return e._averageDistribution;case t.Oj.NPSDIS:return e._npsDistribution;case t.Oj.NPSCOL:return e._npsScoreColumn;case t.Oj.NPSLIN:return e._npsScoreLine;case t.Oj.TABLE:return o?e._table_detail:e._table;case"Table Export":return e._tableexport;case"Spiderweb":return e._spiderweb;case"fiscalYearComparison":return e._fiscalYearComparison;case"table_contact_search":return e._table_contact_search;case"singleInterviewDrilldown":return e._singleInterviewDrilldown;case"tableExcel":return e._table_excel;case"allTableExcel":return e._all_table_excel;case"chartExcel":return e._chart_excel;case"drilldownExcel":return e._drilldown_excel}}}e._pie={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._averageColumn={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._column={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._line={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._averageLine={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._averageDistribution={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data_stackedbar/"},flags:new Map([["getStackedBarChartData",!0]])},e._npsDistribution={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._npsScoreColumn={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._npsScoreLine={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._table={type:t.Oj.TABLE,api:{type:"post",uri:"/api/survey/survey_analytics/answer_data_comment/"},flags:new Map([["getStackedBarChartData",!1],["chartlike",!0]])},e._tableexport={type:t.Oj.TABLE,api:{type:"post",uri:"/api/survey/survey_analytics/generate_xls/"},flags:new Map([["getStackedBarChartData",!1],["chartlike",!0]])},e._spiderweb={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data/"},flags:new Map([["getStackedBarChartData",!1]])},e._fiscalYearComparison={type:"Chart",api:{type:"post",uri:"/api/survey/survey_analytics/fiscal_year_comparison"}},e._table_detail={type:t.Oj.TABLE,api:{type:"post",uri:"/api/survey/survey_analytics/answer_data_comment_detailed/"}},e._table_excel={type:"Export",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data_comment_detailed_excel/"}},e._all_table_excel={type:"Export",api:{type:"post",uri:"/api/survey/survey_analytics/answer_data_comment_detailed_excel_all/"}},e._chart_excel={type:"Export",api:{type:"post",uri:"/api/survey/survey_analytics/generate_xls_for_chart/"}},e._drilldown_excel={type:"Export",api:{type:"post",uri:"/api/survey/survey_analytics/search_by_question_excel/"}},e._table_contact_search={type:t.Oj.TABLE,api:{type:"get",uri:"/api/survey/survey_analytics/",params:[{name:"analytical_report",isQueryParam:!1},{name:"customerSearch",isQueryParam:!1},{name:"projectId",isQueryParam:!0}]}},e._singleInterviewDrilldown={type:t.Oj.TABLE,api:{type:"post",uri:"/api/survey/survey_analytics/search_by_question"}}},73386:(Se,pe,r)=>{"use strict";r.d(pe,{Oj:()=>t,j3:()=>a,wL:()=>e});var t=(()=>{return(s=t||(t={})).AVGCOL="Average (column)",s.AVGLIN="Average (line)",s.AVGDIS="Average (distribution)",s.NPSDIS="NPS distribution",s.NPSCOL="NPS score (column)",s.NPSLIN="NPS score (line)",s.ONLCOL="Column",s.ONLLIN="Line",s.ONLPIE="Pie",s.SPIDER="Spiderweb",s.TABLE="Table",s.FYCOMP="Fiscalyear",s.STACKEDCOL="Stacked Column",s.NOSELECTION="",t;var s})(),e=(()=>{return(s=e||(e={})).NONE="No Label",s.VALUE="Value",s.VALBAS="Value + Base",s.TOTAL="total",s.NOSELECTION="",e;var s})(),a=(()=>{return(s=a||(a={})).NPSQUE="NPS",s.CATEGO="Category",s.CATCOM="CategoryComment",s.SCALEQ="Scale",s.CLUCOM="ClusteredComment",s.COMMEN="Comment",s.MERGEQ="Other Merge",a;var s})()},42483:(Se,pe,r)=>{"use strict";r.d(pe,{P:()=>d,w:()=>o});var t=r(92510),e=r(5e3),a=r(11735),s=r(45953),o=(()=>{return(u=o||(o={})).QuestionSelection="questions",u.QuestionAnalysis="sa-options",u.Filter="filter",o;var u})();let d=(()=>{class u{constructor(x,i){this.route=x,this.surveyAnalyticsService=i}needToBeAdapt(x){return this.isSurveyAnalytics()&&this.isOldBookmark(x)}mapBookmark(x,i,m){switch(i){case"filter":this.mapFilter(x,m);break;case"sa-options":this.mapAxis(x),this.mapSeries(x),this.mapViewOptions(x);break;case"questions":this.mapQuestions(x)}return x}isOldBookmark(x){return["splitByElement","xAxisElements"].some(i=>x.hasOwnProperty(i))}isSurveyAnalytics(){return void 0!==this.route.snapshot.url.find(i=>"sa"===i.path)}mapQuestions(x){return x.groupQuestions=Array.isArray(x.groupQuestions)?x.groupQuestions:[...x.groupQuestions.questions],x.groupQuestions=x.groupQuestions.map(i=>(i.displayOptions||(i.displayOptions=t.f.getVisualizationDisplayOptions(i.type,this.surveyAnalyticsService.fiscalYearComparisonMode)),i)),x}mapAxis(x){x.xAxisElements.length&&(x.firstAxisSelection_old=[],x.secondAxisSelection_old=[],x.xAxisElements.forEach((i,m)=>{const C=this.createColumnSelection(i);0===m?x.firstAxisSelection_old.push(C):x.secondAxisSelection_old.push(C)}))}mapSeries(x){if(x.splitByElement&&x.splitByElement.length){x.splitBySelection_old=[];const m=this.createColumnSelection(x.splitByElement[0]);x.splitBySelection_old.push(m)}}mapViewOptions(x){x.overallSelected_old=x.isOverallSelected,x.mergeSelected_old=x.isMergeActivated}mapFilter(x,i){const m=[];return x.filter[0]&&x.filter[0].column_name&&i.forEach(E=>{const C=this.findSelection(x,E);if(C){m[E.id]=[];const v=this.createFilterSelectionConfig(E,C);v?E.hasAll?m[E.id].push(v):m[E.id]=v:console.log("could not create filter selection config for bookmark selection")}}),x.filter=m,x}createColumnSelection(x){const i={};return i.children=[{name:x.displayName,displayName:x.displayName,databaseName:x.databaseName}],i}findSelection(x,i){if(x.filter&&x.filter.length){const m=x.filter;for(const E of m){const C=this.match(i.column,E.column_name),v=this.match(i.label,E.alias);if(C||v)return E}}else console.log("old bookmark has no existing selections for the filter feature")}createFilterSelectionConfig(x,i){if(2===x.filterType&&2===i.values.length){const m=i.values[0].name.replace(/-/g,"/"),E=i.values[1].name.replace(/-/g,"/");return[{column:x.column,filterId:x.filterId,filterType:x.filterType,fromDate:m,toDate:E}]}if(0===x.filterType)return this.buildSelectionTree(x,i)}match(x,i){return!(!x||!i)&&x.toLowerCase().trim()===i.toLowerCase().trim()}buildSelectionTree(x,i){let m={};const E={name:"All",column:void 0,filterId:x.filterId,filterType:x.filterType};let C=i.grouping.split(",");const v=i.values.filter(h=>h.name);return v.length&&v.forEach(h=>{this.enrichTreeNodesRecursive(h,C),C=i.grouping.split(",")}),E.children=v,m=x.hasAll?E:v,m}enrichTreeNodesRecursive(x,i){const m=Array.isArray(x)?x[0]:x;if("string"==typeof m.name&&(m.name=this.decodeUtf8(m.name)),m.column=i[0],m.children){const E=m.children;i.shift(),this.enrichTreeNodesRecursive(E,i)}else{const E=x;Array.isArray(E)&&E.forEach(C=>{C.column=i[0]})}}decodeUtf8(x){return x.replace(/\xc3\xbc/g,"\xfc").replace("\xc3\x9f","\xdf")}}return u.\u0275fac=function(x){return new(x||u)(e.\u0275\u0275inject(a.gz),e.\u0275\u0275inject(s.x))},u.\u0275prov=e.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac}),u})()},10122:(Se,pe,r)=>{"use strict";r.d(pe,{C:()=>s});var t=r(5e3),e=r(62474),a=r(54620);let s=(()=>{class o{constructor(u,g){this.webApiService=u,this.projectService=g}getAllQuestions(){return this.webApiService.get("/api/survey/survey_analytics/question_data/projectId/"+this.projectService.projectId).then(u=>{console.log("All Questions: ",u)})}getProjectOptions(){return this.webApiService.get("/api/survey/survey_analytics/report_data/reportId/50").then(u=>{console.log("ProjectOptions",u)})}getNpsExampleData(){return this.webApiService.post("/api/survey/survey_analytics/answer_data",{additionalData:{getNext:0,startIndex:0},filter:null,getStackedBarChartData:!1,overallActive:!1,performMerge:!1,projectId:5284,reportId:50,selectedQuestions:[{displayShortName:"NPS Score",questionID:18353,questionType:"NPS",variableID:19477}],splitBy:null,xAxisList:[{databaseName:"LC_METACLUST",displayName:"Metacluster"}]}).then(g=>{console.log("Nps Example Data",g)})}getDefaultBookmark(){this.webApiService.post("/api/bookmark/default",{where:"/5284/SurveyAnalytics/50"}).then(g=>{console.log("Default Bookmark: ",g)})}getDetailedComments(){this.webApiService.post("/api/survey/survey_analytics/answer_data_comment_detailed",{ProjectId:5284,AnalyticalReportId:"50",QuestionId:18357,VariableId:19454,Columns:[{column:"InterviewId",label:"Interview Id",width:5},{column:"PROJECT_YEAR",label:"Fiscal Year",width:5},{column:"FIRSTNAME",label:"First Name",width:10},{column:"LASTNAME",label:"Last Name",width:10},{column:"COMPANY",label:"Company",width:15},{column:"COUNTRY",label:"Country",width:5},{column:"DIVISION",label:"Division",width:5},{column:"BUSINESSUNIT",label:"BU",width:5},{questionId:18353,variableId:19477,label:"NPS Score",width:5},{questionId:18365,variableId:19478,label:"Competitor Score",width:5},{questionId:18361,variableId:19456,label:"Competitor",width:10}],Filters:[{column_name:"interviewDate",column_type:"date",filter:"range",values:[{name:"2017-10-01"},{name:"2018-09-30"}]}]}).then(g=>{console.log("Comment Detailed: ",g)})}}return o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.k))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac}),o})()},96140:(Se,pe,r)=>{"use strict";r.d(pe,{d:()=>N});var t=r(69808),e=r(8929),a=r(30567),s=r(21086),o=r(41746),d=r(591),u=r(92510),g=r(6739);class x{constructor(){this.menu=new i}}class i{constructor(){this.options=new m}}class m{}var E=r(73386),C=r(5e3),v=r(62474),h=r(54620),S=r(5918),p=r(9133),L=r(59077);let N=(()=>{class j{constructor(I,A,O,T,c){this.webApiService=I,this.projectService=A,this.mappingService=O,this.variables=T,this.filterService=c,this._datePipe=new t.uU("dd/mm/yyyy"),this.subs=[]}getInitialData(I){const A=this._loadSurveyConfig(I),O=this._loadAllQuestions(),T=this._loadFilterGroup(I),c=this._loadTableColumns(),M=new e.xQ;return(0,a.D)(A,O,T,c).subscribe(([w,R,D,Y])=>{this._fiscalYears=w.fiscalYears,this.fiscalYearComparisonMode=!(!w.fiscalYears||!w.fiscalYears.length);const _=new x;_.answerdatacommentdetailedcolumns=Y,_.minNumberOfResponses=w.minNumberOfResponses,_.menu.filterGroupId=D,_.menu.options.overall=!1,_.menu.options.merge=!1,_.fiscalYearComparisonMode=this.fiscalYearComparisonMode,_.introName=w.introName,_.name=w.name,_.menu.questionTreeItempicker=this.mappingService.convertQuestionTree(R,w.groupQuestionTree,this.fiscalYearComparisonMode),w.filter&&(w.filter.xAxisDefinition||w.filter.splitByDefinition)&&(w.filter.xAxisDefinition&&(_.menu.options.xAxis=this.mappingService.generateTreeFromFilterDefinitions(w.filter.xAxisDefinition)),w.filter.splitByDefinition&&(_.menu.options.splitBy=this.mappingService.generateTreeFromFilterDefinitions(w.filter.splitByDefinition))),M.next(_)}),M}_loadSurveyConfig(I){return this.webApiService.getObserv("/api/survey/survey_analytics/report_data/reportId2/"+I)}_loadAllQuestions(){return this.webApiService.getObserv("/api/survey/survey_analytics/question_data/projectId/"+this.projectService.projectId)}_loadFilterGroup(I){return this.webApiService.getObserv(this.variables.apiUrl+"/api/Filter/getFilterGroupByReportId/"+I)}_loadTableColumns(){return this.webApiService.getObserv("/api/survey/survey_analytics/answer_data_comment_detailed_columns/"+this.projectService.projectId)}getFiscalYearComparison(I){return this.webApiService.postObserv(g.Y.getVisualizationApiConfig("fiscalYearComparison",!1).api.uri,I)}downloadTableExcel(I){return this.webApiService.postObserv(g.Y.getVisualizationApiConfig("tableExcel",!1).api.uri,I)}downloadAllTableExcel(I){return this.webApiService.postObserv(g.Y.getVisualizationApiConfig("allTableExcel",!1).api.uri,I)}downloadChartExcel(I,A){return this.mappingService.generateSplitBy(A.options),I.splitBy=A.options.splitBy?A.options.splitBy[0]:{},this.webApiService.postObserv(g.Y.getVisualizationApiConfig("chartExcel",!1).api.uri,I)}downloadDrilldownExcel(I){return this.webApiService.postObserv(g.Y.getVisualizationApiConfig("drilldownExcel",!1).api.uri,I)}loadMergeVisualization(I,A,O,T,c){const M={};this.prepareBeforeRequestData(A,T,M,O,!0);const w=I.displayOptions.selectedVisualization?I.displayOptions.selectedVisualization:I.displayOptions.defaultVisualization;I.displayOptions.selectedVisualization=w;const R=g.Y.getVisualizationApiConfig(w,M.hasColumns),D={};let Y;if("Chart"===R.type&&(D.type=R.type,"post"===R.api.type)){Y={additionalData:{},filtergroup:M.filters?M.filters.selection:[],getStackedBarChartData:R.flags.get("getStackedBarChartData"),overallActive:M.overall,performMerge:M.merge,projectId:M.projectId,reportId:O,selectedQuestions:I.questions.map(y=>({displayShortName:y.displayShortName,questionName:y.questionName,questionID:y.questionId,questionType:y.questionType,variableID:y.variableId})),splitBy:M.splitBy,xAxisList:M.xAxisList};const _=this.webApiService.postObserv(R.api.uri,Y).subscribe(y=>{D.data=y,c.next(D)});this.subs.push(_)}}loadVisualization(I,A,O,T,c,M){const w={};this.prepareBeforeRequestData(A,T,w,O,!1);const R=I.displayOptions.selectedVisualization?I.displayOptions.selectedVisualization:I.displayOptions.defaultVisualization;I.displayOptions.selectedVisualization=R;const D=g.Y.getVisualizationApiConfig(R,w.hasColumns),Y={};let _;if("Chart"===D.type){if(Y.type=D.type,"post"===D.api.type){const y=R.includes("NPS")?"NPS":"Scale",H=R.includes("NPS")?["N","NPS curr.","NPS prev.","Diff."]:["N","AVG curr.","AVG prev.","Diff."];let $=(0,s.of)(void 0),K=(0,s.of)(void 0);if(_={additionalData:{startIndex:0,getNext:0,parentClusterId:I.parentClusterId&&I.parentClusterId.length?I.parentClusterId[I.parentClusterId.length-1].parentClusterId:null},filtergroup:w.filters?w.filters.selection:[],getStackedBarChartData:D.flags.get("getStackedBarChartData"),overallActive:w.overall,performMerge:w.merge,projectId:w.projectId,reportId:O,selectedQuestions:[{displayShortName:I.displayShortName,questionID:I.questionId,questionType:I.questionType,variableID:I.variableId}],splitBy:w.splitBy,xAxisList:w.xAxisList},K=this.webApiService.postObserv(D.api.uri,_),c){const G=w.filters&&w.filters.selection[0]&&w.filters.selection[0][0]&&w.filters.selection[0][0].toDate?new Date(w.filters.selection[0][0].toDate).getFullYear():this._fiscalYears[0];I.displayOptions.fyCompType=y,I.displayOptions.fyCompColumns=H;const Z={QuestionId:I.questionId,VariableId:I.variableId,ProjectId:w.projectId,IncludeOverall:w.overall,QuestionType:I.displayOptions.fyCompType,CurrentFiscalYear:G,PreviousFiscalYear:G-1,Dimensions:w.xAxisList,ReportId:O,filtergroup:w.filters?w.filters.selection.map(B=>B.filter(X=>"InterviewDate"!==X.column)):[]};$=this.getFiscalYearComparison(Z)}const z=(0,o.$R)(K,$).subscribe(G=>{c&&G[1]&&void 0!==G[1]&&(G[1]={xAxisList:w.xAxisList,type:R,fiscalYearData:G[1]}),Y.data=G,M.next(Y)});this.subs.push(z)}}else if("Table"===D.type&&(Y.type=D.type,"post"===D.api.type)){let y=[];const H=I.displayOptions.selectedPageOffset?I.displayOptions.selectedPageOffset:I.displayOptions.defaultPageOffset?I.displayOptions.defaultPageOffset:0,$=I.displayOptions.actualPageSize?I.displayOptions.actualPageSize:I.displayOptions.defaultPageSize?I.displayOptions.defaultPageSize:0,K=I.displayOptions.orderBy,z=!!I.displayOptions.orderByAsc&&I.displayOptions.orderByAsc;D.flags&&D.flags.get("chartlike")?_=this.createAnswerDataCommentRequest(I,w,y):(y=JSON.parse(JSON.stringify(T)),_={AnalyticalReportId:O,Columns:y,filtergroup:w.filters?w.filters.selection:[],QuestionID:I.questionId,VariableID:I.variableId,ProjectId:w.projectId,PageOffset:H,PageSize:$,OrderBy:K,OrderByAsc:z,IsNewSa:!0}),this.subs.push(this.webApiService.postObserv(D.api.uri,_).subscribe(G=>{if(D.flags&&D.flags.get("chartlike")){let Z=G[0].results[0].series[0].data.flat().map(X=>{const ee={Comment:[]};return ee.Comment.push(X.answer),y[1]&&ee.Comment.push(X.categoryName),y[2]&&ee.Comment.push(X.subCategoryName),ee});const B=Z.length;if(K){const X=y.findIndex(ee=>ee.label===K)||0;Z.sort((ee,le)=>z?ee.Comment[X]>le.Comment[X]?1:-1:ee.Comment[X]I.unsubscribe())}getContactsForQuestion(I){void 0===I.displayOptions&&(I.displayOptions=u.f.getVisualizationDisplayOptions(E.j3.COMMEN,!1));const A={};return A.Columns=I.Columns,A.ReportId=I.ReportId,A.ProjectId=I.ProjectId,A.PageOffset=I.displayOptions.selectedPageOffset?I.displayOptions.selectedPageOffset:I.displayOptions.defaultPageOffset,A.PageSize=I.displayOptions.actualPageSize?I.displayOptions.actualPageSize:I.displayOptions.defaultPageSize,A.OrderBy=I.displayOptions.orderBy,A.OrderByAsc=I.displayOptions.orderByAsc,A.IsNewSa=!0,A.Question={questionId:I.question.questionId,questionType:I.question.questionType,variableId:I.question.variableId},A.IsTranslateToEnglish=I.IsTranslateToEnglish,A.filterGroup=[],A.Cluster={},A.Cluster.clusterId=I.event.parentClusterId,A.Cluster.isOverall=I.event.isOverall,A.filterGroup=I.menu.filters?I.menu.filters.selection:[],I.event.series.userOptions&&void 0!==I.event.series.userOptions&&(void 0!==I.event.series.userOptions.NpsGroup?A.NpsGroup=I.event.series.userOptions.NpsGroup:void 0!==I.event.series.userOptions.AnswerFrom&&void 0!==I.event.series.userOptions.AnswerTo?(A.AnswerFrom=I.event.series.userOptions.AnswerFrom,A.AnswerTo=I.event.series.userOptions.AnswerTo):void 0!==I.event.series.userOptions.TextAnswer&&0!==I.event.series.userOptions.TextAnswer.length?A.TextAnswer=[I.event.series.userOptions.TextAnswer]:void 0!==I.Series?A.Series=I.Series:this.variables.enableEdit&&console.log("Admin Edit Mode - ChartToTable does not have series information")),1===I.menu.options.axes.length&&I.event.categories&&!I.event.categories.name.includes("Overall")&&(A.Category={},A.Category.Dimension=I.menu.options.axes[0],A.Category.value=I.event.categories.name),2===I.menu.options.axes.length&&I.event.categories&&!I.event.categories.parent.name.includes("Overall")&&(A.Category={},A.Category.value=I.event.categories.parent.name,A.Category.Dimension=I.menu.options.axes[0],I.event.categories.name.includes("Overall")||(A.Subcategory={},A.Subcategory.value=I.event.categories.name,A.Subcategory.Dimension=I.menu.options.axes[1],A.Subcategory.value=I.event.categories.name)),this.webApiService.postObserv("/api/survey/survey_analytics/search_by_question",A)}getDrilldownVisualization(I,A,O,T,c,M){this.mappingService.generateSplitBy(A.options),this.mappingService.generateXAxisList(A.options);const w=A.filters,R=A.options.axes,D=A.options.splitBy?A.options.splitBy[0]:{},Y=!!A.options.overall&&A.options.overall,y=!(!T||!T.length),$=(new d.X(void 0),I.displayOptions.selectedVisualization?I.displayOptions.selectedVisualization:I.displayOptions.defaultVisualization);I.displayOptions.selectedVisualization=$;const K=g.Y.getVisualizationApiConfig($,y),z=this.projectService.projectId;let Z;if("post"===K.api.type){$.includes("NPS"),$.includes("NPS");let ee=(0,s.of)(void 0);return Z={additionalData:{startIndex:0,getNext:0,parentClusterId:I.parentClusterId?I.parentClusterId[I.parentClusterId.length-1].parentClusterId:null},filtergroup:w?w.selection:[],getStackedBarChartData:K.flags.get("getStackedBarChartData"),overallActive:Y,performMerge:!1,projectId:z,reportId:O,selectedQuestions:[{displayShortName:I.displayShortName,questionID:I.questionId,questionType:I.questionType,variableID:I.variableId}],splitBy:D,xAxisList:R},ee=this.webApiService.postObserv(K.api.uri,Z),ee}}createAnswerDataCommentRequest(I,A,O){return O.push({label:"Comment",column:"TextAnswerValue",width:10},...A.xAxisList.map(T=>({column:T.databaseName,label:T.displayName,width:5}))),{reportId:A.reportId,projectId:A.projectId,filtergroup:A.filters?A.filters.selection:[],additionalData:{startIndex:0,getNext:0,parentClusterId:I.parentClusterId&&I.parentClusterId.length?I.parentClusterId[I.parentClusterId.length-1].parentClusterId:null},getStackedBarChartData:!1,overallActive:A.overall,performMerge:A.merge,selectedQuestions:[{displayShortName:I.displayShortName,questionID:I.questionId,questionType:I.questionType,variableID:I.variableId}],xAxisList:A.xAxisList}}prepareBeforeRequestData(I,A,O,T,c){this.mappingService.generateSplitBy(I.options),this.mappingService.generateXAxisList(I.options),O.reportId=T,O.projectId=this.projectService.projectId,O.splitBy=I.options.splitBy?I.options.splitBy[0]:{},O.overall=!!I.options.overall&&I.options.overall,O.filters=I.filters,O.xAxisList=I.options.axes,O.merge=c,O.hasColumns=!(!A||!A.length)}}return j.\u0275fac=function(I){return new(I||j)(C.\u0275\u0275inject(v.f),C.\u0275\u0275inject(h.k),C.\u0275\u0275inject(S.E),C.\u0275\u0275inject(p.a),C.\u0275\u0275inject(L.i))},j.\u0275prov=C.\u0275\u0275defineInjectable({token:j,factory:j.\u0275fac}),j})()},43584:(Se,pe,r)=>{"use strict";r.d(pe,{I:()=>s});var t=r(5e3),e=r(62474),a=r(96140);let s=(()=>{class o{constructor(u,g){this.webApiService=u,this.bifService=g}loadInitialData(u){return this.bifService.getInitialData(u)}loadVisualizationData(u,g,x,i,m,E){return this.bifService.loadVisualization(u,g,x,i,m,E)}loadMergeVisualization(u,g,x,i,m){return this.bifService.loadMergeVisualization(u,g,x,i,m)}getDrilldownVisualization(u,g,x,i,m,E){return this.bifService.getDrilldownVisualization(u,g,x,i,m,E)}getExport(u,g,x,i){return this.bifService.getExport(u,g,x,i)}getFiscalYearComparison(u,g,x,i){return this.bifService.getFiscalYearComparison({AnalyticalReportId:u,QuestionID:g.questionId,VariableID:g.variableId,ProjectId:x,ReportId:u,Filters:i})}getContactsForQuestion(u){return this.bifService.getContactsForQuestion(u)}downloadTableExcel(u){return this.bifService.downloadTableExcel(u)}downloadAllTableExcel(u){return this.bifService.downloadAllTableExcel(u)}downloadChartExcel(u,g){return this.bifService.downloadChartExcel(u,g)}downloadDrilldownExcel(u){return this.bifService.downloadDrilldownExcel(u)}downloadAnswerDataCommentExcel(u,g,x,i,m){return this.bifService.downloadAnswerDataCommentExcel(u,g,x,i,m)}}return o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.d))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac}),o})()},5918:(Se,pe,r)=>{"use strict";r.d(pe,{E:()=>s});var t=r(92510),e=r(5e3),a=r(54620);let s=(()=>{class o{constructor(u){this.projectService=u,this.bookmarkDisplayOptionKeys=["stackingOptions","selectedVisualization","selectedLabel","sortAsc","sortByValue","sortInternBy","scaleBreak","inverted","expanded","selectedAxisSize","selectedLabelSize","selectedPageSize","selectedPageOffset","selecetedPage","orderBy","orderByAsc","chartToTableEvent","chartToTableDisplayOptions","chartToTableEvent","chartToTableDisplayOptions"]}convertQuestionTree(u,g,x){let i=[];return g.groups&&(i=i.concat(this.getItemFromNodes(u,g.groups,x))),g.questions&&(i=g.questions?i.concat(this.getItemFromChildren(u,g.questions,x)):i),i}getItemFromChildren(u,g,x){return g.map(i=>{if(void 0!==(i=this.composeQuestionObject(u,i,x)))return{questionName:i.questionName,translationKeyMenu:i.labelMenu,translationKeyVis:i.labelVis,id:""+i.questionId+i.variableId,questionId:i.questionId,variableId:i.variableId,displayShortName:i.displayShortName,questionType:i.questionType,icon:this._getIconForQuestionType(i.questionType),scale:i.scale,minScale:i.minScale,maxScale:i.maxScale,isTranslateToEnglish:i.isTranslateToEnglish,displayOptions:JSON.parse(JSON.stringify(i.displayOptions))}}).filter(i=>void 0!==i)}_getIconForQuestionType(u){switch(u){case"NPS":return"icon-chart-bar-stacked";case"Scale":return"icon-chart-line";case"Category":return"icon-chart-pie";case"Comment":return"icon-comment"}}getItemFromNodes(u,g,x){return g.map(i=>{const m={};return m.labelMenu=i.name,m.id=i.groupID,m.children=[],m.children=void 0!==i.groups&&0!==i.groups.length?m.children.concat(this.getItemFromNodes(u,i.groups,x)):m.children,m.children=void 0!==i.questions&&0!==i.questions.length?m.children.concat(this.getItemFromChildren(u,i.questions,x)):m.children,m})}composeQuestionObject(u,g,x){const i=u.find(m=>m.questionId===g.questionId&&m.variableId===g.variableId);if(void 0!==i){const m=JSON.parse(JSON.stringify(t.f.getVisualizationDisplayOptions(i.questionType,x)));return{labelMenu:i.displayShortName?i.displayShortName:i.displayName?i.displayName:i.questionName,labelVis:i.translationKey?i.translationKey:i.displayName?i.displayName:i.text,displayShortName:i.displayShortName,questionID:i.questionId,variableID:i.variableId,questionType:i.questionType,scale:i.minScale+"-"+i.maxScale,minScale:i.minScale,maxScale:i.maxScale,isTranslateToEnglish:i.isTranslateToEnglish,questionId:i.questionId,variableId:i.variableId,questionName:i.displayShortName?i.displayShortName:i.displayName?i.displayName:i.questionName,translationKey:i.translationKey,displayOptions:m}}}composeMergeQuestionObject(u,g,x){return{id:u[0].id,questionType:u[0].questionType,translationKeyVis:x+" Question Merge",labelVis:x+" Question Merge",displayOptions:u[0].displayOptions?u[0].displayOptions:JSON.parse(JSON.stringify(t.f.getVisualizationDisplayOptions(u[0].questionType,g))),questions:u,maxScale:u[0].maxScale,minScale:u[0].minScale}}searchQuestionTree(u,g){let x=[];return g.forEach(i=>{if(i.children)x=x.concat(this.searchQuestionTree(u,i.children));else{const m=void 0!==u.questions?u.questions.findIndex(E=>this.isQuestionEqual(i,E)):u.findIndex(E=>this.isQuestionEqual(i,E));m>=0&&(i.originalOrder=m,x.push(i))}}),x}isQuestionEqual(u,g){const x=u.id===""+g.questionId+g.variableId;return x&&(u.displayOptions=this.enrichQuestionFromBookmark(g.displayOptions,u.displayOptions)),x}mapFilters(u){return u.map(g=>((!g[0].column||"All"===g[0].name)&&(g=g[0].children),g?{column_name:g[0].column,column_type:"varchar",filter:"treeview",values:g.map(x=>({name:x.name,children:x.children})),grouping:this.getFilterGroupingFromValue(g)}:void 0)).filter(g=>g)}getFilterGroupingFromValue(u){return u.map(g=>{const x=[];return g.column&&x.push(g.column),g.children&&x.push(this.getFilterGroupingFromChildren(g.children)),x}).flat().filter(this.removeDuplicates).toString()}getFilterGroupingFromChildren(u){return u.map(g=>{const x=[];return x.push(g.column),g.children&&x.push(this.getFilterGroupingFromChildren(g.children)),x})}removeDuplicates(u,g,x){return x.indexOf(u)===g}generateTreeFromFilterDefinitions(u){return u.map((g,x)=>{const i=x+1,m={};return m.label=g.groupName,m.id=i,g.elementList&&g.elementList.length&&(m.children=this.generateTreeFilterChildren(g.elementList,i,g.groupName)),m})}generateTreeFilterChildren(u,g,x){return u.map((i,m)=>{const E=""+g+(m+1),C={id:E,name:i.displayName,displayName:i.displayName,databaseName:"Time"===x?"interviewDate":i.databaseName,isTimeElement:"Time"===x||"interviewDate"===i.databaseName,groupName:x};return i.elementList&&i.elementList.length&&(C.children=this.generateTreeFilterChildren(i.elementList,E,x)),C})}generateXAxisList(u){u&&(u.axes&&u.axes.length?u.axes.forEach(g=>{delete g.name}):u.axes=[])}generateSplitBy(u){u&&(u.splitBy&&u.splitBy.length?u.splitBy.forEach(g=>{delete g.name}):u.splitBy={})}cleanUpQuestionForBookmark(u){const g=JSON.parse(JSON.stringify(u));for(const x of this.bookmarkDisplayOptionKeys)g[x]=u[x];return g}enrichQuestionFromBookmark(u,g){const x=JSON.parse(JSON.stringify(g));for(const i of this.bookmarkDisplayOptionKeys)x[i]=u[i];return x}}return o.\u0275fac=function(u){return new(u||o)(e.\u0275\u0275inject(a.k))},o.\u0275prov=e.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac}),o})()},11317:(Se,pe,r)=>{"use strict";r.d(pe,{E:()=>a});var t=r(5e3),e=r(75531);let a=(()=>{class s{constructor(d){this.languageService=d}translateQuestionTree(d){d.forEach(u=>{u.labelMenu=u.translationKeyMenu?this.languageService.translate(u.translationKeyMenu):u.labelMenu,u.labelVis=u.translationKeyVis?this.languageService.translate(u.translationKeyVis):u.labelVis,u.children&&this.translateQuestionTree(u.children)})}}return s.\u0275fac=function(d){return new(d||s)(t.\u0275\u0275inject(e.T))},s.\u0275prov=t.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac}),s})()},8681:(Se,pe,r)=>{"use strict";r.d(pe,{p:()=>N});var t=r(8929),e=r(5e3),a=r(22324),s=r(87436);const o=["dialog"];let d=(()=>{class j{constructor(){}ngOnInit(){}close(){window.localStorage.setItem("sa.showVideo","false"),this.dialog.close()}}return j.\u0275fac=function(I){return new(I||j)},j.\u0275cmp=e.\u0275\u0275defineComponent({type:j,selectors:[["pulse-intro-video"]],viewQuery:function(I,A){if(1&I&&e.\u0275\u0275viewQuery(o,7),2&I){let O;e.\u0275\u0275queryRefresh(O=e.\u0275\u0275loadQuery())&&(A.dialog=O.first)}},inputs:{videoUrl:"videoUrl"},decls:18,vars:10,consts:[["dialog",""],[1,"modal-header"],[1,"modal-body"],[1,"video"],["controls",""],["videoPlayer",""],["type","video/mp4",3,"src"],[1,"modal-buttons"],[1,"button-modal",3,"click"],["title","Ok",1,"icon-check-mark"]],template:function(I,A){1&I&&(e.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"div",1)(3,"h3"),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div",2)(7,"div",3)(8,"video",4,5),e.\u0275\u0275element(10,"source",6),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(13,"div",7)(14,"button",8),e.\u0275\u0275listener("click",function(){return A.close()}),e.\u0275\u0275element(15,"i",9),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd()()()),2&I&&(e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(5,4,"Intro")),e.\u0275\u0275advance(6),e.\u0275\u0275property("src",A.videoUrl,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(12,6,"Browser not supported")," "),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(17,8,"Okay")))},directives:[a.a],pipes:[s.k],styles:[".modal-body[_ngcontent-%COMP%]{margin-top:40px}"]}),j})();var u=r(42483),g=r(45953),x=r(74564),i=r(23328),m=r(54620),E=r(62474),C=r(4371);function v(j,P){if(1&j&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"pulse-surveyanalytics-menu",3),e.\u0275\u0275elementContainerEnd()),2&j){const I=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("filterGroupId",I.filterGroupId)("options",I.options)("questions",I.questions)}}const h=function(j,P){return{expanded:j,notexpanded:P}};function S(j,P){if(1&j&&e.\u0275\u0275element(0,"pulse-surveyanalytics-visualization",8),2&j){const I=P.$implicit;e.\u0275\u0275property("hasBurger",!0)("visualizationElem",I)("ngClass",e.\u0275\u0275pureFunction2(3,h,I.expanded,!I.expanded))}}function p(j,P){if(1&j&&e.\u0275\u0275element(0,"pulse-surveyanalytics-visualization",9),2&j){const I=P.$implicit;e.\u0275\u0275property("isExport",!0)("hasBurger",!1)("visualizationElem",I)}}function L(j,P){if(1&j&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",4),e.\u0275\u0275template(2,S,1,6,"pulse-surveyanalytics-visualization",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"div",6),e.\u0275\u0275template(4,p,1,3,"pulse-surveyanalytics-visualization",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&j){const I=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",I.visualizationElems),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",I.visualizationElems)}}class N{constructor(P,I,A,O,T,c){this.surveyanalyticsService=P,this.dialoagService=I,this.awsService=A,this.projectService=O,this.webApi=T,this.sidebarNavigationService=c,this.initialMenuReady=!1,this.subs=[],this.showVideo=!1,this.bucketName="pulse-project",this.visualizationElems=[]}static getShowIntroSubject(){return N.showIntroSubject$}ngOnInit(){this.subs.push(this.surveyanalyticsService.questionsUpdated$.subscribe(P=>{this.questions=P}),this.surveyanalyticsService.initialMenuUpdated$.subscribe(P=>{this.initialMenuReady=!1,this.questions=P?P.questionTreeItempicker:void 0,this.options=P?P.options:void 0,this.filterGroupId=P?P.filterGroupId:void 0,this.initialMenuReady=!!P}),this.surveyanalyticsService.visualizationElemsUpdated$.subscribe(P=>{this.visualizationElems=P}),this.surveyanalyticsService.introName$.subscribe(P=>{this.introName=P,P&&void 0!==P&&(this.sidebarNavigationService.showSubmenu("survey",!0),this.webApi.assumeRole(this.projectService.projectId).then(I=>{this.awsService.setCredentials(I),this.videoUrl=this.awsService.getPreSignURLFromS3(this.bucketName,this.projectService.projectId+"/survey_intro/"+P+".mp4"),this.showVideo="false"!==window.localStorage.getItem("sa.showVideo"),this.showVideo&&(this.showIntroVideo(),window.localStorage.setItem("sa.showVideo","false"))}))}),N.getShowIntroSubject().subscribe(()=>{void 0!==this.videoUrl&&this.videoUrl&&this.showIntroVideo()}),this.surveyanalyticsService.splitValue$.subscribe(P=>{this.splitValue=P}))}showIntroVideo(){this.dialoagService.open(d,{videoUrl:this.videoUrl})}ngOnDestroy(){this.subs.forEach(P=>P.unsubscribe()),this.surveyanalyticsService.visualizationElemsUpdated$.unsubscribe(),this.sidebarNavigationService.showSubmenu("survey",!1)}}N.showIntroSubject$=new t.xQ,N.\u0275fac=function(P){return new(P||N)(e.\u0275\u0275directiveInject(g.x),e.\u0275\u0275directiveInject(x.x),e.\u0275\u0275directiveInject(i.s),e.\u0275\u0275directiveInject(m.k),e.\u0275\u0275directiveInject(E.f),e.\u0275\u0275directiveInject(C.R))},N.\u0275cmp=e.\u0275\u0275defineComponent({type:N,selectors:[["pulse-surveyanalytics"]],features:[e.\u0275\u0275ProvidersFeature([g.x,u.P])],decls:5,vars:3,consts:[[4,"ngIf"],[3,"isSpin"],[1,"survey-analytics-filter-footer"],[3,"filterGroupId","options","questions"],["fxLayout.gt-md","row wrap","fxLayout.lt-md","column wrap",1,"container-fluid"],["fxFlex","50","fxFlex.lt-md","100",3,"hasBurger","visualizationElem","ngClass",4,"ngFor","ngForOf"],["fxLayout.gt-md","row wrap","fxLayout.lt-md","column wrap",1,"export-container","container-fluid",2,"position","relative"],["class","exportable-chart","style","visibility: hidden; position: fixed; right: 100vw; width:1200px !important; height:800px !important;",3,"isExport","hasBurger","visualizationElem",4,"ngFor","ngForOf"],["fxFlex","50","fxFlex.lt-md","100",3,"hasBurger","visualizationElem","ngClass"],[1,"exportable-chart",2,"visibility","hidden","position","fixed","right","100vw","width","1200px !important","height","800px !important",3,"isExport","hasBurger","visualizationElem"]],template:function(P,I){1&P&&(e.\u0275\u0275template(0,v,2,3,"ng-container",0),e.\u0275\u0275template(1,L,5,2,"ng-container",0),e.\u0275\u0275element(2,"pulse-spinner",1),e.\u0275\u0275elementStart(3,"div",2),e.\u0275\u0275element(4,"pulse-filter-footer"),e.\u0275\u0275elementEnd()),2&P&&(e.\u0275\u0275property("ngIf",I.initialMenuReady),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",I.visualizationElems),e.\u0275\u0275advance(1),e.\u0275\u0275property("isSpin",!I.initialMenuReady||I.surveyanalyticsService.isBookmarkedMerged))},styles:[".nps-disclaimer[_ngcontent-%COMP%]{background-color:#ffcd50;text-align:center;padding-top:15px;padding-bottom:15px}.visualization-block[_ngcontent-%COMP%]{padding-left:20px}.container-fluid[_ngcontent-%COMP%]{padding:10px;position:relative}pulse-surveyanalytics-visualization.table[_ngcontent-%COMP%]{max-width:inherit!important}.expanded[_ngcontent-%COMP%]{max-width:100%!important}.notexpanded[_ngcontent-%COMP%]{max-width:50%!important}.survey-analytics-filter-footer[_ngcontent-%COMP%]{padding:0 20px}h3[_ngcontent-%COMP%]{font-size:38px;margin-top:15px;line-height:1.4;padding-left:20px}.mobile[_nghost-%COMP%] .project-header[_ngcontent-%COMP%], .mobile [_nghost-%COMP%] .project-header[_ngcontent-%COMP%]{font-size:22px;padding-right:31px}.survey-analytics-beta-flag[_ngcontent-%COMP%]{display:inline-block;background-color:#2d373c!important;color:#ebf0f5;border-radius:40px;padding-left:20px;padding-right:20px;font-style:italic}"]})},45953:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>te});var t=r(591),e=r(8929),a=r(36053),s=r(75778),d=(r(46809),r(52976)),u=r(22868),g=r(80013),x=r(87545),i=r(59973),m=r(5e3),E=r(62474),C=r(54620),v=r(22290),h=r(22324),S=r(19611),p=r(69808),L=r(32925),N=r(23322),j=r(27859),P=r(20688),I=r(92491),A=r(87436);function O(ce,oe){1&ce&&m.\u0275\u0275element(0,"pulse-spinner")}function T(ce,oe){if(1&ce&&(m.\u0275\u0275elementStart(0,"div",15)(1,"div"),m.\u0275\u0275text(2),m.\u0275\u0275elementEnd()()),2&ce){const se=oe.$implicit;m.\u0275\u0275property("ngClass","col-span-"+se.width),m.\u0275\u0275advance(2),m.\u0275\u0275textInterpolate(se.label)}}function c(ce,oe){if(1&ce&&(m.\u0275\u0275elementStart(0,"div",15)(1,"div"),m.\u0275\u0275text(2),m.\u0275\u0275elementEnd()()),2&ce){const se=oe.$implicit,ue=oe.index,_e=m.\u0275\u0275nextContext(3);m.\u0275\u0275property("ngClass","col-span-"+_e.results.Columns[ue].width),m.\u0275\u0275advance(2),m.\u0275\u0275textInterpolate(se)}}function M(ce,oe){if(1&ce){const se=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementStart(0,"div",16),m.\u0275\u0275listener("click",function(){const Ce=m.\u0275\u0275restoreView(se).index;return m.\u0275\u0275nextContext(2).showInterviewInformation(Ce)}),m.\u0275\u0275template(1,c,3,2,"div",11),m.\u0275\u0275elementEnd()}if(2&ce){const se=oe.$implicit;m.\u0275\u0275advance(1),m.\u0275\u0275property("ngForOf",se.valuesArray)}}function w(ce,oe){if(1&ce){const se=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementStart(0,"div")(1,"div",7)(2,"div",8)(3,"div",9)(4,"div",10),m.\u0275\u0275template(5,T,3,2,"div",11),m.\u0275\u0275elementEnd()()(),m.\u0275\u0275elementStart(6,"div",12),m.\u0275\u0275listener("showListChange",function(_e){return m.\u0275\u0275restoreView(se),m.\u0275\u0275nextContext().visibleRows=_e}),m.\u0275\u0275elementStart(7,"div",13),m.\u0275\u0275template(8,M,2,1,"div",14),m.\u0275\u0275elementEnd()()()()}if(2&ce){const se=m.\u0275\u0275nextContext();m.\u0275\u0275advance(5),m.\u0275\u0275property("ngForOf",se.results.Columns),m.\u0275\u0275advance(1),m.\u0275\u0275styleProp("width","100%")("display","table"),m.\u0275\u0275property("rawList",se.results.SearchResults)("showList",se.visibleRows),m.\u0275\u0275advance(2),m.\u0275\u0275property("ngForOf",se.visibleRows)}}function R(ce,oe){if(1&ce){const se=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementStart(0,"pulse-sa-interview",17),m.\u0275\u0275listener("closeInterview",function(){return m.\u0275\u0275restoreView(se),m.\u0275\u0275nextContext().closeInterview()}),m.\u0275\u0275elementEnd()}if(2&ce){const se=m.\u0275\u0275nextContext();m.\u0275\u0275property("closeButton","Customers")("selectedIndex",se.selectedIndex)("interviewIds",se.interviewIds)}}let D=(()=>{class ce{constructor(se,ue,_e){this.webService=se,this.projectService=ue,this.toasty=_e,this.title="Search Customer",this.subs=[],this.searchTerm$=new e.xQ,this.visibleRows=[],this.isCustomerPending$=new t.X(!1),this.interviewSelected=!1}ngOnInit(){this.subs.push(this.searchCustomer(this.searchTerm$).subscribe(se=>{this.visibleRows=[],this.selectedIndex=void 0,this.interviewSelected=!1,this.interviewIds=se.SearchResults.map(ue=>ue.InterviewId),se&&se.SearchResults&&se.SearchResults.forEach(ue=>ue.valuesArray=Object.values(ue.Values)),this.isCustomerPending$.next(!1),this.results=se}))}searchCustomer(se){return se.pipe((0,u.b)(()=>{this.results=void 0,this.isCustomerPending$.next(!0)}),(0,g.b)(400),(0,s.x)(),(0,x.w)(ue=>this.searchWebRequest(ue)),(0,i.X)())}searchWebRequest(se){return this.webService.getObserv("/api/survey/survey_analytics/analytical_report/"+this.reportId+"/customerSearch/"+se+"?projectId="+this.projectService.getProjectId())}showInterviewInformation(se){this.selectedIndex=this.interviewIds.indexOf(this.visibleRows[se].InterviewId),this.interviewSelected=!0}closeInterview(){this.interviewSelected=!1,this.selectedIndex=void 0}ngOnDestroy(){this.subs.forEach(se=>se.unsubscribe())}}return ce.\u0275fac=function(se){return new(se||ce)(m.\u0275\u0275directiveInject(E.f),m.\u0275\u0275directiveInject(C.k),m.\u0275\u0275directiveInject(v._W))},ce.\u0275cmp=m.\u0275\u0275defineComponent({type:ce,selectors:[["sa-peoplefinder"]],inputs:{reportId:"reportId"},decls:13,vars:12,consts:[[3,"minWidth"],["dialog",""],[1,"modal-header"],[1,"sa-peoplefinder-outer"],[3,"autofocus","placeholderText","disabledFilter","searchTextChange"],[4,"ngIf"],[3,"closeButton","selectedIndex","interviewIds","closeInterview",4,"ngIf"],["id","tablescroll",1,"tablescroll"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],["class","pulse-table-cell left",3,"ngClass",4,"ngFor","ngForOf"],["extendedTable","","rowSelector",".pulse-table-row","pulseInfinityScroll","","scrollContentId","tablescroll",1,"pulse-table",3,"rawList","showList","showListChange"],[1,"pulse-table-body"],["class","pulse-table-row clicky",3,"click",4,"ngFor","ngForOf"],[1,"pulse-table-cell","left",3,"ngClass"],[1,"pulse-table-row","clicky",3,"click"],[3,"closeButton","selectedIndex","interviewIds","closeInterview"]],template:function(se,ue){1&se&&(m.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"div",2)(3,"h3"),m.\u0275\u0275text(4),m.\u0275\u0275pipe(5,"translate"),m.\u0275\u0275elementEnd()(),m.\u0275\u0275elementStart(6,"div",3),m.\u0275\u0275element(7,"br"),m.\u0275\u0275elementStart(8,"pulse-search-box",4),m.\u0275\u0275listener("searchTextChange",function(Ce){return ue.searchTerm$.next(Ce)}),m.\u0275\u0275elementEnd(),m.\u0275\u0275template(9,O,1,0,"pulse-spinner",5),m.\u0275\u0275pipe(10,"async"),m.\u0275\u0275template(11,w,9,8,"div",5),m.\u0275\u0275template(12,R,1,3,"pulse-sa-interview",6),m.\u0275\u0275elementEnd()()),2&se&&(m.\u0275\u0275property("minWidth",900),m.\u0275\u0275advance(4),m.\u0275\u0275textInterpolate(m.\u0275\u0275pipeBind1(5,8,ue.title)),m.\u0275\u0275advance(4),m.\u0275\u0275property("autofocus",!0)("placeholderText",ue.title)("disabledFilter",!0),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",m.\u0275\u0275pipeBind1(10,10,ue.isCustomerPending$)),m.\u0275\u0275advance(2),m.\u0275\u0275property("ngIf",ue.results&&ue.results.Columns&&!ue.interviewSelected),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",ue.interviewSelected))},directives:[h.a,S.B,p.O5,L.O,p.sg,p.mk,N.oO,j.h,P.C,I.F],pipes:[A.k,p.Ov],styles:[".search-input{border:1px solid #cdd9e1!important} .search-input:focus{border:1px solid #009999!important;box-shadow:inset 0 0 2px 2px #099}.pulse-table-cell[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:center}.pulse-table-row[_ngcontent-%COMP%] .clicky[_ngcontent-%COMP%]{cursor:pointer}.sa-peoplefinder-outer[_ngcontent-%COMP%]{width:900px}.tablescroll[_ngcontent-%COMP%]{max-height:500px;overflow:auto}"]}),ce})();var Y=r(12131),_=r(92510),y=r(6739),H=r(73386),$=r(11735),K=r(10122),z=r(43584),G=r(75531),Z=r(11317),B=r(74564),X=r(78715),ee=r(4371),le=r(59077),de=r(5918),fe=r(9133);let te=(()=>{class ce{constructor(se,ue,_e,Ce,me,we,Re,Ne,Ge,Pe,Ae,ve,Oe){this.route=se,this.apiTestService=ue,this.dataService=_e,this.languageService=Ce,this.translationService=me,this.dialogService=we,this.slideExport=Re,this.projectService=Ne,this.sidebar=Ge,this.filterService=Pe,this.mappingService=Ae,this.webApi=ve,this.variables=Oe,this._initialMenuUpdated$=new t.X(void 0),this.initialMenuUpdated$=this._initialMenuUpdated$,this._questionsUpdated$=new t.X(void 0),this.questionsUpdated$=this._questionsUpdated$,this._introName$=new e.xQ,this.introName$=this._introName$,this.menuSelectionChanged$=new t.X(void 0),this.splitValue$=new t.X(8),this.exportTiggered$=new e.xQ,this.visualizationElemsUpdated$=new t.X(void 0),this.canDrilldown=!0,this.isBookmarkedMerged=!1,this.menuState={},this.visualizations=[],this.groupBy=function(qe,xt){return qe.reduce(function(At,Lt){return(At[Lt[xt]]=At[Lt[xt]]||[]).push(Lt),At},{})},this.menuSelectionChanged$=new t.X(void 0),this.visualizationElemsUpdated$=new t.X(void 0);const Be=(0,a.aj)([this.route.params,this.languageService.languagesLoaded]),ze=this;this.sub=[],this.sub.push(this.languageService.langChanged$.subscribe(()=>{this._initialMenu&&this._initialMenu.questionTreeItempicker&&(this.translationService.translateQuestionTree(this._initialMenu.questionTreeItempicker),this._questionsUpdated$.next(this._initialMenu.questionTreeItempicker))})),this.sub.push(Be.pipe((0,s.x)((qe,xt)=>JSON.stringify(qe)===JSON.stringify(xt))).subscribe(([qe,xt])=>{this.menuSelectionChanged$.next(void 0),xt&&qe&&qe.id&&(this._reportID=qe.id,this._initialMenuUpdated$.next(void 0),this.sub.push(this.dataService.loadInitialData(this._reportID).subscribe(At=>{this.translationService.translateQuestionTree(At.menu.questionTreeItempicker),this._fiscalYearComparisonMode=At.fiscalYearComparisonMode,this._minNumberOfResponses=At.minNumberOfResponses,this._navigationMode=At.navigationMode,this._initialMenu=At.menu,At.menu.options.mergeDisabled=this._fiscalYearComparisonMode,At.menu.options.overallDisabled=!1,this._answerdatacommentdetailedcolumns=At.answerdatacommentdetailedcolumns,this.canDrilldown=this._answerdatacommentdetailedcolumns.length>0,this._initialMenuUpdated$.next(this._initialMenu),this._name=At.name,this._introName$.next(At.introName)})))})),this.sub.push(this.menuSelectionChanged$.subscribe(qe=>{if(qe&&qe.questions)if(qe.options.merge&&0===this.visualizations.length||qe.options.merge&&this.visualizations.length!==qe.questions.length){this.isBookmarkedMerged=!0;const xt=JSON.parse(JSON.stringify(qe));xt.options.merge=!1,ze.visualizations=this.convertQuestionToVisualization(xt,ze,qe.noCache);let At=0;ze.visualizations.forEach(Lt=>{Lt.data.subscribe(qt=>{qt&&At++,At===ze.visualizations.length&&(this.isBookmarkedMerged=!1,ze.visualizations=ze.convertQuestionToVisualization(qe,ze,qe.noCache),ze.menuState=qe,ze.visualizationElemsUpdated$.next(ze.visualizations))})})}else ze.visualizations=ze.convertQuestionToVisualization(qe,ze,qe.noCache),ze.menuState=qe,ze.visualizationElemsUpdated$.next(ze.visualizations);else ze.visualizationElemsUpdated$.next([])})),this.sub.push(this.exportTiggered$.subscribe(qe=>{if("Excel"!==qe){const xt=document.getElementsByClassName("exportable-chart"),At=new d.t;At.globalStyle="survey_analytics.css",At.Title=this._name,At.FileType=qe,At.Slides=this.slideExport.createSlidesSA(xt,this._name),At.Slides.forEach(Lt=>{Lt.FilterSettings=this.filterService.currentFilterSelectionString}),this.projectService.project.ppttemplate?(At.Template=this.projectService.project.ppttemplate.replace(".potx","_"+this.languageService._languageCode+".pptx"),this.slideExport.startExport(At)):(At.Template="survey_analytics_"+this.languageService._languageCode+".pptx",this.slideExport.startExport(At))}else console.log("test data",ze.visualizations)})),this.sidebar.showSubmenuDisplay("bookmark",!0)}get answerdatacommentdetailedcolumns(){return JSON.parse(JSON.stringify(this._answerdatacommentdetailedcolumns))}get reportId(){return this._reportID}get projectId(){return this.projectService.getProjectId()}get minimalNumberOfResponses(){return this._minNumberOfResponses}getTestData(){try{this.apiTestService.getProjectOptions(),this.apiTestService.getDefaultBookmark(),this.apiTestService.getAllQuestions(),this.apiTestService.getNpsExampleData(),this.apiTestService.getDetailedComments()}catch(se){location.reload()}}get fiscalYearComparisonMode(){return this._fiscalYearComparisonMode}hasQuestionFiscalYearComparisonMode(se){return se?this.fiscalYearComparisonMode&&se.questionType!==H.j3.CATCOM&&se.questionType!==H.j3.CLUCOM:this._fiscalYearComparisonMode}set fiscalYearComparisonMode(se){this._fiscalYearComparisonMode=se}get filters(){return this.menuSelectionChanged$.value.filters.selection||[]}get questions(){return this.menuSelectionChanged$.value.questions}get overall(){return this.menuSelectionChanged$.value.options.overall||!1}get xAxisList(){return this.menuSelectionChanged$.value.options.axes||[]}updateVisualization(se){if(!se)return;const ue=!(!this._answerdatacommentdetailedcolumns||!this._answerdatacommentdetailedcolumns.length);y.Y.getVisualizationApiConfig(se.question.displayOptions.previousVisualization,ue)!==y.Y.getVisualizationApiConfig(se.question.displayOptions.selectedVisualization,ue)||se.reload?!this.menuSelectionChanged$.value.options.merge||"Scale"!==se.question.questionType&&"NPS"!==se.question.questionType?this.dataService.loadVisualizationData(se.question,this.menuSelectionChanged$.value,this._reportID,this._answerdatacommentdetailedcolumns,this.hasQuestionFiscalYearComparisonMode(se.question),se.data):this.dataService.loadMergeVisualization(se.question,this.menuSelectionChanged$.value,this._reportID,this._answerdatacommentdetailedcolumns,se.data):se.data.next(se.data.value)}loadNewDrillDownVisualization(se){return this.dataService.getDrilldownVisualization(se.question,this.menuSelectionChanged$.value,this._reportID,this._answerdatacommentdetailedcolumns,this._fiscalYearComparisonMode,se.data)}convertQuestionToVisualization(se,ue,_e){if(!se.options.merge||this.fiscalYearComparisonMode)return this.cacheAndBuildStandardquestion(se,ue,se.questions,_e);{let Ce=[];const me=[];return se.questions.forEach(we=>{"Scale"!==we.questionType&&"NPS"!==we.questionType&&-1===me.indexOf(1)?me.push(1):"NPS"===we.questionType&&"Average (distribution)"!==we.displayOptions.selectedVisualization&&-1===me.indexOf(2)?me.push(2):("Scale"===we.questionType||"NPS"===we.questionType&&"Average (distribution)"===we.displayOptions.selectedVisualization)&&-1===me.indexOf(3)&&me.push(3)}),me.forEach(we=>{if(1===we){const Re=se.questions.filter(Ne=>"Scale"!==Ne.questionType&&"NPS"!==Ne.questionType);if(Re.length){let Ne=Re.filter(ve=>"Category"!==ve.questionType);const Ge=Re.filter(ve=>"Category"===ve.questionType);[...new Set(Ge.map(ve=>ve.scale))].forEach(ve=>{const Oe=Ge.filter(Be=>Be.scale===ve);Oe&&1===Oe.length?Ne=Ne.concat(Oe):this.checkAnswersInScale(Oe,this.visualizations).forEach(ze=>{if(ze.questions&&1===ze.questions.length)Ne=Ne.concat(ze.questions);else{const qe=this.mappingService.composeMergeQuestionObject(ze.questions,this.fiscalYearComparisonMode,"Category"),xt=new t.X(void 0),At={question:qe,translationKeyVis:qe.translationKeyVis,labelVis:qe.labelVis,data:xt,questionType:qe.questionType,selectedVisualizationType:qe.displayOptions.defaultVisualization};this.dataService.loadMergeVisualization(qe,se,ue._reportID,ue._answerdatacommentdetailedcolumns,xt),Ce.push(At)}})});const Ae=this.cacheAndBuildStandardquestion(se,ue,Ne,_e);Ce=Ce.concat(Ae)}}else if(2===we){const Re=se.questions.filter(Ne=>"NPS"===Ne.questionType&&"Average (distribution)"!==Ne.displayOptions.selectedVisualization);if(Re.length){const Ne=this.mappingService.composeMergeQuestionObject(Re,this.fiscalYearComparisonMode,"NPS"),Ge=new t.X(void 0),Pe={question:Ne,translationKeyVis:Ne.translationKeyVis,labelVis:Ne.labelVis,data:Ge,questionType:Ne.questionType,selectedVisualizationType:Ne.displayOptions.defaultVisualization};this.dataService.loadMergeVisualization(Ne,se,ue._reportID,ue._answerdatacommentdetailedcolumns,Ge),Ce.push(Pe)}}else if(3===we){const Re=se.questions.filter(Ne=>"Scale"===Ne.questionType||"NPS"===Ne.questionType&&"Average (distribution)"===Ne.displayOptions.selectedVisualization);Re.length&&[...new Set(Re.map(Ge=>Ge.scale))].forEach(Ge=>{const Pe=Re.filter(Be=>Be.scale===Ge),Ae=this.mappingService.composeMergeQuestionObject(Pe,this.fiscalYearComparisonMode,"Scale"),ve=new t.X(void 0),Oe={question:Ae,translationKeyVis:Ae.translationKeyVis,labelVis:Ae.labelVis,data:ve,questionType:Ae.questionType,selectedVisualizationType:Ae.displayOptions.defaultVisualization};this.dataService.loadMergeVisualization(Ae,se,ue._reportID,ue._answerdatacommentdetailedcolumns,ve),Ce.push(Oe)})}}),Ce}}checkAnswersInScale(se,ue){const _e=[];return se.forEach(Ce=>{const me=ue.find(Ge=>Ge.question.questions?Ge.question.questions.filter(Pe=>Pe.id===Ce.id).length>0:Ge.question.id===Ce.id).data.value.data[0],Re=[...new Set((me[0]?me[0].results[0].series[0].data[0]:me.results[0].series[0].data[0]).map(Ge=>Ge.answer))].sort(),Ne=_e.find(Ge=>JSON.stringify(Ge.answerSet)===JSON.stringify(Re));Ne?Ne.questions.push(Ce):_e.push({questions:[Ce],answerSet:Re})}),_e}cacheAndBuildStandardquestion(se,ue,_e,Ce){return _e.map(me=>{const we=this.hasQuestionFiscalYearComparisonMode(me),Re=ue.visualizations.find(ve=>!Ce&&ve.question.id===me.id&&JSON.stringify(ve.question.displayOptions)===JSON.stringify(me.displayOptions)&&JSON.stringify(ue.menuState.filters)===JSON.stringify(se.filters)&&JSON.stringify(ue.menuState.options)===JSON.stringify(se.options)),Ne=new t.X(void 0);let Ge=me.displayOptions.selectedVisualization?me.displayOptions.selectedVisualization:me.displayOptions.defaultVisualization;const Pe=_.f.getVisualizationDisplayOptions(me.questionType,we);se.globalDisplayOptions.resetGlobalDisplayOptions&&me.displayOptions.displayOptionsBeforeGlobal&&(me.displayOptions.selectedVisualization=me.displayOptions.displayOptionsBeforeGlobal.selectedVisualization?me.displayOptions.displayOptionsBeforeGlobal.selectedVisualization:Pe.defaultVisualization,me.displayOptions.inverted=me.displayOptions.displayOptionsBeforeGlobal.inverted?me.displayOptions.displayOptionsBeforeGlobal.inverted:Pe.inverted,me.displayOptions.sortAsc=me.displayOptions.displayOptionsBeforeGlobal.sortAsc?me.displayOptions.displayOptionsBeforeGlobal.sortAsc:Pe.sortAsc,me.displayOptions.sortByValue=me.displayOptions.displayOptionsBeforeGlobal.sortByValue?me.displayOptions.displayOptionsBeforeGlobal.sortByValue:Pe.sortByValue,me.displayOptions.scaleBreak=me.displayOptions.displayOptionsBeforeGlobal.scaleBreak?me.displayOptions.displayOptionsBeforeGlobal.scaleBreak:Pe.scaleBreak),Object.values(se.globalDisplayOptions)&&!se.globalDisplayOptions.resetGlobalDisplayOptions&&(me.displayOptions.displayOptionsBeforeGlobal={},se.globalDisplayOptions.selectedVisualization&&Pe.visualizationTypes.includes(se.globalDisplayOptions.selectedVisualization)&&(me.displayOptions.displayOptionsBeforeGlobal.selectedVisualization=me.displayOptions.selectedVisualization,me.displayOptions.selectedVisualization=se.globalDisplayOptions.selectedVisualization,Ge=se.globalDisplayOptions.selectedVisualization),se.globalDisplayOptions.selectedLabel&&(Pe.availableLabels.includes(se.globalDisplayOptions.selectedLabel)?(me.displayOptions.displayOptionsBeforeGlobal.selectedLabel=me.displayOptions.selectedLabel,me.displayOptions.selectedLabel=se.globalDisplayOptions.selectedLabel):me.displayOptions.selectedLabel=Pe.defaultLabel),void 0!==se.globalDisplayOptions.inverted&&(Y.K.checkInvertItem(Ge)?(me.displayOptions.displayOptionsBeforeGlobal.inverted=me.displayOptions.inverted,me.displayOptions.inverted=se.globalDisplayOptions.inverted):me.displayOptions.inverted=Pe.inverted),void 0!==se.globalDisplayOptions.sortAsc&&(Y.K.checkSortAsc(Ge,we,this._merge,this.menuState.options.splitBy.length)?(me.displayOptions.displayOptionsBeforeGlobal.sortAsc=me.displayOptions.sortAsc,me.displayOptions.sortAsc=se.globalDisplayOptions.sortAsc):me.displayOptions.sortAsc=Pe.sortAsc),void 0!==se.globalDisplayOptions.sortByValue&&(Y.K.checkSortByValue(Ge,we,this._merge,this.menuState.options.splitBy.length)?(me.displayOptions.displayOptionsBeforeGlobal.sortByValue=me.displayOptions.sortByValue,me.displayOptions.sortByValue=se.globalDisplayOptions.sortByValue):me.displayOptions.sortByValue=Pe.sortByValue),void 0!==se.globalDisplayOptions.scaleBreak&&(Y.K.checkScaleItem(Ge)?(me.displayOptions.displayOptionsBeforeGlobal.scaleBreak=me.displayOptions.scaleBreak,me.displayOptions.scaleBreak=se.globalDisplayOptions.scaleBreak):me.displayOptions.scaleBreak=Pe.scaleBreak));const Ae=Re||{question:me,translationKeyVis:me.translationKeyVis,labelVis:me.labelVis,data:Ne,questionType:me.questionType,scale:me.scale,selectedVisualizationType:Ge};return ue.dataService.loadVisualizationData(me,se,ue._reportID,ue._answerdatacommentdetailedcolumns,we,Ne),Ae})}getContactsForQuestion(se){return se.menu=this.menuState,se.Columns=this.answerdatacommentdetailedcolumns,se.ReportId=this.reportId,se.ProjectId=this.projectId,this.menuState.options.splitBy&&this.menuState.options.splitBy.length&&(se.Series={value:se.event.series.userOptions.name,Dimension:this.menuState.options.splitBy[0]}),this.dataService.getContactsForQuestion(se)}onPeoplefinder(){this.dialogService.open(D,{reportId:this.reportId})}ngOnDestroy(){this.sidebar.showSubmenuDisplay("bookmark",!1),this.sub.forEach(se=>se.unsubscribe())}downloadTableExcel(se){return this._answerdatacommentdetailedcolumns&&this._answerdatacommentdetailedcolumns.length?this.dataService.downloadTableExcel({ProjectId:this.projectId,AnalyticalReportId:this.reportId,QuestionId:se.questionId,VariableId:se.variableId,Columns:this.answerdatacommentdetailedcolumns,filterGroup:this.filters,TranslateComments:!1,filterString:this.filterService.currentFilterSelectionString}):this.dataService.downloadAnswerDataCommentExcel(se,this.menuSelectionChanged$.value,this._reportID,this._answerdatacommentdetailedcolumns,this.fiscalYearComparisonMode)}downloadAllTableExcel(se){const ue=[];if(se.forEach(Ce=>{"Comment"===Ce.questionType&&ue.push({QuestionId:Ce.question.questionId,VariableId:Ce.question.variableId})}),0!==ue.length)return this.dataService.downloadAllTableExcel({ProjectId:this.projectId,AnalyticalReportId:this.reportId,Items:ue,Columns:this.answerdatacommentdetailedcolumns,filterGroup:this.filters,TranslateComments:!1,filterString:this.filterService.currentFilterSelectionString})}downloadChartExcel(se){return this.dataService.downloadChartExcel(se,this.menuState)}downloadDrilldownExcel(se){return this.dataService.downloadDrilldownExcel(se)}}return ce.\u0275fac=function(se){return new(se||ce)(m.\u0275\u0275inject($.gz),m.\u0275\u0275inject(K.C),m.\u0275\u0275inject(z.I),m.\u0275\u0275inject(G.T),m.\u0275\u0275inject(Z.E),m.\u0275\u0275inject(B.x),m.\u0275\u0275inject(X.j),m.\u0275\u0275inject(C.k),m.\u0275\u0275inject(ee.R),m.\u0275\u0275inject(le.i),m.\u0275\u0275inject(de.E),m.\u0275\u0275inject(E.f),m.\u0275\u0275inject(fe.a))},ce.\u0275prov=m.\u0275\u0275defineInjectable({token:ce,factory:ce.\u0275fac}),ce})()},16296:(Se,pe,r)=>{"use strict";r.d(pe,{N:()=>v});var t=r(8929),e=r(591),a=r(61130),s=r(21086),o=r(5e3),d=r(61035),u=r(23328),g=r(98613),x=r(40520),i=r(9133),m=r(22290),E=r(75531),C=r(11735);let v=(()=>{class h{constructor(p,L,N,j,P,I,A,O){this.awsSignatureService=p,this.newAwsService=L,this.userService=N,this.http=j,this.variables=P,this.toasty=I,this.langService=A,this.router=O,this.AWS_API_GATEWAY_ENDPOINT="eu-west-1.gateway.pulse.siemens.cloud",this.loading=!0,this.hasPeriod=!1,this.filterLoaded=!1,this.hasAssumeRole=!1,this.loadDataForOthersOnce=!0,this.unstickyHeader=!0,this.comparisons=[],this.compSelection=[],this.hierarchyFilterSelection={},this.searchCommentTextChange=new t.xQ,this.columnsToShow=[],this.columnSelection=[],this.orgSpecificQuestions=[],this.switchedResults=[],this.nonRatingData={},this.categories=[],this.ratingOrNot=["RATING","NON-RATING"],this.ratingOrNotSelection="RATING",this.employeeAdditionalFilters=[],this.reportingAdditionalFilters=[],this.showSgesChart=!1,this.cache=[],this.filter={},this._categoryCache={},p.bucketName="1ta6qoye04",p.awsService="execute-api",p.awsRegion="eu-west-1",this.additionFilterselection={},this.periodSelection=new e.X(null),this.filterChanged$=new a.t(1)}fetchCommentList(p,L){return new Promise((N,j)=>{const P={};this.additionFilters&&Object.keys(this.additionFilters).length>0&&Object.keys(this.additionFilters).forEach(M=>{P[M]=this.additionFilters[M]}),this._getSelectedCategoryList().length!==this.filterCommentArea.length&&(P.commentArea=this._getSelectedCategoryList());const A=this._getSelectedClusterList();A.length!==this.filterCommentCluster.length&&(P.cluster=A),L&&(this.commentSubArea=[],delete P.commentArea),this.commentVisibilitySelection&&this.commentVisibilitySelection.length>0&&this.periodSelection.value.userIsManager&&("public"===this.commentVisibilitySelection[0].name?P.commentIsVisibleForEmployees=[1]:"confidential"===this.commentVisibilitySelection[0].name?P.commentIsVisibleForEmployees=[0]:P.commentIsVisibleForEmployees&&delete P.commentIsVisibleForEmployees),this.commentIsProposalSelection&&this.commentIsProposalSelection.name&&("proposal"===this.commentIsProposalSelection.name?P.isProposal=[1]:"nonProposal"===this.commentIsProposalSelection.name?P.isProposal=[0]:P.isProposal&&delete P.isProposal);const O={countsInto:this.selectedOrgCode,fieldingPeriod:this.selectedPeriod,commentSubArea:this.commentSubArea,offset:p,rows:20,additionalFilter:P},T=this.getCommentLanguage();this.searchCommentText&&this.searchCommentText.length>2&&(O.searchKey=this.searchCommentText,O.language=T);const c=this.checkInCache(O);if(c)c.subscribe(M=>{this.commentList=M,N(M)},M=>j(M));else{this.awsSignatureService.bucketName="6buhl19776";const M=this.awsSignatureService.Post(JSON.stringify(O),"/production/sges/comment");this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(M,O).then(w=>{this.commentList=w,N(w)},w=>j(w))}})}fetchCommentStatistic(p,L){return new Promise((N,j)=>{const P={};this.commentStatistic=[],this.additionFilters&&Object.keys(this.additionFilters).length>0&&Object.keys(this.additionFilters).forEach(O=>{P[O]=this.additionFilters[O]}),this.commentVisibilitySelection&&this.commentVisibilitySelection.length>0&&this.periodSelection.value.userIsManager&&("public"===this.commentVisibilitySelection[0].name?P.commentIsVisibleForEmployees=[1]:"confidential"===this.commentVisibilitySelection[0].name?P.commentIsVisibleForEmployees=[0]:P.commentIsVisibleForEmployees&&delete P.commentIsVisibleForEmployees),this.commentIsProposalSelection&&this.commentIsProposalSelection.name&&("proposal"===this.commentIsProposalSelection.name?P.isProposal=[1]:"nonProposal"===this.commentIsProposalSelection.name?P.isProposal=[0]:P.isProposal&&delete P.isProposal),P.cluster=p?this.filterCommentCluster.map(O=>O.key):this._getSelectedClusterList(),L?this.commentSubArea=[]:P.commentArea=this._getSelectedCategoryList(),p&&P.commentArea&&delete P.commentArea;const I={countsInto:this.selectedOrgCode,fieldingPeriod:this.selectedPeriod,commentSubArea:p?null:this.commentSubArea,additionalFilter:P};if(!p){const O=this.getCommentLanguage();this.searchCommentText&&this.searchCommentText.length>2&&(I.searchKey=this.searchCommentText,I.language=O)}const A=this.checkInCache(I);if(A)A.subscribe(O=>{this.commentStatistic=O,N(O)},O=>j(O));else{this.awsSignatureService.bucketName="6buhl19776";const O=this.awsSignatureService.Post(JSON.stringify(I),"/production/sges/comment/count");this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(O,I).then(T=>{this.commentStatistic=T,N(T)},T=>j(T))}})}getCommentLanguage(){let p;return p=this.showCommentsInEnglish?"en":this.showCommentsInGerman?"de":"original",p}downloadComment(){const p=this.toasty.info(this.langService.translate("EXP_COM_INIT")).toastId;return new Promise((L,N)=>{const j={};this.additionFilters&&Object.keys(this.additionFilters).length>0&&Object.keys(this.additionFilters).forEach(T=>{j[T]=this.additionFilters[T]}),this._getSelectedCategoryList().length!==this.filterCommentArea.length&&(j.commentArea=this._getSelectedCategoryList());const I=this._getSelectedClusterList();I.length!==this.filterCommentCluster.length&&(j.cluster=I),this.commentVisibilitySelection&&this.commentVisibilitySelection.length>0&&this.periodSelection.value.userIsManager&&("public"===this.commentVisibilitySelection[0].name?j.commentIsVisibleForEmployees=[1]:"confidential"===this.commentVisibilitySelection[0].name?j.commentIsVisibleForEmployees=[0]:j.commentIsVisibleForEmployees&&delete j.commentIsVisibleForEmployees),this.commentIsProposalSelection&&this.commentIsProposalSelection.name&&("proposal"===this.commentIsProposalSelection.name?j.isProposal=[1]:"nonProposal"===this.commentIsProposalSelection.name?j.isProposal=[0]:j.isProposal&&delete j.isProposal);const A=this.getCommentLanguage(),O={countsInto:this.selectedOrgCode,fieldingPeriod:this.selectedPeriod,commentSubArea:this.commentSubArea,additionalFilter:j,language:A};this.searchCommentText&&this.searchCommentText.length>2&&(O.searchKey=this.searchCommentText),this.awsSignatureService.bucketName="6buhl19776",this.awsSignatureService.Post(JSON.stringify(O),"/production/sges/comment/download").subscribe(T=>{this.toasty.remove(p),this.toasty.success(this.langService.translate("EXP_COM_OK")),L(T)},T=>{this.toasty.error(this.langService.translate("EXP_COM_ERROR")),N(T)}),this.awsSignatureService.bucketName="1ta6qoye04"})}loadData(p){}getProxyUser(){return this.userService.delUser?this.userService.delUser:null}rebuildRows(p,L){const N=[],j=L||this.ratingQuestions;if(p&&0!==p.length&&j)return p.forEach(P=>{const I=j.filter(T=>T.QuestionName===P.name),A={QuestionName:P.name};[...new Set(I.map(T=>T.fieldingPeriod))].forEach(T=>{const c=I.filter(w=>w.fieldingPeriod===T),M=c.filter(w=>w.countsInto?w.countsInto!==this.currentFilter:w.dimension!==this.currentFilter);A[T||this.periodSelection.value.period]=this.rebuildDistributions(c,M)}),I&&I.length>0&&N.push(A)}),N}rebuildDistributions(p,L){const N=p.find(T=>T.countsInto===this.currentFilter||T.dimension===this.currentFilter);let j;j=[],Array.prototype.push.apply(j,N&&N.n&&N.n>=6?[N.ones/N.n*100,N.twos/N.n*100,N.threes/N.n*100,N.fours/N.n*100,N.fives/N.n*100]:[0,0,0,0,0]);const P=100-j.reduce(function(T,c){return T+Math.round(c)},0),I=j.indexOf(Math.max(...j)),A=j.map(function(T,c){return c===I?Math.round(T)+P:Math.round(T)}),O={n:N?N.n:0,ones:A[0],twos:A[1],threes:A[2],fours:A[3],fives:A[4],totalFavorable:N?N.totalFavorable:0};return L.forEach(T=>{O[T.countsInto?T.countsInto:T.dimension]=T.totalFavorable}),O}buildPreviousYearOptions(p,L){(L||!this.previousYearOptions||this.previousYearOptions.length!==p.previousScores.length)&&(this.previousYearOptions=[],this.previousYearSelection=[],p.previousScores.sort(function(j,P){return j.PreviousPeriod>P.PreviousPeriod?-1:j.PreviousPeriod{this.previousYearOptions.push({name:j.PreviousPeriod,label:j.PreviousPeriod.replace("SGES","")+" "+j.PreviousCountsInto+" "+(j.PreviousCountsIntoPercentage?" ("+Math.round(100*j.PreviousCountsIntoPercentage)+"%)":""),score:j.PreviousCountsIntoPercentage})}))}buildQuestionHierarchyFilter(p,L){const N=[...new Set(p.map(I=>I.QuestionName))];JSON.stringify(N),this.questionsCache=JSON.stringify(N);const j=this.initialData["categories"+this.periodSelection.value.period].filter(I=>N.indexOf(I.QuestionName)>-1);this.allCategoryFilter=[],this.allCategoryFilterSelection=[],this.allCategoryFilterAllQuestions=[],this.allCategoryFilterAllQuestionsSelection=[],[...new Set(j.map(I=>I.category))].forEach(I=>{this.allCategoryFilter.push({name:I,label:I,column:"category",children:[]})}),this.allCategoryFilter.forEach(I=>{[...new Set(j.filter(O=>O.category===I.name).map(O=>O.subCategory))].forEach(O=>{I.children.push({name:O,label:O,column:"subCategory",children:[]})})}),this.allCategoryFilter.forEach(I=>{I.children.forEach(A=>{const O=[...new Set(j.filter(T=>T.category===I.name&&T.subCategory===A.name).map(T=>T.subSubCategory))];O&&O.length>0&&O.forEach(T=>{const c=[...new Set(j.filter(M=>M.category===I.name&&M.subCategory===A.name&&M.subSubCategory===T).map(M=>({name:M.QuestionName,label:M.QuestionName,column:"questions"})))];null!=T?A.children.push({name:T,label:T,column:"subSubCategory",children:c}):A.children=c})})}),this.allCategoryFilterAllQuestions=[...this.allCategoryFilter],this.allCategoryFilterSelection=L?JSON.parse(JSON.stringify(this.allCategoryFilter)):this.buildSelection("DS_CATEGORY_01",this.allCategoryFilter)}_getSelectedCategoryList(){const p=[];if(this.filterCommentArea)for(let L=0;L"HideComment"===L.Property).length>0||0===this.periodSelection.value.userIsManager)return!1;if(p){const L=this.initialData["categories"+this.periodSelection.value.period].find(N=>N.QuestionName===p);if(L&&L.correspondingCommentQuestion)return!0}return!1}jumpToComment(p,L){if(p){const N=this.initialData["categories"+this.periodSelection.value.period].find(j=>j.QuestionName===p);N&&N.correspondingCommentQuestion&&this.fetchCommentStatistic(!0).then(j=>{!j||j&&j.errorMessage&&j.errorMessage.toLowerCase().indexOf("access")>-1?this.APIResponseControl("access"):(this.buildCommentsCategory(),L.parent.snapshot.data.selectedArea=N.correspondingCommentQuestion,this.jumpToCommentQuestion(N.correspondingCommentQuestion))})}}jumpToCommentQuestion(p,L){this.filterCommentArea.forEach(j=>{j.selected=j.key===p}),this.selectedCommentArea=p;const N={name:"COMMENT_CATEGORY_04",column:"level0"};N.children=this.buildSelection(L||p,this.allCommentCategoryFilter),this.allCommentCategoryFilterSelection=[N],this.router.navigateByUrl("sges/comments/text")}buildSelection(p,L,N){const j=L||this.hierarchyFilter;let P=this.getSelectionFromOrgCode(j,"children",!1).filter(A=>this.isSearchedOrgCode(A,p));N&&(P=this.getSelectionFromOrgCode(j,"children",!1).filter(A=>this.isSearchedOrgCodeList(A,N)));const I=[];if(P.length>0)if(P[0].selected=!0,P.length>2){I.push({name:P[P.length-2].name,column:P[P.length-2].column,filterId:P[P.length-1].id,filterType:P[P.length-1].filterType,children:[]});let A=I[0].children;for(let O=P.length-3;O>=0;O--)if(N)if("level0"===P[O].column&&"Special Report"===P[O].name)I.push({name:P[O].name,column:P[O].column,children:[]});else if("level1"!==P[O].column||P[O].children)"level1"===P[O].column?A.push({name:P[O].name,column:P[O].column}):this.searchToLastNode(A,P[O]);else{const T=I.find(c=>"Special Report"===c.name);T&&T.children.push({name:P[O].name,column:P[O].column})}else A.push({name:P[O].name,column:P[O].column}),O>0&&(A[0].children=[],A=A[0].children)}else if(L)return P;return I}searchToLastNode(p,L){for(let N=0;N0&&this.searchToLastNode(p[N].children,L)}}isSearchedOrgCodeList(p,L){if(L){if(L.indexOf(p.name)>-1)return!0;if(null!=p.children)for(const N of p.children)if(this.isSearchedOrgCodeList(N,L))return!0}return!1}getSelectionFromOrgCode(p,L,N){const j=[];return p&&(p.forEach(P=>{P[L]&&P[L].length>0&&Array.prototype.push.apply(j,this.getSelectionFromOrgCode(P[L],L,N))}),Array.prototype.push.apply(j,p.filter(P=>!N||!(P[L]&&P[L].length>0)).map(P=>P))),j}isSearchedOrgCode(p,L){if(p.name.toLowerCase()===L.toLowerCase())return!0;if(null!=p.children)for(const N of p.children)if(this.isSearchedOrgCode(N,L))return!0;return!1}getCategories(p,L){const N=this.checkInCache(p);if(N)return N;const j=this.awsSignatureService.Post(JSON.stringify(p),"/dev/sges/newquestions");return this.addToCache(j,p),j}calcReportingLineType(){return this.additionFilters&&this.additionFilters.reportingLineType&&0!==this.additionFilters.reportingLineType.length?this.additionFilters.reportingLineType.map(p=>{switch(p){case"G":return"Governance";case"S":return"Shared";case"L":case"m":return"Local";case"D":case"a":return"Divided";default:return"Business"}}).join(", "):"HB_08_01"}getInitData(p){return new Promise((L,N)=>{const j={credentials:localStorage.getItem("credentials")};this.http.post("https://"+this.awsSignatureService.bucketName+"."+this.awsSignatureService.awsService+"."+this.awsSignatureService.awsRegion+".amazonaws.com/dev/sges/init",j).toPromise().then(I=>{if(!I||I.errorMessage)return N(I.errorMessage),void this.APIResponseControl("server");if(I&&I.message&&I.message.toLowerCase().indexOf("endpoint")>-1)return void this.APIResponseControl("server");if(I&&I.UNKNOWN_CODE_PLEASE_REPORT)return void this.APIResponseControl("server");const A={accessKeyId:I.Credentials.AccessKeyId,expiration:I.Credentials.Expiration,expired:!1,securityToken:I.Credentials.SessionToken,secretAccessKey:I.Credentials.SecretAccessKey,expireDate:new Date(I.Credentials.Expiration)};if(this.selectedPeriod=I.filedingPeriod[0].period,this.selectedOrgCode=I["orgCode"+this.selectedPeriod],this.filterCommentArea=I["comment"+this.selectedPeriod].filter.commentArea,this.filterCommentCluster=I["comment"+this.selectedPeriod].filter.cluster,this.newAwsService.setCredentials(A),this.variables.awsCredentials=A,this.hasAssumeRole=!0,this.initialData=I,I.user&&I.user.length>0&&!p&&(this.user=I.user[0],this.userService.user.next(I.user[0])),this.userService.checkDelegationMode()){const c=atob(localStorage.getItem("credentials")).split(";")[4];this.getUserByGid(c).then(M=>{const w=M[0];p||this.userService.delegatedUser.next(w),this.userService.delUser=w},M=>{throw new Error("could not resolve delegated user from his gid")})}this.fieldingPeriodOptions=I.filedingPeriod,p||(this.periodSelection.next(this.fieldingPeriodOptions[0]),this.dashboardDefaultloading=!0),this.hasPeriod=!0,this.orgSpecificQuestions=[...new Set(I["categories"+this.fieldingPeriodOptions[0].period].filter(T=>"DS_CATEGORY_02"===T.category).map(T=>T.QuestionName))];const O=A.expireDate.getTime()-(new Date).getTime();setTimeout(()=>{A.expired=!0,this.getInitData(!0)},O),this.periodSelection.subscribe(T=>{this.selectedPeriod=T.period,this.filterCommentArea=this.initialData["comment"+this.selectedPeriod].filter.commentArea,this.filterCommentCluster=this.initialData["comment"+this.selectedPeriod].filter.cluster}),L(A)}).catch(I=>{this.variables.hasError=!0,this.APIResponseControl("server")}),this.awsSignatureService.bucketName="1ta6qoye04"})}getUserByGid(p){return new Promise((L,N)=>{p&&this.awsSignatureService.Post(JSON.stringify({searchByGidList:[p]}),"/dev/user").subscribe(P=>{P&&P.length>0?L(P):N("user not found"+p)})})}getTranslation(p){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const L=this.checkInCache(p);if(L)return L;this.awsSignatureService.bucketName="6buhl19776";const N=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/translation");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(N,p),N}getHierarchyFilter(p){const L=this.checkInCache(p);if(L)return L;this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled),this.awsSignatureService.bucketName="6buhl19776";const N=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/hierarchy");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(N,p),N}getResponseRateFilterList(p){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const L=this.checkInCache(p);if(L)return L;this.awsSignatureService.bucketName="6buhl19776";const N=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/response/filter");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(N,p),N}getResponseRateData(p){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const L=this.checkInCache(p);if(L)return L;this.awsSignatureService.bucketName="6buhl19776";const N=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/response/data");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(N,p),N}getData(p,L){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const N=this.checkInCache(p);if(N)return N;this.loading=!0,this.awsSignatureService.bucketName="6buhl19776";const j=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/data");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(j,p),j}getExpertFilter(p,L){const N={fieldingPeriod:p,countsInto:L,cacheKey:"expertFilters",useCache:!0};this.periodSelection.value&&(N.useCache=1===this.periodSelection.value.cacheEnabled);const j=this.checkInCache(N);if(j)return j;this.loading=!0;const P=this.awsSignatureService.Post(JSON.stringify(N),"/dev/sges/expert/filter");return this.addToCache(P,N),P}getComment(p,L){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const N=this.checkInCache(p);if(N)return N;const j=this.awsSignatureService.Post(JSON.stringify(p),"/dev/sges/comment");return this.addToCache(j,p),j}getCommentCount(p,L){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const N=this.checkInCache(p);if(N)return N;this.awsSignatureService.bucketName="6buhl19776";const j=this.awsSignatureService.Post(JSON.stringify(p),"/production/sges/comment/count");return this.awsSignatureService.bucketName="1ta6qoye04",this.addToCache(j,p),j}getOrgCodeInfo(p){return new Promise((L,N)=>{this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const j=this.checkInCache(p);if(j)return j.subscribe(I=>{L(I)},I=>N(I));const P=this.awsSignatureService.Post(JSON.stringify(p),"/dev/sges/orgcode/info");this.addToCache(P,p).then(I=>{L(I)},I=>N(I))})}getCountsIntoMatrix(p){this.periodSelection.value&&(p.useCache=1===this.periodSelection.value.cacheEnabled);const L=this.checkInCache(p);if(L)return L;const N=this.awsSignatureService.Post(JSON.stringify(p),"/dev/sges/countsinto");return this.addToCache(N,p),N}actSpecialReports(p,L,N,j,P,I,A,O){const T={fieldingPeriod:this.periodSelection.value.period,additionalFilter:this.additionFilters,specialReportName:p,countsInto:this.currentFilter,comparisonList:L,oneLevelDownList:N,comment:j,previousComp:I,breakdown:A,canSeeComment:O,action:P};return new Promise((c,M)=>{this.awsSignatureService.Post(JSON.stringify(T),"/dev/sges/special-report/create").subscribe(w=>{w&&w.errorMessage?this.toasty.error(this.langService.translate(w.errorMessage)):w&&w.message&&w.message.toLowerCase().indexOf("endpoint")>-1?this.APIResponseControl("server"):("NEW"===P?this.toasty.success(this.langService.translate("SR_SUCCESS_ADD")):"UPDATE"===P&&this.toasty.success(this.langService.translate("SR_SUCCESS_UPDATE")),c(w))},w=>M(w))})}getSpecialReports(p){return new Promise((L,N)=>{const j={fieldingPeriod:this.periodSelection.value.period,cacheKey:"exiting special reports",useCache:!0};p&&(j.fieldingPeriod=p),this.periodSelection.value&&(j.useCache=1===this.periodSelection.value.cacheEnabled),this.awsSignatureService.Post(JSON.stringify(j),"/dev/sges/special-report").subscribe(P=>{P&&P.errorMessage&&P.errorMessage.toLowerCase().indexOf("access")>-1?this.toasty.error(this.langService.translate("SR_ERROR_NOACCESS")):P&&P.message&&P.message.toLowerCase().indexOf("endpoint")>-1?this.APIResponseControl("server"):L(P)},P=>N(P))})}getSpecialReportFromName(p){const L={fieldingPeriod:this.periodSelection.value.period,name:p,cacheKey:"special report config",useCache:!0};return this.periodSelection.value&&(L.useCache=1===this.periodSelection.value.cacheEnabled),this.awsSignatureService.Post(JSON.stringify(L),"/dev/sges/special-report")}checkInCache(p,L){let N;if(this.cache.length>0&&(N=this.cache.find(j=>JSON.stringify(j.request)===JSON.stringify(p)),N)){const j=JSON.parse(JSON.stringify(N.response));return(0,s.of)(j)}return!1}addToCache(p,L){return new Promise((N,j)=>{const P=this,I=JSON.parse(JSON.stringify(L));p.subscribe(A=>{P.cache.push({request:I,response:A}),N(A)},A=>{j(A),this.APIResponseControl("server")})})}equalRequests(p,L){if(!p||!L||Object.keys(p).length!==Object.keys(L).length)return!1;for(const N in p)if(p.hasOwnProperty(N)){const j=p[N],P=L[N];if(Array.isArray(j)&&Array.isArray(P)){const I=j.sort(),A=P.sort();if(I.toString()!==A.toString())return!1;continue}if(j!==P)return!1}return!0}changeFilter(p){this.selectedOrgCode=p,this.currentFilter=p,this.filterChanged$.next(p)}exportTable(p){const L=this.toasty.info(this.langService.translate("CO_DOWN")).toastId;return new Promise((N,j)=>{this.awsSignatureService.Post(JSON.stringify({countsInto:this.selectedOrgCode,fieldingPeriod:this.selectedPeriod,additionalFilter:this.additionFilters,table:p}),"/dev/sges/analytics/download").subscribe(I=>{this.toasty.remove(L),this.toasty.success(this.langService.translate("EXP_COM_OK")),I&&I.data&&N(I.data)},I=>{this.toasty.error(this.langService.translate("EXP_COM_ERROR")),j(I)})})}exportData(p){return new Promise((L,N)=>{this.awsSignatureService.bucketName="hx3s7r8jah",this.awsSignatureService.Post('"'+JSON.stringify(p).replace(/"/g,'\\"')+'"',"/dev-hx3s7r8jah",[],[],this.AWS_API_GATEWAY_ENDPOINT).subscribe(j=>{j&&j.indexOf("sucessful")>-1?L(!0):L(!1)},j=>{N(j)}),this.awsSignatureService.bucketName="1ta6qoye04"})}buildCommentsCategory(){this.allCommentCategoryFilter=[],this.filterCommentArea=[],this.commentSubArea=[];const p=this.initialData["commentCategory"+this.periodSelection.value.period].filter(j=>this.commentStatistic.filter(P=>P.commentArea===j.QuestionName&&P.commentSubArea===j.subClass).length>0),L=[...new Set(p.map(j=>this.matchCategory(j.QuestionCategory)))];0!==L.length&&([...new Set(p.map(j=>j.QuestionName))].forEach(j=>{this.filterCommentArea.push({key:j,selected:!0})}),this.allCommentCategoryFilter=[{name:"COMMENT_CATEGORY_04",label:"COMMENT_CATEGORY_04",column:"level0",expanded:!0,children:[]}],this.allCommentCategoryFilterSelection=[],L.forEach(j=>{this.allCommentCategoryFilter[0].children.push({name:j,label:j,column:"level1",children:[]})}),this.allCommentCategoryFilter[0].children.forEach(j=>{const P=[...new Set(p.filter(A=>this.matchCategory(A.QuestionCategory)===j.name&&null===A.category).map(A=>A.QuestionName))],I=[...new Set(p.filter(A=>this.matchCategory(A.QuestionCategory)===j.name&&null!=A.category&&"SGES2019-05"!==this.periodSelection.value.period).map(A=>A.category))].sort();P.forEach(A=>{const O=[...new Set(p.filter(M=>this.matchCategory(M.QuestionCategory)===j.name&&M.QuestionName===A&&null!=M.subClass).map(M=>M.subClass))].sort(),T=p.filter(M=>this.matchCategory(M.QuestionCategory)===j.name&&M.QuestionName===A&&null!=M.subClass).map(M=>M.subClass+"+"+M.QuestionName);this.commentSubArea=[...new Set(this.commentSubArea.concat(T))].sort();const c=[];O.forEach(M=>{c.push({name:M,label:M,parent:A,column:"level3",selected:!0})}),j.children.push({name:A,label:A,column:"level2",children:c,selected:!this.selectedCommentArea||this.selectedCommentArea===A})}),I.forEach(A=>{const O=[...new Set(p.filter(c=>this.matchCategory(c.QuestionCategory)===j.name&&c.category===A).map(c=>c.QuestionName))].sort(),T=[];O.forEach(c=>{const M=[...new Set(p.filter(D=>this.matchCategory(D.QuestionCategory)===j.name&&D.QuestionName===c&&null!=D.subClass).map(D=>D.subClass))].sort(),w=p.filter(D=>this.matchCategory(D.QuestionCategory)===j.name&&D.QuestionName===A&&null!=D.subClass).map(D=>D.subClass+"+"+D.QuestionName);this.commentSubArea=[...new Set(this.commentSubArea.concat(w))].sort();const R=[];M.forEach(D=>{R.push({name:D,label:D,parent:c,column:"level4",selected:!0})}),T.push({name:c,label:c,column:"level3",children:R,selected:!this.selectedCommentArea||this.selectedCommentArea===c})}),j.children.push({name:A,label:A,column:"level2",children:T,selected:!this.selectedCommentArea||this.selectedCommentArea===A})})}),this.selectedCommentArea||(this.allCommentCategoryFilterSelection=JSON.parse(JSON.stringify(this.allCommentCategoryFilter))),this.selectedCommentArea=void 0)}matchCategory(p){if(p)switch(p){case"S":default:return"COMMENT_CATEGORY_01";case"O":return"COMMENT_CATEGORY_02";case"C":return"COMMENT_CATEGORY_03";case"X":return"COMMENT_CATEGORY_05"}}getCategory(){return new Promise((p,L)=>{const N={countsInto:this.selectedOrgCode,fieldingPeriod:this.selectedPeriod,additionalFilter:this.additionFilters};this._categoryCache[JSON.stringify(N)]&&p(this._categoryCache[JSON.stringify(N)]),this.awsSignatureService.Post(JSON.stringify(N),"/dev/sges/questions-by-countsinto").subscribe(j=>{const P=j.reduce((I,A)=>{if(!I.some(O=>O.category===A.Category&&O.subCategory===A.SubCategory&&("NONRATING"!==A.SubSubCategory&&"NONRATING"!==O.subSubCategory||O.subSubCategory===A.SubSubCategory))){const O={category:A.Category,subCategory:A.SubCategory,subSubCategory:""};"NONRATING"===A.SubSubCategory&&(O.subSubCategory="NONRATING"),O.url=A.Category.indexOf("DS_CATEGORY_01")>-1?"swqc":A.Category.indexOf("DS_CATEGORY_02")>-1?"osqc":A.Category.indexOf("DS_CATEGORY_03")>-1?"csqc":"detailedresults",I.push(O)}return I},[]);this._categoryCache[JSON.stringify(N)]=P,p(P)},j=>{L(j)})})}APIResponseControl(p){let L=403,N="You are not authorized to view this page";switch(p){case"access":L=403,N="You are not authorized to view this page";break;case"server":L=500,N="We are currently experiencing significant load on the system. Please give it some time and try again later."}this.router.navigate(["error",L],{queryParams:{msg:N}})}}return h.\u0275fac=function(p){return new(p||h)(o.\u0275\u0275inject(d.X),o.\u0275\u0275inject(u.s),o.\u0275\u0275inject(g.K),o.\u0275\u0275inject(x.eN),o.\u0275\u0275inject(i.a),o.\u0275\u0275inject(m._W),o.\u0275\u0275inject(E.T),o.\u0275\u0275inject(C.F0))},h.\u0275prov=o.\u0275\u0275defineInjectable({token:h,factory:h.\u0275fac,providedIn:"root"}),h})()},8805:(Se,pe,r)=>{"use strict";r.d(pe,{N:()=>P});var t=r(64753),e=r(46809),a=r(95346),s=r(5e3),o=r(22313),d=r(47626),u=r(11735),g=r(9133),x=r(54620),i=r(96995),m=r(74564),E=r(40520),C=r(62474),v=r(22290),h=r(69808),S=r(32925);function L(I,A){if(1&I&&(s.\u0275\u0275elementStart(0,"div"),s.\u0275\u0275element(1,"iframe",1),s.\u0275\u0275elementEnd()),2&I){const O=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("src",O.link,s.\u0275\u0275sanitizeResourceUrl)}}function N(I,A){1&I&&(s.\u0275\u0275elementStart(0,"div"),s.\u0275\u0275element(1,"pulse-spinner"),s.\u0275\u0275elementEnd())}let j=(()=>{class I{constructor(O,T,c,M,w,R,D,Y,_,y,H){this.sanitizer=O,this.headerService=T,this.activeRoute=c,this.variables=M,this.projectService=w,this.validatorService=R,this.dialogService=D,this.http=Y,this.variableService=_,this.webApi=y,this.toasty=H,this.reloading=!1,this.sub=[]}ngOnInit(){if(this.activeRoute.snapshot.data&&this.activeRoute.snapshot.data.iframe){const O=["iframe"];let T=this.activeRoute.snapshot.data.iframe;T.startsWith("http")||(T=`${this.variables.oldApiUrl}/${this.projectService.projectId}${T}`),this.activeRoute.snapshot.params.id&&(T+=`/${this.activeRoute.snapshot.params.id}`),this.activeRoute.snapshot.params.actionId&&O.push(`action=${this.activeRoute.snapshot.params.actionId}`.toLowerCase()),Object.keys(this.activeRoute.snapshot.queryParams).forEach(c=>{O.push(`${c}=${this.activeRoute.snapshot.queryParams[c]}`.toLowerCase())}),this.link=this.sanitizer.bypassSecurityTrustResourceUrl(`${T}?${O.join("&")}`)}this.headerService.showHeader=!0,this.webApi.get("/api/project/getruleid").then(O=>{null!==O&&(this.ruleId=O,this.validatorService.getRules().then(T=>{if(T&&T.length>0){const c=T.find(w=>w.Id===this.ruleId),M=JSON.parse(c.Config).config.TemplateName;this.headerService.actions.push({label:"Upload Contacts",icon:"icon-arrow-to-top",order:1,callback:()=>{const w=document.createElement("input");w.setAttribute("type","file"),w.setAttribute("accept",".xlsx,.xls"),document.body.appendChild(w),w.click(),w.addEventListener("input",R=>{this.uploadFile(w.files)})}}),M&&this.headerService.actions.push({label:"Get Template File",icon:"icon-arrow-to-down",order:0,callback:()=>{this.validatorService.getPresignedUrl(M,"template","penthao-test-system",!0).then(w=>{w&&w.length>0&&e.Z.downloadLink(w[0])}).catch(w=>{console.log(w)})}})}}))})}ngOnDestroy(){this.sub.forEach(O=>O.unsubscribe()),this.headerService.actions=[]}uploadFile(O){return function(I,A,O,T){return new(O||(O=Promise))(function(M,w){function R(_){try{Y(T.next(_))}catch(y){w(y)}}function D(_){try{Y(T.throw(_))}catch(y){w(y)}}function Y(_){_.done?M(_.value):function c(M){return M instanceof O?M:new O(function(w){w(M)})}(_.value).then(R,D)}Y((T=T.apply(I,A||[])).next())})}(this,void 0,void 0,function*(){this.validatorService.validateFile(O[0],this.ruleId).then(T=>{const c=JSON.parse(T.Config);if(!1===c.log.Validated){const M=c.log.Message,w={data:M?JSON.parse(M):""};this.dialogService.open(a.F,w,{})}else if(!0===c.log.Validated){this.toasty.info("Filetransfer to Database started ...");const M=new FormData;M.append("uploadedFile",O[0]),this.reloading=!0,this.webApi.post(this.variables.oldApiUrl+"/api/project/updateexcel",M).then(w=>{this.toasty.success("Transfer successful. Fetch Data ..."),this.reloading=!1},w=>{this.reloading=!1})}})})}}return I.\u0275fac=function(O){return new(O||I)(s.\u0275\u0275directiveInject(o.DomSanitizer),s.\u0275\u0275directiveInject(d.r),s.\u0275\u0275directiveInject(u.gz),s.\u0275\u0275directiveInject(g.a),s.\u0275\u0275directiveInject(x.k),s.\u0275\u0275directiveInject(i.o),s.\u0275\u0275directiveInject(m.x),s.\u0275\u0275directiveInject(E.eN),s.\u0275\u0275directiveInject(g.a),s.\u0275\u0275directiveInject(C.f),s.\u0275\u0275directiveInject(v._W))},I.\u0275cmp=s.\u0275\u0275defineComponent({type:I,selectors:[["pulse-contact-prep"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"src"]],template:function(O,T){1&O&&(s.\u0275\u0275template(0,L,2,1,"div",0),s.\u0275\u0275template(1,N,2,0,"div",0)),2&O&&(s.\u0275\u0275property("ngIf",!T.reloading),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",T.reloading))},directives:[h.O5,S.O],styles:["iframe[_ngcontent-%COMP%]{position:relative;height:calc(100vh - 55px);border:none;width:100%}"]}),I})(),P=(()=>{class I{}return I.Config={path:"survey",data:{navigation:"Survey Management",icon:"icon-chat",checkChildren:!0},children:[{path:"configuration",component:t.H,data:{navigation:"Survey Configuration",iframe:"/Administration/SurveyConfig",role:"canprojectadministraion"}},{path:"action",component:t.H,data:{navigation:"Action Management",iframe:"/Administration/FollowUpAdministration",role:"canprojectadministraion"}},{path:"contactpreparation",component:j,data:{navigation:"Contact Preparation",iframe:"/ContactPreparation",role:"canmanagesurveypreparation"}},{path:"mail",data:{icon:"icon-e-mail",navigation:"Email",role:"canprojectadministraion"},children:[{path:"configuration",component:t.H,data:{navigation:"Email Configuration",iframe:"/Administration/EmailConfiguration",role:"canprojectadministraion"}},{path:"queue",component:t.H,data:{navigation:"Email Queue",iframe:"/Administration/EmailQueueManager",role:"canprojectadministraion"}}]}]},I})()},53716:(Se,pe,r)=>{"use strict";r.d(pe,{p:()=>t});class t{static downloadFile(a,s,o){t.downloadLink(`data:${s};base64,${a}`,o)}static downloadLink(a,s){const o=document.createElement("a");o.href=a,o.download=s||o.download,document.body.appendChild(o),o.click(),document.body.removeChild(o)}static generateBlob(a){const s=t.decode(a);return new Blob([s])}static decode(a){const s=t.calcBufferSize(a),o=new ArrayBuffer(s),d=new Uint8Array(o),u=t.buildLookupTable();let g,x,i,m,E=0;for(let C=0;C>4,d[E++]=(15&x)<<4|i>>2,d[E++]=(3&i)<<6|63&m;return o}static buildLookupTable(){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(256);for(let o=0;o{"use strict";r.d(pe,{Z:()=>t});class t{static GetDateFromUTC(a){return a=a.replace("T"," ")+" UTC",new Date(a)}static GetBase(){const a=document.location.pathname.split("/");return a.length>0?a[1].toLowerCase():""}static GetDeep(a,...s){if(s.length>0){const o=s.shift();return Object.keys(a).indexOf(o)>-1?this.GetDeep(a[o],...s):{}}return a}static makeSurePostIsNotCached(){return"v="+Math.round((new Date).getTime()/1e3)}static downloadLink(a){if(t.detectIE())window.open(a,"_blank");else{const s=document.createElement("a");s.href=a,s.target="_blank",document.body.appendChild(s),s.click()}}static downloadBlob(a,s){const o=window.URL.createObjectURL(a),d=document.createElement("a");s&&(d.download=s),d.href=o,d.click()}static detectIE(){const a=window.navigator.userAgent,s=a.indexOf("MSIE ");if(s>0)return parseInt(a.substring(s+5,a.indexOf(".",s)),10);if(a.indexOf("Trident/")>0){const u=a.indexOf("rv:");return parseInt(a.substring(u+3,a.indexOf(".",u)),10)}const d=a.indexOf("Edge/");return d>0&&parseInt(a.substring(d+5,a.indexOf(".",d)),10)}static detectIphone(){return/iPhone/.test(navigator.userAgent)}static detectDevice(a){return new RegExp(`${a}`).test(navigator.userAgent)}static detectMobile(){return["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].some(s=>new RegExp(s).test(navigator.userAgent))}static orderByProperty(...a){const s=a.shift();return(o,d)=>o[s]d[s]?1:0}static flat(a){return a.reduce((s,o)=>s.concat(o),[])}static getDepth(a,s){const o=Object.keys(a).filter(u=>s.includes(u));return 1+Math.max(...o.map(u=>a[u]?Math.max(...a[u].map(g=>t.getDepth(g,s))):0))}static parseURL(a){const s=a.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return{protocol:s[1],host:s[2],hostname:s[3],port:s[4],pathname:s[5],search:s[6],hash:s[7]}}static utcsize(a){return new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()))}static getUILocale(){let a="en - US";if("undefined"==typeof window||void 0===window.navigator)return a;const s=window.navigator;let o=s.languages?s.languages[0]:a;return o=o||s.language||s.browserLanguage||s.userLanguage,o}}},97454:(Se,pe,r)=>{"use strict";r.d(pe,{F:()=>m});var t=r(11735),e=r(591),a=r(8929),s=r(20731),o=r(92340),d=r(46809),u=r(5e3),g=r(62474),x=r(22290),i=r(54620);let m=(()=>{class E{constructor(v,h,S,p,L){this.router=v,this.webApi=h,this.route=S,this.toastr=p,this.projectService=L,this.bookmarks=new e.X(null),this.bookmarkDeleteEvent$=new a.xQ,this.firstLoad=!0,this._handler=[],this.router.events.subscribe(N=>{N instanceof t.m2&&(this.bookmark=null)})}ngOnInit(){}addHandler(v){-1===this._handler.indexOf(v)&&this._handler.push(v),v.openBookmark(this.bookmark)}removeHandler(v){this._handler=this._handler.filter(h=>h!==v)}addBookmark(v){if(this.toastr.success("You created a new bookmark.","Add Bookmark"),this.bookmarks.value){const h=this.bookmarks.value;h.push(v),this.bookmarks.next(h)}}removeBookmark(v){if(this.toastr.success("You deleted a bookmark.","Delete Bookmark"),this.bookmarks.value){const h=this.bookmarks.value.filter(S=>S.id!==v);this.bookmarks.next(h)}}replaceBookmark(v,h){if(this.toastr.success("You changed a bookmark.","Change Bookmark"),this.bookmarks.value){const S=[];this.bookmarks.value.forEach(p=>{p.id===v&&(h.longLink&&(p.longLink=h.longLink),h.category&&(p.category=h.category),p.name=h.name,p.where=h.where),S.push(p)}),this.bookmarks.next(S)}}getLocation(){let v=location.href.split("?")[0];return o.N.location&&(v=o.N.location+v.split(location.host)[1]),v.toLowerCase()}getWhere(v){let h=v.split("?")[0];return h=o.N.location?o.N.location+h:location.href.split(location.host)[0]+location.host+h,h.toLowerCase()}createBookmark(v,h,S){const L={name:v,where:this.getLocation()};return S&&(L.category=S),L.longLink=this.getLongLink(h),this.webApi.post("/api/bookmark",L).then(N=>{this.addBookmark(N)})}changeBookmark(v,h,S,p){h.id=v;const L=this.getLocation();return h.where=L,S&&(h.longLink=this.getLongLink(S)),p&&(h.category=p),this.webApi.put("/api/bookmark/"+v,h).then(()=>this.replaceBookmark(v,h))}deleteBookmark(v){return this.webApi.delete("/api/bookmark/"+v).then(()=>{const h=this.bookmarks.value.find(S=>S.id===v);if(h&&h.longLink){const S=this.getObjectFromLongLink(h.longLink);this.bookmarkDeleteEvent$.next(S)}this.removeBookmark(v)})}getBookmark(v){return this.webApi.get("/api/bookmark/"+v)}getObject(v){return new Promise((h,S)=>{let p;null!==this.bookmarks.value&&(p=this.bookmarks.value.find(L=>L.id===+v)),p&&p.longLink?h(this.getObjectFromLongLink(p.longLink)):this.loadLonglink(v).then(L=>{p&&(p.longLink=L),h(this.getObjectFromLongLink(L))},L=>S(L))})}loadLonglink(v){return this.webApi.get("/api/bookmark/"+v+"/longlink")}getUserList(v){return this.webApi.get("/api/bookmark/"+v+"/user")}deleteUser(v,h,S){return this.webApi.delete("/api/bookmark/"+v+"/user/"+h).then(()=>{S&&this.removeBookmark(v)})}putUser(v,h){return this.webApi.put("/api/bookmark/"+v+"/user/"+h.id,h).then(()=>{this.bookmarks.next(this.bookmarks.value)})}postUser(v,h){return this.webApi.post("/api/bookmark/"+v+"/user",h)}getBookmarks(v,h){return v=this.getWhere(v),(!this.bookmarks.value||h)&&this.webApi.get("/api/bookmark?where="+encodeURIComponent(v)).then(S=>this.bookmarks.next(S)),this.bookmarks}getBookmarksFrtExport(v){return v=this.getWhere(v),this.webApi.get("/api/bookmark/export?where="+encodeURIComponent(v))}getDefault(v,h){return new Promise((S,p)=>{this.route.snapshot.queryParams.bmid?this.openBookmark(+this.route.snapshot.queryParams.bmid).then(L=>{S(L)}):(h=h?this.getWhere(h):this.getLocation(),this.webApi.post("/api/bookmark/default",{where:h,category:v}).then(N=>{N&&(N.isDefault=!0),N&&N.longLink&&this.projectService.compareProjectPath(N.where,h)?this.setBookmark(this.getObjectFromLongLink(N.longLink)):this.setBookmark(null),S(N)},N=>p(N)))})}getShortlink(v){let h=0;if(0===v.length)return h;for(let S=0;S0&&(N[0]=s.Y.getGroupName(p[0])),L>1){const j=this.projectService.getItemName(p.join("/"),p[0]);j&&(N[1]=j)}S=N.join(" > ")}else p=v.where.split(h)[1].split("/").filter(L=>L),S=p.map(L=>this.camelCase(L)).join(" > ");return S}prepareBookmark(v,h,S){let p="",L=v.where.replace(/-/g," ").split("/");if(L.includes("project")){L=L.slice(L.indexOf("project")+2);const P=L.length,I=JSON.parse(JSON.stringify(L));if(P>0&&(I[0]=s.Y.getGroupName(L[0])),P>1){const A=this.projectService.getItemName(L.join("/"),L[0]);A&&(I[1]=A)}p=I.join(" > ")}else L=v.where.split(h)[1].split("/").filter(P=>P),p=L.map(P=>this.camelCase(P)).join(" > ");let N=""!==o.N.location&&o.N.location?v.where.split(o.N.location)[1]:null;N&&N.indexOf("/#")>-1&&(N=N.split("/#")[1]);const j={title:v.name,subtitle:p,id:v.id,longLink:v.longLink,go:L?this.projectService.getItemGo(L.join("/"),L[0]):void 0,function:P=>{this.openBookmark(P.id)},link:N||v.where.split(window.location.hostname)[1],path:d.Z.parseURL(v.where).pathname};if(v.Bookmark2User){const P=v.Bookmark2User.find(A=>A.userId===S),I=v.Bookmark2User.find(A=>!A.isShared);j.userId=I?I.userId:0,P&&P.isShared&&(j.b2uId=P.id),j.group="",P&&(j.b2u=P,P.isShared?j.group="Shared":P.isFavorite&&(j.group="Favorite")),v.Bookmark2User.some(A=>A.isDefault)&&(j.group="Default")}return j}openBookmark(v){return new Promise((h,S)=>{this.getObject(v).then(p=>{p&&p.fiscalyear&&delete p.fiscalyear,this.setBookmark(p),h(p)})})}setBookmark(v){v&&v.fiscalyear&&delete v.fiscalyear;const h=this._handler.map(S=>(E.isBookmarkLoading=!0,S.openBookmark(v)));this.bookmark=v,Promise.all(h).then(()=>{this._handler.forEach(S=>{S.refreshData&&S.refreshData()},S=>{this.bookmark=v}),E.isBookmarkLoading=!1})}createBookmarkObj(v){const h={};return this._handler.forEach(S=>S.saveBookmark(h,v)),h}}return E.isBookmarkLoading=!0,E.\u0275fac=function(v){return new(v||E)(u.\u0275\u0275inject(t.F0),u.\u0275\u0275inject(g.f),u.\u0275\u0275inject(t.gz),u.\u0275\u0275inject(x._W),u.\u0275\u0275inject(i.k))},E.\u0275prov=u.\u0275\u0275defineInjectable({token:E,factory:E.\u0275fac}),E})()},17717:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>s});var t=r(591),e=r(5e3),a=r(62474);let s=(()=>{class o{constructor(u){this.webApi=u,this.currencyFlags=[{name:"group",label:"Group Currency"},{name:"local",label:"Local Currency"},{name:"transaction",label:"Transaction Currency",disabled:!0}],this.currency=new t.X(this.currencyFlags[0].name),this.uniqueCurrency=new t.X(["\u20ac"]),this.currencies=[],this.disabled=!1}setCurrency(u){u!==this.currency.value&&(this.currencyFlags.find(g=>g.name===u)?this.currency.next(u):this.currency.next(this.currencyFlags[0].name))}getCurrencyName(){return this.uniqueCurrency.value&&this.uniqueCurrency.value.length>0?this.uniqueCurrency.value[0]:"\u20ac"}hasLocalCurrency(u,g,x){this.currency.value!==this.currencyFlags[0].name?this.webApi.post("/Customer/FinancialReporting/HasLocalCurrency",{frtId:u,filters:g,table:x,currency:this.currency.value}).then(m=>{if(Array.isArray(m))this.uniqueCurrency.next(m.map(E=>E.currencyName));else if("402"===m)throw this.uniqueCurrency.next([]),{name:"Permission Error",level:"showStopper",message:"Check FRT Permissions",htmlMessage:"

Permission Error

Check FRT Permissions

",toString:function(){return this.name+": "+this.message}}}):this.uniqueCurrency.next(["\u20ac"])}getEuro(u,g,x,i){if(u){const m=this.getRate(g,x,i.exType,i.monthOffset);if(m)return u/m}return null}getRate(u,g,x,i){const m=this.currencies.find(E=>E.currency===u&&E.fiscalYear===g&&x===E.type&&i===E.monthOffset);return m?m.rate:0}getCurrency(u,g){(u=u.filter(i=>!this.currencies.some(m=>m.fiscalYear===g&&m.monthOffset===i.monthOffset&&m.type===i.exType))).length>0&&this.webApi.post("/Customer/ExchangeRate",{rates:u,fiscalyear:g}).then(i=>{this.currencies.push(...i.map(m=>(m.fiscalYear=+m.fiscalYear,m)))})}}return o.\u0275fac=function(u){return new(u||o)(e.\u0275\u0275inject(a.f))},o.\u0275prov=e.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac}),o})()},45622:(Se,pe,r)=>{"use strict";r.d(pe,{Q:()=>v});var t=r(5e3),e=r(93075),a=r(85864),s=r(69808),o=r(8971),d=r(3068),u=r(87436);function g(h,S){if(1&h){const p=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"i",5),t.\u0275\u0275listener("click",function(N){return t.\u0275\u0275restoreView(p),t.\u0275\u0275nextContext().clear(N)}),t.\u0275\u0275elementEnd()}}function x(h,S){if(1&h){const p=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"i",15),t.\u0275\u0275listener("click",function(N){t.\u0275\u0275restoreView(p),t.\u0275\u0275nextContext();const j=t.\u0275\u0275reference(2);return N.stopPropagation(),j.close()}),t.\u0275\u0275elementEnd()}}function i(h,S){if(1&h){const p=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",13),t.\u0275\u0275listener("click",function(){const j=t.\u0275\u0275restoreView(p).$implicit;return t.\u0275\u0275nextContext(2).onTokenSelection(j.key)}),t.\u0275\u0275elementStart(1,"a"),t.\u0275\u0275element(2,"i",16),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd()()}if(2&h){const p=S.$implicit;t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(4,1,p.key)," ")}}function m(h,S){if(1&h){const p=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",6,7),t.\u0275\u0275element(3,"i",8),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"div",9,10)(6,"div",11),t.\u0275\u0275template(7,x,1,0,"i",12),t.\u0275\u0275elementStart(8,"ul",13),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(p),t.\u0275\u0275reference(2).close()}),t.\u0275\u0275template(9,i,5,3,"li",14),t.\u0275\u0275pipe(10,"keyvalue"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementContainerEnd()}if(2&h){const p=t.\u0275\u0275reference(5),L=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("pulseDropdownMenu",p),t.\u0275\u0275advance(6),t.\u0275\u0275property("ngIf",L.dateModel&&L.dateModel.startDate),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",t.\u0275\u0275pipeBind1(10,3,L.internalTokens))}}const E=function(h){return{format:h}},C={provide:e.NG_VALUE_ACCESSOR,useExisting:(0,t.forwardRef)(()=>v),multi:!0};let v=(()=>{class h{constructor(p){this.changeDetector=p,this.isSingleDate=!1,this.dateConstraint={minDate:void 0,maxDate:void 0},this.dateFormat="DD.MM.YYYY",this.useLocalTime=!1,this.disabled=!1,this.internalTokens={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}ngOnInit(){this.buildTokens()}clear(p){this.dateModel=void 0,this.onChangeCallback(this.dateModel),p.stopPropagation()}writeValue(p){null!==p&&(p&&p.startDate&&p.endDate?(this.dateModel={startDate:this.utcsize(p.startDate),endDate:this.utcsize(p.endDate)},this.onChangeCallback(this.dateModel)):this.isDate(p)?this.dateModel={startDate:this.utcsize(p),endDate:this.utcsize(p)}:(this.dateModel=void 0,this.onChangeCallback(this.dateModel))),this.changeDetector.detectChanges()}registerOnChange(p){this.onChangeCallback=p}registerOnTouched(p){this.onTouchedCallback=p}interceptDateModelChange(p){if(this.isSingleDate)p.endDate&&this.onChangeCallback(this.utcsize(p.endDate._d?p.endDate._d:p.endDate));else if(p.startDate&&p.endDate){const N=p.endDate._d?p.endDate._d:p.endDate,j={startDate:this.utcsize(p.startDate._d?p.startDate._d:p.startDate),endDate:this.utcsize(N)};this.onChangeCallback(j)}}onTokenSelection(p){this.writeValue({startDate:this.internalTokens[p].startDate,endDate:this.internalTokens[p].endDate})}buildTokens(){this.tokens&&this.tokens.forEach(p=>{this.internalTokens[p.name]=p.value.fromDate?{startDate:new Date(p.value.fromDate),endDate:new Date(p.value.toDate)}:{startDate:new Date(p.value.startDate),endDate:new Date(p.value.endDate)}})}hasTokens(){return Object.keys(this.internalTokens).length>0}utcsize(p){return this.useLocalTime?p:new Date(Date.UTC(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds()))}isDate(p){return!isNaN(Date.parse(p))}}return h.\u0275fac=function(p){return new(p||h)(t.\u0275\u0275directiveInject(t.ChangeDetectorRef))},h.\u0275cmp=t.\u0275\u0275defineComponent({type:h,selectors:[["pulse-datepicker"]],inputs:{isSingleDate:"isSingleDate",dateConstraint:"dateConstraint",dateFormat:"dateFormat",tokens:"tokens",useLocalTime:"useLocalTime",disabled:"disabled"},features:[t.\u0275\u0275ProvidersFeature([C])],decls:6,vars:16,consts:[[1,"date-picker"],[1,"date-picker__input-container"],["type","text","ngxDaterangepickerMd","",1,"date-picker__input",3,"placeholder","ngModel","locale","showDropdowns","showWeekNumbers","autoApply","singleDatePicker","minDate","maxDate","disabled","ngModelChange"],["class","icon-close",3,"click",4,"ngIf"],[4,"ngIf"],[1,"icon-close",3,"click"],["pulseDropdown","",1,"pulse-dropdown-toggle","token",3,"pulseDropdownMenu"],["dropdown","pulseDropdown"],[1,"icon-token"],["perfectScrollbar","",1,"token-class"],["tokenDropMenu",""],[1,"pulse-dropdown-menu","pulse-select-list"],["class","icon-close2",3,"click",4,"ngIf"],[3,"click"],[3,"click",4,"ngFor","ngForOf"],[1,"icon-close2",3,"click"],[1,"icon-calendar"]],template:function(p,L){1&p&&(t.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"input",2),t.\u0275\u0275listener("ngModelChange",function(j){return L.dateModel=j})("ngModelChange",function(j){return L.interceptDateModelChange(j)}),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(4,g,1,0,"i",3),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(5,m,11,5,"ng-container",4),t.\u0275\u0275elementEnd()),2&p&&(t.\u0275\u0275advance(2),t.\u0275\u0275property("placeholder",t.\u0275\u0275pipeBind1(3,12,"DATE_PICKER_PLACEHOLDER"))("ngModel",L.dateModel)("locale",t.\u0275\u0275pureFunction1(14,E,L.dateFormat))("showDropdowns",!0)("showWeekNumbers",!0)("autoApply",!0)("singleDatePicker",L.isSingleDate)("minDate",L.dateConstraint.minDate)("maxDate",L.dateConstraint.maxDate)("disabled",L.disabled),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",L.dateModel&&L.dateModel.startDate),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",L.hasTokens()))},directives:[a.SP,e.DefaultValueAccessor,e.NgControlStatus,e.NgModel,s.O5,o.w,d.$V,s.sg],pipes:[u.k,s.Nd],styles:['.date-picker[_ngcontent-%COMP%]{display:flex;position:relative}.date-picker[_ngcontent-%COMP%] .date-picker__input-container[_ngcontent-%COMP%]{width:100%;position:relative}.date-picker[_ngcontent-%COMP%] .date-picker__input-container[_ngcontent-%COMP%] .date-picker__input[_ngcontent-%COMP%]{font-size:inherit;width:100%!important;border:1px solid #cdd9e1!important;border-color:#cdd9e1 #cdd9e1 #879baa #cdd9e1!important;height:40px;padding:1px 15px 0!important;font-family:siemensSans;text-overflow:ellipsis;cursor:pointer}.date-picker[_ngcontent-%COMP%] .date-picker__input-container[_ngcontent-%COMP%]:after{position:absolute;right:11px;top:10px;color:#788791;font-family:pulseicons;content:"\\f0ed";font-size:13px;pointer-events:none}.date-picker[_ngcontent-%COMP%] .date-picker__input-container[_ngcontent-%COMP%] .icon-close[_ngcontent-%COMP%]{position:absolute;cursor:pointer;right:6px;font-size:14px;pointer-events:auto;font-family:pulseicons;content:"\\f0ed";background:#fff;color:#788791;z-index:1;top:7px;padding:4px}.pulse-dropdown[_ngcontent-%COMP%]{background-color:#fff;left:0;max-height:400px;border:1px solid #cdd9e1;border-radius:0}.pulse-dropdown[_ngcontent-%COMP%] .pulse-select-list[_ngcontent-%COMP%] i.icon-close2[_ngcontent-%COMP%]{position:absolute;cursor:pointer;color:#fff;right:7px;top:10px}']}),h})()},22324:(Se,pe,r)=>{"use strict";r.d(pe,{a:()=>g});var t=r(5e3),e=r(74564),a=r(69808);function s(x,i){if(1&x){const m=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"i",4),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(m),t.\u0275\u0275nextContext(2).close()}),t.\u0275\u0275elementEnd()}}function o(x,i){if(1&x&&(t.\u0275\u0275elementStart(0,"div",2),t.\u0275\u0275template(1,s,1,0,"i",3),t.\u0275\u0275projection(2),t.\u0275\u0275elementEnd()),2&x){const m=t.\u0275\u0275nextContext();t.\u0275\u0275styleProp("width",m.width+"%")("min-width",m.minWidth+"px")("min-height",m.minHeight+"px")("overflow",m.overflowType),t.\u0275\u0275classProp("noFlow",m.noFlow),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",m.closeIcon)}}function d(x,i){if(1&x){const m=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",5),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(m),t.\u0275\u0275nextContext().closeOutSideDialog()}),t.\u0275\u0275elementEnd()}}const u=["*"];let g=(()=>{class x{constructor(m){this.dialog=m,this.isOpen=!0,this.closeIcon=!0,this.overflowType="auto",this.minWidth=600,this.minHeight=300}keyup(m){27===m.keyCode&&this.close()}ngOnInit(){}close(){this.isOpen=!1,this.dialog.destroy()}closeOutSideDialog(){this.noCloseOutside||this.close()}}return x.\u0275fac=function(m){return new(m||x)(t.\u0275\u0275directiveInject(e.x))},x.\u0275cmp=t.\u0275\u0275defineComponent({type:x,selectors:[["pulse-dialog"]],hostBindings:function(m,E){1&m&&t.\u0275\u0275listener("keyup",function(v){return E.keyup(v)},!1,t.\u0275\u0275resolveDocument)},inputs:{closeIcon:"closeIcon",minWidth:"minWidth",minHeight:"minHeight",width:"width",noFlow:"noFlow",noCloseOutside:"noCloseOutside",overflowType:"overflowType"},ngContentSelectors:u,decls:2,vars:2,consts:[["id","pulse-model-container",3,"width","minWidth","minHeight","noFlow","overflow",4,"ngIf"],["id","overlay",3,"click",4,"ngIf"],["id","pulse-model-container"],["class","pulse-modal-close icon-close2",3,"click",4,"ngIf"],[1,"pulse-modal-close","icon-close2",3,"click"],["id","overlay",3,"click"]],template:function(m,E){1&m&&(t.\u0275\u0275projectionDef(),t.\u0275\u0275template(0,o,3,15,"div",0),t.\u0275\u0275template(1,d,1,0,"div",1)),2&m&&(t.\u0275\u0275property("ngIf",E.isOpen),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",E.isOpen))},directives:[a.O5],styles:["#pulse-model-container[_ngcontent-%COMP%]{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);min-height:300px;min-width:600px;max-width:90%;max-height:90%;background:#ffffff;text-align:left;box-shadow:0 0 2px 1px #879baa;z-index:1100;overflow:auto;padding:15px;display:flex;flex-direction:column}#pulse-model-container[_ngcontent-%COMP%] .pulse-modal-close[_ngcontent-%COMP%]{z-index:1;position:absolute;right:5px;top:5px;font-size:25px;cursor:pointer}#overlay[_ngcontent-%COMP%]{position:absolute;top:0px;left:0px;z-index:1099;background:#000;width:100%;opacity:.75;height:100%}"]}),x})()},27859:(Se,pe,r)=>{"use strict";r.d(pe,{h:()=>E});var t=r(5e3),e=r(23753),a=r(67742);const s=["txaCopy"],o=["divTable"],d=["extendedTable",""],u=["*"],g=[{ctrlKey:null,altKey:null,shiftKey:!0,metaKey:!1,keyCode:null}],x=[{ctrlKey:!0,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:null},{ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!0,keyCode:null}],i=[{ctrlKey:!0,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:null},{ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!0,keyCode:null}],m=[{ctrlKey:!0,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:67},{ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!0,keyCode:67}];let E=(()=>{class C{constructor(h){this.service=h,this.selectionClass="selected_default",this.copyColumnSeparator="\t",this.copyRowSeparator="\n",this.rowSelector="tr",this.selectedCellsSumChange=new t.EventEmitter,this.isMouseDown=!1,this._sub=[],this.service.setTable(this)}ngOnDestroy(){this.service.mousemove$&&this.service.mousemove$.unsubscribe(),this.service.keydown$&&this.service.keydown$.unsubscribe(),this._sub.forEach(h=>h.unsubscribe())}ngOnInit(){this.canSelect="noselection"!==this.extendedTable.toLowerCase(),this.canCopy="nocopy"!==this.extendedTable.toLowerCase(),this.resetSelection(),this._sub.push((0,e.R)(document,"keydown").subscribe(h=>this.handleKeyDown(h))),this._sub.push((0,e.R)(this.divTable.nativeElement,"mousedown").subscribe(h=>this.onMouseDown(h))),this._sub.push((0,e.R)(document.body,"mousedown").subscribe(h=>{this.isMouseDown||this.resetSelection()})),this._sub.push((0,e.R)(document,"mouseup").subscribe(h=>{this.isMouseDown=!1,this.service.mousemove$&&this.service.mousemove$.unsubscribe()}))}paste(h){h&&h.clipboardData&&this.service.paste.next(h.clipboardData.getData("text"))}handleKeyDown(h){this.canCopy&&this.hasSelection()&&(!document.queryCommandSupported("copy")&&this.isPressed(i,h)?(this.txaCopy.nativeElement.value=this.copySelection(),this.txaCopy.nativeElement.focus(),this.txaCopy.nativeElement.select()):this.isPressed(m,h)&&(this.txaCopy.nativeElement.value=this.copySelection(),this.txaCopy.nativeElement.focus(),this.txaCopy.nativeElement.select(),document.execCommand("copy")))}getCurrentCell(h){const S=[],p=h.closest(this.rowSelector);let N,L=h;do{L=L.parentNode,null!=L&&L!=p&&S.push(L)}while(null!=L&&L!=p);return N=0===S.length?h:S[S.length-1],N}getPosition(h){const S=this.getCurrentCell(h),p=S.parentElement;if(null==p)return null;const L=this.divTable.nativeElement.querySelectorAll(this.rowSelector);let N=-1,j=-1;for(let P=0;P{this.onMouseOver(p)})}onMouseOver(h){const S=this.getPosition(h.target);this.isMouseDown&&null!=S&&(this.selectedCellsEnd=S,null==this.selectedCellsStart&&(this.selectedCellsStart=S),this.drawSelection(),this.calcSum())}hasSelection(){return this.canSelect&&(null!=this.selectedCellsStart&&null!=this.selectedCellsEnd||this.selectedCells.length>0)}selectedCellsStartEndToMinMax(){return null==this.selectedCellsStart||null==this.selectedCellsEnd?null:{xMin:Math.min(this.selectedCellsStart.x,this.selectedCellsEnd.x),xMax:Math.max(this.selectedCellsStart.x,this.selectedCellsEnd.x),yMin:Math.min(this.selectedCellsStart.y,this.selectedCellsEnd.y),yMax:Math.max(this.selectedCellsStart.y,this.selectedCellsEnd.y)}}selectedCellsMinMax(){let h=this.selectedCellsStartEndToMinMax();null==h&&(h={xMin:null,xMax:null,yMin:null,yMax:null});for(const S of this.selectedCells)(null===h.xMin||S.xh.xMax)&&(h.xMax=S.x),(null===h.yMin||S.yh.yMax)&&(h.yMax=S.y);return null===h.xMin?null:{xMin:h.xMin,xMax:h.xMax,yMin:h.yMin,yMax:h.yMax}}cellIsSelected(h,S){if(null!=this.selectedCellsStart&&null!=this.selectedCellsEnd){const p=this.selectedCellsStartEndToMinMax();if(null!=p&&h>=p.xMin&&h<=p.xMax&&S>=p.yMin&&S<=p.yMax)return!0}for(const p of this.selectedCells)if(p.x==h&&p.y==S)return!0;return!1}resetSelection(){this.selectedCells=[],this.selectedCellsStart=null,this.selectedCellsEnd=null,this.calcSum(),this.drawSelection()}drawSelection(){if(!this.canSelect)return;this.hasSelection()&&setTimeout(()=>{this.txaCopy.nativeElement.focus(),this.txaCopy.nativeElement.select()});const h=this.divTable.nativeElement.querySelectorAll(this.rowSelector);this.service.rowCount=h.length,h.length>0&&(this.service.childrenCount=h[0].children.length);for(let S=0;S{"use strict";r.d(pe,{e:()=>a});var t=r(61130),e=r(5e3);let a=(()=>{class s{constructor(){this.paste=new t.t(null)}setTable(d){this.table=d}right(){this.table.selectedCellsStart.x++,this.table.selectedCellsEnd.x=this.table.selectedCellsStart.x,this.table.drawSelection(),this.table.calcSum()}left(){this.table.selectedCellsStart.x--,this.table.selectedCellsEnd.x=this.table.selectedCellsStart.x,this.table.drawSelection(),this.table.calcSum()}up(){this.table.selectedCellsStart.y--,this.table.selectedCellsEnd.y=this.table.selectedCellsStart.y,this.table.drawSelection(),this.table.calcSum()}down(){this.table.selectedCellsStart.y++,this.table.selectedCellsEnd.y=this.table.selectedCellsStart.y,this.table.drawSelection(),this.table.calcSum()}}return s.\u0275fac=function(d){return new(d||s)},s.\u0275prov=e.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac}),s})()},58342:(Se,pe,r)=>{"use strict";r.d(pe,{w:()=>g});var t=r(5e3),e=r(59077),a=r(69808);function s(x,i){if(1&x&&t.\u0275\u0275element(0,"div",5),2&x){const m=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("innerHTML",m.service.currentFilterSelection,t.\u0275\u0275sanitizeHtml)}}function o(x,i){if(1&x&&t.\u0275\u0275element(0,"div",5),2&x){const m=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("innerHTML",m.htmlFilter,t.\u0275\u0275sanitizeHtml)}}function d(x,i){if(1&x&&(t.\u0275\u0275elementStart(0,"div"),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&x){const m=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(m.footnote)}}function u(x,i){if(1&x&&(t.\u0275\u0275elementStart(0,"div",1)(1,"div",2),t.\u0275\u0275text(2,"Active Filters:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(3,s,1,1,"div",3),t.\u0275\u0275template(4,o,1,1,"div",3),t.\u0275\u0275template(5,d,2,1,"div",4),t.\u0275\u0275elementEnd()),2&x){const m=t.\u0275\u0275nextContext();t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",!m.htmlFilter),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",m.htmlFilter),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",m.hasFootnote)}}let g=(()=>{class x{constructor(m){this.service=m,this.hasFootnote=!1}ngOnInit(){}}return x.\u0275fac=function(m){return new(m||x)(t.\u0275\u0275directiveInject(e.i))},x.\u0275cmp=t.\u0275\u0275defineComponent({type:x,selectors:[["pulse-filter-footer"]],inputs:{htmlFilter:"htmlFilter",hasFootnote:"hasFootnote",footnote:"footnote"},decls:1,vars:1,consts:[["class","filter-footer",4,"ngIf"],[1,"filter-footer"],[1,"filter-footer-header"],["class","filter-footer-group",3,"innerHTML",4,"ngIf"],[4,"ngIf"],[1,"filter-footer-group",3,"innerHTML"]],template:function(m,E){1&m&&t.\u0275\u0275template(0,u,6,3,"div",0),2&m&&t.\u0275\u0275property("ngIf",E.service.currentFilterSelection||E.htmlFilter)},directives:[a.O5],styles:["pulse-filter-footer .filter-footer{padding-top:10px;font-size:14px;color:#879baa}pulse-filter-footer .filter-footer .filter-footer-header{font-weight:500}pulse-filter-footer .filter-footer .filter-footer-group .filter-row{padding:3px 0;border-bottom:1px solid #cdd9e1}pulse-filter-footer .filter-footer .filter-footer-group div{padding-right:15px}pulse-filter-footer .filter-footer .filter-footer-group .filter-element{display:inline-block;padding-top:4px}\n"],encapsulation:2}),x})()},59077:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>d});var t=r(61130),e=r(591),a=r(5e3),s=r(62474),o=r(97454);let d=(()=>{class u{constructor(x,i){this.webApi=x,this._filterConfig$=new t.t(1),this.filterConfig$=this._filterConfig$,this._filtersReady$=new t.t(1),this.filtersReady$=this._filtersReady$,this._filterBookmarkReadyChanged$=new t.t(1),this.filterBookmarkReadyChanged$=this._filterBookmarkReadyChanged$,this.currentSelection=new e.X(null),this.manualChangeSelection=new e.X(null),this.selection={},this.cache={},this.currentFilterSelection="",this.changedFilter={},this.currentFilterSelectionString=""}set filterBookmarkReady(x){this._filterBookmarkReady=x,this._filterBookmarkReadyChanged$.next()}get filterBookmarkReady(){return this._filterBookmarkReady}manualChange(x,i){Object.keys(this.selection).forEach(m=>this.selection[m]=x[m]?x[m]:this.selection[m]),this.manualChangeSelection.next({force:i,selection:this.selection})}createSelection(x,i,m){for(let E=0;E{this.selection[i]=x[i]})}setCurrentSelection(x){this.currentSelection.next(x)}updateFilterConfig(x){this._filtersReady$.next(!1);const i=JSON.stringify(x);if(!this.cache[i])return this.webApi.postObserv("/Customer/HierarchyFilter/GetFilterGroup",x);this.nextFilter(this.cache[i],i)}nextFilter(x,i){this.cache[i]=x,this._filterConfig$.next(x),this._filtersReady$.next(!0)}saveBookmarkHook(x,i){this.changedFilter[104]||null!=i&&(i.forEach(m=>{}),i=i.filter(m=>m.length))}openBookmarkHook(x,i){null!=i&&i.forEach(m=>{})}}return u.\u0275fac=function(x){return new(x||u)(a.\u0275\u0275inject(s.f),a.\u0275\u0275inject(o.F))},u.\u0275prov=a.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac}),u})()},93870:(Se,pe,r)=>{"use strict";r.d(pe,{b:()=>N});var t=r(61130),e=r(591),a=r(46809),s=r(5e3),o=r(98613),d=r(62474),u=r(17717),g=r(22324),x=r(23753);let i=(()=>{class j{constructor(I){this._scrollComments=I,this._disableScrollDown=!1}ngOnInit(){this.scrollEvent$=(0,x.R)(this._scrollComments.nativeElement,"scroll").subscribe(I=>{this.onScroll()})}ngOnDestroy(){this.scrollEvent$&&this.scrollEvent$.unsubscribe()}ngAfterViewChecked(){this.scrollToBottom()}onScroll(){const I=this._scrollComments.nativeElement;this._disableScrollDown=I.scrollHeight-I.scrollTop!==I.offsetHeight}scrollToBottom(){if(!this._disableScrollDown)try{this._scrollComments.nativeElement.scrollTop=this._scrollComments.nativeElement.scrollHeight}catch(I){}}}return j.\u0275fac=function(I){return new(I||j)(s.\u0275\u0275directiveInject(s.ElementRef))},j.\u0275dir=s.\u0275\u0275defineDirective({type:j,selectors:[["","pulseScrollToBottom",""]]}),j})();var m=r(69808),E=r(93075);function C(j,P){if(1&j){const I=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"li",11)(1,"div")(2,"p",12),s.\u0275\u0275text(3),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"p",13),s.\u0275\u0275text(5),s.\u0275\u0275pipe(6,"date"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(7,"button",14),s.\u0275\u0275listener("click",function(){const T=s.\u0275\u0275restoreView(I).$implicit;return s.\u0275\u0275nextContext().delete(T)}),s.\u0275\u0275element(8,"i",15),s.\u0275\u0275text(9," Delete"),s.\u0275\u0275elementEnd()()}if(2&j){const I=P.$implicit,A=s.\u0275\u0275nextContext();s.\u0275\u0275advance(3),s.\u0275\u0275textInterpolate(I.comment),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate2("",s.\u0275\u0275pipeBind2(6,4,I.date,"MMM d, y, HH:mm")," / ",I.userName,""),s.\u0275\u0275advance(2),s.\u0275\u0275property("disabled",I.userId!==A.user.id)}}function v(j,P){1&j&&(s.\u0275\u0275elementStart(0,"span"),s.\u0275\u0275text(1,"(Only relevant for Revenue Deviations)"),s.\u0275\u0275elementEnd())}function h(j,P){if(1&j){const I=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"li")(1,"label",19)(2,"input",20),s.\u0275\u0275listener("change",function(){return s.\u0275\u0275restoreView(I),s.\u0275\u0275nextContext(2).changeCategory()})("ngModelChange",function(O){return s.\u0275\u0275restoreView(I).$implicit.selected=O}),s.\u0275\u0275elementEnd(),s.\u0275\u0275element(3,"span",21),s.\u0275\u0275text(4),s.\u0275\u0275elementEnd()()}if(2&j){const I=P.$implicit;s.\u0275\u0275advance(2),s.\u0275\u0275property("ngModel",I.selected),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate1(" ",I.label," ")}}function S(j,P){if(1&j&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"div",16)(2,"label"),s.\u0275\u0275text(3),s.\u0275\u0275template(4,v,2,0,"span",5),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(5,"ul",17),s.\u0275\u0275template(6,h,5,2,"li",18),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementContainerEnd()),2&j){const I=s.\u0275\u0275nextContext();s.\u0275\u0275advance(3),s.\u0275\u0275textInterpolate1("","deviation"===I.columnType?"Deviation":"Column"," Categories "),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2507===I.frtService.frtId),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngForOf",I.categories)}}let p=(()=>{class j{constructor(I,A,O){this.userService=I,this.webApi=A,this.currencyService=O,this.invalidCom=!0,this.drilldownArray=[],this.categories=[],this._sub=[],this.categoryValue="category",this._sub.push(this.userService.getUser().subscribe(T=>{T&&(this.user=T)}))}ngOnInit(){const I={frtId:this.frtService.frtId,table:this.frtService.frtTable,filter:this.frtService.request.filterList,drilldown:this.drilldownArray,cumulated:this.frtService.isCumulate,currencyFlag:this.currencyService.currency.value};let A=[];if("deviation"===this.columnType?(I.deviationId=this.columnId,A=this.commentService.categoriesDeviation):(I.columnId=this.columnId,A=this.commentService.categoriesColumn),this.categories=A.map(O=>({selected:!1,label:O})),this._categorySelection=this.allComments.filter(O=>O.columnId===this.columnId).find(O=>O.value===this.categoryValue),this._categorySelection){const O=JSON.parse(this._categorySelection.comment);this.categories.forEach(T=>{T.selected=O.indexOf(T.label)>-1})}this.comments=this.allComments.filter(O=>O.columnId===this.columnId).filter(O=>O.value!==this.categoryValue).map(O=>(O.date=a.Z.GetDateFromUTC(O.timestamp),O))}ngOnDestroy(){this._sub.forEach(I=>I.unsubscribe())}onChange(I){this.invalidCom=!(I.replace(/\s/g,"").length>0)}onKeydown(I){"Enter"===I.key&&(this.add(this.commentText),this.commentText="",this.callback())}changeCategory(){const I=JSON.stringify(this.categories.filter(A=>A.selected).map(A=>A.label));this._categorySelection?this.commentService.editComment({id:this._categorySelection.id,comment:I}).then(()=>{this._categorySelection.comment=I,this.callback()}):this.add(I,this.categoryValue)}add(I,A,O){const T={frtId:this.frtService.frtId,table:this.frtService.frtTable,filter:this.frtService.request.filterList,drilldown:this.drilldownArray,comment:this.commentText?this.commentText:I,cumulated:this.frtService.isCumulate,value:A||this.value,currencyFlag:this.currencyService.currency.value};return"deviation"===this.columnType?T.deviationId=this.columnId:T.columnId=this.columnId,this.commentService.addComment(T).then(c=>{this.allComments.push(c),c.value!==this.categoryValue?(c.date=a.Z.GetDateFromUTC(c.timestamp),this.comments.push(c),this.commentText=""):this._categorySelection=c,this.callback()})}delete(I,A){const O=I.id;this.commentService.deleteComment({frtId:this.frtService.frtId,id:O}).then(()=>{if(!A){let c=this.comments.indexOf(I);-1!==c&&this.comments.splice(c,1),c=this.allComments.findIndex(M=>M.id===O),-1!==c&&this.allComments.splice(c,1),this.callback()}})}}return j.\u0275fac=function(I){return new(I||j)(s.\u0275\u0275directiveInject(o.K),s.\u0275\u0275directiveInject(d.f),s.\u0275\u0275directiveInject(u.i))},j.\u0275cmp=s.\u0275\u0275defineComponent({type:j,selectors:[["pulse-frt-comments"]],decls:17,vars:5,consts:[[3,"closeIcon"],[1,"dialog-header"],[1,"icon-bookmark"],["pulseScrollToBottom","",1,"comments"],["class","comment",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"pulse-form-field",3,"ngSubmit"],["placeholder","Create new comment...",1,"pulse-input",3,"ngModel","keydown","ngModelChange"],[1,"modal-buttons"],["type","submit",1,"button-modal",3,"disabled","click"],["title","Save",1,"icon-check-mark"],[1,"comment"],[1,"text"],[1,"textInfo"],[1,"pulse-btn","cancel",3,"disabled","click"],[1,"icon-delete"],[1,"pulse-form-field"],[1,"categories"],[4,"ngFor","ngForOf"],[1,"pulse-checkbox-container"],["type","checkbox",1,"pulse-checkbox",3,"ngModel","change","ngModelChange"],[1,"checkmark"]],template:function(I,A){1&I&&(s.\u0275\u0275elementStart(0,"pulse-dialog",0)(1,"div",1)(2,"h3"),s.\u0275\u0275element(3,"i",2),s.\u0275\u0275text(4,"Comments"),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(5,"ul",3),s.\u0275\u0275template(6,C,10,7,"li",4),s.\u0275\u0275elementEnd(),s.\u0275\u0275template(7,S,7,3,"ng-container",5),s.\u0275\u0275elementStart(8,"div",6),s.\u0275\u0275listener("ngSubmit",function(){return A.add()}),s.\u0275\u0275elementStart(9,"label"),s.\u0275\u0275text(10,"New Comment"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(11,"div")(12,"input",7),s.\u0275\u0275listener("keydown",function(T){return A.onKeydown(T)})("ngModelChange",function(T){return A.commentText=T})("ngModelChange",function(T){return A.onChange(T)}),s.\u0275\u0275elementEnd()()(),s.\u0275\u0275elementStart(13,"div",8)(14,"button",9),s.\u0275\u0275listener("click",function(){return A.add()}),s.\u0275\u0275element(15,"i",10),s.\u0275\u0275text(16," Save"),s.\u0275\u0275elementEnd()()()),2&I&&(s.\u0275\u0275property("closeIcon",!0),s.\u0275\u0275advance(6),s.\u0275\u0275property("ngForOf",A.comments),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",(null==A.categories?null:A.categories.length)>0),s.\u0275\u0275advance(5),s.\u0275\u0275property("ngModel",A.commentText),s.\u0275\u0275advance(2),s.\u0275\u0275property("disabled",A.invalidCom))},directives:[g.a,i,m.sg,m.O5,E.CheckboxControlValueAccessor,E.NgControlStatus,E.NgModel,E.DefaultValueAccessor],pipes:[m.uU],styles:["#pulse-model-container[_ngcontent-%COMP%]{overflow:hidden}ul[_ngcontent-%COMP%]{padding:0;list-style:none}ul.comments[_ngcontent-%COMP%]{margin:10px 0;overflow:auto}ul.categories[_ngcontent-%COMP%]{margin:0 0 10px;display:flex;flex-direction:row;flex-wrap:wrap}ul.categories[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{flex:50%}.comment[_ngcontent-%COMP%]{display:flex;padding:10px;border-top:1px solid #cdd9e1}.comment[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%;margin-right:10px}.comment[_ngcontent-%COMP%] div[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{word-break:break-word;margin:0;padding:.1em}.comment[_ngcontent-%COMP%] div[_ngcontent-%COMP%] .textInfo[_ngcontent-%COMP%]{margin:0;padding:.1em;font-size:10px;font-style:italic}.comment[_ngcontent-%COMP%]:last-child{border-bottom:1px solid #cdd9e1}.comment[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:auto 10px auto auto;width:95px;min-width:auto}.comment[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{margin:auto 0 auto auto}.comment[_ngcontent-%COMP%]:nth-child(odd){background:#dfe6ed}"]}),j})();var L=r(74564);let N=(()=>{class j{constructor(I,A){this.webApi=I,this.dialog=A,this.newComments=new t.t,this.categoriesDeviation=[],this.categoriesColumn=[],this.hasComments=new e.X(null)}addComment(I){return this.webApi.post("/Customer/FinancialReporting/AddComment",I)}deleteComment(I){return this.webApi.post("/Customer/FinancialReporting/DeleteComment",I)}editComment(I){return this.webApi.post("/Customer/FinancialReporting/EditComment",I)}getComments(I){return this.webApi.postObserv("/Customer/FinancialReporting/GetComment",I)}onCellClick(I,A,O,T,c,M,w,R){this.dialog.open(p,{frtService:I,commentService:this,allComments:T,columnId:A,columnType:w?"deviation":"column",value:M,rowData:c,drilldownArray:O,callback:R})}hasComment(I,A,O,T,c,M,w){return this.webApi.postObserv("/Customer/FinancialReporting/HasComment",{frtId:I,table:A,drilldown:O,columnId:T,deviationId:c,isCumulate:M,currency:w})}}return j.\u0275fac=function(I){return new(I||j)(s.\u0275\u0275inject(d.f),s.\u0275\u0275inject(L.x))},j.\u0275prov=s.\u0275\u0275defineInjectable({token:j,factory:j.\u0275fac}),j})()},77051:(Se,pe,r)=>{"use strict";r.d(pe,{X:()=>t});var t=(()=>{return(e=t||(t={}))[e.CLASSICGFB=1]="CLASSICGFB",e[e.CLASSICCMAPP=2]="CLASSICCMAPP",t;var e})()},87208:(Se,pe,r)=>{"use strict";r.d(pe,{A:()=>_});var t=r(61130),e=r(591),a=r(92198),s=r(5e3),o=r(49765),d=r(59077),u=r(22721),g=r(74564),x=r(93870);const i=["drilldownMenu"],m=["cellMenu"];function E(y,H){1&y&&(s.\u0275\u0275elementStart(0,"div"),s.\u0275\u0275element(1,"div",12),s.\u0275\u0275elementStart(2,"span"),s.\u0275\u0275text(3,"Freetext commenting"),s.\u0275\u0275elementEnd()())}function C(y,H){if(1&y&&s.\u0275\u0275template(0,E,4,0,"div",6),2&y){const $=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("ngIf",$.service.hasComment)}}function v(y,H){if(1&y){const $=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"pulse-frt-cell",10),s.\u0275\u0275listener("click",function(z){const Z=s.\u0275\u0275restoreView($).$implicit;return s.\u0275\u0275nextContext().keyPress(z,Z.name)}),s.\u0275\u0275pipe(1,"async"),s.\u0275\u0275pipe(2,"async"),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275elementStart(4,"context-menu",3,11),s.\u0275\u0275template(6,C,1,1,"ng-template",5),s.\u0275\u0275listener("execute",function(){const G=s.\u0275\u0275restoreView($).$implicit,Z=s.\u0275\u0275nextContext();return Z.onCellClick(G.id,Z.showData(G.name))}),s.\u0275\u0275elementEnd()()}if(2&y){const $=H.$implicit,K=s.\u0275\u0275reference(5),z=s.\u0275\u0275nextContext();let G,Z;s.\u0275\u0275classProp("corner-right-top-1",null==(G=s.\u0275\u0275pipeBind1(1,11,z.rowComments))||null==G.column[$.id]?null:G.column[$.id].comment)("green",null==(Z=s.\u0275\u0275pipeBind1(2,13,z.rowComments))||null==Z.column[$.id]?null:Z.column[$.id].category),s.\u0275\u0275property("ngClass",z.getClass($,s.\u0275\u0275pipeBind1(3,15,z.service.columns)))("cellData",z.showData($.name))("currencyFlag",z.rowData.currencyFlag)("currency",z.rowData[z.service.uniqueLocal])("column",$)("drilldown",z.drilldown)("contextMenu",K)}}function h(y,H){1&y&&(s.\u0275\u0275elementStart(0,"div"),s.\u0275\u0275element(1,"div",12),s.\u0275\u0275elementStart(2,"span"),s.\u0275\u0275text(3,"Deviation commenting"),s.\u0275\u0275elementEnd()())}function S(y,H){if(1&y&&s.\u0275\u0275template(0,h,4,0,"div",6),2&y){const $=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("ngIf",$.service.hasComment)}}function p(y,H){if(1&y){const $=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"pulse-frt-deviation",13),s.\u0275\u0275pipe(1,"async"),s.\u0275\u0275pipe(2,"async"),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275pipe(4,"async"),s.\u0275\u0275elementStart(5,"context-menu",3,14),s.\u0275\u0275template(7,S,1,1,"ng-template",5),s.\u0275\u0275listener("execute",function(){const G=s.\u0275\u0275restoreView($).$implicit,Z=s.\u0275\u0275nextContext();return Z.onCellClick(G.id,Z.service.deviationValue(G,Z.rowData),!0)}),s.\u0275\u0275elementEnd()()}if(2&y){const $=H.$implicit,K=s.\u0275\u0275reference(6),z=s.\u0275\u0275nextContext();let G,Z;s.\u0275\u0275classProp("corner-right-top-1",null==(G=s.\u0275\u0275pipeBind1(1,10,z.rowComments))||null==G.deviation[$.id]?null:G.deviation[$.id].comment)("green",null==(Z=s.\u0275\u0275pipeBind1(2,12,z.rowComments))||null==Z.deviation[$.id]?null:Z.deviation[$.id].category),s.\u0275\u0275property("ngClass",z.getClass($,z.service.deviations))("ngStyle",s.\u0275\u0275pipeBind1(3,14,z.rowData.cd)?z.service.deviationPercentageClass($,z.rowData):"")("rowData",z.rowData)("deviation",$)("pulseTooltip",s.\u0275\u0275pipeBind1(4,16,z.rowData.cd)?z.service.deviationPercentage($,z.rowData,!0)+" %":"")("contextMenu",K)}}function L(y,H){1&y&&s.\u0275\u0275text(0,"Open chart")}function N(y,H){1&y&&s.\u0275\u0275text(0,"Expand All")}function j(y,H){1&y&&s.\u0275\u0275text(0,"Expand Next Level")}function P(y,H){1&y&&s.\u0275\u0275text(0,"Collapse All")}function I(y,H){}function A(y,H){1&y&&s.\u0275\u0275template(0,I,0,0,"ng-template",15)}function O(y,H){1&y&&s.\u0275\u0275text(0,"Filter")}function T(y,H){if(1&y){const $=s.\u0275\u0275getCurrentView();s.\u0275\u0275template(0,O,1,0,"ng-template",5),s.\u0275\u0275listener("execute",function(z){return s.\u0275\u0275restoreView($),s.\u0275\u0275nextContext().onFilter(z.item)})}}function c(y,H){1&y&&s.\u0275\u0275text(0,"Add drilldown")}function M(y,H){if(1&y&&(s.\u0275\u0275elementStart(0,"span",17),s.\u0275\u0275text(1),s.\u0275\u0275elementEnd()),2&y){const $=s.\u0275\u0275nextContext().$implicit;s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate($.key)}}function w(y,H){if(1&y&&(s.\u0275\u0275elementStart(0,"span",19),s.\u0275\u0275text(1),s.\u0275\u0275elementEnd()),2&y){const $=s.\u0275\u0275nextContext(2).$implicit;s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate($.label)}}function R(y,H){if(1&y&&s.\u0275\u0275template(0,w,2,1,"span",18),2&y){const $=s.\u0275\u0275nextContext().$implicit,K=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("ngIf",-1===K.service.frtDrilldownSelection.indexOf($))}}function D(y,H){if(1&y){const $=s.\u0275\u0275getCurrentView();s.\u0275\u0275template(0,R,1,1,"ng-template",5),s.\u0275\u0275listener("execute",function(z){const Z=s.\u0275\u0275restoreView($).$implicit;return s.\u0275\u0275nextContext(2).addDrilldown(z.item,Z)})}}function Y(y,H){if(1&y&&(s.\u0275\u0275elementStart(0,"div"),s.\u0275\u0275template(1,M,2,1,"ng-template",16),s.\u0275\u0275template(2,D,1,0,null,9),s.\u0275\u0275elementEnd()),2&y){const $=H.$implicit;s.\u0275\u0275advance(1),s.\u0275\u0275property("enabled",!1),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngForOf",$.value)}}let _=(()=>{class y{constructor($,K,z,G,Z,B,X){this.element=$,this.service=K,this.filterService=z,this.planService=G,this.dialog=Z,this.commentService=B,this.cd=X,this.rowComments=new t.t(1),this.drilldownArray=[],this._sub=[],this.treeLevel=0,this.rowData={}}ngOnDestroy(){this._sub.forEach($=>$.unsubscribe()),this.checkCollumns$&&this.checkCollumns$.unsubscribe()}ngOnInit(){this.fullDrilldown=this.service.getFullDrilldown(this.rowData),this.treeLevel=this.service.getTreelevel(this.rowData);const $=[];for(let K=0;KG.name===this.service.drilldown[K]);z&&$.push(z)}this.lastDrilldown=$.pop(),this._plan=this.planService.findCurrentPlan(this.rowData,this.lastDrilldown,$),this.treeLevel=this.service.getTreelevel(this.rowData),this.rowData.cd=new e.X(!0),this._sub.push(this.service.tableData.subscribe(()=>{this.cd.markForCheck()}));for(const K of this.service.frtDrilldownSelection)this.rowData[K.name]&&this.drilldownArray.push([K.name,this.rowData[K.name]]);this.checkComments()}onCellClick($,K,z){this.commentService.onCellClick(this.service,$,this.drilldownArray,this.hasComments,this.rowData,K,z,()=>{this.calcRowComments()})}checkComments(){this.checkCollumns$&&this.checkCollumns$.unsubscribe(),this.checkCollumns$=this.commentService.hasComments.pipe((0,a.h)($=>$)).subscribe($=>{const K=JSON.stringify(this.drilldownArray.map(G=>[G[0],"%"])),z=$.mapping.find(G=>G.drill===K);if(z&&z.norm){const G=JSON.parse(z.norm);G.map(B=>{B[1]=this.rowData[B[0]]});const Z=JSON.stringify(G);this.hasComments=$.comments.filter(B=>B.drilldown===Z),this.hasComments.length>0&&this.calcRowComments()}})}calcRowComments(){const $=this.hasComments.reduce((K,z)=>("column"===z.columnType?(K.column[z.columnId]||(K.column[z.columnId]={}),"category"===z.value&&"[]"!==z.comment?(K.column[z.columnId].category=!0,K.column[z.columnId].comment=!0):"category"!==z.value&&(K.column[z.columnId].comment=!0)):(K.deviation[z.columnId]||(K.deviation[z.columnId]={}),"category"===z.value&&"[]"!==z.comment?(K.deviation[z.columnId].category=!0,K.deviation[z.columnId].comment=!0):"category"!==z.value&&(K.deviation[z.columnId].comment=!0)),K),{deviation:{},column:{}});this.rowComments.next($)}hasComment($){return!!(this.hasComments&&this.hasComments.length>0)&&!!this.hasComments.find(z=>z.columnId===$)}showData($){return this.service.showData(this.treeLevel)?0===this.rowData[$]?NaN:this.rowData[$]:""}getClass($,K){const z=[];this.service.highlight.column[$.id]&&z.push("active"),"deviation"!==$.category&&z.push("frt-colid"+$.id),this.planService.canEdit(this.rowData,$.name)&&z.push("can-edit");const G=K.indexOf($);return G>0?K[G-1].category!==$.category&&z.push("first-child"):z.push("first-child"),GZ.name),this.service.refreshData(),this.service.collapseOne(!1,$)}keyPress($,K){this.subscribeEvent(K)}subscribeEvent($){return!!this.planService.canEdit(this.rowData,$)&&(this.planService.subcribeKeydown($,this.rowData[$],this),!0)}reload(){this.cd.markForCheck()}trackByIdentify($,K){return K.name}saveValue($){this.planService.updateRow($,this.rowData,this.lastDrilldown)}rowHasFilter($){const K=this.getItem($);if(this.filterService.currentFilterConfig)return this.filterService.createSelection(this.filterService.currentFilterConfig,K.name,K.value)}}return y.\u0275fac=function($){return new($||y)(s.\u0275\u0275directiveInject(s.ElementRef),s.\u0275\u0275directiveInject(o.E),s.\u0275\u0275directiveInject(d.i),s.\u0275\u0275directiveInject(u.t),s.\u0275\u0275directiveInject(g.x),s.\u0275\u0275directiveInject(x.b),s.\u0275\u0275directiveInject(s.ChangeDetectorRef))},y.\u0275cmp=s.\u0275\u0275defineComponent({type:y,selectors:[["pulse-frt-row"]],viewQuery:function($,K){if(1&$&&(s.\u0275\u0275viewQuery(i,7),s.\u0275\u0275viewQuery(m,5)),2&$){let z;s.\u0275\u0275queryRefresh(z=s.\u0275\u0275loadQuery())&&(K.otherMenu=z.first),s.\u0275\u0275queryRefresh(z=s.\u0275\u0275loadQuery())&&(K.cellMenu=z.first)}},inputs:{rowData:"rowData",columnWidth:"columnWidth"},decls:18,vars:23,consts:[["long-press","",1,"frt-cell","col-span-2",3,"contextMenu","contextMenuSubject","rowData"],["class","frt-cell",3,"ngClass","corner-right-top-1","green","cellData","currencyFlag","currency","column","drilldown","contextMenu","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","frt-cell frt-deviation","position","top",3,"ngClass","corner-right-top-1","green","ngStyle","rowData","deviation","pulseTooltip","contextMenu",4,"ngFor","ngForOf"],["menuClass","pulse-contextmenu"],["drilldownMenu",""],["contextMenuItem","",3,"execute"],[4,"ngIf"],["contextMenuItem","",3,"visible","subMenu"],["drilldownSubMenu",""],[4,"ngFor","ngForOf"],[1,"frt-cell",3,"ngClass","cellData","currencyFlag","currency","column","drilldown","contextMenu","click"],["cellMenu",""],[1,"corner-right-top-1"],["position","top",1,"frt-cell","frt-deviation",3,"ngClass","ngStyle","rowData","deviation","pulseTooltip","contextMenu"],["deviationMenu",""],["contextMenuItem","","divider","true"],["contextMenuItem","",3,"enabled"],[2,"font-weight","bold","cursor","default"],["style","padding-left: 0.5em",4,"ngIf"],[2,"padding-left","0.5em"]],template:function($,K){if(1&$&&(s.\u0275\u0275element(0,"pulse-frt-cell-drilldown",0),s.\u0275\u0275template(1,v,7,17,"pulse-frt-cell",1),s.\u0275\u0275pipe(2,"emptyColumn"),s.\u0275\u0275pipe(3,"async"),s.\u0275\u0275template(4,p,8,18,"pulse-frt-deviation",2),s.\u0275\u0275elementStart(5,"context-menu",3,4),s.\u0275\u0275template(7,L,1,0,"ng-template",5),s.\u0275\u0275listener("execute",function(G){return K.openChart(G.item)}),s.\u0275\u0275template(8,N,1,0,"ng-template",5),s.\u0275\u0275listener("execute",function(){return K.service.collapseAll(!1)}),s.\u0275\u0275template(9,j,1,0,"ng-template",5),s.\u0275\u0275listener("execute",function(G){return K.service.collapseAll(!1,G.item)}),s.\u0275\u0275template(10,P,1,0,"ng-template",5),s.\u0275\u0275listener("execute",function(){return K.service.collapseAll(!0)}),s.\u0275\u0275template(11,A,1,0,null,6),s.\u0275\u0275template(12,T,1,0,null,6),s.\u0275\u0275template(13,c,1,0,"ng-template",7),s.\u0275\u0275elementStart(14,"context-menu",3,8),s.\u0275\u0275template(16,Y,3,2,"div",9),s.\u0275\u0275pipe(17,"groupBy"),s.\u0275\u0275elementEnd()()),2&$){const z=s.\u0275\u0275reference(6),G=s.\u0275\u0275reference(15);s.\u0275\u0275styleProp("flex-grow",0==K.columnWidth?2:0)("flex-basis",K.columnWidth+"px"),s.\u0275\u0275property("contextMenu",z)("contextMenuSubject",K.rowData)("rowData",K.rowData),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngForOf",s.\u0275\u0275pipeBind2(2,15,s.\u0275\u0275pipeBind1(3,18,K.service.columns),K.service.doSkipNullColumns))("ngForTrackBy",K.trackByIdentify),s.\u0275\u0275advance(3),s.\u0275\u0275property("ngForOf",K.service.deviations),s.\u0275\u0275advance(7),s.\u0275\u0275property("ngIf",K.rowHasFilter(K.rowData)||K.service.showDrilldown),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",K.rowHasFilter(K.rowData)),s.\u0275\u0275advance(1),s.\u0275\u0275property("visible",K.service.showDrilldown)("subMenu",G),s.\u0275\u0275advance(3),s.\u0275\u0275property("ngForOf",s.\u0275\u0275pipeBind2(17,20,K.service.frtDrilldown,"category"))}},styles:[""],changeDetection:0}),y})()},94005:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>O});var t=r(69808),e=r(87208),a=r(5e3),s=r(49765),o=r(53527),d=r(17717);const u=["columnMenu"],g=["deviationMenu"];function x(T,c){if(1&T&&(a.\u0275\u0275elementStart(0,"div",24),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&T){const M=c.$implicit;a.\u0275\u0275property("ngClass","col-span-"+M.value.length),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",M.key," ")}}function i(T,c){if(1&T&&(a.\u0275\u0275elementStart(0,"div",24),a.\u0275\u0275text(1),a.\u0275\u0275elementEnd()),2&T){const M=c.$implicit;a.\u0275\u0275property("ngClass","col-span-"+M.value.length),a.\u0275\u0275advance(1),a.\u0275\u0275textInterpolate1(" ",M.key," ")}}function m(T,c){if(1&T&&(a.\u0275\u0275elementStart(0,"div",26)(1,"div"),a.\u0275\u0275element(2,"span",27),a.\u0275\u0275elementEnd()()),2&T){const M=c.$implicit,w=c.index,R=a.\u0275\u0275nextContext().$implicit,D=a.\u0275\u0275nextContext(2),Y=a.\u0275\u0275reference(3);a.\u0275\u0275property("ngClass",D.getColumnClass(w,R,M,!1))("contextMenu",Y)("contextMenuSubject",M),a.\u0275\u0275advance(2),a.\u0275\u0275property("innerHTML",M.display,a.\u0275\u0275sanitizeHtml)}}function E(T,c){if(1&T&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275template(1,m,3,4,"div",25),a.\u0275\u0275elementContainerEnd()),2&T){const M=c.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",M.value)}}function C(T,c){if(1&T&&(a.\u0275\u0275elementStart(0,"div",26)(1,"div"),a.\u0275\u0275element(2,"i",28)(3,"span",27),a.\u0275\u0275elementEnd()()),2&T){const M=c.$implicit,w=c.index,R=a.\u0275\u0275nextContext().$implicit,D=a.\u0275\u0275nextContext(2),Y=a.\u0275\u0275reference(9);a.\u0275\u0275property("ngClass",D.getColumnClass(w,R,M,!0))("contextMenu",Y)("contextMenuSubject",M),a.\u0275\u0275advance(3),a.\u0275\u0275property("innerHTML",M.display,a.\u0275\u0275sanitizeHtml)}}function v(T,c){if(1&T&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275template(1,C,4,4,"div",25),a.\u0275\u0275elementContainerEnd()),2&T){const M=c.$implicit;a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",M.value)}}function h(T,c){if(1&T&&(a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275element(1,"pulse-frt-row",29),a.\u0275\u0275elementContainerEnd()),2&T){const M=c.$implicit,w=a.\u0275\u0275nextContext(2);a.\u0275\u0275advance(1),a.\u0275\u0275property("rowData",M)("columnWidth",w.columnWidth)}}function S(T,c){if(1&T){const M=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",10),a.\u0275\u0275listener("selectedCellsSumChange",function(R){return a.\u0275\u0275restoreView(M),a.\u0275\u0275nextContext().getSum(R)}),a.\u0275\u0275elementStart(1,"div",11)(2,"div",12),a.\u0275\u0275element(3,"div",13),a.\u0275\u0275template(4,x,2,2,"div",14),a.\u0275\u0275pipe(5,"groupBy"),a.\u0275\u0275pipe(6,"emptyColumn"),a.\u0275\u0275pipe(7,"async"),a.\u0275\u0275template(8,i,2,2,"div",14),a.\u0275\u0275pipe(9,"groupBy"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(10,"div",12),a.\u0275\u0275element(11,"div",15),a.\u0275\u0275template(12,E,2,1,"ng-container",16),a.\u0275\u0275pipe(13,"groupBy"),a.\u0275\u0275pipe(14,"emptyColumn"),a.\u0275\u0275pipe(15,"async"),a.\u0275\u0275template(16,v,2,1,"ng-container",16),a.\u0275\u0275pipe(17,"groupBy"),a.\u0275\u0275elementEnd()(),a.\u0275\u0275elementStart(18,"div",17),a.\u0275\u0275template(19,h,2,2,"ng-container",18),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(20,"div",19)(21,"div",20),a.\u0275\u0275element(22,"i",21),a.\u0275\u0275text(23),a.\u0275\u0275pipe(24,"scale"),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(25,"div",22)(26,"div",23),a.\u0275\u0275text(27,"Right click a cell to open context-menu"),a.\u0275\u0275elementEnd(),a.\u0275\u0275projection(28),a.\u0275\u0275elementEnd()()()}if(2&T){const M=a.\u0275\u0275nextContext();a.\u0275\u0275styleProp("width",0==M.tableWidth?"100%":M.tableWidth+"px"),a.\u0275\u0275advance(3),a.\u0275\u0275styleProp("flex-grow",0==M.columnWidth?2:0)("flex-basis",M.columnWidth+"px"),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",a.\u0275\u0275pipeBind2(5,17,a.\u0275\u0275pipeBind2(6,20,a.\u0275\u0275pipeBind1(7,23,M.service.columns),M.service.doSkipNullColumns),"category")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",a.\u0275\u0275pipeBind2(9,25,M.service.deviations,"category")),a.\u0275\u0275advance(3),a.\u0275\u0275styleProp("flex-grow",0==M.columnWidth?2:0)("flex-basis",M.columnWidth+"px"),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngForOf",a.\u0275\u0275pipeBind2(13,28,a.\u0275\u0275pipeBind2(14,31,a.\u0275\u0275pipeBind1(15,34,M.service.columns),M.service.doSkipNullColumns),"category")),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngForOf",a.\u0275\u0275pipeBind2(17,36,M.service.deviations,"category")),a.\u0275\u0275advance(3),a.\u0275\u0275property("ngForOf",M.data)("ngForTrackBy",M.i),a.\u0275\u0275advance(4),a.\u0275\u0275textInterpolate1(": ",a.\u0275\u0275pipeBind1(24,39,M.cellSum),"")}}function p(T,c){1&T&&a.\u0275\u0275text(0,"Hide column")}function L(T,c){if(1&T&&a.\u0275\u0275text(0),2&T){const M=a.\u0275\u0275nextContext(2);a.\u0275\u0275textInterpolate1(" ",M.service.doSkipNullColumns?"Show":"Hide"," empty columns")}}function N(T,c){if(1&T){const M=a.\u0275\u0275getCurrentView();a.\u0275\u0275template(0,L,1,1,"ng-template",4),a.\u0275\u0275listener("execute",function(){return a.\u0275\u0275restoreView(M),a.\u0275\u0275nextContext().service.toggleSkipNullColumns()})}}function j(T,c){}function P(T,c){1&T&&a.\u0275\u0275text(0,"Highlight column")}function I(T,c){1&T&&a.\u0275\u0275text(0,"Hide column")}const A=["*"];let O=(()=>{class T{constructor(M,w,R,D,Y,_){this.document=M,this.service=w,this.cd=R,this.differs=D,this.scaleService=Y,this.currencyService=_,this.tableWidth=0,this.columnWidth=0,this.resizingTableElement=null,this.cellSum=0,this.sub=[],this.sub.push(w.tableData.subscribe(y=>{this.data=y,this.cd.markForCheck()}))}getSum(M){this.cellSum=M}applyFilter(M,w){M&&this.service.setFilter(M),this.service.isLoading||this.service.refreshData()}getColumnClass(M,w,R,D){const Y=[];return D||(this.service.highlight.column[R.id]&&Y.push("active"),Y.push("frt-colid"+R.id)),0===M&&Y.push("first-child"),M===w.value.length-1&&Y.push("last-child"),Y}ngOnInit(){this.sub.push(this.currencyService.currency.subscribe(M=>{this.service.changeCurrency(M,!0)})),this.service.initData(this.frtId,this.projectId).then(()=>{this.sub.push(this.service.viewColumns.subscribe(M=>{if(M)for(let w=0;wY.id===R);if(D&&D.label.toLowerCase().indexOf("comp")>-1){this.service.hasFootnote=!0;break}this.service.hasFootnote=!1}}))}),document.onmousedown=this.onMouseDown.bind(this),document.onmousemove=this.onMouseMove.bind(this),document.onmouseup=this.onMouseUp.bind(this)}ngOnDestroy(){this.sub.forEach(M=>M.unsubscribe())}onColumnClick(M,w){if(w){const R=this.service.deviationIds.value.filter(D=>D!==M.id);this.service.setDeviations(R,!0)}else{const R=this.service.columns.value.filter(D=>D.id!==M.id).map(D=>D.id);this.service.setColumns(R,!0)}this.service.calcData()}toggleHighlight(M){this.service.highlightColumn(M.id,!this.service.highlight.column[M.id])}onMouseDown(M){this.resizingTableElement=this.getTableElement(M),null!=this.resizingTableElement&&this.resizingTableElement.classList.contains("frt-table")?(0===this.tableWidth&&(this.tableWidth=this.resizingTableElement.clientWidth),this.startX=M.screenX-this.tableWidth):null!=this.resizingTableElement&&(0===this.columnWidth&&(this.columnWidth=this.resizingTableElement.clientWidth),this.startX=M.screenX-this.columnWidth)}onMouseMove(M){0===M.buttons&&null!=this.resizingTableElement&&this.onMouseUp(M),null==this.resizingTableElement?document.body.style.cursor=null==this.getTableElement(M)?"":"col-resize":this.resizingTableElement.classList.contains("frt-table")?(this.tableWidth=M.screenX-this.startX,this.cd.detectChanges()):(this.columnWidth=M.screenX-this.startX,this.cd.detectChanges())}onMouseUp(M){this.resizingTableElement=null}getTableElement(M){let R=M.target;for(;R.parentNode&&R.parentNode.classList&&!R.parentNode.classList.contains("frt-row");)R=R.parentNode;if(!R.parentNode||!R.parentNode.classList)return null;const D=this.getCellsInfo(R.parentNode.children,R);if(0===D.index&&R.offsetWidth-M.offsetX<=7.5||1===D.index&&M.offsetX<=7.5)return R.parentNode.children[0];if(D.index===D.count-1&&R.offsetWidth-M.offsetX<=7.5){do{R=R.parentNode}while(!R.classList.contains("frt-table"));return R}return null}getCellsInfo(M,w){let R=-1,D=0;for(const Y of M)Y.classList.contains("frt-cell")&&(Y===w&&(R=D),D++);return{index:R,count:D}}}return T.\u0275fac=function(M){return new(M||T)(a.\u0275\u0275directiveInject(t.K0),a.\u0275\u0275directiveInject(s.E),a.\u0275\u0275directiveInject(a.ChangeDetectorRef),a.\u0275\u0275directiveInject(a.KeyValueDiffers),a.\u0275\u0275directiveInject(o.q),a.\u0275\u0275directiveInject(d.i))},T.\u0275cmp=a.\u0275\u0275defineComponent({type:T,selectors:[["pulse-frt-table"]],viewQuery:function(M,w){if(1&M&&(a.\u0275\u0275viewQuery(u,7),a.\u0275\u0275viewQuery(g,7),a.\u0275\u0275viewQuery(e.A,5)),2&M){let R;a.\u0275\u0275queryRefresh(R=a.\u0275\u0275loadQuery())&&(w.columnMenu=R.first),a.\u0275\u0275queryRefresh(R=a.\u0275\u0275loadQuery())&&(w.deviationMenu=R.first),a.\u0275\u0275queryRefresh(R=a.\u0275\u0275loadQuery())&&(w.rows=R)}},inputs:{frtId:"frtId",projectId:"projectId",tableWidth:"tableWidth",columnWidth:"columnWidth"},ngContentSelectors:A,decls:14,vars:4,consts:[["isRelative","true",3,"isSpin"],["class","frt-table pulse-container","extendedTable","","rowSelector",".frt-row","decimalMark",",",3,"width","selectedCellsSumChange",4,"ngIf"],["menuClass","pulse-contextmenu"],["columnMenu",""],["contextMenuItem","",3,"execute"],[4,"ngIf"],["contextMenuItem","","divider","true"],["deviationMenu",""],[3,"identifier"],["bridgeModal",""],["extendedTable","","rowSelector",".frt-row","decimalMark",",",1,"frt-table","pulse-container",3,"selectedCellsSumChange"],["pulseSticky","50","stickyContentId","scrolledContent","id","frtHeader",1,"frt-header"],[1,"frt-row"],[1,"frt-cell","col-span-2"],["class","frt-cell first-child last-child",3,"ngClass",4,"ngFor","ngForOf"],[1,"frt-cell","col-span-2","drag-bar"],[4,"ngFor","ngForOf"],[1,"frt-body"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"frt-footer"],[1,"frt-sum"],[1,"icon-sigma"],[1,"frt-legend"],[1,"contextMenuInfo"],[1,"frt-cell","first-child","last-child",3,"ngClass"],["class","frt-cell",3,"ngClass","contextMenu","contextMenuSubject",4,"ngFor","ngForOf"],[1,"frt-cell",3,"ngClass","contextMenu","contextMenuSubject"],[3,"innerHTML"],[1,"icon-delta"],[1,"frt-row",3,"rowData","columnWidth"]],template:function(M,w){1&M&&(a.\u0275\u0275projectionDef(),a.\u0275\u0275element(0,"pulse-spinner",0),a.\u0275\u0275template(1,S,29,41,"div",1),a.\u0275\u0275elementStart(2,"context-menu",2,3),a.\u0275\u0275template(4,p,1,0,"ng-template",4),a.\u0275\u0275listener("execute",function(D){return w.onColumnClick(D.item,!1)}),a.\u0275\u0275template(5,N,1,0,null,5),a.\u0275\u0275template(6,j,0,0,"ng-template",6),a.\u0275\u0275template(7,P,1,0,"ng-template",4),a.\u0275\u0275listener("execute",function(D){return w.toggleHighlight(D.item)}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(8,"context-menu",2,7),a.\u0275\u0275template(10,I,1,0,"ng-template",4),a.\u0275\u0275listener("execute",function(D){return w.onColumnClick(D.item,!0)}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(11,"ngx-smart-modal",8,9),a.\u0275\u0275element(13,"pulse-frt-bridge"),a.\u0275\u0275elementEnd()),2&M&&(a.\u0275\u0275property("isSpin",w.service.isLoading),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",!w.service.isLoading),a.\u0275\u0275advance(4),a.\u0275\u0275property("ngIf",w.service.allowSkipNullColumns),a.\u0275\u0275advance(6),a.\u0275\u0275property("identifier","bridgeModal"))},styles:['pulse-frt-filter .mat-expansion-panel-body,pulse-frt-filter .mat-expansion-panel-content,pulse-frt-options .mat-expansion-panel-body,pulse-frt-options .mat-expansion-panel-content{overflow:inherit;padding-bottom:1px}.nsm-dialog{max-width:inherit!important}pulse-frt-options .col-12>*{width:100%}.drag-bar{position:relative;border-right:2px solid #005f87}.drag-bar:after{position:absolute;content:"";right:-9px;top:-1px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:12px solid #005f87}.contextMenuInfo{margin-left:auto;font-size:11px;margin-top:5px}.contextMenuInfo p{margin:0}.contextMenuInfo:before{content:"*";color:#fff;background-color:#2d373c;width:10px;height:10px;line-height:19px;text-align:center;border-radius:100%;font-size:14px;margin-top:2px;margin-right:5px}\n'],encapsulation:2,changeDetection:0}),T})()},45478:(Se,pe,r)=>{"use strict";r.d(pe,{j:()=>v});var t=r(93870),e=r(94005),a=r(22721),s=r(49765),o=r(5e3),d=r(62127),u=r(36885),g=r(97454),x=r(59077);function i(h,S){if(1&h){const p=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",8)(1,"div",9)(2,"i",10),o.\u0275\u0275listener("click",function(){return o.\u0275\u0275restoreView(p),o.\u0275\u0275nextContext().hideChart()}),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(3,"pulse-chart",11),o.\u0275\u0275elementEnd()()}if(2&h){const p=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275property("options",p.chartOption)("resetChart",!0)}}function m(h,S){1&h&&(o.\u0275\u0275elementStart(0,"div",12),o.\u0275\u0275text(1,"No Data for current selection"),o.\u0275\u0275elementEnd())}const E=function(h){return{hidden:h}},C=["*"];let v=(()=>{class h{constructor(p,L,N,j,P){this.frtService=p,this.frtGlobalService=L,this.tableService=N,this.bm=j,this.filterService=P,this.allowSkipNullColumns=!1,p.table=this,this.sub=[],this.hidden=!localStorage.getItem("debug"),this.preventFrtTableLoad=L.preventFrtTableLoad}setTable(p){let L=!1;return p&&this.frtService.frtTable&&this.frtService.frtTable!==p&&(this.bm.getDefault(p),L=!0),this.frtService.setTable(p),this.frtService.setFiscalyear(this.tableService.getFiscalyear(p)),!this.frtService.isLoading&&!L&&(this.frtService.refreshData(),L=!0),p}ngOnInit(){this.frtService.defaultPath=this.defaultPath,this.frtService.allowSkipNullColumns=this.allowSkipNullColumns,this.sub.push(this.tableService.table.subscribe(p=>this.setTable(p))),this.sub.push(this.frtService.chartOption.subscribe(p=>{this.chartOption=p}))}ngOnDestroy(){this.sub.forEach(p=>p.unsubscribe()),this.frtGlobalService.setFrtService(null),this.frtService.chartOption.next(null)}onSelectionChanged(p){p&&(this.groupFilter=p,this.frtService.setFilter(this.groupFilter.selection),this.groupFilter.refresh&&!this.frtService.isLoading&&this.frtService.refreshData())}apply(){this.frtTable.applyFilter(this.groupFilter.selection,this.groupFilter.loadDefault)}getFilterSelections(){return this.groupFilter.selection}printSql(){this.frtService.printSql().then(console.log)}hideChart(){this.frtService.chartOption.next(null)}}return h.\u0275fac=function(p){return new(p||h)(o.\u0275\u0275directiveInject(s.E),o.\u0275\u0275directiveInject(d.I),o.\u0275\u0275directiveInject(u._),o.\u0275\u0275directiveInject(g.F),o.\u0275\u0275directiveInject(x.i))},h.\u0275cmp=o.\u0275\u0275defineComponent({type:h,selectors:[["pulse-frt"]],viewQuery:function(p,L){if(1&p&&o.\u0275\u0275viewQuery(e.x,7),2&p){let N;o.\u0275\u0275queryRefresh(N=o.\u0275\u0275loadQuery())&&(L.frtTable=N.first)}},inputs:{frtId:"frtId",projectId:"projectId",defaultPath:"defaultPath",customExportConfig:"customExportConfig",allowSkipNullColumns:"allowSkipNullColumns"},features:[o.\u0275\u0275ProvidersFeature([s.E,a.t,t.b])],ngContentSelectors:C,decls:12,vars:15,consts:[["class","item-container",4,"ngIf"],[3,"ngClass"],[1,"table-view"],["type","button",3,"hidden","click"],[3,"ngClass","frtId","projectId"],["class","item-block",4,"ngIf"],[3,"htmlFilter"],[3,"customExportConfig"],[1,"item-container"],[1,"item-block","frt-chart"],[1,"icon-close2","pointer",3,"click"],[3,"options","resetChart"],[1,"item-block"]],template:function(p,L){if(1&p&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275template(0,i,4,2,"div",0),o.\u0275\u0275elementStart(1,"div",1),o.\u0275\u0275pipe(2,"async"),o.\u0275\u0275elementStart(3,"div",2)(4,"button",3),o.\u0275\u0275listener("click",function(){return L.printSql()}),o.\u0275\u0275text(5,"SQL"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"pulse-frt-table",4),o.\u0275\u0275projection(7),o.\u0275\u0275elementEnd(),o.\u0275\u0275template(8,m,2,0,"div",5),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(9,"pulse-filter-footer",6),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(10,"pulse-bookletexport",7)(11,"pulse-planning-upload")),2&p){let N;o.\u0275\u0275property("ngIf",L.chartOption),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(11,E,(null==(N=o.\u0275\u0275pipeBind1(2,9,L.filterService.currentSelection))?null:N.length)<=0&&-1!==L.preventFrtTableLoad.indexOf(L.frtId))),o.\u0275\u0275advance(3),o.\u0275\u0275property("hidden",L.hidden),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(13,E,L.frtService.noData))("frtId",L.frtId)("projectId",L.projectId),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",L.frtService.noData),o.\u0275\u0275advance(1),o.\u0275\u0275property("htmlFilter",L.frtService.htmlFilter),o.\u0275\u0275advance(1),o.\u0275\u0275property("customExportConfig",L.customExportConfig)}},styles:[".frt-chart[_ngcontent-%COMP%] .icon-close2[_ngcontent-%COMP%]{float:right;margin-left:auto;margin-right:3px}.frt-chart[_ngcontent-%COMP%] pulse-chart[_ngcontent-%COMP%]{position:relative;display:block}div.container-fluid[_ngcontent-%COMP%]{width:100%;padding-top:20px}.table-view[_ngcontent-%COMP%]{margin-top:20px}.hidden[_ngcontent-%COMP%]{display:none}i.icon-close2[_ngcontent-%COMP%]{cursor:pointer}"]}),h})()},4480:(Se,pe,r)=>{"use strict";r.d(pe,{h:()=>E});var t=r(46809),e=r(5e3),a=r(62474),s=r(97454),o=r(62127),d=r(9133),u=r(27671),g=r(30745),x=r(22313),i=r(69808);function m(C,v){if(1&C&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",3)(2,"div",4)(3,"h3"),e.\u0275\u0275element(4,"i",5),e.\u0275\u0275text(5,"Upload excel file"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(6,"div")(7,"div",6),e.\u0275\u0275element(8,"iframe",7),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()),2&C){const h=e.\u0275\u0275nextContext();e.\u0275\u0275advance(8),e.\u0275\u0275property("src",h.uploadURI,e.\u0275\u0275sanitizeResourceUrl)}}let E=(()=>{class C{constructor(h,S,p,L,N,j,P){this.webApi=h,this.bookmarkService=S,this.frtService=p,this.variables=L,this.usertracking=N,this.ngxSmartModalService=j,this.sanitizer=P,this.iconClass="",this.selection=[],this.isOpen=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("planningUpload").onOpen.subscribe(h=>{this.dialog=h,this.data=h.getData(),this.uploadId=this.data.uploadId,this.uploadURI=this.sanitizer.bypassSecurityTrustResourceUrl("https://add1.pulse.siemens.cloud/CFRReportingIntelligence/UploadManagement?singledailyid="+this.uploadId)})}export(h=!0){this.selection.length>0?this.bookmarkExport(h):this.currentExport(h)}rawDataExport(){this.export(!1)}customExport(){const h=this._preparecustomExport();h&&this.webApi.post(`${this.variables.apiUrl}/api/CustomExport/get/${this.customExportConfig.exportId}`,h).then(S=>{S.awsDownloadLink.forEach(p=>t.Z.downloadLink(p)),this.iconClass=""}),this.iconClass=""}customExportSql(){const h=this._preparecustomExport();h&&this.webApi.post(`${this.variables.apiUrl}/api/CustomExport/getSql/${this.customExportConfig.exportId}`,h).then(S=>{this.iconClass=""}),this.iconClass=""}_preparecustomExport(){this.iconClass="spin";const h=this.bookmarkService.createBookmarkObj();return h.filter&&this.customExportConfig.overrideFilters&&(this.customExportConfig.overrideFilters.forEach(S=>{h.filter[S.filterId]=S.value}),this.customExportConfig.overrideFilters.forEach(S=>{const p=h.filterSelection.findIndex(L=>L[0].filterId===S.filterId);p>=0?h.filterSelection[p]=S.value:h.filterSelection.push(S.value)})),h.frtId>0?{frtId:h.frtId,longlink:this.bookmarkService.getLongLink(h),filename:this.data.request.filename}:null}bookmarkExport(h){this.iconClass="spin";const S={bookmarkList:this.selection.map(p=>p.id),fiscalYear:this.data.request.fiscalyear,frtId:this.data.request.frtId,table:this.data.request.table,filename:this.data.request.filename,hasRollUp:h};this.webApi.post("/Customer/FinancialReporting/GetExcelData",S).then(p=>{t.Z.downloadLink(p),this.iconClass=""})}currentExport(h){this.iconClass="spin";const S=this.bookmarkService.createBookmarkObj();if(S.frtId>0){const p={frtId:S.frtId,longlink:this.bookmarkService.getLongLink(S),filename:this.data.request.filename,hasRollUp:h};this.webApi.post("/Customer/FinancialReporting/GetExcel",p).then(L=>{t.Z.downloadLink(L),this.iconClass=""})}}openModal(h){this.isOpen=!0,this.data=h.getData()}close(){}}return C.\u0275fac=function(h){return new(h||C)(e.\u0275\u0275directiveInject(a.f),e.\u0275\u0275directiveInject(s.F),e.\u0275\u0275directiveInject(o.I),e.\u0275\u0275directiveInject(d.a),e.\u0275\u0275directiveInject(u.r),e.\u0275\u0275directiveInject(g.lu),e.\u0275\u0275directiveInject(x.DomSanitizer))},C.\u0275cmp=e.\u0275\u0275defineComponent({type:C,selectors:[["pulse-planning-upload"]],inputs:{customExportConfig:"customExportConfig"},decls:3,vars:2,consts:[[3,"identifier","onOpen"],["planningUpload",""],[4,"ngIf"],[1,"dialog-header"],[1,"pulse-col-12-6"],[1,"icon-share-ios"],["id","iframe-container"],["scrolling","no","width","100%",3,"src"]],template:function(h,S){if(1&h){const p=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1),e.\u0275\u0275listener("onOpen",function(){e.\u0275\u0275restoreView(p);const N=e.\u0275\u0275reference(1);return S.openModal(N)}),e.\u0275\u0275template(2,m,9,1,"ng-container",2),e.\u0275\u0275elementEnd()}2&h&&(e.\u0275\u0275property("identifier","planningUpload"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",S.isOpen))},directives:[g.Q3,i.O5],styles:["h3[_ngcontent-%COMP%]{margin-bottom:18px;margin-top:-3px}.pulse-btn-group[_ngcontent-%COMP%]{margin-top:25px}.w-100.flex-center[_ngcontent-%COMP%]{padding-right:0} pulse-planning-upload .nsm-dialog{max-width:90%} pulse-planning-upload .nsm-dialog h3{display:flex;font-weight:500!important} pulse-planning-upload .nsm-dialog h3 i.icon-share-ios{font-size:24px!important;position:relative!important;top:2px!important;margin-right:5px!important} pulse-planning-upload .nsm-dialog .download-link{top:5px;position:relative} pulse-planning-upload .nsm-dialog .nsm-content{background-color:#ebf0f5;width:550px;margin-left:auto;margin-right:auto} pulse-planning-upload .nsm-dialog .nsm-content .nsm-dialog-btn-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} pulse-planning-upload .nsm-dialog .nsm-content .nsm-dialog-btn-close:hover{color:#00737d!important}#iframe-container[_ngcontent-%COMP%]{width:840px;height:400px;overflow:hidden;overflow-x:hidden;-webkit-resize:vertical;-moz-resize:vertical;resize:vertical;min-height:300px}#iframe-container[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:810px;height:570px;margin-left:-299px;margin-top:-135px;overflow:hidden;border:none;background:transparent;-webkit-resize:none;-moz-resize:none;resize:none}"]}),C})()},22721:(Se,pe,r)=>{"use strict";r.d(pe,{t:()=>P});var t=r(23753),e=r(40537),a=r(5154),s=r(5e3),o=r(22290),d=r(22324),u=r(93075),g=r(69808),x=r(90809),i=r(558);const m=["dialog"],E=["filterForm"];function C(I,A){if(1&I){const O=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"label"),s.\u0275\u0275text(2),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"pulse-combobox",10),s.\u0275\u0275listener("ngModelChange",function(c){return s.\u0275\u0275restoreView(O),s.\u0275\u0275nextContext().wildcardValue=c}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementContainerEnd()}if(2&I){const O=s.\u0275\u0275nextContext();s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate1("Please choose a ",O.columnLabel,":"),s.\u0275\u0275advance(1),s.\u0275\u0275property("options",O.list)("pulseValueInListValidator",O.list)("ngModel",O.wildcardValue)}}function v(I,A){if(1&I){const O=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementContainerStart(0,11),s.\u0275\u0275elementStart(1,"label"),s.\u0275\u0275text(2,"Type in a Name"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"input",12),s.\u0275\u0275listener("ngModelChange",function(c){return s.\u0275\u0275restoreView(O),s.\u0275\u0275nextContext().wildcardValue=c}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementContainerEnd()}if(2&I){const O=s.\u0275\u0275nextContext();s.\u0275\u0275advance(3),s.\u0275\u0275property("ngModel",O.wildcardValue)}}let h=(()=>{class I{constructor(O){this.toastr=O,this.columnLabel="line",this.wildcardValue=""}ngOnInit(){}onSubmit(){this.filterForm.form.valid?this.callback(this.wildcardValue):this.toastr.error(' "'+this.wildcardValue+'"',"invalid input: "),this.dialog.close()}}return I.\u0275fac=function(O){return new(O||I)(s.\u0275\u0275directiveInject(o._W))},I.\u0275cmp=s.\u0275\u0275defineComponent({type:I,selectors:[["pulse-frt-wildcard-dialog"]],viewQuery:function(O,T){if(1&O&&(s.\u0275\u0275viewQuery(m,7),s.\u0275\u0275viewQuery(E,7)),2&O){let c;s.\u0275\u0275queryRefresh(c=s.\u0275\u0275loadQuery())&&(T.dialog=c.first),s.\u0275\u0275queryRefresh(c=s.\u0275\u0275loadQuery())&&(T.filterForm=c.first)}},decls:15,vars:5,consts:[["dialog",""],[1,"modal-header"],[1,"icon-plus2","header-icon"],[1,"modal-body"],[3,"ngSubmit"],["filterForm","ngForm"],[4,"ngIf"],["class","pulse-form-field",4,"ngIf"],[1,"model-footer"],[1,"pulse-btn","save",3,"disabled","click"],["name","wildcard","required","",3,"options","pulseValueInListValidator","ngModel","ngModelChange"],[1,"pulse-form-field"],["name","wildcard","autofocus","","placeholder","",1,"pulse-input",3,"ngModel","ngModelChange"]],template:function(O,T){if(1&O&&(s.\u0275\u0275elementStart(0,"pulse-dialog",null,0)(2,"h3",1)(3,"span"),s.\u0275\u0275element(4,"i",2),s.\u0275\u0275elementEnd(),s.\u0275\u0275text(5),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(6,"div",3)(7,"form",4,5),s.\u0275\u0275listener("ngSubmit",function(){return T.onSubmit()}),s.\u0275\u0275template(9,C,4,4,"ng-container",6),s.\u0275\u0275template(10,v,4,1,"ng-container",7),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementStart(11,"div",8)(12,"button",9),s.\u0275\u0275listener("click",function(){return T.onSubmit()}),s.\u0275\u0275element(13,"i",2),s.\u0275\u0275text(14),s.\u0275\u0275elementEnd()()()),2&O){const c=s.\u0275\u0275reference(8);s.\u0275\u0275advance(5),s.\u0275\u0275textInterpolate1(" Add ",T.columnLabel," "),s.\u0275\u0275advance(4),s.\u0275\u0275property("ngIf",T.list),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",!T.list),s.\u0275\u0275advance(2),s.\u0275\u0275property("disabled",!c.form.valid),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate1("Add ",T.wildcardValue,"")}},directives:[d.a,u.\u0275NgNoValidate,u.NgControlStatusGroup,u.NgForm,g.O5,x.R,u.RequiredValidator,i._,u.NgControlStatus,u.NgModel,u.DefaultValueAccessor],styles:[".modal-header[_ngcontent-%COMP%]{padding-bottom:15px}.modal-body[_ngcontent-%COMP%]{flex:1}.modal-body[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%]{flex-direction:column}.modal-body[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{text-align:left;padding:0}.modal-footer[_ngcontent-%COMP%]{margin-top:auto}"]}),I})();var S=r(49765),p=r(62474),L=r(53527),N=r(67742),j=r(74564);let P=(()=>{class I{constructor(O,T,c,M,w,R,D){this.service=O,this.webapi=T,this.toastr=c,this.scaleService=M,this.renderer=w,this.extendedtable=R,this.dialogService=D,this.lastRequests=[],this.cachedWildCardList={},this.mousedown$=(0,t.R)(document.body,"mousedown").subscribe(Y=>{this.keydown$&&this.keydown$.unsubscribe()}),this.subscribePaste()}ngOnDestroy(){this.keydown$&&this.keydown$.unsubscribe(),this.mousedown$&&this.mousedown$.unsubscribe(),this.paste$&&this.paste$.unsubscribe()}subscribePaste(){this.paste$&&this.paste$.unsubscribe(),this.paste$=this.extendedtable.paste.subscribe(O=>{if(this.currentHeader&&this.currentRow){let T=this.currentRow,c=this.currentHeader;const M=this.service.table.frtTable.rows.toArray(),w=M.findIndex(Y=>Y===T),R=this.service.columns.value.findIndex(Y=>Y.name===c),D=O.split("\n");for(let Y=0;Y0){if(!(M.length>w+Y))return;T=M[w+Y]}const y=D[Y].split("\t");for(let H=0;HR+H))break;c=this.service.columns.value[R+H].name,!isNaN($)&&T.rowData[c]!==$&&(T.rowData[c]=$,T.saveValue(c))}}}})}subcribeKeydown(O,T,c){setTimeout(()=>{this.currentHeader=O,this.currentRow=c}),this.keydown$&&this.keydown$.unsubscribe(),this.vz="",this.keydown$=(0,t.R)(window,"keydown").pipe((0,e.x)(()=>{this.finalizeEvent(O,T,c)})).subscribe(M=>{this.handleEvent(M,O,c,T)})}updateRow(O,T,c){const M={value:T[O],drilldown:{},table:this.service.frtTable,currency:this.service.request.currency,fiscalyear:this.service.fiscalYear.value,header:O,frtId:this.service.frtId,wildcardColumnId:c.id};return this.service.drilldown.forEach(w=>{M.drilldown[w]=T[w]}),this.webapi.postObserv("/Customer/FinancialReporting/UpdateRow",M).subscribe(w=>{T.cd&&T.cd.next(!0),w>0?this.toastr.success(`Update ${O}: ${T[O]}`):this.toastr.error(`Error ${O}: ${T[O]}`)})}insertRow(O,T,c){const M={};return this.service.drilldown.forEach(R=>{M[R]=O[R]}),this.webapi.postObserv("/Customer/FinancialReporting/InsertRow",{wildcardValue:c,drilldown:M,table:this.service.frtTable,currency:this.service.request.currency,fiscalyear:this.service.fiscalYear.value,frtId:this.service.frtId,wildcardColumnId:T.id}).subscribe(R=>{R>0?(this.toastr.success(`Insert ${T.label}: ${c}`),this.service.refreshItem(!1,this.service.getFullDrilldown(O,0))):this.toastr.error(`Error ${T.label}: ${c}`)})}loadWildcardGroup(O){const T=JSON.stringify({frtId:this.service.frtId,wildCardGroup:O});let c;return this.lastRequests.includes(T)?c=this.lastRequests.indexOf(T):(this.lastRequests.push(T),c=this.lastRequests.indexOf(T),this.cachedWildCardList[c]=this.webapi.postObserv("/Customer/FinancialReporting/GetWildcardWhiteList",{frtId:this.service.frtId,wildCardGroup:O}).pipe((0,a.d)(1))),this.cachedWildCardList[c]}findCurrentPlan(O,T,c){if(this.service.frtPlanning&&-1===O.treeLevel)return this.service.frtPlanning.find(M=>{if((this.service.fiscalYear.value===M.fiscalYear||!M.fiscalYear)&&M.wildcardColumnId===T.id){const w=c.find(R=>M.compareColumnId===R.id);if(w&&O[w.name]===M.compareValue)return!0}return!1})}addWildcard(O,T,c,M){if(c)if(c.wildcardWhitelistGroupId>0){const w=this.service.getFullDrilldown(O,T-1),R=this.service.tableData.value.filter(D=>this.service.getFullDrilldown(D).startsWith(w)&&D[M.name]&&D[M.name].length>0&&"*"!==D[M.name]).map(D=>D[M.name]);this.loadWildcardGroup(c.wildcardWhitelistGroupId).toPromise().then(D=>{D=D.filter(Y=>-1===R.indexOf(Y)),this.dialogService.open(h,{callback:Y=>{this.insertRow(O,M,Y)},list:D,columnLabel:c.FinancialReportingTableWhitelistGroup.name})})}else this.dialogService.open(h,{callback:w=>{this.insertRow(O,M,w)},columnLabel:"Freetext"});else this.toastr.error(`Error ${M.label}: Add not possible`)}canEdit(O,T){if(this.service.frtPlanning&&-1===O.treeLevel){const c=this.service.getIdByName(T),M=this.service.frtPlanning.filter(w=>w.writeColmnId===c&&(this.service.fiscalYear.value===w.fiscalYear||!w.fiscalYear));if(M&&M.length>0)for(let w=0;wH.id===R.compareColumnId);_&&(D=_.name);const y=this.service.frtDrilldown.find(H=>H.id===R.wildcardColumnId);if(y&&(Y=y.name),D&&O[D]===R.compareValue&&(Y&&"*"!==O[Y]||!Y))return!0}}return!1}finalizeEvent(O,T,c){this.currentHeader=null,this.currentRow=null;const M=c.rowData[O];T!==M&&(isNaN(+M)&&(c.rowData[O]=0),this.updateRow(O,c.rowData,c.lastDrilldown)),c.reload()}handleEvent(O,T,c,M){let w=1;"FTE"!==c.rowData.currencyFlag&&(w=this.scaleService.getScaleValue()),c.rowData[T]==M&&(48<=O.keyCode&&O.keyCode<58||96<=O.keyCode&&O.keyCode<106)&&(c.rowData[T]=null);let R=Math.floor(+c.rowData[T]/w),D="";if("Backspace"===O.key)R=Math.floor(R/10);else if(48<=O.keyCode&&O.keyCode<58||96<=O.keyCode&&O.keyCode<106)0===R&&"-"===this.vz&&(D="-",this.vz=""),D+=48===O.keyCode||96===O.keyCode?"0":O.key;else if(46===O.keyCode)D="delete";else if(109===O.keyCode||189===O.keyCode)R>0?R*=-1:""===this.vz&&(this.vz="-");else if(107===O.keyCode||187===O.keyCode)R<0?R*=-1:this.vz="";else if(39===O.keyCode){const _=this.service.columns.value.findIndex(y=>y.name===T);this.service.columns.value.length>_+1&&c.subscribeEvent(this.service.columns.value[_+1].name)&&this.extendedtable.right()}else if(37===O.keyCode){const _=this.service.columns.value.findIndex(y=>y.name===T);0<=_-1&&c.subscribeEvent(this.service.columns.value[_-1].name)&&this.extendedtable.left()}else if(38===O.keyCode){const _=this.service.table.frtTable.rows.toArray().findIndex(y=>y===c);0<=_-1&&this.service.table.frtTable.rows.toArray()[_-1].subscribeEvent(T)&&this.extendedtable.up()}else{if(40!==O.keyCode&&13!==O.keyCode)return;{const _=this.service.table.frtTable.rows.toArray(),y=_.findIndex(H=>H===c);_.length>y+1&&_[y+1].subscribeEvent(T)&&this.extendedtable.down()}}let Y=c.rowData[T];if("delete"===D)Y=0;else{const _=+(""+(0!==R?R:"")+D)*w;!isNaN(_)&&isFinite(_)&&_{"use strict";r.d(pe,{E:()=>L});var t=r(591),e=r(8929),a=r(92198),s=r(72986),o=r(53527),d=(()=>{return(N=d||(d={}))[N.Deviation=0]="Deviation",N[N.Column=1]="Column",d;var N})(),u=r(5e3),g=r(62026),x=r(62127),i=r(97454),m=r(59077),E=r(22290),C=r(46702),v=r(17717),h=r(93870),S=r(69808),p=r(36885);let L=(()=>{class N{constructor(P,I,A,O,T,c,M,w,R,D,Y){this.fiscalyearService=P,this.globalService=I,this.bookmarkService=A,this.filterService=O,this.scaleService=T,this.toastr=c,this.explService=M,this.currencyService=w,this.frtCommentService=R,this.location=D,this.monthtable=Y,this.tableData=new t.X(null),this._skipColumnsUpdated$=new e.xQ,this.skipColumnsUpdated$=this._skipColumnsUpdated$,this.columns=new t.X([]),this.viewColumns=new t.X(null),this.deviationIds=new t.X(null),this._enableLazyloading=!1,this.frtColumnsObserv=new t.X(null),this.frtDeviationsObserv=new t.X(null),this.fiscalYear=new t.X(this.fiscalyearService.getFiscalYear()),this.chartOption=new t.X(null),this.hasComment=!1,this._maxNumberOfRows=2e3,this.showDrilldown=!1,this.deviationsSelected=[],this.filterApplied=[],this.request={},this.projectId=5139,this.collapse={},this.highlight={column:{},row:{}},this.frtTable="",this.htmlFilter="",this.isLoading=!0,this.isBookmark=!1,this.noData=!1,this.noPermission=!1,this.afterInit=!1,this.isDefault=!0,this.frtExplanationRestrictionFilterGroupId=null,this.isCumulate=!1}ngOnDestroy(){this.bookmarkService.removeHandler(this),this._commentSub$&&this._commentSub$.unsubscribe()}ngOnInit(){}initFrt(P){return this.request={},this.afterInit=!1,this.globalService.setFrtService(this),this.setFiscalyear(),this.frtId=P,this.request.isNew=!0,this.request.frtId=this.frtId,this.explService.hasFreezePermission(),this.getConfig().then(I=>{if(I.GlobalObject){if(this.currencyService.currencyFlags[2]&&(this.currencyService.currencyFlags[2].disabled=!0),this.request.currency=this.currencyService.currency.value,I.drillDownList){const A=JSON.parse(I.drillDownList);if(A.scale)for(let O=0;OA.order-O.order),this.frtDrilldown?(this.frtDrilldownSelection=this.frtDrilldown.filter(A=>(A.isRequired&&(A.iconProperty="icon-icon_lock"),A.isDefault||A.isRequired)),this.request.level=this.frtDrilldownSelection.map(A=>A.name)):console.error("FinancialReportingTableDrilldown is null for frtId = "+this.frtId),this.frtColumns=I.FinancialReportingTableColumn.sort((A,O)=>A.Order-O.Order).sort((A,O)=>A.fiscalYearOffset-O.fiscalYearOffset),this.frtPlanning=I.FinancialReportingTablePlanning,this.frtColumnsObserv.next(this.frtColumns.map(A=>(A.display=A.label.replace(/\\n/g,"
"),A.label=A.label.replace(/\\n/g," "),A))),this.frtDeviationsObserv.next(I.FinancialReportingTableDeviations.map(A=>(A.label=A.name.replace(/\\n/g,""),A.display=A.name.replace(/\\n/g,"
"),A))),"local"===this.currencyService.currency.value&&(this.loadCurrency(),this.isLocal=!0),this.afterInit=!0,this.bookmarkService.addHandler(this),this.globalService.frtOptions&&this.globalService.frtOptions.frtId===this.frtId?this.bookmarkService.setBookmark(this.globalService.frtOptions):this.bookmarkService.getDefault(this.frtTable,this.defaultPath).then(A=>{this.isDefault=!A||!!A.isDefault})}else this.noPermission=!0})}showData(P){return!0}loadCurrency(){const P=this.frtColumns.filter(I=>!!I.currencyType).map(I=>({exType:I.currencyType,monthOffset:I.currencyMonthOffset}));P.length>0&&this.currencyService.getCurrency(P,this.fiscalYear.value)}changeCurrency(P,I,A){if((this.request.currency!==P||A)&&(this.request.currency=P,(!this.isLoading||A)&&this.frtDrilldownSelection)){const O=this.frtDrilldownSelection.some(c=>c.name===this.uniqueLocal),T=[];"local"===P||"transaction"===P?(this.isLocal=!0,this.loadCurrency(),this.frtDrilldownSelection.forEach(c=>{T.push(c.name),c.isRequired&&!O&&-1===T.indexOf(this.uniqueLocal)&&T.push(this.uniqueLocal)}),this.setDrilldown(T,[this.uniqueLocal])):(this.isLocal=!1,this.frtDrilldownSelection.forEach(c=>{(c.name!==this.uniqueLocal||c.isRequired&&c.isDefault)&&T.push(c.name)}),this.setDrilldown(T)),I&&this.refreshData()}}setFiscalyear(P){if(P)this.fiscalYear.next(P);else if(this.frtTable&&this.frtTable.indexOf("DATE(")>0){const I=this.frtTable.split("DATE(")[1].split(")")[0];this.fiscalYear.next(this.fiscalyearService.getFiscalYear(I))}isNaN(this.fiscalYear.value)&&this.fiscalYear.next(this.fiscalyearService.getFiscalYear()),this.request.fiscalYear=this.fiscalYear.value}openBookmark(P){return this.isBookmark=!0,this.request.frtId=this.frtId,new Promise((I,A)=>{P&&(this.setCollapse(P.collapse?P.collapse:{}),this.setHighlight(P.highlight?P.highlight:{column:{},row:{}}),P.drilldown&&this.setDrilldown(P.drilldown),P.viewColumns&&this.setColumns(P.viewColumns,!0),P.deviationIds&&this.setDeviations(P.deviationIds),P.doSkipNullColumns&&this.setDoSkipNullColumns(P.doSkipNullColumns)),I(["collapse","highlight","drilldown","viewColumns","deviationIds","fiscalyear","doSkipNullColumns"])})}saveBookmark(P){return P.frtId=this.frtId,this.collapse&&(P.collapse=this.collapse),this.highlight&&(P.highlight=this.highlight),this.drilldown&&(P.drilldown=this.frtDrilldownSelection&&this.drilldown&&this.frtDrilldownSelection.length!==this.drilldown.length?this.frtDrilldownSelection.map(I=>I.name):this.drilldown),this.columns&&(P.viewColumns=this.columns.value.map(I=>I.id)),this.deviations&&(P.deviationIds=this.deviations.map(I=>I.id)),this.doSkipNullColumns&&this.allowSkipNullColumns&&(P.doSkipNullColumns=this.doSkipNullColumns),P.fiscalyear=this.fiscalYear.value,["collapse","highlight","viewColumns","deviationIds","fiscalyear","doSkipNullColumns"]}setFilter(P){this.filterApplied=JSON.parse(JSON.stringify(P));const I=JSON.stringify({name:"All"}),A=P.filter(O=>O.length>0&&JSON.stringify(O[0])!==I);this.request.filterList=A,P&&this.filterService.manualChange(P)}setTable(P){this.frtTable=P,this.request.table=P,this.explService.hasFreezePermission()}setDeviations(P,I){this.deviationIds.next(P),this.frtDeviationsObserv.value?this.deviationsSelected=this.frtDeviationsObserv.value.filter(A=>P.indexOf(A.id)>-1).map(A=>(A.category="deviation",A)):this.frtDeviationsObserv.subscribe(A=>{A&&(this.deviationsSelected=A.filter(O=>P.indexOf(O.id)>-1).map(O=>(O.category="deviation",O)),this.deviations=this.deviationsSelected)}),I&&(this.deviations=this.deviationsSelected)}setColumns(P,I){JSON.stringify(P)!==JSON.stringify(this.viewColumns.value)&&(P=P.filter(A=>this.frtColumns.find(O=>O.id===A)))&&P.length>0&&(this.viewColumns.next(P),this.request.viewColumns=P),I&&this.columns.next(this.columns.value.filter(A=>P.indexOf(A.id)>-1))}setCumulate(P){this.request.isCumulate=P}setDrilldown(P,I){return P=P.filter(A=>this.frtDrilldown.find(O=>O.name===A)),new Promise((A,O)=>{this.frtDeviationsObserv.value?(this.frtDrilldownSelection=P.map(T=>{const c=this.frtDrilldown.find(M=>M.name===T);return c&&(I&&I.indexOf(T)>-1&&(c.isRequired=!0),c.order=P.indexOf(T)),c}),this.frtDrilldownSelection.filter(T=>null!==T),A(this.frtDrilldownSelection)):this.frtDeviationsObserv.subscribe(T=>{T&&(this.frtDrilldownSelection=P.map(c=>{const M=this.frtDrilldown.find(w=>w.name===c);return M&&(M.order=P.indexOf(c)),M}),this.frtDrilldownSelection.filter(c=>null!==c),A(this.frtDrilldownSelection))}),this.request.level=P})}setDoSkipNullColumns(P){this.doSkipNullColumns=P,this._skipColumnsUpdated$.next(this.doSkipNullColumns)}getConfig(P){return P&&(this.frtId=P),this.globalService.getConfig(this.projectId,this.frtId)}printSql(){return this.globalService.printSql(this.request)}refreshData(P){return new Promise((I,A)=>{this._enableLazyloading&&isNaN(this.request.loadLevel)&&(this.request.loadLevel=1),isNaN(this.request.table)&&this.monthtable.table.value&&(this.request.table=this.monthtable.table.value);const O=JSON.stringify(this.request);if(this.lastRequest!==O||!1===P)return this.lastRequest=O,this.deviationIds.value&&this.deviationIds.value.length>0&&this.explService.checkExplanations(this.frtId,this.filterApplied,this.deviationIds.value,this.frtTable,this.frtDrilldownSelection),this.globalService.getData(this.request,P).then(T=>{var c;-1!==this.globalService.preventFrtTableLoad.indexOf(null===(c=this.request)||void 0===c?void 0:c.frtId)&&0===(null==T?void 0:T.length)||this.toastr.success("New data available.","Table Data");const M=T.slice(1,T.length);this.htmlFilter=this.filterService.currentFilterSelection,this.setCollapse(this.collapse,M)||this.setTabelData(M),this._hasComment(),I(M)});I(this.tableDataOriginal),this.setTabelData(this.tableDataOriginal)})}_hasComment(){const P=this.frtDrilldownSelection.map(I=>[I.name,"%"]);this._commentSub$&&this._commentSub$.unsubscribe(),this._commentSub$=this.frtCommentService.hasComment(this.frtId,this.frtTable,P,this.viewColumns.value,this.deviationIds.value,this.isCumulate).subscribe(I=>{!1===I?this.hasComment=!1:(this.hasComment=!0,this.frtCommentService.hasComments.next(I))})}initData(P,I){return this.isLoading=!0,new Promise((A,O)=>{this.frtId!==P||this.projectId!==I?(this.projectId=I,this.tableDataOriginal=[],this.tableData.next([]),this.chartOption.next(null),this.frtTable?this.initFrt(P).then(()=>A(null),T=>O(T)):this.globalService.getTable(I,P).then(T=>{let c=T.find(M=>-1===M.indexOf("_SKIP_"));this.frtTable=c,this.initFrt(P).then(()=>A(null),M=>O(M))},T=>O(T))):A(null)})}getColumnClass(P,I,A){const O=[];return O.push("frt-colid"+A.id),0===P&&O.push("first-child"),P===I.value.length-1&&O.push("last-child"),O}setTabelData(P,I=!0,A=!1){if(!P||!P[0])return console.warn("no data for request = "+JSON.stringify(this.request)),this.noData=!0,void(A||(this.isLoading=!1));this.noData=!1,this.deviations=this.deviationsSelected;const O=Object.keys(P[0]);this.frtColumns?(this.columns.next(this.frtColumns.filter(M=>O.indexOf(M.name)>=0).map(M=>({id:M.id,columntype:d.Column,name:M.name,label:M.label.replace(/\\n/g,""),display:M.display?M.display:M.label.replace(/\\n/g,"
"),order:M.Order,category:""+(this.fiscalYear.value+M.fiscalYearOffset),exRate:{monthOffset:M.currencyMonthOffset,exType:M.currencyType}}))),this.setColumns(this.columns.value.map(M=>M.id))):console.error("FinancialReportingTableColumn is null for frtId = "+this.frtId);const T=this.frtDrilldown.findIndex(M=>M.isRequired);P.filter(M=>M.treeLevel===T).forEach(M=>{for(const w of this.columns.value)null!==M[w.name]&&(w.hasValues=!0)});const c=O.indexOf(N.TREELEVEL);this.drilldown=O.slice(0,c),I&&(this.tableDataOriginal=P),this.tableDataOriginal?this.calcData():console.error("Cannot getData for frtId = "+this.frtId),A||(this.isLoading=!1)}saveOptions(){this.globalService.frtOptions=this.saveBookmark(this.globalService.frtOptions)}calcData(){if(this.tableDataOriginal instanceof Array&&this.tableDataOriginal.length>0){let P=this.tableDataOriginal.filter(I=>this.isClose(I));P.length>this._maxNumberOfRows&&(alert("You try to display too many data rows:\n\nYour selection results in "+P.length+" rows, the limit is set to "+this._maxNumberOfRows+" rows.\nPlease consider, that only the first "+this._maxNumberOfRows+" rows are displayed.\nTo reduce the amount of rows, apply more filters or add more drilldowns.\nThe Data Export option extracts all the data."),P=P.slice(0,this._maxNumberOfRows)),this.tableData.next(P)}this.saveOptions()}isClose(P,I=-1){if(0===P[N.TREELEVEL])return!0;const A=this.getTreelevel(P),O=this.getFullDrilldown(P,A+I);return!0===this.collapse[O]}apply(){this.table&&this.table.apply()}getValue(P,I){return P[Object.keys(P)[I]]}highlightColumn(P,I){this.highlight.column[P]=I,this.calcData()}setHighlight(P){this.highlight=P}toggleCollapse(P,I){this.collapseOne(I,P)}collapseAll(P,I){let A=this.tableDataOriginal;if(I){const O=this.getFullDrilldown(I),T=this.getTreelevel(I);A=A.filter(c=>this.getFullDrilldown(c).indexOf(O)>-1&&this.getTreelevel(c)<=T+1)}this.collapseList(A,P)}getFilterOfDrilldown(P){const I=[],A=P.split(">");if(A.length>1)for(let O=1;Oc.name);let O=I.reduce((c,M)=>{const w=M.split(">");return w.shift(),c.push([this._getFilterOptions(A,w,0)]),c},[]);O.length>1&&(O=O.filter(c=>3===c[0].loadLevel));const T=JSON.parse(JSON.stringify(this.request));T.filterList||(T.filterList=[]),T.filterList.push(...O),this.globalService.getData(T,!0).then(c=>{c=c.slice(1,c.length),I.forEach(M=>{const w=this.getFilterOfDrilldown(M),R=c.filter(Y=>{for(let y=0;y{y.treeLevelthis.getFullDrilldown(y)===M),_=this.tableDataOriginal.filter(y=>{for(let $=0;$this.collapseOne(!1,D))}}),this.setTabelData(c,!1)})}_getFilterOptions(P,I,A){const O=A+3;O>this.request.loadLevel&&(this.request.loadLevel=O);const T=I.shift(),c=P[A];if(0===I.length)return{column:c,name:T,loadLevel:O};const M=this._getFilterOptions(P,I,A+1);return{column:c,name:T,loadLevel:M.loadLevel,children:[M]}}collapseOne(P,I,A){const O=this.getFullDrilldown(I);this._enableLazyloading&&!I.deepLoad&&!P&&-1!==I.treeLevel&&(I.isLoading=!0,this.request.loadLevel=I.treeLevel+3,this.refreshItem(!1,O)),this.collapseItem(I,P);const T=this.tableDataOriginal;if(void 0===A&&(A=T.findIndex(c=>this.getFullDrilldown(c)===O)),!P&&!I.isLoading&&T.length>A+1){const c=this.getTreelevel(T[A]);1===T.filter((w,R)=>R!==A&&this.getFullDrilldown(w,c)===O&&this.getTreelevel(w)===c+1).length&&this.collapseOne(P,T[A+1],A+1)}this.calcData()}collapseList(P,I){P.forEach(A=>this.collapseItem(A,I)),this.calcData()}collapseItem(P,I){const A=this.getFullDrilldown(P);0===A.length||!this.collapse[A]&&I||(this.collapse[A]=null==I?!this.collapse[A]:!I,this.collapse[A]||Object.keys(this.collapse).forEach(T=>{T.indexOf(A+">")>=0&&(this.collapse[T]=!1)}))}setCollapse(P,I){return this.collapse=P,this._enableLazyloading&&(this._refreshItem$&&this._refreshItem$.unsubscribe(),this._refreshItem$=this.tableData.pipe((0,a.h)(A=>A&&A.length>0),(0,s.q)(1)).subscribe(()=>{this.refreshItem(!0,...Object.keys(P).filter(A=>P[A]))})),!1}getTreelevel(P){if(P.level)return P.level;let I=Number(P[N.TREELEVEL]);for(-1===I&&(I=this.drilldown.length-1);this.drilldown&&""===P[this.drilldown[I]];)I--;return P.level=I,I}getFullDrilldown(P,I){if(P.fullDrilldown||(P.fullDrilldown={}),I>=0||(I=this.getTreelevel(P)),P.fullDrilldown[I])return P.fullDrilldown[I];let A="";for(let O=0;O<=I;O++)A+=">"+this.getValue(P,O);return P.fullDrilldown[I]=A,A}deviationValue(P,I){const A=this.deviationPercentage(P,I);return isNaN(A)?NaN:I[this.getNameById(P.column2id)]-I[this.getNameById(P.column1id)]}deviationPercentageClass(P,I){const A={};let O=this.deviationPercentage(P,I);return P.isAbsolute&&(O=this.deviationValue(P,I)),isNaN(O)?{}:(O=Math.abs(O),P.edge1&&OA.id===P);return I?I.name:""}getIdByName(P){const I=this.frtColumns.find(A=>A.name===P);return I?I.id:-1}getLabelById(P){const I=this.frtColumns.find(A=>A.id===P);return I?I.label:""}getCategoryById(P){const I=this.columns.value.find(A=>A.id===P);return I?I.category:""}deviationPercentage(P,I,A){const O=I[this.getNameById(P.column1id)],T=I[this.getNameById(P.column2id)];return A?o.q.FormatValue(100*(T/O-1),1,1):100*(T/O-1)}updateChartConfig(P,I){this.chartOption.next(this.getChartConfig(P,I))}getValueChart(P,I,A){return A?-1*P[I]:P[I]}getChartConfig(P,I){if(void 0===I){const Y=this.getFullDrilldown(P);I=!0===this.collapse[Y]}if(!P){if(!this.tableDataOriginal)return;P=this.tableDataOriginal[0]}const A=this.getTreelevel(P),O=[],T=[],c="FTE"===P.currencyFlag?o.N.Integer:void 0,M="Gross Costs"===P.MainItem;if(!0===I||void 0===I&&AP[Y]===$[Y]&&$[Y]!==$[_]&&$[_]&&!$[y]);H.length>0?H.forEach($=>{const K={name:$[_],data:[]};for(let z=0;z0&&Y>0||this.total<=0&&Y<=0)return R.formatNumber(Y,c,M)}}},lang:{thousandsSep:".",decimalPoint:","},tooltip:{shared:!0,backgroundColor:"#ffffff",formatter:function(){let Y=0,_="",y="";for(let H=0;H'+T[H].name+':'+R.formatNumber(this.points[H].y,c,M)+"
",Y+=this.points[H].y,0===H&&(_=this.points[H].x));return"
Name: "+_+"

"+y+"Total:
"+R.formatNumber(Y,c,M)+""}},exporting:{sourceWidth:1600,sourceHeight:400,buttons:{contextButton:{enabled:!1}},fallbackToExportServer:!1,scale:1},plotOptions:{column:{stacking:"normal",dataLabels:{enabled:!1,color:"white"}}},credits:{enabled:!1},series:T}}toggleSkipNullColumns(P){this.doSkipNullColumns=void 0!==P?P:!this.doSkipNullColumns,this._skipColumnsUpdated$.next(this.doSkipNullColumns),this.calcData()}openHierarchyBySplice(P,I,A){const O=[];for(let T=0;T=P&&0!==I&&I--}return O}}return N.TREELEVEL="treeLevel",N.\u0275fac=function(P){return new(P||N)(u.\u0275\u0275inject(g.R),u.\u0275\u0275inject(x.I),u.\u0275\u0275inject(i.F),u.\u0275\u0275inject(m.i),u.\u0275\u0275inject(o.q),u.\u0275\u0275inject(E._W),u.\u0275\u0275inject(C.N),u.\u0275\u0275inject(v.i),u.\u0275\u0275inject(h.b),u.\u0275\u0275inject(S.Ye),u.\u0275\u0275inject(p._))},N.\u0275prov=u.\u0275\u0275defineInjectable({token:N,factory:N.\u0275fac}),N})()},47626:(Se,pe,r)=>{"use strict";r.d(pe,{r:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(){this.actionsClass="",this.tabs=[],this.actions=[],this.showHeader=!0,this.showCurrency=!0}selectTab(o){const d=o.active;this.tabs.forEach(u=>u.active=!1),d||(o.active=!0),o.callback(o)}addTab(o){-1===this.tabs.indexOf(o)&&this.tabs.push(o),this.tabs=this.tabs.sort((d,u)=>d.order-u.order)}removeTab(o){this.tabs=this.tabs.filter(d=>d!==o)}selectItem(o){const d=o.active;this.tabs.forEach(u=>u.active=!1),d||(o.active=!0),o.callback(o)}changeItem(o,d){d&&(o.value=d),o.callback(o)}addAction(...o){o.forEach(d=>{-1===this.actions.indexOf(d)&&(this.actions.push(d),this.actions=this.actions.sort((u,g)=>g.order-u.order))})}removeAction(...o){this.actions=this.actions.filter(d=>-1===o.indexOf(d))}onTreeMultiSelectSelection(o,d){d.value=o,d.callback(o)}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=t.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"}),a})()},19083:(Se,pe,r)=>{"use strict";r.d(pe,{q:()=>t});var t=(()=>{return(a=t||(t={}))[a.dropdown=0]="dropdown",a[a.multiselect=1]="multiselect",a[a.select=2]="select",a[a.treemultiselect=3]="treemultiselect",a[a.toggle=4]="toggle",t;var a})()},56982:(Se,pe,r)=>{"use strict";r.d(pe,{I:()=>d});var t=r(5e3),e=r(40520),a=r(69808);function s(u,g){if(1&u){const x=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",5),t.\u0275\u0275listener("click",function(){const E=t.\u0275\u0275restoreView(x).$implicit;return t.\u0275\u0275nextContext(2).changeIcon(E)}),t.\u0275\u0275element(1,"i"),t.\u0275\u0275elementEnd()}if(2&u){const x=g.$implicit;t.\u0275\u0275advance(1),t.\u0275\u0275classMap(x)}}function o(u,g){if(1&u&&(t.\u0275\u0275elementStart(0,"div",3),t.\u0275\u0275template(1,s,2,2,"div",4),t.\u0275\u0275elementEnd()),2&u){const x=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",x.glyphs)}}let d=(()=>{class u{constructor(x){this.webApi=x,this.isOpenSelection=!1,this.glyphs=[],this.path="src/pulseicons.svg",this.picked=new t.EventEmitter}ngOnInit(){this.webApi.get("/assets/fonts/pulseicons.svg").subscribe(x=>{},x=>{const i=x.error.text,E=(new DOMParser).parseFromString(i,"image/svg+xml").getElementsByTagName("glyph");for(let C=0;C{this.isOpenSelection=!1},200)}}return u.\u0275fac=function(x){return new(x||u)(t.\u0275\u0275directiveInject(e.eN))},u.\u0275cmp=t.\u0275\u0275defineComponent({type:u,selectors:[["pulse-icon-picker"]],inputs:{icon:"icon"},outputs:{picked:"picked"},decls:4,vars:4,consts:[[1,"icon-picker-container",2,"width","100%"],["id","picker",1,"picked-item",3,"tabIndex","click","blur"],["class","picker-container",4,"ngIf"],[1,"picker-container"],["class","icon-option",3,"click",4,"ngFor","ngForOf"],[1,"icon-option",3,"click"]],template:function(x,i){1&x&&(t.\u0275\u0275elementStart(0,"div",0)(1,"div",1),t.\u0275\u0275listener("click",function(){return i.isOpenSelection=!0})("blur",function(){return i.onblur()}),t.\u0275\u0275element(2,"i"),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(3,o,2,1,"div",2),t.\u0275\u0275elementEnd()),2&x&&(t.\u0275\u0275advance(1),t.\u0275\u0275property("tabIndex",1),t.\u0275\u0275advance(1),t.\u0275\u0275classMap(i.icon),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.isOpenSelection))},directives:[a.O5,a.sg],styles:[".icon-picker-container[_ngcontent-%COMP%]{width:100%;display:flex}.icon-picker-container[_ngcontent-%COMP%] .picked-item[_ngcontent-%COMP%]{cursor:pointer;width:30px;height:30px;border:1px solid grey;border-radius:3px;display:flex;justify-content:center;align-items:center;font-size:15px}.icon-picker-container[_ngcontent-%COMP%] .picker-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;background:white;border-radius:4px;box-shadow:-2px 4px 15px -3px #0006;color:#000;width:277px;height:300px;position:fixed;overflow-y:scroll;z-index:100}.icon-picker-container[_ngcontent-%COMP%] .picker-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.icon-picker-container[_ngcontent-%COMP%] .picker-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.icon-picker-container[_ngcontent-%COMP%] .picker-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:9px;background:rgba(0,0,0,.5)}.icon-picker-container[_ngcontent-%COMP%] .icon-option[_ngcontent-%COMP%]{cursor:pointer;padding:5px;margin:2px;border:1px solid rgba(0,0,0,.4);border-radius:3px;max-height:30px;width:30px;display:flex;justify-content:center;align-items:center}.icon-picker-container[_ngcontent-%COMP%] .icon-option[_ngcontent-%COMP%]:hover{border:1px solid #00646e}"]}),u})()},28606:(Se,pe,r)=>{"use strict";r.d(pe,{G:()=>m});var t=r(5e3),e=r(97454);function a(E,C){1&E&&(t.\u0275\u0275elementStart(0,"label"),t.\u0275\u0275text(1,"Filter"),t.\u0275\u0275elementEnd())}function s(E,C){if(1&E){const v=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",14),t.\u0275\u0275template(1,a,2,0,"label",15),t.\u0275\u0275elementStart(2,"input",16),t.\u0275\u0275listener("ngModelChange",function(S){return t.\u0275\u0275restoreView(v),t.\u0275\u0275nextContext().unpickedItemsFilter=S}),t.\u0275\u0275elementEnd()()}if(2&E){const v=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",v.isSearchboxLabeled),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngModel",v.unpickedItemsFilter)}}function o(E,C){1&E&&(t.\u0275\u0275elementStart(0,"label"),t.\u0275\u0275text(1,"Filter"),t.\u0275\u0275elementEnd())}function d(E,C){if(1&E){const v=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",14),t.\u0275\u0275template(1,o,2,0,"label",15),t.\u0275\u0275elementStart(2,"input",16),t.\u0275\u0275listener("ngModelChange",function(S){return t.\u0275\u0275restoreView(v),t.\u0275\u0275nextContext().pickedItemsFilter=S}),t.\u0275\u0275elementEnd()()}if(2&E){const v=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",v.isSearchboxLabeled),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngModel",v.pickedItemsFilter)}}function u(E,C){if(1&E&&t.\u0275\u0275element(0,"i",20),2&E){const v=t.\u0275\u0275nextContext().$implicit;t.\u0275\u0275property("ngClass",v.iconProperty)}}const g=function(E,C){return{selected:E,fixed:C}};function x(E,C){if(1&E){const v=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",17),t.\u0275\u0275listener("dragstart",function(S){const L=t.\u0275\u0275restoreView(v).$implicit,N=t.\u0275\u0275nextContext();return N.setItemSelection(L,!0),N.ondragstart(S,!0)})("click",function(S){return S.stopPropagation()})("mousedown",function(){const p=t.\u0275\u0275restoreView(v).$implicit,L=t.\u0275\u0275nextContext();return L.unselectItems(!1),L.setItemSelection(p)}),t.\u0275\u0275elementStart(1,"div",18),t.\u0275\u0275text(2),t.\u0275\u0275template(3,u,1,1,"i",19),t.\u0275\u0275elementEnd()()}if(2&E){const v=C.$implicit,h=t.\u0275\u0275nextContext();t.\u0275\u0275property("hidden",null!=h.pickedItemsFilter&&-1===v[h.labelProperty].toLowerCase().indexOf(h.pickedItemsFilter.toLowerCase()))("ngClass",t.\u0275\u0275pureFunction2(6,g,h.getItemSelection(v),h.isFixed(v))),t.\u0275\u0275attribute("itemId",v[h.idProperty]),t.\u0275\u0275advance(1),t.\u0275\u0275attribute("itemId",v.id),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("",v[h.labelProperty]," "),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",v.iconProperty)}}const i="2px solid rgb(0, 180, 180)";let m=(()=>{class E{constructor(v){this.bookmarService=v,this.isSearchboxLabeled=!0,this.selectedItems=[],this.pickedItemsChange=new t.EventEmitter,this.itemsTypeTitle="items",this.labelProperty="label",this.idProperty="id",this.categoryProperty=null,this.fixedProperty=null,this.orderProperty=null,this.childrenProperty="children",this.expandedProperty="expanded",this.labelAvailable="Available",this.labelActive="Active",this.internalPickedItems=[]}get items(){return this.internalItems}set items(v){if(null==this.categoryProperty||null==v)this.internalItems=v;else{this.internalItems=this.fromCategoriesToHierarchy(v);for(const h of this.internalItems)h.expanded=!0}this.updatePickedItems()}get pickedItems(){return this.internalPickedItems}set pickedItems(v){v&&(this.internalPickedItems=v.filter(h=>!!h),setTimeout(()=>{this.updatePickedItems()}))}static swapElements(v,h,S){const p=v[h];v[h]=v[S],v[S]=p}updatePickedItems(){if(null!=this.internalItems&&null!=this.internalPickedItems)for(let v=0;vv[this.orderProperty]-h[this.orderProperty])}findItem(v,h){for(const S of v)if(S[this.childrenProperty]){const p=this.findItem(S[this.childrenProperty],h);if(null!=p)return p}else if(S[this.idProperty]===h[this.idProperty])return S;return null}fromCategoriesToHierarchy(v){const h=[];for(const S of v){const p=S[this.categoryProperty];let L=h.find(N=>N[this.labelProperty]===p);null==L?(L={},L[this.labelProperty]=p,L[this.childrenProperty]=[S],h.push(L)):L[this.childrenProperty].push(S)}return h}pickedItemsChanged(){if(null!=this.orderProperty)for(let v=0;vS[this.idProperty]===v[this.idProperty])}getItemSelection(v){return-1!==this.selectedItems.indexOf(v)}setItemSelection(v,h){if(v[this.childrenProperty])for(const S of v[this.childrenProperty])this.isItemPicked(S)||this.setItemSelection(S,null==h||h);else{const S=this.selectedItems.indexOf(v);-1===S&&!1!==h?this.selectedItems.push(v):-1!==S&&!0!==h&&this.selectedItems.splice(S,1)}}unselectItems(v){if(null==v)this.selectedItems=[];else{let h=0;for(;h=0;v--)if(this.getItemSelection(this.internalPickedItems[v])){if(v===this.internalPickedItems.length-1)return;E.swapElements(this.internalPickedItems,v,v+1)}this.pickedItemsChanged()}dropPositionMarker(v,h){v.target.getAttribute("itemid")?v.target.style.borderTop=h?i:"":v.target.lastElementChild&&(v.target.lastElementChild.style.borderBottom=h?i:"")}ondragover(v){v.preventDefault()}ondragenter(v){this.dropPositionMarker(v,!0)}ondragleave(v){this.dropPositionMarker(v,!1)}ondragstart(v,h){v.dataTransfer.setData("isFromPickedItems",h?"1":"0")}ondrop(v,h){v.preventDefault(),this.dropPositionMarker(v,!1);const S="1"===v.dataTransfer.getData("isFromPickedItems"),p=v.target.getAttribute("itemid");let L=-1;p&&(L=h?this.internalPickedItems.findIndex(N=>N.id.toString()===p):this.internalUnpickedItems.findIndex(N=>N.id.toString()===p)),!S&&h?this.addToPickedItems(L):S&&!h?this.removeFromPickedItems():S&&h&&(L=this.removeFromPickedItems(L),this.addToPickedItems(L)),this.unselectItems(),this.pickedItemsChanged()}addToPickedItems(v=-1){-1===v&&(v=this.internalPickedItems.length);for(let h=0;h{"use strict";r.d(pe,{R:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(){this.height||(this.height="50"),this.colors||(this.colors=["#3081A0","#174260","#0F3345"])}ngOnInit(){}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=t.\u0275\u0275defineComponent({type:a,selectors:[["pulse-loader"]],inputs:{height:"height",colors:"colors"},decls:7,vars:5,consts:[["version","1.1","id","L7","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","x","0px","y","0px","viewBox","0 0 100 100","enable-background","new 0 0 100 100",0,"xml","space","preserve",1,"loader-center"],["d","M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3\nc-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z"],["attributeName","transform","attributeType","XML","type","rotate","dur","2s","from","0 50 50","to","360 50 50","repeatCount","indefinite"],["d","M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7\nc-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z"],["attributeName","transform","attributeType","XML","type","rotate","dur","1s","from","0 50 50","to","-360 50 50","repeatCount","indefinite"],["d","M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5\nL82,35.7z"]],template:function(o,d){1&o&&(t.\u0275\u0275namespaceSVG(),t.\u0275\u0275elementStart(0,"svg",0)(1,"path",1),t.\u0275\u0275element(2,"animateTransform",2),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"path",3),t.\u0275\u0275element(4,"animateTransform",4),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"path",5),t.\u0275\u0275element(6,"animateTransform",2),t.\u0275\u0275elementEnd()()),2&o&&(t.\u0275\u0275styleProp("height",d.height),t.\u0275\u0275advance(1),t.\u0275\u0275attribute("fill",d.colors[0]),t.\u0275\u0275advance(2),t.\u0275\u0275attribute("fill",d.colors[1]),t.\u0275\u0275advance(2),t.\u0275\u0275attribute("fill",d.colors[2]))},styles:[".loader-center[_ngcontent-%COMP%]{margin:0 auto;display:flex;align-items:center;justify-content:center}"]}),a})()},4221:(Se,pe,r)=>{"use strict";r.d(pe,{O:()=>i});var t=r(591),e=r(21086),a=r(22868),s=r(27221),o=r(5e3),d=r(62474),u=r(9133),g=r(98613),x=r(61035);let i=(()=>{class m{constructor(C,v,h,S){this.webApi=C,this.variables=v,this.userService=h,this.awsSignatureService=S,this._endpoint=this.variables.apiUrl+"/api/UserDelegation",this.givenDelegations$=new t.X([]),this.receivedDelegations$=new t.X([]),S.set(5036),this.userService.checkDelegationMode()||this.fetchDelegations()}fetchDelegations(){this.delegations$=this.webApi.getObserv(this._endpoint).pipe((0,a.b)(C=>this.generateGivenDelegations(C)),(0,a.b)(C=>this.generateReceivedDelegations(C)),(0,s.K)(C=>this.handleDelegationError("GET DELEGATION",C))),this.delegations$.subscribe()}generateGivenDelegations(C){const v=C.delegateToGid?C.delegateToGid:[];v.length>0&&this.awsSignatureService.Post(JSON.stringify({searchByGidList:v}),"/dev/user").subscribe(S=>{S.forEach(p=>p.name=`${p.firstName} ${p.lastName}`),this.givenDelegations$.next(S)})}generateReceivedDelegations(C){const v=C.delegateFromGid?C.delegateFromGid:[];v.length>0&&this.awsSignatureService.Post(JSON.stringify({searchByGidList:v}),"/dev/user").subscribe(S=>{S.forEach(p=>p.name=`${p.firstName} ${p.lastName}`),this.receivedDelegations$.next(S)})}addDelegation(C){return this.webApi.postObserv(this._endpoint+`/${C}`,{}).pipe((0,s.K)(v=>this.handleDelegationError("ADD DELEGATION",v)))}deleteDelegation(C){return(0,e.of)(this.webApi.delete(this._endpoint+`/${C}`)).pipe((0,s.K)(v=>this.handleDelegationError("DELETE DELEGATION",v)))}useDelegation(C,v){this.userService.getDelegation(C,v)}handleDelegationError(C,v){return console.error("error occured executing following delegation operation: "+C),(0,e.of)(v)}}return m.\u0275fac=function(C){return new(C||m)(o.\u0275\u0275inject(d.f),o.\u0275\u0275inject(u.a),o.\u0275\u0275inject(g.K),o.\u0275\u0275inject(x.X))},m.\u0275prov=o.\u0275\u0275defineInjectable({token:m,factory:m.\u0275fac}),m})()},47648:(Se,pe,r)=>{"use strict";r.d(pe,{p:()=>v});var t=r(8929),e=r(80013),a=r(75778),s=r(5e3),o=r(30745),d=r(98613),u=r(69808),g=r(93075),x=r(23322);function i(h,S){if(1&h){const p=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",7)(1,"input",8),s.\u0275\u0275listener("keydown.enter",function(){return s.\u0275\u0275restoreView(p),s.\u0275\u0275nextContext().onEnterPress()})("keyup.arrowup",function(){return s.\u0275\u0275restoreView(p),s.\u0275\u0275nextContext().onUpArrowPress()})("keyup.arrowdown",function(){return s.\u0275\u0275restoreView(p),s.\u0275\u0275nextContext().onDownArrowPress()})("ngModelChange",function(N){return s.\u0275\u0275restoreView(p),s.\u0275\u0275nextContext().searchText=N})("ngModelChange",function(N){return s.\u0275\u0275restoreView(p),s.\u0275\u0275nextContext().changed(N)}),s.\u0275\u0275elementEnd()()}if(2&h){const p=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("ngModel",p.searchText)}}const m=function(h){return{active:h}};function E(h,S){if(1&h){const p=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div")(1,"div",12),s.\u0275\u0275listener("click",function(){const j=s.\u0275\u0275restoreView(p).$implicit;return s.\u0275\u0275nextContext(2).onLogIn(j.gid,j.id)})("mouseover",function(){const N=s.\u0275\u0275restoreView(p),j=N.index,P=N.$implicit;return s.\u0275\u0275nextContext(2).onPulseUserHover(j,P.gid,P.id)}),s.\u0275\u0275text(2),s.\u0275\u0275elementEnd()()}if(2&h){const p=S.$implicit,L=S.index,N=s.\u0275\u0275nextContext(2);s.\u0275\u0275advance(1),s.\u0275\u0275property("ngClass",s.\u0275\u0275pureFunction1(2,m,N.focusedUserIndex==L)),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate1(" ",p.lastName+", "+p.firstName+" ("+p.orgId+")"," ")}}function C(h,S){if(1&h&&(s.\u0275\u0275elementStart(0,"div",9,10),s.\u0275\u0275template(2,E,3,4,"div",11),s.\u0275\u0275elementEnd()),2&h){const p=s.\u0275\u0275nextContext();s.\u0275\u0275advance(2),s.\u0275\u0275property("ngForOf",p.filteredPulseUsers)}}let v=(()=>{class h{constructor(p,L){this.ngxSmartModalService=p,this.userService=L,this.projectId=0,this.focusedUserIndex=0,this.searchResultsLoaded=!1,this.searchText="",this.searchChanged=new t.xQ,this.searchChanged.pipe((0,e.b)(300),(0,a.x)()).subscribe(N=>this.filterUsers(N))}ngOnInit(){this.isProxy=this.userService.isProxy()}changed(p){this.searchChanged.next(p)}ngOnDestroy(){this.searchUser$&&this.searchUser$.unsubscribe()}filterUsers(p){this.searchText.trim().length>0&&(this.searchUser$&&this.searchUser$.unsubscribe(),this.searchUser$=this.userService.searchUserSub(this.searchText.trim(),this.projectId).subscribe(L=>{this.filteredPulseUsers=L.results,this.filteredPulseUsers.length>0&&(this.focusedUserId=this.filteredPulseUsers[0].id,this.focusedUserGid=this.filteredPulseUsers[0].gid),this.searchResultsLoaded=!0}))}onLogIn(p,L){this.userService.logInUser(p,this.projectId).then(N=>{if(this.projectId>0){const j=btoa(`${N.authGid};${N.authExpires};${N.authSignature};${N.projectId}`);localStorage.setItem("credentials",j),this.ngxSmartModalService.getModal("userModal").close(),location.reload()}else{const j=btoa(`${N.authGid};${N.authExpires};${N.authSignature}`);localStorage.setItem("credentials",j),this.userService.getUserFromGID(N.authGid).then(P=>this.userService.user.next(P[0])),this.ngxSmartModalService.getModal("userModal").close()}})}onLogOut(){this.userService.logOutUser().then(p=>{const L=btoa(`${p.authGid};${p.authExpires};${p.authSignature}`);localStorage.setItem("credentials",L),this.userService.getUserFromGID(p.authGid).then(N=>this.userService.user.next(N[0])),this.ngxSmartModalService.getModal("userModal").close(),this.projectId>0&&location.reload()})}onPulseUserHover(p,L,N){this.focusedUserIndex=p,this.focusedUserId=N,this.focusedUserGid=L}onEnterPress(){this.onLogIn(this.focusedUserGid,this.focusedUserId)}onUpArrowPress(){this.focusedUserIndex>0&&(this.focusedUserIndex--,this.focusedUserGid=this.filteredPulseUsers[this.focusedUserIndex].gid,this.focusedUserId=this.filteredPulseUsers[this.focusedUserIndex].id)}onDownArrowPress(){this.focusedUserIndex0))},directives:[o.Q3,u.O5,g.DefaultValueAccessor,g.NgControlStatus,g.NgModel,u.sg,x.oO,u.mk],styles:[".pulse-user[_ngcontent-%COMP%]{cursor:pointer}"]}),h})()},36885:(Se,pe,r)=>{"use strict";r.d(pe,{_:()=>d});var t=r(591);const e={"01":{short:"Jan",long:"January"},"02":{short:"Feb",long:"February"},"03":{short:"Mar",long:"March"},"04":{short:"Apr",long:"April"},"05":{short:"May",long:"May"},"06":{short:"Jun",long:"June"},"07":{short:"Jul",long:"July"},"08":{short:"Aug",long:"August"},"09":{short:"Sep",long:"September"},10:{short:"Oct",long:"October"},11:{short:"Nov",long:"November"},12:{short:"Dec",long:"December"}};var a=r(5e3),s=r(62474),o=r(62026);let d=(()=>{class u{constructor(x,i){this.webApi=x,this.fiscalyearService=i,this.table=new t.X(null),this.tables=new t.X(null),this._hidden$=new t.X(!1),this.hidden$=this._hidden$,this.splitParamStart="_DATE(",this.splitParamEnd=")"}getTables(x){if(!Array.isArray(x))return this.webApi.get("/Customer/HierarchyFilter/GetMonthTables?datasourceTableId="+x).then(i=>{if(i=[...new Set(i)],this.tableId=x,this.tables.next(i.map(m=>{const E=m.split(this.splitParamStart);this.prefix=E[0];const C={};return C.value=m,C.label=this.parseTableName(m),C})),this.table.value&&i.indexOf(this.table.value)>-1)this.setTable();else{let m=i.find(E=>-1===E.indexOf("_SKIP_"));m||(m=i[0]),this.setTable(m)}});{this.tableId=x;const i=[];x.forEach(m=>{i.push(this.webApi.get("/Customer/HierarchyFilter/GetMonthTables?datasourceTableId="+m))}),Promise.all(i).then(m=>{m=m.map(E=>E[0]),this.table.next(m.toString())})}}setTable(x){if(x&&-1===x.indexOf("_DATE"))this.table.next(x);else if(this.table&&this.table.value!==x){const i=this.getTableDate(x);i.startsWith("_")||this.table.value&&-1===this.table.value.indexOf("_DATE")||x&&x.indexOf("_SKIP")>-1?this.table.next(x):this.table.next(this.prefix+this.splitParamStart+i+this.splitParamEnd)}}parseTableName(x){return this.fiscalyearService.getPeriodName(this.getTableDate(x))}getFiscalyear(x){const i=this.getTableDate(x);return this.fiscalyearService.getFiscalYear(i)}getMonth(x){const m=this.getTableDate(x).substring(5,7);return e[m]?e[m].short:""}getYear(x){return+this.getTableDate(x).substring(2,4)}getTableDate(x){let i=this.table.value;if(x&&(i=x),i){const m=i.indexOf(this.splitParamStart);return i=i.substring(m+this.splitParamStart.length,i.length-this.splitParamEnd.length),i}return""}set hidden(x){this._hidden$.next(x)}}return u.\u0275fac=function(x){return new(x||u)(a.\u0275\u0275inject(s.f),a.\u0275\u0275inject(o.R))},u.\u0275prov=a.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac}),u})()},56551:(Se,pe,r)=>{"use strict";r.d(pe,{v:()=>x});var t=r(40520),e=r(591),a=r(46809),s=r(5e3),o=r(62474),d=r(54620),u=r(9133),g=r(23328);let x=(()=>{class i{constructor(E,C,v,h){this._webApi=E,this._projectService=C,this._variables=v,this._aws=h,this.unreadnotificationsCount=0,this._projectId=C.projectId,this._updateData$=new e.X(!1),this.updateData$$=this._updateData$.asObservable()}doDataRefresh(E){this._updateData$.next(E)}getAllNotifications(){return new Promise((E,C)=>{this._webApi.get(this._variables.apiUrl+`/api/NotificationCenter/get/${this._projectId}`).then(v=>{E(v)},v=>C(v))})}getAttachmentsByNotificationId(E){return new Promise((C,v)=>{this._webApi.get(this._variables.apiUrl+`/api/NotificationCenter/get/attachments/${E}`).then(h=>{C(h)},h=>v(h))})}getCountUnreadNotifications(E){return new Promise((C,v)=>{E?this._webApi.get(this._variables.apiUrl+`/api/NotificationCenter/get/unread-count/${E}`).then(h=>{C(h)},h=>v(h)):C(0)})}addNotificationGroup(E){return new Promise((C,v)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/add/group",{projectId:this._projectId,groupName:E}).then(S=>{C(S)},S=>v(S))})}addNotificationItemReadByUser(E){return new Promise((C,v)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/add/item/read",{notificationItemId:E}).then(S=>{C(S)},S=>v(S))})}addAttachment(E){const C=(new t.WM).append("Content-Disposition","multipart/form-data");return new Promise((v,h)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/add/attachment",E,{headers:C}).then(S=>{v(S)},S=>h(S))})}addCoverPhoto(E){const C=(new t.WM).append("Content-Disposition","multipart/form-data");return new Promise((v,h)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/add/coverphoto",E,{headers:C}).then(S=>{v(S)},S=>h(S))})}addNotificationItem(E){return new Promise((C,v)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/add/item",E).then(h=>{C(h)},h=>v(h))})}updateNotificationItem(E){return new Promise((C,v)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/update/item",E).then(h=>{C(h)},h=>v(h))})}downloadAttachment(E,C){return new Promise((v,h)=>{this._webApi.get(this._variables.apiUrl+`/api/NotificationCenter/download/attachment/${E}`,{responseType:"blob"}).then(S=>{a.Z.downloadBlob(S,C),v(S)},S=>h(S))})}downloadCoverPhoto(E){return new Promise((C,v)=>{this._webApi.get(this._variables.apiUrl+`/api/NotificationCenter/download/coverphoto/${E}`,{responseType:"blob"}).then(h=>{C(h)},h=>v(h))})}deleteNotificationItem(E){return new Promise((C,v)=>{this._webApi.delete(this._variables.apiUrl+`/api/NotificationCenter/delete/item/${E}`).then(h=>{C(h)},h=>v(h))})}deleteNotificationGroup(E){return new Promise((C,v)=>{this._webApi.delete(this._variables.apiUrl+`/api/NotificationCenter/delete/group/${E}`).then(h=>{C(h)},h=>v(h))})}deleteAttachment(E,C){return new Promise((v,h)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/delete/attachment",{Id:E,folder:C}).then(p=>{v(p)},p=>h(p))})}deleteCoverPhoto(E,C){return new Promise((v,h)=>{this._webApi.post(this._variables.apiUrl+"/api/NotificationCenter/delete/coverphoto",{Id:E,folder:C}).then(p=>{v(p)},p=>h(p))})}}return i.\u0275fac=function(E){return new(E||i)(s.\u0275\u0275inject(o.f),s.\u0275\u0275inject(d.k),s.\u0275\u0275inject(u.a),s.\u0275\u0275inject(g.s))},i.\u0275prov=s.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac}),i})()},47582:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>o});var t=r(5e3),e=r(30745),a=r(96268);function s(d,u){if(1&d&&(t.\u0275\u0275elementStart(0,"option",15),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&d){const g=u.$implicit;t.\u0275\u0275property("ngValue",g.id),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(g.name)}}let o=(()=>{class d{constructor(g,x){this.ngxSmartModalService=g,this.projectService=x,this.projectList=[{id:0,name:"Group"},{id:2,name:"Dashboard"},{id:3,name:"External Link"}],this.projectService.existsReponserateDashboard(x.projectId).then(i=>{i||this.projectList.push({id:4,name:"Response Rate Dashboard"})})}create(){const g={isEdit:!1};switch(this.selectProject){case 0:this.ngxSmartModalService.setModalData(g,"group",!0),this.ngxSmartModalService.getModal("group").open();break;case 1:this.ngxSmartModalService.getModal("frt").open();break;case 2:this.ngxSmartModalService.setModalData(g,"dashboard",!0),this.ngxSmartModalService.getModal("dashboard").open();break;case 3:this.ngxSmartModalService.setModalData(g,"external",!0),this.ngxSmartModalService.getModal("external").open();break;case 4:this.ngxSmartModalService.setModalData(g,"responserate",!0),this.ngxSmartModalService.getModal("responserate").open()}this.ngxSmartModalService.close("addProject")}}return d.\u0275fac=function(g){return new(g||d)(t.\u0275\u0275directiveInject(e.lu),t.\u0275\u0275directiveInject(a.F))},d.\u0275cmp=t.\u0275\u0275defineComponent({type:d,selectors:[["pulse-project-add"]],decls:26,vars:3,consts:[[3,"identifier"],["addProject",""],[1,"modal-header"],[1,"modal-body"],[2,"display","flex","align-items","center"],[2,"padding","20px"],[1,"pulse-form-field"],[2,"height","40px","width","100%",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"modal-buttons"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"],[3,"ngValue"]],template:function(g,x){if(1&g){const i=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),t.\u0275\u0275text(4,"Add new item"),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(5,"div",3)(6,"div",4)(7,"label",5),t.\u0275\u0275text(8,"Format:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(9,"div",6)(10,"select",7),t.\u0275\u0275listener("ngModelChange",function(E){return x.selectProject=E}),t.\u0275\u0275template(11,s,2,2,"option",8),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(12,"div",9)(13,"div",10)(14,"button",11),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(i),t.\u0275\u0275reference(1).close()}),t.\u0275\u0275element(15,"i",12),t.\u0275\u0275text(16,"Cancel"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(17,"button",13),t.\u0275\u0275listener("click",function(){return x.create()}),t.\u0275\u0275element(18,"i",14),t.\u0275\u0275text(19,"Ok"),t.\u0275\u0275elementEnd()()()()(),t.\u0275\u0275element(20,"pulse-project-add-group")(21,"pulse-project-add-dashboard")(22,"pulse-project-add-frt")(23,"pulse-project-add-external-link")(24,"pulse-project-add-global")(25,"pulse-project-add-response-rate-dashboard")}2&g&&(t.\u0275\u0275property("identifier","addProject"),t.\u0275\u0275advance(10),t.\u0275\u0275property("ngModel",x.selectProject),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",x.projectList))},styles:[""]}),d})()},82460:(Se,pe,r)=>{"use strict";r.d(pe,{u:()=>H});var t=r(16150),e=r.n(t),a=r(53527),s=r(5e3),o=r(10085),d=r(17717),u=r(69808);let g=(()=>{class ${constructor(z,G){this.el=z,this.renderer=G,this.disableFurtherUpdate=!1}ngOnInit(){this.updateFontSize()}ngOnChanges(){this.updateFontSize()}getTextWidth(z,G){this.objCanvas=this.objCanvas||document.createElement("canvas");const Z=this.objCanvas.getContext("2d");return Z.font=G,Z.measureText(z).width}updateFontSize(){if(!this.value||this.disableFurtherUpdate)return;this.minFontSize&&this.minFontSize===this.maxFontSize&&(this.el.nativeElement.style.fontSize=this.minFontSize,this.disableFurtherUpdate=!0);const z=document.createElement("div");this.renderer.appendChild(this.el.nativeElement,z);const G=z.offsetWidth;this.renderer.removeChild(this.el.nativeElement,z),this.objStyles=this.objStyles||{size:Number.parseFloat(window.getComputedStyle(this.el.nativeElement).getPropertyValue("font-size")),font:window.getComputedStyle(this.el.nativeElement).getPropertyValue("font")};const Z=this.getTextWidth(this.value,this.objStyles.font);let B=Math.floor(this.objStyles.size*G/Z);this.minFontSize&&(B=Math.max(B,this.minFontSize)),this.maxFontSize&&(B=Math.min(B,this.maxFontSize)),this.el.nativeElement.style.fontSize=B+"px",this.el.nativeElement.style.lineHeight="1em"}onResize(){this.updateFontSize()}}return $.\u0275fac=function(z){return new(z||$)(s.\u0275\u0275directiveInject(s.ElementRef),s.\u0275\u0275directiveInject(s.Renderer2))},$.\u0275cmp=s.\u0275\u0275defineComponent({type:$,selectors:[["pulse-responsive-text"]],hostBindings:function(z,G){1&z&&s.\u0275\u0275listener("resize",function(B){return G.onResize(B)},!1,s.\u0275\u0275resolveWindow)},inputs:{value:"value",minFontSize:"minFontSize",maxFontSize:"maxFontSize"},features:[s.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,template:function(z,G){1&z&&s.\u0275\u0275text(0),2&z&&s.\u0275\u0275textInterpolate(G.value)},encapsulation:2}),$})();var x=r(23322),i=r(31989),m=r(28606),E=r(93075),C=r(32925);const v=["chartdiv"],h=["label"],S=function($){return{"text-align-right":$}};function p($,K){if(1&$&&(s.\u0275\u0275elementStart(0,"div",11),s.\u0275\u0275element(1,"pulse-responsive-text",12),s.\u0275\u0275elementEnd()),2&$){const z=s.\u0275\u0275nextContext(3);s.\u0275\u0275styleProp("width",z.dynamicNumber(null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]?null:z._options.series[0].data[0].y)+"%"),s.\u0275\u0275advance(1),s.\u0275\u0275property("value",z.dynamicNumber(null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]?null:z._options.series[0].data[0].y)+" %")("minFontSize",z.minFontSize-4)("maxFontSize",z.maxFontSize-4)("ngClass",s.\u0275\u0275pureFunction1(6,S,z.dynamicNumber(null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]?null:z._options.series[0].data[0].y)<15))}}function L($,K){if(1&$&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275template(1,p,2,8,"div",10),s.\u0275\u0275elementContainerEnd()),2&$){const z=s.\u0275\u0275nextContext(2);s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",z.dynamicNumber(null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]?null:z._options.series[0].data[0].y))}}function N($,K){if(1&$&&s.\u0275\u0275element(0,"pulse-responsive-text",14),2&$){const z=s.\u0275\u0275nextContext(3);s.\u0275\u0275property("value",z.dynamicNumber(null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]?null:z._options.series[0].data[0].y))("minFontSize",z.minFontSize)("maxFontSize",z.maxFontSize)}}function j($,K){if(1&$&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275template(1,N,1,3,"pulse-responsive-text",13),s.\u0275\u0275text(2),s.\u0275\u0275elementContainerEnd()),2&$){const z=s.\u0275\u0275nextContext(2);s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",z.decimalFormat<=0),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate1(" ",z.decimalFormat>0?null==z._options||null==z._options.series[0]||null==z._options.series[0].data[0]||null==z._options.series[0].data[0].y?null:z._options.series[0].data[0].y.toFixed(z.decimalFormat):null," ")}}function P($,K){if(1&$&&(s.\u0275\u0275elementStart(0,"label",8),s.\u0275\u0275template(1,L,2,1,"ng-container",9),s.\u0275\u0275template(2,j,3,2,"ng-container",9),s.\u0275\u0275elementEnd()),2&$){const z=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",z.type&&"percent"===z.type),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",!z.type)}}const I=function($,K){return{height:$,width:K,position:"relative"}},A=function($,K){return{height:$,width:K}};function O($,K){if(1&$){const z=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"pulse-highchart",15),s.\u0275\u0275listener("chartInstance",function(Z){return s.\u0275\u0275restoreView(z),s.\u0275\u0275nextContext().saveInstance(Z)}),s.\u0275\u0275elementEnd()}if(2&$){const z=s.\u0275\u0275nextContext();s.\u0275\u0275propertyInterpolate1("id","pulsechart_",z.chartId,""),s.\u0275\u0275property("ngStyle",z._options.position?s.\u0275\u0275pureFunction2(3,I,z.height?z.height+"px":"100%",z.width+"px"):s.\u0275\u0275pureFunction2(6,A,z.height+"px",z.width+"px"))("options",z._options)}}function T($,K){if(1&$){const z=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div")(1,"pulse-itempicker",21),s.\u0275\u0275listener("pickedItemsChange",function(Z){return s.\u0275\u0275restoreView(z),s.\u0275\u0275nextContext().$implicit.selection=Z})("pickedItemsChange",function(){s.\u0275\u0275restoreView(z);const Z=s.\u0275\u0275nextContext().$implicit;return s.\u0275\u0275nextContext(2).drilldownPicker(Z)}),s.\u0275\u0275elementEnd()()}if(2&$){const z=s.\u0275\u0275nextContext().$implicit;s.\u0275\u0275advance(1),s.\u0275\u0275property("items",z.values)("pickedItems",z.selection)}}function c($,K){if(1&$&&(s.\u0275\u0275elementStart(0,"option",26),s.\u0275\u0275text(1),s.\u0275\u0275elementEnd()),2&$){const z=K.$implicit;s.\u0275\u0275property("value",z.column),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate(z.label)}}function M($,K){if(1&$){const z=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"label",22),s.\u0275\u0275text(2),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"div",23)(4,"select",24),s.\u0275\u0275listener("ngModelChange",function(Z){return s.\u0275\u0275restoreView(z),s.\u0275\u0275nextContext(2).$implicit.defaultValue=Z})("change",function(){s.\u0275\u0275restoreView(z);const Z=s.\u0275\u0275nextContext(2).$implicit;return s.\u0275\u0275nextContext(2).splitBy(Z)}),s.\u0275\u0275template(5,c,2,2,"option",25),s.\u0275\u0275elementEnd()(),s.\u0275\u0275elementContainerEnd()}if(2&$){const z=s.\u0275\u0275nextContext(2).$implicit;s.\u0275\u0275advance(1),s.\u0275\u0275property("for",z.replace),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate1("",z.label," "),s.\u0275\u0275advance(2),s.\u0275\u0275property("id",z.replace)("ngModel",z.defaultValue),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngForOf",z.values)}}function w($,K){if(1&$&&s.\u0275\u0275template(0,M,6,5,"ng-container",9),2&$){const z=s.\u0275\u0275nextContext().$implicit;s.\u0275\u0275property("ngIf","hidden"!=z.type)}}function R($,K){if(1&$&&(s.\u0275\u0275elementStart(0,"div",18),s.\u0275\u0275template(1,T,2,2,"div",19),s.\u0275\u0275template(2,w,1,1,"ng-template",null,20,s.\u0275\u0275templateRefExtractor),s.\u0275\u0275elementEnd()),2&$){const z=K.$implicit,G=s.\u0275\u0275reference(3);s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf","itempicker"==z.type)("ngIfElse",G)}}function D($,K){if(1&$&&(s.\u0275\u0275elementStart(0,"div",16),s.\u0275\u0275template(1,R,4,2,"div",17),s.\u0275\u0275elementEnd()),2&$){const z=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("ngForOf",z._drilldownItems)}}function Y($,K){if(1&$&&s.\u0275\u0275element(0,"pulse-spinner",27),2&$){const z=s.\u0275\u0275nextContext();s.\u0275\u0275property("isSpin",z.isSpinner)}}function _($,K){1&$&&(s.\u0275\u0275elementStart(0,"div",28),s.\u0275\u0275element(1,"i",29),s.\u0275\u0275elementStart(2,"span"),s.\u0275\u0275text(3,"An error occurred! "),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"span"),s.\u0275\u0275text(5,"Please contact the administrator."),s.\u0275\u0275elementEnd()())}function y($){const K=$.point,G=K.shapeArgs,Z=G.x,B=this.translate($.brk.from,0,1,0,1),X=G.width,le=["M",Z,B,"L",Z+.25*X,B+4,"L",Z+.75*X,B-4,"L",Z+X,B];K.brk?K.brk.attr({d:le}):K.brk=this.chart.renderer.path(le).attr({"stroke-width":4,stroke:"#FFF"}).add(K.graphic.parentGroup)}r(92407)(e()),r(33461)(e()),r(10217)(e()),r(4971)(e()),r(2112)(e()),r(86439)(e()),r(34737)(e()),r(65473)(e());let H=(()=>{class ${constructor(z,G,Z,B){this.pulseChartService=z,this.scaleService=G,this.currencyService=Z,this.renderer=B,this.chartCached=!0,this.Highcharts=e(),this.hidden=!localStorage.getItem("debug"),window.pulse=this,window.Highcharts=e(),this.chartId=0,this.isLoading=!0,this._request={},this._drilldownItems=[],this.isFullscreen=!1,this.resetChart=!1,this.isSpinner=!0,this.hasError=!1,this.enableFullscreenMode=!0,this.drilldown={},this.isLabel=!1,this.excludeScale=!1,this.decimalFormat=0,e().setOptions({lang:{decimalPoint:a.q.DecimalPoint,thousandsSep:a.q.ThousandsSep}})}set options(z){z?(this._options=z,this.isSpinner=!1):this.isSpinner=!0}set request(z){z&&(this._request=z,this._options&&this.refreshData(z))}set changeData(z){if(z&&this.chart){const G=this._options.series;G[0].data[0]=z,this.dataColorFunction&&(G[0].color=this.dataColorFunction),this.setData(G)}}set chartData(z){this._chartData=z}get chartData(){return this._chartData}onResize(z){this.calcChartSize(),setTimeout(()=>{this.calcChartSize()},250)}printConfig(){console.warn(this._options)}calcChartSize(){if(this.chartDiv.nativeElement){const z=this.chartDiv.nativeElement.offsetHeight;z>0&&(this.height=z-37,this._drilldownItems&&this._drilldownItems.length&&(this.height=this._drilldownItems.find(Z=>"itempicker"===Z.type)?this.height-323:this.height-80));const G=this.chartDiv.nativeElement.offsetWidth;G>0&&(this.width=G)}}setData(z){if(this.chartData=z,this.resetChart&&this._options)this._options.series=z,this.reset();else if(!this.isLabel){for(let G=0;G{this._drilldownItems[1].values&&this._drilldownItems[1].values.length>0&&(this._drilldownItems[1].allValues||(this._drilldownItems[1].allValues=[...this._drilldownItems[1].values]),this._drilldownItems[1].values=this._drilldownItems[1].allValues.filter(Z=>!Z.display||Z.display[z.replaceKey].indexOf(z.defaultValue)>-1))}),this.drilldown[z.replaceKey]=z.defaultValue,this.refreshData(this._request)}reflow(){this.chart&&setTimeout(()=>{this.chart.reflowNow instanceof Function?this.chart.reflowNow():this.chart.reflow()},500)}resizeChart(z,G){this.chart&&this.chart.setSize(z,G)}drilldownPicker(z){this.drilldown={};for(let G=0;G({key:z.replace(/\_/g," "),value:this.drilldown[z]})),this.pulseChartService.getSql(this.chartId,this._request).then(console.warn))}saveInstance(z){this.chart=z,this.chart.reflowNow=function(){this.containerHeight=this.options.chart.height,this.containerWidth=this.options.chart.width,this.setSize(this.containerWidth,this.containerHeight,!1),this.hasUserSize=null},this._request.chartId=this.chartId}ngAfterViewInit(){this.colors&&e().setOptions({colors:this.colors}),this.pulseChartService.addChart(this)}ngOnInit(){this.onResize(),this.pulseChartService.getConfig(this.chartId).then(z=>{if(z){z.drilldown&&(this._drilldownItems=this.pulseChartService.parseJSON(z.drilldown),this._drilldownItems.forEach(B=>{B&&B.defaultValues&&(B.selection=B.defaultValues.map(X=>B.values.find(ee=>ee.column===X)))})),this.onResize();const G=this.pulseChartService.parseJSON(z.options),Z=void 0===this.chartCached||Boolean(this.chartCached);G&&G.chart&&"label"===G.chart.type&&(this.isLabel=!0,this.decimalFormat=G.decimal&&Number.isInteger(G.decimal)?G.decimal:0),this.chartData?(this.chartData.length>0&&(G.series=this.getSeries(this.chartData)),this._options=G,this.isSpinner=!1):this.getData(this._request,Z).then(B=>{if(this.chartData=B,B.length>0&&(G.series=B),this._options=G,-1!==[3667,3666].indexOf(this.chartId)){let X={data:[]};if(3667===this.chartId?G.series.forEach(ee=>{X.data.push(ee.data[0])}):X=G.series[0],X){const ee=X.data.map(ue=>ue.y);ee.pop();const te=[...ee.reduce((ue,_e,Ce)=>[...ue,_e+(ue[Ce-1]||0)],[]),ee.reduce((ue,_e)=>ue+_e,0)],ce=1.01*Math.max(...te);let oe=0,se=0;3667===this.chartId?(oe=.01*Math.min(...te),se=.55*Math.min(...te)):(oe=.01*Math.min(...te),se=.9*Math.min(...te)),this._options.yAxis&&(3666===this.chartId&&(this._options.yAxis.max=ce,this._options.yAxis.endOnTick=!1,this._options.plotOptions.series.dataLabels.verticalAlign="top"),this._options.yAxis.breaks=[{from:oe,to:se,breakSize:1}],this._options.events={pointBreak:y})}}})}else this.onResize(),this.chartData=this._options.series})}ngOnDestroy(){this.sub&&this.sub.unsubscribe(),this.pulseChartService.removeChart(this)}getData(z,G){return new Promise((Z,B)=>{z?(this.sub&&this.sub.unsubscribe(),this.sub=this.pulseChartService.getData(this.chartId,z).subscribe(X=>{const ee=this.getSeries(X);this.isSpinner=!1,Z(ee)},X=>{X&&(this.hasError=!0)})):B()})}getSeries(z){const G=[];for(let Z=0;Z{const ee=Number(X.Level.substring(X.Level.length-1,X.Level.length));G.push({id:"Level"+ee+"_"+X.from.substring(7,X.from.length),Level:"Level "+ee,name:X.from.substring(7,X.from.length),color:"#"+Z[B%Z.length]}),G.push({id:"Level"+(ee+1)+"_"+X.to.substring(7,X.to.length),Level:"Level "+(ee+1),name:X.to.substring(7,X.to.length),color:"#"+Z[B%Z.length]}),B++}),G.filter((X,ee,le)=>le.map(de=>de.id).indexOf(X.id)===ee).sort((X,ee)=>X.name!==ee.name?X.nameX.id===Z.data.serieId);if(B&&B.data)return Z.data.calc(B.data)}return[]}reset(){this.chart&&(this._options.chart.height=this.chart.chartHeight,this._options.chart.width=this.chart.chartWidth,this.chart.destroy(),this.chart=document.getElementById("pulsechart_"+this.chartId),this.chart=new(e().Chart)(this.chart,this._options))}refreshData(z){z||(z=this._request),z&&(this.isLabel||this.chart)&&(z.drilldown=[],z.drilldown=Object.keys(this.drilldown).map(G=>({key:G.replace(/\_/g," "),value:this.drilldown[G]})),this.isSpinner=!0,this.getData(z,!1).then(G=>{this.setData(G)}))}}return $.\u0275fac=function(z){return new(z||$)(s.\u0275\u0275directiveInject(o.F),s.\u0275\u0275directiveInject(a.q),s.\u0275\u0275directiveInject(d.i),s.\u0275\u0275directiveInject(s.Renderer2))},$.\u0275cmp=s.\u0275\u0275defineComponent({type:$,selectors:[["pulse-chart"]],viewQuery:function(z,G){if(1&z&&(s.\u0275\u0275viewQuery(v,7),s.\u0275\u0275viewQuery(h,5)),2&z){let Z;s.\u0275\u0275queryRefresh(Z=s.\u0275\u0275loadQuery())&&(G.chartDiv=Z.first),s.\u0275\u0275queryRefresh(Z=s.\u0275\u0275loadQuery())&&(G.labelElem=Z.first)}},hostBindings:function(z,G){1&z&&s.\u0275\u0275listener("resize",function(B){return G.onResize(B)},!1,s.\u0275\u0275resolveWindow)},inputs:{excludeScale:"excludeScale",chartCached:"chartCached",options:"options",request:"request",changeData:"changeData",chartId:"chartId",porjectId:"porjectId",resetChart:"resetChart",enableFullscreenMode:"enableFullscreenMode",chartData:"chartData",drilldown:"drilldown",dataColorFunction:"dataColorFunction",colors:"colors",minFontSize:"minFontSize",maxFontSize:"maxFontSize",type:"type"},decls:11,vars:8,consts:[["type","button",3,"hidden","click"],["class","data-label",4,"ngIf"],[1,"chart-div",3,"id"],["chartdiv",""],[3,"ngStyle","id","options","chartInstance",4,"ngIf"],["class","pulse-chart-options",4,"ngIf"],[3,"isSpin",4,"ngIf"],["class","chart-error-msg",4,"ngIf"],[1,"data-label"],[4,"ngIf"],["class","percent",3,"width",4,"ngIf"],[1,"percent"],[3,"value","minFontSize","maxFontSize","ngClass"],[3,"value","minFontSize","maxFontSize",4,"ngIf"],[3,"value","minFontSize","maxFontSize"],[3,"ngStyle","id","options","chartInstance"],[1,"pulse-chart-options"],["class","drilldown fullWidth",4,"ngFor","ngForOf"],[1,"drilldown","fullWidth"],[4,"ngIf","ngIfElse"],["dropdown",""],["itemsTypeTitle","Flows","pickedItemsFilter","","unpickedItemsFilter","","categoryProperty","category","idProperty","column",3,"items","pickedItems","pickedItemsChange"],[3,"for"],[1,"pulse-select"],[3,"id","ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"isSpin"],[1,"chart-error-msg"],[1,"icon-alert-outline"]],template:function(z,G){1&z&&(s.\u0275\u0275elementStart(0,"button",0),s.\u0275\u0275listener("click",function(){return G.printSql()}),s.\u0275\u0275text(1,"sql"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(2,"button",0),s.\u0275\u0275listener("click",function(){return G.printConfig()}),s.\u0275\u0275text(3,"config"),s.\u0275\u0275elementEnd(),s.\u0275\u0275template(4,P,3,2,"label",1),s.\u0275\u0275elementStart(5,"div",2,3),s.\u0275\u0275template(7,O,1,9,"pulse-highchart",4),s.\u0275\u0275elementEnd(),s.\u0275\u0275template(8,D,2,1,"div",5),s.\u0275\u0275template(9,Y,1,1,"pulse-spinner",6),s.\u0275\u0275template(10,_,6,0,"div",7)),2&z&&(s.\u0275\u0275property("hidden",G.hidden),s.\u0275\u0275advance(2),s.\u0275\u0275property("hidden",G.hidden),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",G.isLabel&&!G.hasError),s.\u0275\u0275advance(1),s.\u0275\u0275propertyInterpolate1("id","chart-div_",G.chartId,""),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",!G.hasError&&G._options&&!G.isLabel),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",!G.hasError),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",!G.hasError),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",G.hasError))},directives:[u.O5,g,x.oO,u.mk,i.x,x.Zl,u.PC,u.sg,m.G,E.SelectControlValueAccessor,E.NgControlStatus,E.NgModel,E.NgSelectOption,E.\u0275NgSelectMultipleOption,C.O],styles:[".percent[_ngcontent-%COMP%]{background-color:#00646e;color:#fff;padding:5px;max-width:100%;white-space:nowrap}.percent[_ngcontent-%COMP%] .text-align-right[_ngcontent-%COMP%]{position:relative;left:calc(100% + 10px);color:#00646e}label[_ngcontent-%COMP%]{padding:0 7px}label.data-label[_ngcontent-%COMP%]{display:block;font-weight:500;font-size:46px;text-align:center;color:#00646e}i[_ngcontent-%COMP%]{position:absolute;font-size:22px;right:0px;top:0px;z-index:1;opacity:.7}.icon-close2[_ngcontent-%COMP%]{position:fixed;right:40px;top:36px;z-index:250;opacity:.7}.pointer[_ngcontent-%COMP%]{cursor:pointer}pulse-chart[_ngcontent-%COMP%], highcharts-chart[_ngcontent-%COMP%], pulse-highchart[_ngcontent-%COMP%]{height:inherit;position:absolute}div.chart-div[_ngcontent-%COMP%]{flex:1;overflow:hidden;width:100%;position:relative;height:100%}.pulse-chart-options[_ngcontent-%COMP%]{position:absolute;bottom:5px;padding:0 10px;width:100%;display:flex}.pulse-chart-options[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{flex:33% 1 1}.pulse-chart-options[_ngcontent-%COMP%] .fullWidth[_ngcontent-%COMP%]{width:100%}.pulse-chart-options.full-screen[_ngcontent-%COMP%]{position:relative;bottom:0}.chart-error-msg[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 40px);left:0;display:flex;flex-direction:column;text-align:center;line-height:16px}.chart-error-msg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:relative;font-size:30px;color:#879baa;margin-bottom:15px}"]}),$})()},10085:(Se,pe,r)=>{"use strict";r.d(pe,{F:()=>o});var t=r(56498),e=r(5e3),a=r(62474),s=r(53527);let o=(()=>{class d{constructor(g,x){this.webApi=g,this.scaleService=x,this.charts=[],this._sub=[],this.cache={},this._sub.push(this.scaleService.scale.subscribe(()=>{this.charts.forEach(i=>{i.reflow()})}))}ngOnDestroy(){this._sub.forEach(g=>g.unsubscribe())}addChart(g){-1===this.charts.indexOf(g)&&this.charts.push(g)}removeChart(g){this.charts=this.charts.filter(x=>x!==g)}getConfig(g){return new Promise((x,i)=>{this.cache[g]?x(this.cache[g]):0!==g?this.webApi.get("/api/pulsechart/"+g).then(m=>{this.cache[g]=m,x(m)}):x(null)})}getSql(g,x){return x?this.webApi.post("/Customer/PulseCharts/GetChartSql",x,{params:{chartId:g}}):this.webApi.get("/Customer/PulseCharts/GetChartSql",{params:{chartId:g}})}getMultiData(g,x,i){const m=JSON.parse(JSON.stringify(i));return m.chartIds=g,m.table=i.table.split(",")[0],g&&g.length>0?this.webApi.postObserv("/Customer/PulseCharts/GetMultiChartData",m,{params:{cached:x}}):new t.y(null)}removeFilterFromRequest(g,x,i,m){if(-1!==i.indexOf(x)){const E=[...g.filterList];g.filterList.forEach((C,v)=>{-1!==m.indexOf(C[0].filterId)&&(E[v]=void 0)}),g.filterList=E}}getData(g,x,i){const m=Object.assign({},x);this.removeFilterFromRequest(m,g,[3657,3658,3659,3660,3661,3664,3665,3666,3667],[4853]),this.removeFilterFromRequest(m,g,[3668,3779],[4843,4844,4845,4846,4854,4855]),this.removeFilterFromRequest(m,g,[3659,3666],[4846]),m.table&&(m.table=m.table.split(",")[0]);let E="/Customer/PulseCharts/GetChartData";return i&&(E+="?cached=false"),this.webApi.postObserv(E,m,{params:{chartId:g}})}getDataAsExcel(g,x){return this.webApi.postObserv("/Customer/PulseCharts/GetChartDataAsExcel",x,{params:{chartId:g}})}parseJSON(g){try{return JSON.parse(g,function(x,i){return i&&"string"==typeof i&&0===i.indexOf("function")?new Function("return "+i)():i})}catch(x){return console.warn(x),{}}}}return d.\u0275fac=function(g){return new(g||d)(e.\u0275\u0275inject(a.f),e.\u0275\u0275inject(s.q))},d.\u0275prov=e.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac}),d})()},16712:(Se,pe,r)=>{"use strict";r.d(pe,{g:()=>i});var t=r(5e3),e=r(93075),a=r(23322),s=r(69808);function o(m,E){if(1&m&&(t.\u0275\u0275elementStart(0,"div",4),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&m){const C=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(C.defaultOne)}}function d(m,E){if(1&m&&(t.\u0275\u0275elementStart(0,"div",4),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&m){const C=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(C.defaultTwo)}}const u=function(m,E){return{checked:m,disabled:E}},g=()=>{},x={provide:e.NG_VALUE_ACCESSOR,useExisting:(0,t.forwardRef)(()=>i),multi:!0};let i=(()=>{class m{constructor(){this.innerValue=!1,this.onTouchedCallback=g,this.onChangeCallback=g,this.defaultOne="Off",this.defaultTwo="On",this.inverted=!1}get value(){return this.innerValue}set value(C){this.innerValue=C,this.onChangeCallback(this.inverted?!C:C)}onBlur(){this.onTouchedCallback()}writeValue(C){this.value=C,C!==this.value&&(this.value=this.inverted?!C:C)}registerOnChange(C){this.onChangeCallback=C}registerOnTouched(C){this.onTouchedCallback=C}setDisabledState(C){this.disabled=C}}return m.\u0275fac=function(C){return new(C||m)},m.\u0275cmp=t.\u0275\u0275defineComponent({type:m,selectors:[["pulse-checkbox-toggle"]],inputs:{inverted:"inverted",defaultOne:"defaultOne",defaultTwo:"defaultTwo"},features:[t.\u0275\u0275ProvidersFeature([x])],decls:5,vars:8,consts:[[1,"pulse-checkbox-toggle"],[3,"ngClass"],["class","text",4,"ngIf"],["type","checkbox",3,"ngModel","disabled","ngModelChange"],[1,"text"]],template:function(C,v){1&C&&(t.\u0275\u0275elementStart(0,"div",0)(1,"label",1),t.\u0275\u0275template(2,o,2,1,"div",2),t.\u0275\u0275template(3,d,2,1,"div",2),t.\u0275\u0275elementStart(4,"input",3),t.\u0275\u0275listener("ngModelChange",function(S){return v.value=S}),t.\u0275\u0275elementEnd()()()),2&C&&(t.\u0275\u0275advance(1),t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction2(5,u,v.value,v.disabled)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!v.value),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",v.value),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngModel",v.value)("disabled",v.disabled))},directives:[a.oO,s.mk,s.O5,e.CheckboxControlValueAccessor,e.NgControlStatus,e.NgModel],styles:['.pulse-checkbox-toggle[_ngcontent-%COMP%]{display:flex;position:relative;height:40px;min-width:60px;width:inherit}.pulse-checkbox-toggle[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed!important}.pulse-checkbox-toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none!important}.pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;margin-top:auto;margin-bottom:auto;position:relative;width:60px;height:30px;border-radius:30px;display:inline-block;transition:background-color .2s linear;border-width:1px;border-style:solid}.pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{left:0;right:0;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:100%;z-index:0;position:absolute;font-size:14px;margin:7px 0 0 21px}.pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:before{position:absolute;z-index:1;width:14px;height:14px;border-radius:14px;display:block;content:"";float:left;margin:7px 0 0 7px;transition:margin .2s linear}.pulse-checkbox-toggle[_ngcontent-%COMP%] .checked[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{z-index:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:100%;margin-left:0;margin-right:21px;position:absolute}.pulse-checkbox-toggle[_ngcontent-%COMP%] .checked[_ngcontent-%COMP%]:before{z-index:1;content:"";margin:7px 0 0 36px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%]{min-width:30px;height:18px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{height:12px;width:30px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:before{width:8px;height:8px;margin:.5px 0 0 1px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{line-height:0%;margin:6px 0 0 8px;font-size:8px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%] .checked[_ngcontent-%COMP%]:before{width:8px;height:8px;margin:1px 0 0 19px}.small[_nghost-%COMP%] .pulse-checkbox-toggle[_ngcontent-%COMP%] .checked[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{line-height:0%;margin:5px 0 0 -5px}']}),m})()},90809:(Se,pe,r)=>{"use strict";r.d(pe,{R:()=>o});var t=r(5e3),e=r(93075),a=r(69808);function s(d,u){1&d&&t.\u0275\u0275element(0,"option",4),2&d&&t.\u0275\u0275property("value",u.$implicit)}let o=(()=>{class d{constructor(){this.options=[],this.disabled=!1,this.placeholder="",this.hasDropdownIcon=!0,this.onChangeCallback=()=>{},this.comboboxInstanceId=d.instanceCount++}ngOnInit(){}writeValue(g){this.value=g}registerOnChange(g){this.onChangeCallback=g}registerOnTouched(){}propagateChange(g){this.onChangeCallback(g)}}return d.instanceCount=0,d.\u0275fac=function(g){return new(g||d)},d.\u0275cmp=t.\u0275\u0275defineComponent({type:d,selectors:[["pulse-combobox"]],inputs:{options:"options",disabled:"disabled",placeholder:"placeholder",hasDropdownIcon:"hasDropdownIcon"},features:[t.\u0275\u0275ProvidersFeature([{provide:e.NG_VALUE_ACCESSOR,useExisting:(0,t.forwardRef)(()=>d),multi:!0}])],decls:4,vars:8,consts:[[1,"combobox-wrapper"],[1,"pulse-input","form-control",3,"disabled","placeholder","ngModel","ngModelChange"],[3,"id"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(g,x){1&g&&(t.\u0275\u0275elementStart(0,"div",0)(1,"input",1),t.\u0275\u0275listener("ngModelChange",function(m){return x.value=m})("ngModelChange",function(m){return x.propagateChange(m)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(2,"datalist",2),t.\u0275\u0275template(3,s,1,1,"option",3),t.\u0275\u0275elementEnd()),2&g&&(t.\u0275\u0275classProp("combobox-wrapper--iconed",x.hasDropdownIcon),t.\u0275\u0275advance(1),t.\u0275\u0275property("disabled",x.disabled)("placeholder",x.placeholder)("ngModel",x.value),t.\u0275\u0275attribute("list","optionList-"+x.comboboxInstanceId),t.\u0275\u0275advance(1),t.\u0275\u0275property("id","optionList-"+x.comboboxInstanceId),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",x.options))},directives:[e.DefaultValueAccessor,e.NgControlStatus,e.NgModel,a.sg,e.NgSelectOption,e.\u0275NgSelectMultipleOption],styles:['input[_ngcontent-%COMP%], datalist[_ngcontent-%COMP%], option[_ngcontent-%COMP%]{font-family:Siemens Sans}input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none}.combobox-wrapper[_ngcontent-%COMP%]{position:relative;width:inherit}.combobox-wrapper.combobox-wrapper--iconed[_ngcontent-%COMP%]:after{position:absolute;right:10px;top:15px;color:#788791;font-family:pulseicons;content:"\\e609";font-size:10px;pointer-events:none;cursor:pointer}']}),d})()},558:(Se,pe,r)=>{"use strict";r.d(pe,{_:()=>a});var t=r(5e3),e=r(93075);let a=(()=>{class s{constructor(){this.optionList=[]}validate(d){const u=d.value;return("string"==typeof this.optionList[0]?this.optionList:this.optionList.map(x=>x.label)).find(x=>x===u)?null:{message:"value invalid"}}}return s.\u0275fac=function(d){return new(d||s)},s.\u0275dir=t.\u0275\u0275defineDirective({type:s,selectors:[["","pulseValueInListValidator",""]],inputs:{optionList:["pulseValueInListValidator","optionList"]},features:[t.\u0275\u0275ProvidersFeature([{provide:e.NG_VALIDATORS,useExisting:(0,t.forwardRef)(()=>s),multi:!0}])]}),s})()},31989:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>i});var t=r(5e3),e=r(16150),a=r.n(e),s=r(23753),o=r(80013),d=r(92198),u=r(1059),g=r(22868);const x=["pulsehighchartViewChild"];r(92407)(a()),r(33461)(a()),r(10217)(a()),r(4971)(a()),r(2112)(a()),r(86439)(a()),r(34737)(a()),r(65473)(a()),r(47664)(a());let i=(()=>{class m{constructor(){this.Highcharts=a(),this.chartReady=new t.EventEmitter,this.chartInstance=new t.EventEmitter}ngOnInit(){this.resizeStream$=(0,s.R)(window,"resize"),this.resizeStream$.pipe((0,o.b)(500),(0,d.h)(C=>C.target.innerWidth>300)).subscribe(C=>{this.reflow()})}ngAfterViewInit(){setTimeout(()=>{this.resizeStream$.pipe((0,u.O)(null),(0,g.b)(()=>this.reflow())).subscribe()})}get options(){return this._options}getChart(){return this._chartInstance}set options(C){const v=this;C.chart&&(C.chart.events=void 0!==C.chart.events?C.chart.events:{},C.chart.events.load=function(h){v.onChartReady()}),this.reset(C)}onChartReady(){this.chartReady.next()}reset(C){this._options=C,this._chartInstance&&void 0!==this._chartInstance&&this._chartInstance.destroy&&this._chartInstance.destroy(this._chartInstance),this._chartInstance=this.highchartViewChild.nativeElement,this._chartInstance=new(a().Chart)(this._chartInstance,C),this.chartInstance.emit(this._chartInstance),this._chartInstance.update({chart:{width:this._calculateWidth()}})}fullscreen(C){this._chartInstance.viewFullscreen()}_calculateWidth(){return this.highchartViewChild.nativeElement.offsetWidth}reflow(){this._chartInstance&&this._chartInstance.update({chart:{width:this._calculateWidth()}})}}return m.\u0275fac=function(C){return new(C||m)},m.\u0275cmp=t.\u0275\u0275defineComponent({type:m,selectors:[["pulse-highchart"]],viewQuery:function(C,v){if(1&C&&t.\u0275\u0275viewQuery(x,7),2&C){let h;t.\u0275\u0275queryRefresh(h=t.\u0275\u0275loadQuery())&&(v.highchartViewChild=h.first)}},inputs:{chartId:"chartId",options:"options"},outputs:{chartReady:"chartReady",chartInstance:"chartInstance"},decls:2,vars:0,consts:[[1,"pulsehighchartViewChild"],["pulsehighchartViewChild",""]],template:function(C,v){1&C&&t.\u0275\u0275element(0,"div",0,1)},styles:[".pulsehighchartViewChild[_ngcontent-%COMP%]{height:100%}"]}),m})()},64753:(Se,pe,r)=>{"use strict";r.d(pe,{H:()=>g});var t=r(5e3),e=r(22313),a=r(47626),s=r(11735),o=r(9133),d=r(54620),u=r(75531);let g=(()=>{class x{constructor(m,E,C,v,h,S){this.sanitizer=m,this.headerService=E,this.activeRoute=C,this.variables=v,this.projectService=h,this.languageService=S,this.sub=[]}ngOnInit(){if(this.activeRoute.snapshot.data&&this.activeRoute.snapshot.data.iframe){const m=["iframe"];let E=this.activeRoute.snapshot.data.iframe;E.startsWith("http")||(E=`${this.variables.oldApiUrl}/${this.projectService.projectId}${E}`),this.activeRoute.snapshot.params.id&&(E+=`/${this.activeRoute.snapshot.params.id}`),this.activeRoute.snapshot.params.actionId&&m.push(`action=${this.activeRoute.snapshot.params.actionId}`.toLowerCase()),Object.keys(this.activeRoute.snapshot.queryParams).forEach(C=>{m.push(`${C}=${this.activeRoute.snapshot.queryParams[C]}`.toLowerCase())}),this.link=this.sanitizer.bypassSecurityTrustResourceUrl(`${E}?${m.join("&")}`)}this.headerService.showHeader=!1}ngOnDestroy(){this.sub.forEach(m=>m.unsubscribe())}}return x.\u0275fac=function(m){return new(m||x)(t.\u0275\u0275directiveInject(e.DomSanitizer),t.\u0275\u0275directiveInject(a.r),t.\u0275\u0275directiveInject(s.gz),t.\u0275\u0275directiveInject(o.a),t.\u0275\u0275directiveInject(d.k),t.\u0275\u0275directiveInject(u.T))},x.\u0275cmp=t.\u0275\u0275defineComponent({type:x,selectors:[["pulse-iframe"]],decls:1,vars:1,consts:[[3,"src"]],template:function(m,E){1&m&&t.\u0275\u0275element(0,"iframe",0),2&m&&t.\u0275\u0275property("src",E.link,t.\u0275\u0275sanitizeResourceUrl)},styles:["iframe[_ngcontent-%COMP%]{position:absolute;height:100vh;border:none;width:100%}"]}),x})()},16427:(Se,pe,r)=>{"use strict";r.d(pe,{$:()=>o});var t=r(5e3),e=r(8929),a=r(80013),s=r(93075);let o=(()=>{class d{constructor(){this.modelChange=new t.EventEmitter,this.valueChanged=new e.xQ,this.debounceTime=200}changed(g){this.valueChanged.next(g)}ngOnInit(){this.valueChanged.pipe((0,a.b)(this.debounceTime)).subscribe(g=>{this.model=g,this.modelChange.emit(g)})}}return d.\u0275fac=function(g){return new(g||d)},d.\u0275cmp=t.\u0275\u0275defineComponent({type:d,selectors:[["pulse-input"]],inputs:{placeholder:"placeholder",model:"model",debounceTime:"debounceTime"},outputs:{modelChange:"modelChange"},decls:1,vars:2,consts:[[1,"pulse-input",3,"ngModel","placeholder","ngModelChange"]],template:function(g,x){1&g&&(t.\u0275\u0275elementStart(0,"input",0),t.\u0275\u0275listener("ngModelChange",function(m){return x.changed(m)}),t.\u0275\u0275elementEnd()),2&g&&t.\u0275\u0275property("ngModel",x.value)("placeholder",x.placeholder)},directives:[s.DefaultValueAccessor,s.NgControlStatus,s.NgModel],styles:[""]}),d})()},75229:(Se,pe,r)=>{"use strict";r.d(pe,{D:()=>t});class t{constructor(a,s){this.contactData=this.objectToMap(a.ContactData),a.Footer&&(this.info=a.Footer.displayText),this.interviewDate=a.Interview.Date,this.surveyName=a.Survey.Name,this.sections=this.mapActionInterviewSections(a.sections,s),this.interviewInformation=this.objectToMap(a.Interview)}mapActionInterviewSections(a,s){let o;return o=a.map(d=>({position:d.position,displayText:d.displayText,kpis:d.KPIs?this.mapKpis(d.KPIs,s):void 0,expanded:!0})),o}mapKpis(a,s){let o;return o=a.map(d=>({id:d.KpiId,answer:s.bypassSecurityTrustHtml(d.Answer),question:{label:d.QuestionLabel,text:d.QuestionText,block:d.questionBlock}})),o}objectToMap(a){const s=new Map;for(const o in a)a.hasOwnProperty(o)&&("InterviewDate"===o&&(a[o]=new Date(a[o]).toLocaleDateString()),s.set(o,a[o]));return s}}},5268:(Se,pe,r)=>{"use strict";r.d(pe,{e:()=>D});var t=r(40520),e=r(591),a=r(21086),s=r(27221),o=r(92198),d=r(24850),u=r(22868),g=r(75229),x=r(5e3),i=r(94761),m=r(22313);let E=(()=>{class Y{constructor(y,H){this.apiService=y,this.sanitizer=H,this.isInterviewPending$=new e.X(!1)}getInterview(y,H,$){const z="/api/SurveySingleInterview"+($?`/GetActionDetailByInterviewId/${y}/${$}`:`/GetActionDetail/${y}/${H}`);return this.isInterviewPending$.next(!0),this.apiService.get(z).pipe((0,s.K)(Z=>(this.isInterviewPending$.next(!1),(0,a.of)(Z))),(0,o.h)(Z=>!(Z instanceof t.UA)),(0,d.U)(Z=>new g.D(Z,this.sanitizer)),(0,u.b)(()=>this.isInterviewPending$.next(!1)))}}return Y.\u0275fac=function(y){return new(y||Y)(x.\u0275\u0275inject(i.s),x.\u0275\u0275inject(m.DomSanitizer))},Y.\u0275prov=x.\u0275\u0275defineInjectable({token:Y,factory:Y.\u0275fac}),Y})();var C=r(75531),v=r(69808),h=r(23322),S=r(32925),p=r(87436);function L(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"div",12)(1,"span",13),x.\u0275\u0275text(2),x.\u0275\u0275pipe(3,"translate"),x.\u0275\u0275elementEnd(),x.\u0275\u0275elementStart(4,"span",14),x.\u0275\u0275text(5),x.\u0275\u0275pipe(6,"translate"),x.\u0275\u0275elementEnd()()),2&Y){const y=x.\u0275\u0275nextContext().$implicit;x.\u0275\u0275advance(2),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(3,2,y.key)," "),x.\u0275\u0275advance(3),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(6,4,y.value)," ")}}function N(Y,_){if(1&Y&&(x.\u0275\u0275elementContainerStart(0),x.\u0275\u0275template(1,L,7,6,"div",11),x.\u0275\u0275elementContainerEnd()),2&Y){const y=_.$implicit;x.\u0275\u0275advance(1),x.\u0275\u0275property("ngIf",y.value)}}function j(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"div",3)(1,"div",4)(2,"span",5),x.\u0275\u0275text(3),x.\u0275\u0275pipe(4,"translate"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementStart(5,"div",6),x.\u0275\u0275template(6,N,2,1,"ng-container",7),x.\u0275\u0275pipe(7,"keyvalue"),x.\u0275\u0275elementEnd()()),2&Y){const y=x.\u0275\u0275nextContext().$implicit,H=x.\u0275\u0275nextContext();x.\u0275\u0275advance(3),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(4,2,"{ActionSI_InterviewData}")," "),x.\u0275\u0275advance(3),x.\u0275\u0275property("ngForOf",x.\u0275\u0275pipeBind2(7,4,y.interviewInformation,H.originalOrder))}}function P(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"div",12)(1,"span",13),x.\u0275\u0275text(2),x.\u0275\u0275pipe(3,"translate"),x.\u0275\u0275elementEnd(),x.\u0275\u0275elementStart(4,"span",14),x.\u0275\u0275text(5),x.\u0275\u0275pipe(6,"translate"),x.\u0275\u0275elementEnd()()),2&Y){const y=x.\u0275\u0275nextContext().$implicit;x.\u0275\u0275advance(2),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(3,2,y.key)," "),x.\u0275\u0275advance(3),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(6,4,y.value)," ")}}function I(Y,_){if(1&Y&&(x.\u0275\u0275elementContainerStart(0),x.\u0275\u0275template(1,P,7,6,"div",11),x.\u0275\u0275elementContainerEnd()),2&Y){const y=_.$implicit;x.\u0275\u0275advance(1),x.\u0275\u0275property("ngIf",y.value)}}function A(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"span",21),x.\u0275\u0275text(1),x.\u0275\u0275elementEnd()),2&Y){const y=x.\u0275\u0275nextContext(2).$implicit;x.\u0275\u0275advance(1),x.\u0275\u0275textInterpolate1(" Total: ",null==y?null:y.kpis.length," ")}}function O(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"div",22)(1,"div",23),x.\u0275\u0275text(2),x.\u0275\u0275pipe(3,"translate"),x.\u0275\u0275elementEnd(),x.\u0275\u0275elementStart(4,"div",24),x.\u0275\u0275element(5,"span",10),x.\u0275\u0275elementEnd()()),2&Y){const y=_.$implicit,H=x.\u0275\u0275nextContext(2).$implicit;x.\u0275\u0275styleProp("max-height",null!=H&&H.expanded?"1000px":"0px"),x.\u0275\u0275advance(2),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(3,4,y.question.text)," "),x.\u0275\u0275advance(3),x.\u0275\u0275property("innerHTML",y.answer,x.\u0275\u0275sanitizeHtml)}}function T(Y,_){if(1&Y){const y=x.\u0275\u0275getCurrentView();x.\u0275\u0275elementContainerStart(0),x.\u0275\u0275elementStart(1,"div",16),x.\u0275\u0275listener("click",function(){x.\u0275\u0275restoreView(y);const $=x.\u0275\u0275nextContext().$implicit;return x.\u0275\u0275nextContext(2).toggle($)}),x.\u0275\u0275elementStart(2,"div",17),x.\u0275\u0275element(3,"i",18),x.\u0275\u0275text(4),x.\u0275\u0275pipe(5,"translate"),x.\u0275\u0275template(6,A,2,1,"span",19),x.\u0275\u0275elementEnd()(),x.\u0275\u0275template(7,O,6,6,"div",20),x.\u0275\u0275elementContainerEnd()}if(2&Y){const y=x.\u0275\u0275nextContext().$implicit;x.\u0275\u0275advance(3),x.\u0275\u0275property("ngClass",null!=y&&y.expanded?"icon-arrow-link-large-up":"icon-arrow-link-large-down"),x.\u0275\u0275advance(1),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(5,4,null==y?null:y.displayText)," "),x.\u0275\u0275advance(2),x.\u0275\u0275property("ngIf",!(null!=y&&y.expanded)),x.\u0275\u0275advance(1),x.\u0275\u0275property("ngForOf",null==y?null:y.kpis)}}function c(Y,_){if(1&Y&&(x.\u0275\u0275elementContainerStart(0),x.\u0275\u0275template(1,T,8,6,"ng-container",15),x.\u0275\u0275elementContainerEnd()),2&Y){const y=_.$implicit;x.\u0275\u0275advance(1),x.\u0275\u0275property("ngIf",null==y?null:y.kpis)}}function M(Y,_){if(1&Y&&(x.\u0275\u0275elementStart(0,"div"),x.\u0275\u0275template(1,j,8,7,"div",2),x.\u0275\u0275elementStart(2,"div",3)(3,"div",4)(4,"span",5),x.\u0275\u0275text(5),x.\u0275\u0275pipe(6,"translate"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementStart(7,"div",6),x.\u0275\u0275template(8,I,2,1,"ng-container",7),x.\u0275\u0275pipe(9,"keyvalue"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementStart(10,"div",3)(11,"div",4)(12,"span",5),x.\u0275\u0275text(13),x.\u0275\u0275pipe(14,"translate"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementStart(15,"div",6)(16,"div",8)(17,"div",9),x.\u0275\u0275template(18,c,2,1,"ng-container",7),x.\u0275\u0275elementEnd()()()(),x.\u0275\u0275elementStart(19,"div",3)(20,"div",4)(21,"span",5),x.\u0275\u0275text(22),x.\u0275\u0275pipe(23,"translate"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementStart(24,"div",6),x.\u0275\u0275element(25,"span",10),x.\u0275\u0275pipe(26,"translate"),x.\u0275\u0275elementEnd()()()),2&Y){const y=_.$implicit,H=x.\u0275\u0275nextContext();x.\u0275\u0275advance(1),x.\u0275\u0275property("ngIf",y.interviewInformation),x.\u0275\u0275advance(4),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(6,7,"{SingleInterview.Section.CompanyInformation}")," "),x.\u0275\u0275advance(3),x.\u0275\u0275property("ngForOf",x.\u0275\u0275pipeBind2(9,9,y.contactData,H.originalOrder)),x.\u0275\u0275advance(5),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(14,12,"{General.Question}")," "),x.\u0275\u0275advance(5),x.\u0275\u0275property("ngForOf",y.sections),x.\u0275\u0275advance(4),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(23,14,"General Infos")," "),x.\u0275\u0275advance(3),x.\u0275\u0275property("innerHTML",x.\u0275\u0275pipeBind1(26,16,y.info),x.\u0275\u0275sanitizeHtml)}}function w(Y,_){1&Y&&(x.\u0275\u0275elementContainerStart(0),x.\u0275\u0275elementStart(1,"div",26),x.\u0275\u0275element(2,"i",27),x.\u0275\u0275elementStart(3,"span",28),x.\u0275\u0275text(4),x.\u0275\u0275pipe(5,"translate"),x.\u0275\u0275elementEnd()(),x.\u0275\u0275elementContainerEnd()),2&Y&&(x.\u0275\u0275advance(4),x.\u0275\u0275textInterpolate1(" ",x.\u0275\u0275pipeBind1(5,1,"NO_INTERVIEW")," "))}function R(Y,_){if(1&Y&&(x.\u0275\u0275element(0,"pulse-spinner",25),x.\u0275\u0275pipe(1,"async"),x.\u0275\u0275template(2,w,6,3,"ng-container",15),x.\u0275\u0275pipe(3,"async")),2&Y){const y=x.\u0275\u0275nextContext();x.\u0275\u0275property("isRelative",!0)("isSpin",x.\u0275\u0275pipeBind1(1,3,y.interviewService.isInterviewPending$)),x.\u0275\u0275advance(2),x.\u0275\u0275property("ngIf",!x.\u0275\u0275pipeBind1(3,5,y.interviewService.isInterviewPending$))}}let D=(()=>{class Y{constructor(y,H){this.interviewService=y,this.languageService=H,this.originalOrder=($,K)=>0}set interviewId(y){this._interviewId=y}set actionId(y){this._actionId=y}ngOnChanges(){this.getInterview()}toggle(y){y.expanded=!y.expanded}getInterview(){this.projectId&&(this._interviewId||this._actionId)&&(this.interview$=this.interviewService.getInterview(this.projectId,this._actionId,this._interviewId))}}return Y.\u0275fac=function(y){return new(y||Y)(x.\u0275\u0275directiveInject(E),x.\u0275\u0275directiveInject(C.T))},Y.\u0275cmp=x.\u0275\u0275defineComponent({type:Y,selectors:[["pulse-survey-interview"]],inputs:{projectId:"projectId",interviewId:"interviewId",actionId:"actionId"},features:[x.\u0275\u0275ProvidersFeature([E]),x.\u0275\u0275NgOnChangesFeature],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["emptyOrLoadState",""],["class","section",4,"ngIf"],[1,"section"],[1,"section-header"],[1,"section-title"],[1,"section-body"],[4,"ngFor","ngForOf"],[1,"pulse-table"],[1,"pulse-table-body"],[3,"innerHTML"],["class","data-field",4,"ngIf"],[1,"data-field"],[1,"data-label"],[1,"data-value"],[4,"ngIf"],[1,"pulse-table-row",2,"background-color","#ebf0f5","cursor","pointer",3,"click"],[1,"pulse-table-cell","col-span-12","title"],[1,"accordion-toggle",3,"ngClass"],["class","total-count",4,"ngIf"],["class","pulse-table-row nohover kpi-panel","style","background-color: #FFF;",3,"max-height",4,"ngFor","ngForOf"],[1,"total-count"],[1,"pulse-table-row","nohover","kpi-panel",2,"background-color","#FFF"],[1,"pulse-table-cell","col-span-4","left","key"],[1,"pulse-table-cell","col-span-4","left"],[3,"isRelative","isSpin"],[1,"empty-state","empty-state--static"],[1,"icon-search"],[1,"empty-state__title"]],template:function(y,H){if(1&y&&(x.\u0275\u0275template(0,M,27,18,"div",0),x.\u0275\u0275pipe(1,"async"),x.\u0275\u0275template(2,R,4,7,"ng-template",null,1,x.\u0275\u0275templateRefExtractor)),2&y){const $=x.\u0275\u0275reference(3);x.\u0275\u0275property("ngIf",x.\u0275\u0275pipeBind1(1,2,H.interview$))("ngIfElse",$)}},directives:[v.O5,v.sg,h.oO,v.mk,S.O],pipes:[v.Ov,p.k,v.Nd],styles:["[_nghost-%COMP%]{width:100%;position:relative}.spinner[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%}.section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{height:21px;margin-bottom:20px;border-bottom:2px solid #ebf0f5}.section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{padding-right:10px;border:none;background-color:#fff;font-size:25px;font-weight:500;color:#009898}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:10px}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .data-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px;display:flex}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .data-field[_ngcontent-%COMP%] .data-label[_ngcontent-%COMP%]{min-width:150px;font-weight:300;color:#00646e;font-weight:500}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .data-field[_ngcontent-%COMP%] .data-value[_ngcontent-%COMP%]{min-width:200px}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%]{border-top:1px solid #becdd7}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row.nohover[_ngcontent-%COMP%]:hover{background-color:#fff!important}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row.kpi-panel[_ngcontent-%COMP%]{overflow:hidden;transition:max-height .2s ease-out}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]{padding:5px}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .total-count[_ngcontent-%COMP%]{padding-right:10px}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%] .accordion-toggle[_ngcontent-%COMP%]{float:right;position:relative;top:4px}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell.title[_ngcontent-%COMP%]{font-size:16px;font-weight:400}.section[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%] .pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{color:#00646e;font-weight:300}"]}),Y})()},93144:(Se,pe,r)=>{"use strict";r.d(pe,{e:()=>a});var t=r(5e3),e=r(11735);let a=(()=>{class s{constructor(d){this.router=d;const u=window.location.hash;if(u&&u.startsWith("#/cfr")){const g=u.split("#/cfr")[1];this.router.navigateByUrl("/repint"+g)}else this.router.navigateByUrl("/repint")}ngOnInit(){}}return s.\u0275fac=function(d){return new(d||s)(t.\u0275\u0275directiveInject(e.F0))},s.\u0275cmp=t.\u0275\u0275defineComponent({type:s,selectors:[["pulse-redirect"]],decls:0,vars:0,template:function(d,u){},styles:[""]}),s})()},53527:(Se,pe,r)=>{"use strict";r.d(pe,{N:()=>s,q:()=>a});var t=r(591),e=r(5e3);class a{constructor(){this.scale=new t.X(s.Siemens),this.types=[s.Decimal,s.Integer,s.Thousand,s.Million,s.MillionFixed,s.Siemens,s.SiemensMillion,s.SiemensCompare],this.disabled=!1}static FormatValue(d,u,g=0){if(isNaN(d)||!isFinite(d))return""+d;if(0===g)return parseInt((d/u).toFixed(0),10).toLocaleString().split(a.ThousandsSep).join(a.config.ThousandsSep);const x=(d/u).toFixed(g).split(a.DecimalPointFix);return parseInt(x[0],10).toLocaleString().split(a.ThousandsSep).join(a.config.ThousandsSep)+a.config.DecimalPoint+x[1]}static FormatSiemens(d,u=0){if(0===u)return this.siemensSeb((d/1e6).toFixed(0));const x=(d/1e6).toFixed(u).split(a.DecimalPointFix);return this.siemensSeb(x[0])+a.SiemensNumberSymbol+x[1]}static siemensSeb(d){const u=parseInt(d,10).toLocaleString().split(a.ThousandsSep);let g="";return u.length>1&&(g=a.SiemensNumberSymbol+a.SiemensNumberSymbol+u.pop()),u.join("")+g}static FormatSiemensFixed(d,u=0){let i="'";for(d/=1e6;Math.abs(d)>=1e3;)i+="'",d/=1e3;const m=parseFloat(d.toFixed(u)).toLocaleString();return-1!==m.indexOf(a.DecimalPoint)?m.replace(a.DecimalPoint,i):m+i+(u>0?0:"")}setScale(d){this.scale.value.toString()!==d&&this.scale.next(d)}getValue(d){return d.toString()}getScale(){return+this.scale.value}getScaleValue(){switch(this.scale.value){case s.Decimal:return 1;case s.Thousand:return 1e3;case s.Million:case s.MillionFixed:return 1e6;default:return 1}}getFraction(){const d=this.scale.value.split(a.config.ThousandsSep);return d.length>1?d[1].length:0}formatNumber(d,u,g){if(null==d)return null;if(!isFinite(d))return d.toString();if(g&&(d*=-1),u)switch(u){case s.Integer:return parseInt(d.toFixed(0),10).toLocaleString().split(a.ThousandsSep).join(a.config.ThousandsSep);case s.Decimal:return a.FormatValue(d,1,2)}else switch(this.scale.value){case s.Decimal:return a.FormatValue(d,1,2);case s.Integer:return a.FormatValue(d,1,0);case s.Thousand:return a.FormatValue(d,1e3,0);case s.Million:return a.FormatValue(d,1e6,0);case s.MillionFixed:return a.FormatValue(d,1e6,1);case s.Siemens:return a.FormatSiemensFixed(d,1);case s.SiemensMillion:return a.FormatSiemensFixed(d,0);case s.SiemensCompare:return a.FormatSiemens(d,1);default:return d.toLocaleString().split(a.DecimalPoint).join("_").split(a.ThousandsSep).join(a.config.ThousandsSep).split("_").join(a.config.DecimalPoint)}}}a.config={DecimalPoint:",",ThousandsSep:"."},a.DecimalPoint=.1.toLocaleString()[1],a.DecimalPointFix=(0).toFixed(1)[1],a.ThousandsSep=1e4.toLocaleString()[2],a.SiemensNumberSymbol="'",a.\u0275fac=function(d){return new(d||a)},a.\u0275prov=e.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac});var s=(()=>{return(o=s||(s={})).Decimal="1,00",o.Integer="1",o.Thousand="1.000",o.Million="1.000.000",o.MillionFixed="1.000.000,0",o.Siemens="1'0",o.SiemensMillion="1'",o.SiemensCompare="1\"000'0",s;var o})()},19611:(Se,pe,r)=>{"use strict";r.d(pe,{B:()=>s});var t=r(5e3),e=r(93075),a=r(82945);let s=(()=>{class o{constructor(){this.searchKeys=[],this.disabledFilter=!1,this.autofocus=!1,this.arrayChange=new t.EventEmitter,this.searchTextChange=new t.EventEmitter}ngOnInit(){}filterValues(){this.disabledFilter||(this.filteredArray=[],this.filteredArray=0===this.searchText.length?this.arrayToFilter.slice(0):this.arrayToFilter.filter(u=>-1!==Object.keys(u).filter(g=>this.searchKeys.includes(g)).map(g=>String(u[g])).join("|").toLowerCase().indexOf(this.searchText.toLowerCase())||!this.searchText),this.arrayChange.emit(this.filteredArray)),this.searchTextChange.emit(this.searchText)}}return o.\u0275fac=function(u){return new(u||o)},o.\u0275cmp=t.\u0275\u0275defineComponent({type:o,selectors:[["pulse-search-box"]],inputs:{searchText:"searchText",searchKeys:"searchKeys",placeholderText:"placeholderText",arrayToFilter:"arrayToFilter",disabledFilter:"disabledFilter",autofocus:"autofocus"},outputs:{arrayChange:"arrayChange",searchTextChange:"searchTextChange"},decls:3,vars:3,consts:[[1,"search-box"],["type","text",1,"search-input",3,"pulseAutofocus","placeholder","ngModel","ngModelChange","input"],[1,"icon-search"]],template:function(u,g){1&u&&(t.\u0275\u0275elementStart(0,"div",0)(1,"input",1),t.\u0275\u0275listener("ngModelChange",function(i){return g.searchText=i})("input",function(){return g.filterValues()}),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(2,"i",2),t.\u0275\u0275elementEnd()),2&u&&(t.\u0275\u0275advance(1),t.\u0275\u0275propertyInterpolate("placeholder",g.placeholderText),t.\u0275\u0275property("pulseAutofocus",g.autofocus)("ngModel",g.searchText))},directives:[e.DefaultValueAccessor,a.U,e.NgControlStatus,e.NgModel],styles:[".search-box[_ngcontent-%COMP%]{width:100%;position:relative;margin-bottom:20px;border:none;overflow:visible}.search-input[_ngcontent-%COMP%]{width:100%;padding:12px 10px 8px;border:1px solid transparent;font-size:120%;outline:none;cursor:text}.search-input[_ngcontent-%COMP%]:focus{border:1px solid #3c464b}.icon-search[_ngcontent-%COMP%]{position:absolute;bottom:1px;right:0px;width:25px;height:25px}"]}),o})()},9200:(Se,pe,r)=>{"use strict";r.d(pe,{n:()=>_t});var t=r(5e3),e=r(11735),a=r(70697),s=r(591),o=r(61715),d=r(22868),u=r(24850),g=r(8681),x=r(53716),i=r(46809),m=r(75531),E=r(22324),C=r(77093),v=r(87436);let h=(()=>{class Ct{constructor(Le){this.languageService=Le}ngOnInit(){}}return Ct.\u0275fac=function(Le){return new(Le||Ct)(t.\u0275\u0275directiveInject(m.T))},Ct.\u0275cmp=t.\u0275\u0275defineComponent({type:Ct,selectors:[["pulse-help-section-dialog"]],inputs:{title:"title",content:"content"},decls:12,vars:9,consts:[[3,"minHeight","minWidth"],["dialog",""],[3,"innerHTML"],[1,"modal-buttons"],["fxLayout","row","fxLayoutAlign","end end","fxLayoutGap","20px"],["fxFlex","25%",1,"pulse-btn","cancel",3,"click"],[1,"icon-check-mark"]],template:function(Le,ot){if(1&Le){const He=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"pulse-dialog",0,1)(2,"h3"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(5,"div",2),t.\u0275\u0275elementStart(6,"div",3)(7,"div",4)(8,"button",5),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(He),t.\u0275\u0275reference(1).close()}),t.\u0275\u0275element(9,"i",6),t.\u0275\u0275text(10),t.\u0275\u0275pipe(11,"translate"),t.\u0275\u0275elementEnd()()()()}2&Le&&(t.\u0275\u0275property("minHeight",540)("minWidth",960),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(4,5,ot.title)," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("innerHTML",ot.languageService.translateHTML(ot.content),t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(11,7,"OK"),""))},directives:[E.a,C.xw,C.Wh,C.SQ,C.yH],pipes:[v.k],styles:[""]}),Ct})();var S=r(22313),p=r(4371),L=r(98613),N=r(54620),j=r(9133),P=r(97454),I=r(27671),A=r(89055),O=r(30745),T=r(74564),c=r(56551),M=r(23328),w=r(65351);const R=function(Ct){return[Ct]};function D(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275namespaceSVG(),t.\u0275\u0275namespaceHTML(),t.\u0275\u0275elementStart(0,"div",35),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().usertrackingService.setTransitionItem("project-title")}),t.\u0275\u0275element(1,"i",36),t.\u0275\u0275elementStart(2,"a"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("routerLink",t.\u0275\u0275pureFunction1(8,R,Le.link)),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("invisible",Le.service.expandSideNavigation.value),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("invisible",!Le.service.expandSideNavigation.value),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,6,Le.service.title))}}function Y(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275namespaceSVG(),t.\u0275\u0275namespaceHTML(),t.\u0275\u0275elementStart(0,"div",37),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().openExternalLink()}),t.\u0275\u0275element(1,"i",36),t.\u0275\u0275elementStart(2,"a"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275classProp("invisible",Le.service.expandSideNavigation.value),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("invisible",!Le.service.expandSideNavigation.value),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,5,Le.service.title))}}function _(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"div",38),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275elementEnd()),2&Ct){const Le=Bt.ngIf;t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate2(" (",t.\u0275\u0275pipeBind1(2,2,"U_HEAD_DELIGATION_03")," ",Le,") ")}}function y(Ct,Bt){1&Ct&&t.\u0275\u0275element(0,"i",39)}const H=function(Ct){return{selected:Ct}};function $(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",40),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("bookmark",!He.service.submenu.bookmark)}),t.\u0275\u0275elementStart(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",41),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6,"Bookmarks"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275element(7,"i",39),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(1,H,Le.service.submenu.bookmark))}}function K(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"span",45),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(null==Le.notificationCenter?null:Le.notificationCenter.unreadnotificationsCount)}}function z(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().clickNotificationCenterItem()}),t.\u0275\u0275elementStart(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",43),t.\u0275\u0275template(4,K,2,1,"span",44),t.\u0275\u0275elementStart(5,"div",15)(6,"div"),t.\u0275\u0275text(7,"Notification Center"),t.\u0275\u0275elementEnd()()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(2,H,Le.service.submenu.notificationcenter)),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",(null==Le.notificationCenter?null:Le.notificationCenter.unreadnotificationsCount)>0)}}function G(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"li")(2,"a",47),t.\u0275\u0275listener("click",function(){const $e=t.\u0275\u0275restoreView(Le).$implicit;return t.\u0275\u0275nextContext(2).applyNavigationGroup($e.key,$e.value,!0)}),t.\u0275\u0275text(3),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()}if(2&Ct){const Le=Bt.$implicit;t.\u0275\u0275advance(2),t.\u0275\u0275attribute("title",Le.key),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate(Le.key)}}function Z(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"ul",46),t.\u0275\u0275pipe(1,"async"),t.\u0275\u0275pipe(2,"async"),t.\u0275\u0275template(3,G,4,2,"ng-container",24),t.\u0275\u0275pipe(4,"async"),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275styleProp("visibility",Le.service.expandSideNavigation.value?"visible":"hidden"),t.\u0275\u0275property("ngClass",t.\u0275\u0275pipeBind1(1,4,Le.activeGroup)?"active-"+t.\u0275\u0275pipeBind1(2,6,Le.activeGroup):""),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngForOf",t.\u0275\u0275pipeBind1(4,8,Le.navigationGroups))}}function B(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",50,51)(2,"pulse-sidebar-navigationitem",52),t.\u0275\u0275listener("itemClick",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext(3).onItemClick()}),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275reference(1),ot=t.\u0275\u0275nextContext().$implicit,He=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("id",null==ot.data?null:ot.data.introId),t.\u0275\u0275advance(2),t.\u0275\u0275property("parentPath",He.link)("item",ot)("navigationElement",Le)}}function X(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,B,3,4,"li",49),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=Bt.$implicit,ot=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.checkActiveGroup(null==Le?null:Le.group)&&ot.service.showItem(Le))}}function ee(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"ul",48),t.\u0275\u0275template(1,X,2,1,"ng-container",24),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",Le.service.navigationItemsTop)}}function le(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",50,51)(2,"pulse-sidebar-navigationitem",52),t.\u0275\u0275listener("itemClick",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext(3).onItemClick()}),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275reference(1),ot=t.\u0275\u0275nextContext().$implicit,He=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("id",null==ot.data?null:ot.data.introId),t.\u0275\u0275advance(2),t.\u0275\u0275property("parentPath",He.link)("item",ot)("navigationElement",Le)}}function de(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,le,3,4,"li",49),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=Bt.$implicit,ot=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.showItem(Le))}}function fe(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"ul",48),t.\u0275\u0275template(1,de,2,1,"ng-container",24),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",Le.service.navigationItemsTop)}}function te(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"li",50,51),t.\u0275\u0275element(2,"pulse-sidebar-navigationitem",54),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275reference(1),ot=t.\u0275\u0275nextContext().$implicit,He=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("id",null==ot.data?null:ot.data.introId),t.\u0275\u0275advance(2),t.\u0275\u0275property("parentPath",He.link)("item",ot)("navigationElement",Le)}}function ce(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,te,3,4,"li",49),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=Bt.$implicit,ot=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.showItem(Le))}}function oe(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"ul",53),t.\u0275\u0275template(1,ce,2,1,"ng-container",24),t.\u0275\u0275elementEnd()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",Le.service.navigationItemsExtra)}}function se(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().showSurveyIntroVideo()}),t.\u0275\u0275elementStart(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",55),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6,"Intro"),t.\u0275\u0275elementEnd()()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(1,H,Le.service.submenu.news))}}function ue(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",50,51)(2,"pulse-sidebar-navigationitem",52),t.\u0275\u0275listener("itemClick",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext(2).onItemClick()}),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275reference(1),ot=t.\u0275\u0275nextContext().$implicit,He=t.\u0275\u0275nextContext();t.\u0275\u0275property("id",null==ot.data?null:ot.data.introId),t.\u0275\u0275advance(2),t.\u0275\u0275property("parentPath",He.link)("item",ot)("navigationElement",Le)}}function _e(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,ue,3,4,"li",49),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=Bt.$implicit,ot=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.showItem(Le))}}function Ce(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("news",!He.service.submenu.news),He.usertrackingService.trackAction("sidebar","news")}),t.\u0275\u0275elementStart(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",43),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6,"News"),t.\u0275\u0275elementEnd()()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(1,H,Le.service.submenu.news))}}function me(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("guide",!He.service.submenu.guide)}),t.\u0275\u0275elementStart(1,"div",56)(2,"a"),t.\u0275\u0275element(3,"i",57),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275element(8,"i",39),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(4,H,Le.service.submenu.guide)),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(7,2,"SUBSIDEMENU.GUIDE"))}}function we(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("support",!He.service.submenu.support)}),t.\u0275\u0275elementStart(1,"div",58)(2,"a"),t.\u0275\u0275element(3,"i",59),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275element(8,"i",39),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(6,H,Le.service.submenu.support)),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("badge",Le.service.badgeShow()),t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(7,4,"SUBSIDEMENU.SUPPORT"))}}function Re(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"li")(1,"div",28)(2,"a",60),t.\u0275\u0275element(3,"i",61),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()()()()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(2),t.\u0275\u0275property("href",Le.service.mailto,t.\u0275\u0275sanitizeUrl),t.\u0275\u0275advance(4),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(7,2,"SUBSIDEMENU.CONTACT"))}}function Ne(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("helpandsupport",!He.service.submenu.helpandsupport)}),t.\u0275\u0275elementStart(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",62),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275element(8,"i",39),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(6,H,Le.service.submenu.helpandsupport)),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("badge",Le.service.isGlobalBadge),t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(7,4,"SUBSIDEMENU.HELPANDSUPPORT"))}}function Ge(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",42),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext();return He.service.showSubmenu("language",!He.service.submenu.language)}),t.\u0275\u0275elementStart(1,"div",63)(2,"a"),t.\u0275\u0275element(3,"i",62),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275element(8,"i",39),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(4,H,Le.service.submenu.language)),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(7,2,Le.activeLanguageName))}}function Pe(Ct,Bt){1&Ct&&(t.\u0275\u0275elementStart(0,"li",64)(1,"div",28)(2,"a"),t.\u0275\u0275element(3,"i",65),t.\u0275\u0275elementStart(4,"div",15)(5,"div"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()()()()()),2&Ct&&(t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(7,1,"FOOTER")," "))}function Ae(Ct,Bt){if(1&Ct&&t.\u0275\u0275element(0,"pulse-bookmark",66),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("bookmarkPrefix",Le.link)("isMobile",Le.service.isMobile)}}function ve(Ct,Bt){if(1&Ct&&t.\u0275\u0275element(0,"i"),2&Ct){const Le=t.\u0275\u0275nextContext().$implicit;t.\u0275\u0275classMap(Le.icon)}}function Oe(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"i",47),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext(2).callAction(He)}),t.\u0275\u0275elementEnd()}if(2&Ct){const Le=t.\u0275\u0275nextContext().$implicit;t.\u0275\u0275classMapInterpolate1("icon-",Le["action-icon"]," action")}}const Be=function(Ct){return{"highlight active":Ct}};function ze(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li")(1,"div",70),t.\u0275\u0275listener("click",function(){const $e=t.\u0275\u0275restoreView(Le).$implicit;return t.\u0275\u0275nextContext(2).call($e)}),t.\u0275\u0275elementStart(2,"a")(3,"div",71),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275template(7,ve,1,3,"i",72),t.\u0275\u0275elementEnd()(),t.\u0275\u0275template(8,Oe,1,3,"i",73),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=Bt.$implicit;t.\u0275\u0275advance(1),t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(9,Be,Le.active)),t.\u0275\u0275advance(2),t.\u0275\u0275propertyInterpolate("title",t.\u0275\u0275pipeBind1(4,5,Le.info)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(6,7,Le.lang)," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",Le.icon),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",Le.action)}}const qe=function(Ct){return{mobile:Ct}};function xt(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",67)(1,"div",2)(2,"div"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"i",68),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().service.showSubmenu("language",!1)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(6,"ul",69),t.\u0275\u0275template(7,ze,9,11,"li",24),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(5,qe,Le.service.isMobile)),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,3,"SUBSIDEMENU.LANGUAGE")),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngForOf",Le.languages)}}function At(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",81),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext(3).openHelpPopup(He)}),t.\u0275\u0275elementStart(1,"a",82)(2,"div",71),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275text(4),t.\u0275\u0275pipe(5,"translate"),t.\u0275\u0275elementEnd()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext().$implicit,ot=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(2),t.\u0275\u0275classProp("badge",ot.service.showBadge(Le)),t.\u0275\u0275propertyInterpolate("title",t.\u0275\u0275pipeBind1(3,4,Le.titleKey)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(5,6,Le.titleKey)," ")}}function Lt(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",28)(1,"a",83),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext(3).clickedItem(He.id)}),t.\u0275\u0275elementStart(2,"div",71),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275text(4),t.\u0275\u0275pipe(5,"translate"),t.\u0275\u0275elementEnd()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext().$implicit,ot=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(1),t.\u0275\u0275property("href",Le.contentKey,t.\u0275\u0275sanitizeUrl),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("badge",ot.service.showBadge(Le)),t.\u0275\u0275propertyInterpolate("title",t.\u0275\u0275pipeBind1(3,5,Le.titleKey)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(5,7,Le.titleKey)," ")}}function qt(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",28)(1,"a",84),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext(3).clickedItem(He.id)}),t.\u0275\u0275elementStart(2,"div",71),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275text(4),t.\u0275\u0275pipe(5,"translate"),t.\u0275\u0275elementEnd()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext().$implicit,ot=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(1),t.\u0275\u0275propertyInterpolate1("href","mailto:",Le.contentKey,"",t.\u0275\u0275sanitizeUrl),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("badge",ot.service.showBadge(Le)),t.\u0275\u0275propertyInterpolate("title",t.\u0275\u0275pipeBind1(3,5,Le.titleKey)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(5,7,Le.titleKey)," ")}}function yt(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"li",78),t.\u0275\u0275template(1,At,6,8,"div",79),t.\u0275\u0275template(2,Lt,6,9,"div",80),t.\u0275\u0275template(3,qt,6,9,"div",80),t.\u0275\u0275elementEnd()),2&Ct){const Le=Bt.$implicit;t.\u0275\u0275property("ngSwitch",!0),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngSwitchCase","Image"===Le.type||"Popup"===Le.type||"Video"===Le.type||"Document"===Le.type),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngSwitchCase","Link"===Le.type),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngSwitchCase","Mail"===Le.type)}}function Wt(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementStart(0,"ul",75)(1,"div",76),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(5,yt,4,4,"li",77),t.\u0275\u0275pipe(6,"orderBy"),t.\u0275\u0275elementEnd()),2&Ct){const Le=Bt.$implicit;t.\u0275\u0275property("ngSwitch",!0),t.\u0275\u0275advance(1),t.\u0275\u0275propertyInterpolate("title",t.\u0275\u0275pipeBind1(2,4,Le.key)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(4,6,Le.key)," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",t.\u0275\u0275pipeBind2(6,8,Le.value,"order"))}}function gt(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",67)(1,"div",2)(2,"div"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"i",68),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().service.showSubmenu("helpandsupport",!1)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275template(6,Wt,7,11,"ul",74),t.\u0275\u0275pipe(7,"groupBy"),t.\u0275\u0275pipe(8,"orderBy"),t.\u0275\u0275elementEnd()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(11,qe,Le.service.isMobile)),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,3,"SUBSIDEMENU.HELPANDSUPPORT")),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngForOf",t.\u0275\u0275pipeBind2(7,5,t.\u0275\u0275pipeBind2(8,8,Le.helpSectionItems,"order"),"category"))}}const Et=function(Ct,Bt){return{"icon-pencil":Ct,"icon-pencil-off":Bt}};function Jt(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li")(1,"div",28)(2,"a")(3,"div",85),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(Le);const He=t.\u0275\u0275nextContext(2);return He.variables.enableEdit=!He.variables.enableEdit,He.variables.enableEditSubject.next(He.variables.enableEdit)}),t.\u0275\u0275element(4,"i",86),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275elementEnd()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(4),t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction2(4,Et,!Le.variables.enableEdit,Le.variables.enableEdit)),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(6,2,"Admin Edit Mode")," ")}}function en(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li")(1,"div",28)(2,"a")(3,"div",85),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext(2).onModalOpen("userModal")}),t.\u0275\u0275element(4,"i",87),t.\u0275\u0275text(5," Proxy "),t.\u0275\u0275elementEnd()()()()}}function On(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li")(1,"div",28)(2,"a")(3,"div",85),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext(2).logoutDelegation()}),t.\u0275\u0275element(4,"i",87),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275elementEnd()()()()}2&Ct&&(t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(6,1,"U_HEAD_DELIGATION_04")," "))}function Wn(Ct,Bt){1&Ct&&t.\u0275\u0275elementContainer(0)}function an(Ct,Bt){1&Ct&&t.\u0275\u0275elementContainer(0)}const kn=function(){return{modalName:"userDelegationsViewModal",icon:"icon-users",title:"U_HEAD_DELIGATION_01"}},vn=function(){return{modalName:"userDelegationsConfigModal",icon:"icon-career",title:"U_DELEGATION_VIEW_07"}};function Dn(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"li"),t.\u0275\u0275template(2,Wn,1,0,"ng-container",88),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"li"),t.\u0275\u0275template(4,an,1,0,"ng-container",88),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&Ct){t.\u0275\u0275nextContext(2);const Le=t.\u0275\u0275reference(57);t.\u0275\u0275advance(2),t.\u0275\u0275property("ngTemplateOutlet",Le)("ngTemplateOutletContext",t.\u0275\u0275pureFunction0(4,kn)),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngTemplateOutlet",Le)("ngTemplateOutletContext",t.\u0275\u0275pureFunction0(5,vn))}}function An(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li")(1,"div",28)(2,"a")(3,"div",85),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le).$implicit.callback()}),t.\u0275\u0275element(4,"i",86),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275elementEnd()()()()}if(2&Ct){const Le=Bt.$implicit;t.\u0275\u0275advance(4),t.\u0275\u0275property("ngClass",Le.icon),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(6,2,Le.name)," ")}}function Zn(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,An,7,4,"li",24),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",Le.userItems)}}function Qn(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",67)(1,"div",2)(2,"div"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"i",68),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().service.showSubmenu("user",!1)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(6,"ul",69),t.\u0275\u0275template(7,Jt,7,7,"li",25),t.\u0275\u0275template(8,en,6,0,"li",25),t.\u0275\u0275pipe(9,"async"),t.\u0275\u0275template(10,On,7,3,"li",25),t.\u0275\u0275pipe(11,"async"),t.\u0275\u0275template(12,Dn,5,6,"ng-container",25),t.\u0275\u0275pipe(13,"async"),t.\u0275\u0275template(14,Zn,2,1,"ng-container",25),t.\u0275\u0275elementEnd()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(15,qe,Le.service.isMobile)),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,7,"User")),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",!Le.isSges&&1===Le.isAdmin),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",-1!==Le.userService.roles.indexOf("canproxy")&&!t.\u0275\u0275pipeBind1(9,9,Le.userService.isDelegationMode$)),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",t.\u0275\u0275pipeBind1(11,11,Le.delegateUser$)),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!t.\u0275\u0275pipeBind1(13,13,Le.userService.isDelegationMode$)),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",Le.userItems&&Le.userItems.length>0&&Le.isSges)}}function hi(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",67)(1,"div",2)(2,"div",89),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"i",68),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().service.showSubmenu("guide",!1)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(6,"ul",69)(7,"li")(8,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().startGuide("general")}),t.\u0275\u0275elementStart(9,"a")(10,"div",15),t.\u0275\u0275text(11),t.\u0275\u0275pipe(12,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275elementStart(13,"li")(14,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().startGuide("page")}),t.\u0275\u0275elementStart(15,"a")(16,"div",15),t.\u0275\u0275text(17),t.\u0275\u0275pipe(18,"translate"),t.\u0275\u0275elementEnd()()()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(10,qe,Le.service.isMobile)),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,4,"SUBSIDEMENU.GUIDE")),t.\u0275\u0275advance(8),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(12,6,"HM_05_01")),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(18,8,"HM_05_02"))}}function Gi(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",67)(1,"div",2)(2,"div",89),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(5,"i",68),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().service.showSubmenu("support",!1)}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(6,"ul",69)(7,"li")(8,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().open("yammer")}),t.\u0275\u0275elementStart(9,"a")(10,"div",15),t.\u0275\u0275text(11),t.\u0275\u0275pipe(12,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275elementStart(13,"li")(14,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().open("homepage")}),t.\u0275\u0275elementStart(15,"a")(16,"div",15),t.\u0275\u0275text(17),t.\u0275\u0275pipe(18,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275elementStart(19,"li")(20,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().open("video")}),t.\u0275\u0275elementStart(21,"a")(22,"div",15),t.\u0275\u0275text(23),t.\u0275\u0275pipe(24,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275elementStart(25,"li")(26,"div",81),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().open("toolbox")}),t.\u0275\u0275elementStart(27,"a")(28,"div",15),t.\u0275\u0275text(29),t.\u0275\u0275pipe(30,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275elementStart(31,"li")(32,"div",28)(33,"a",90)(34,"div",15),t.\u0275\u0275text(35),t.\u0275\u0275pipe(36,"translate"),t.\u0275\u0275elementEnd()()()()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(21,qe,Le.service.isMobile)),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(4,9,"SUBSIDEMENU.SUPPORT")),t.\u0275\u0275advance(8),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(12,11,"HM_06_02")),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(18,13,"HM_06_03")),t.\u0275\u0275advance(5),t.\u0275\u0275classProp("badge",!Le.service.badgeClicked.video),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(24,15,"HM_06_04")," "),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(30,17,"HM_06_05")),t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(36,19,"ICON_CONTACT"))}}function Ui(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",81),t.\u0275\u0275listener("click",function(){const $e=t.\u0275\u0275restoreView(Le).modalName;return t.\u0275\u0275nextContext().onModalOpen($e)}),t.\u0275\u0275elementStart(1,"a")(2,"div",15),t.\u0275\u0275element(3,"i"),t.\u0275\u0275text(4),t.\u0275\u0275pipe(5,"translate"),t.\u0275\u0275elementEnd()()()}if(2&Ct){const Le=Bt.icon,ot=Bt.title;t.\u0275\u0275advance(3),t.\u0275\u0275classMap(Le+" action"),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(5,3,ot)," ")}}function _n(Ct,Bt){if(1&Ct&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275element(1,"pulse-modal-mobile")(2,"pulse-modal-user-delegations-view")(3,"pulse-modal-user-delegations-config",91)(4,"pulse-modal-users",92),t.\u0275\u0275pipe(5,"async"),t.\u0275\u0275elementContainerEnd()),2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(3),t.\u0275\u0275property("activeTab",Le.service.submenu.user?1:2),t.\u0275\u0275advance(1),t.\u0275\u0275property("user",t.\u0275\u0275pipeBind1(5,3,Le.user$))("projectId",Le.variables.projectId)}}function Ve(Ct,Bt){if(1&Ct){const Le=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",93)(1,"div",94),t.\u0275\u0275element(2,"i",43),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",95)(4,"p"),t.\u0275\u0275text(5,"You have "),t.\u0275\u0275elementStart(6,"b"),t.\u0275\u0275text(7),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(8),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(9,"p")(10,"a",47),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().clickNotificationCenterItem()}),t.\u0275\u0275text(11),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(12,"a",96),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(Le),t.\u0275\u0275nextContext().closeNotificationToasty()}),t.\u0275\u0275element(13,"i",97),t.\u0275\u0275elementEnd()()()}if(2&Ct){const Le=t.\u0275\u0275nextContext();t.\u0275\u0275advance(7),t.\u0275\u0275textInterpolate(Le.notificationCenter.unreadnotificationsCount),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" unread ",1==Le.notificationCenter.unreadnotificationsCount?"notification":"notifications","."),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1("show ",1==Le.notificationCenter.unreadnotificationsCount?"notification":"notifications","")}}const Ye=function(Ct,Bt){return{healthineers:Ct,energy:Bt}},Qe=function(Ct){return{active:Ct}};let _t=(()=>{class Ct{constructor(Le,ot,He,$e,Ke,vt,Nt,Qt,sn,yn,Ft,tn,on,Tn,$n,ii,$i,Wi){this.sanitizer=Le,this.elementRef=ot,this.renderer=He,this.service=$e,this.userService=Ke,this.router=vt,this.activatedRoute=Nt,this.languageService=Qt,this.projectService=sn,this.variables=yn,this.bookmarkService=Ft,this.usertrackingService=tn,this.breakpointObserver=on,this.ngxSmartModalService=Tn,this.dialogService=$n,this.notificationCenter=ii,this.awsService=$i,this.groupPipe=Wi,this.navigationItemsTop=[],this.navigationItemsExtra=[],this.navigationItemsBottom=[],this.subMenuClicked=new t.EventEmitter,this.user$=this.userService.getUser().pipe((0,d.b)(yi=>this.isAdmin=yi.admin),(0,u.U)(yi=>yi.firstName+" "+yi.lastName)),this.delegateUser$=this.userService.delegatedUser$.pipe((0,u.U)(yi=>yi.firstName+" "+yi.lastName)),this.isSges=!1,this.subs=[],this.badgeClicked=!1,this.pulseMediaQueries={mobile:"screen and (max-width: 40.062em)"},this.navigationGroups=new s.X([]),this.activeGroup=new s.X(0),this.showNotificationToasty=!1,this.hasSeenNotificationToasty=!1,this.logo=this.sanitizer.bypassSecurityTrustResourceUrl("./assets/img/logo/sie-logo-white-rgb.svg"),this.config={submenu:["user","news","bookmark","language","contact"],useGroups:!1},this.isHC=!1,this.isEnergy=!1,this.service.sidebar=this,this.service.sidebarDisplay?this.showSidebar():this.hideSidebar(),this.subs.push(this.projectService.projectObserv.subscribe(yi=>{null!=yi&&(this.service.title=this.service.title?this.service.title:sn.project.title?sn.project.title:sn.project.name?sn.project.name:"",sn.project.isSurvey&&(this.service.mailto="mailto:pulse.surveys@gms.siemens.cloud"),sn.project.responsiblePerson.indexOf("@")>0&&(this.service.mailto="mailto:"+sn.project.responsiblePerson),3===sn.project.design&&(this.isHC=!0,this.logo=this.sanitizer.bypassSecurityTrustResourceUrl("./assets/img/logo/sh_logo_white.svg")),4===sn.project.design&&(this.isEnergy=!0,this.logo=this.sanitizer.bypassSecurityTrustResourceUrl("./assets/img/logo/se-logo.svg")))}))}hasSubmenu(Le){return this.service.submenuDisplay[Le]}toogleActive(Le){Le.classList.toggle("active")}hideSidebar(){this.renderer.addClass(this.elementRef.nativeElement,"hidden")}showSidebar(){this.renderer.removeClass(this.elementRef.nativeElement,"hidden")}ngOnInit(){this.isSges=location.href.includes("sges"),this.bookmarkService.prefix=this.link.toLowerCase(),this.projectService.getHelpSectionItems();const Le=(0,o.F)(6e4);this.subs.push(Le.subscribe(He=>this.getUnreadNotifications(!0))),this.navigationItemsFull=this.service.navigationItemsTop.filter(He=>{if(this.service.showItem(He))return He}),setTimeout(()=>{this.config&&this.config.useGroups&&this.changeNavigationGroup()},1e3),this.config&&this.config.useGroups&&this.changeNavigationGroup();const ot=this;this.config.submenu.forEach(He=>{!1!==this.service.submenuDisplay[He]&&this.service.showSubmenuDisplay(He,!0)}),this.isSges||this.projectService.helpSection$.subscribe(He=>{He&&(this.helpSectionItems=He,this.service.showGlobalBadge(He)),this.helpSectionItems=He}),this.languageService.languagesLoaded.subscribe(He=>{if(He){this.service.showSubmenuDisplay("language",1!==He.length),this.languages=He,this.languages.filter($e=>$e.key===this.languageService._languageCode)[0]&&(this.activeLanguageName=this.languages.filter($e=>$e.key===this.languageService._languageCode)[0].lang);for(let $e=0;$e{He instanceof e.m2&&(this.isSges=He.url.includes("sges"),this.config&&this.config.useGroups?this.changeNavigationGroup():ot.service.navigationItemsTop.forEach($e=>{let Ke="";if($e.directPath)Ke=$e.directPath;else{const vt=ot.activatedRoute.snapshot.parent.url;Ke=(vt.length>0?vt[0].path:"")+"/"+$e.path}ot.service.isLinkActive(Ke)||($e.active=!1)}))})),this.setupResponsiveness()}ngOnDestroy(){this.subs.forEach(Le=>{Le.unsubscribe()}),this.isSges||(this.service.navigationItemsTop=this.navigationItemsFull)}setupResponsiveness(){this.setupDesktopResponsiveness(),this.setupMobileResponsiveness()}setupMobileResponsiveness(){i.Z.detectIphone()&&this.subs.push(this.breakpointObserver.observe(this.variables.pulseMediaQueries.mobile).subscribe(Le=>{this.service.isMobile=Le.matches,Le.matches?(this.service.expandSideNavigation.next(!1),this.renderer.addClass(this.elementRef.nativeElement,"hidden"),this.renderer.addClass(this.elementRef.nativeElement,"mobile")):(this.renderer.removeClass(this.elementRef.nativeElement,"hidden"),this.renderer.removeClass(this.elementRef.nativeElement,"mobile"))}))}setupDesktopResponsiveness(){this.subs.push(this.breakpointObserver.observe(this.variables.pulseMediaQueries.desktop.medium).subscribe(Le=>{Le.matches?(this.renderer.addClass(this.elementRef.nativeElement,"collapse"),this.service.widthState$.next("collapsed"),this.service.expandSideNavigation.next(!1)):(this.renderer.removeClass(this.elementRef.nativeElement,"collapse"),this.service.widthState$.next("collapsed"),this.service.expandSideNavigation.next(!0))}))}getUnreadNotifications(Le){this.notificationCenter.getCountUnreadNotifications(this.service.activeGroup).then(ot=>{this.notificationCenter.unreadnotificationsCount=ot,Le&&this.notificationCenter.unreadnotificationsCount>0&&(this.showNotificationToasty=!0),this.service.submenu["notification-center"]&&this.notificationCenter.unreadnotificationsCount>0&&this.notificationCenter.doDataRefresh(!0)})}isDashboard(){const Le=this.router.url,ot=Le.split("/"),He=Le.split("/").pop();return"dashboard"===(ot.length>1?ot[ot.length-2]:He)}toggleMenu(){this.service.isMobile?this.service.expandSideNavigation.value?this.renderer.addClass(this.elementRef.nativeElement,"hidden"):this.renderer.removeClass(this.elementRef.nativeElement,"hidden"):this.service.expandSideNavigation.value?(this.renderer.addClass(this.elementRef.nativeElement,"collapse"),this.service.widthState$.next("collapsed")):(this.renderer.removeClass(this.elementRef.nativeElement,"collapse"),this.service.widthState$.next("")),this.service.expandSideNavigation.next(!this.service.expandSideNavigation.value)}call(Le){Le.function&&Le.function(this,Le)}callAction(Le,ot){Le.function&&Le.function(this,Le,ot)}openBookmark(Le){}onModalOpen(Le){this.ngxSmartModalService.getModal(Le).open()}startGuide(Le){this.service.showSubmenu("guide",!1);const ot=a(),He=this;let $e,Ke;ot.onexit(function(){He.subMenuClicked.emit("userDelegationsConfigModal")});const vt=this.languageService.translate("GUIDED_TOUR_BACK"),Nt=this.languageService.translate("GUIDED_TOUR_NEXT");switch(ot.setOption("nextLabel",''+Nt+' '),ot.setOption("prevLabel",' '+vt+""),ot.setOption("skipLabel",''),ot.setOption("doneLabel",''),ot.setOption("showStepNumbers",!1),Le){case"general":$e=this.getIntroElements(!0),Ke=$e.filter(Qt=>{const sn=Qt.element?Qt.element.replace("#",""):"";return null!==document.getElementById(sn)}),ot.addSteps(Ke),ot.start();break;case"page":$e=this.getIntroElements(!1),Ke=$e.filter(Qt=>{const sn=Qt.element?Qt.element.replace("#",""):"";return null!==document.getElementById(sn)}),ot.addSteps(Ke),ot.start()}}getIntroElements(Le){const ot=this.router.url,He=ot.split("/"),$e=ot.split("/").pop(),vt=He.length>1?He[He.length-2]:$e;let Nt;if("sges"!==(He.length>1?He[1]:void 0))return[];if(Le)Nt=this.getGeneralGuidSettup();else{const sn=this.activatedRoute.routeConfig;if(He&&He.length>1){let yn;const Ft=sn.children.filter(tn=>tn.path===vt)[0];yn="sges"!==vt?Ft.children.filter(tn=>tn.path===$e)[0]:sn.children.filter(tn=>tn.path===$e)[0],Nt=yn&&yn.data.introItems?yn.data.introItems:Ft.data&&Ft.data.introItems?Ft.data.introItems:[]}}const Qt=[];for(let sn=0;sn0){let on="";for(let Tn=0;Tn
";Ft.intro=on}else Ft.intro=this.languageService.translate(yn.contentKey);yn.position&&(Ft.position=yn.position),Qt.push(Ft)}return Qt}onItemClick(){this.service.isMobile&&this.toggleMenu()}getGeneralGuidSettup(){return[{elementId:"intro-guideNavItem",contentKey:"GT_GT",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-helpSupportNavItem",contentKey:"GT_HS",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-langNavItem",contentKey:"GT_LANG",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-orgCodeMainNavItem",contentKey:"GT_TEAM",position:"bottom",toolTipClass:"helpernumber-left"},{elementId:"intro-countsIntoNavItem",contentKey:"GT_COUNTS",position:"bottom",toolTipClass:"helpernumber-left"},{elementId:"intro-additionalEmployeeNavItem",contentKey:"GT_EMPLSCOPE",position:"bottom",toolTipClass:"helpernumber-left"},{elementId:"intro-additionalReportingNavItem",contentKey:"GT_REPLINE",position:"bottom",toolTipClass:"helpernumber-left"},{elementId:"intro-actionsMainNavItem",contentKey:"GT_ACTION",position:"bottom",toolTipClass:"helpernumber-left"},{elementId:"intro-navItems",contentKey:"GT_REP_TABS",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-exportNavItem",contentKey:"GT_EXPORT",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-userNavItem",contentKey:"GT_PERSONAL",position:"right",toolTipClass:"helpernumber-right"},{elementId:"intro-responseRateNavItem",contentKey:"GT_RR",position:"right",toolTipClass:"helpernumber-right"}]}open(Le){switch(this.service.showSubmenu("support",!1),Le){case"yammer":window.open("https://www.yammer.com/siemens.com/#/threads/inGroup?type=in_group&feedId=17347504&view=all","_blank");break;case"homepage":window.open("https://intranet.siemens.com/sges","_blank");break;case"video":this.service.badgeClicked.video=!0,this.subMenuClicked.emit("video"),"de"===this.languageService._languageCode?window.open("https://myvideo.siemens.com/secureshare/index/share/id/1_cku6dje5","_blank"):window.open("https://myvideo.siemens.com/secureshare/index/share/id/1_qblig552","_blank");break;case"toolbox":window.open("https://wse03.siemens.com/content/P0017055/SGES/Page/index.html#/","_blank")}}openHelpPopup(Le){const $e=this.awsService.getPreSignURLFromS3("pulse-project",(Le.projectId?Le.projectId:"general")+"/"+Le.contentKey);if("Document"===Le.type)x.p.downloadLink($e,Le.contentKey);else if("Image"===Le.type||"Video"===Le.type){let Ke="";Ke="Image"===Le.type?'':'',this.service.showSubmenu("helpandsupport",!1),this.dialogService.open(h,{title:Le.titleKey,content:this.sanitizer.bypassSecurityTrustHtml(Ke),type:Le.type})}else this.service.showSubmenu("helpandsupport",!1),this.dialogService.open(h,{title:Le.titleKey,content:this.sanitizer.bypassSecurityTrustHtml(Le.contentKey),type:Le.type});this.clickedItem(Le.id)}clickedItem(Le){localStorage.setItem("HelpSection_Id_"+Le,"true"),this.service.showGlobalBadge(this.helpSectionItems)}showWhatsNew(){this.variables.dontShowAgain=!1,this.service.showSubmenu("guide",!1)}logoutDelegation(){this.userService.removeDelegation()}showSurveyIntroVideo(){g.p.getShowIntroSubject().next()}openExternalLink(){window.location.replace(this.externalSidenavHeaderLink)}applyNavigationGroup(Le,ot,He=!1){this.service.activeGroup=Le,"Financial Statement Reporting"===Le&&(this.renderer.removeClass(document.getElementsByTagName("body")[0],"theme-lightteal"),this.renderer.removeClass(document.getElementsByTagName("body")[0],"theme-teal"),this.renderer.addClass(document.getElementsByTagName("body")[0],"theme-lightteal")),"Support Function Reporting"===Le&&(this.renderer.removeClass(document.getElementsByTagName("body")[0],"theme-lightteal"),this.renderer.removeClass(document.getElementsByTagName("body")[0],"theme-teal"),this.renderer.addClass(document.getElementsByTagName("body")[0],"theme-teal"));for(let $e=0;$e1),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",null==ot.config?null:ot.config.useGroups),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!(null!=ot.config&&ot.config.useGroups)&&ot.service.navigationItemsTop),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.navigationItemsExtra),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",ot.service.submenu.survey),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",ot.service.navigationItemsBottom),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("news")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("guide")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("support")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("contact")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("helpandsupport")&&!ot.isSges&&ot.helpSectionItems&&ot.helpSectionItems.length>0),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("language")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("notification")),t.\u0275\u0275advance(9),t.\u0275\u0275property("ngIf",ot.service.submenu.bookmark),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",ot.service.submenu.language),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.submenu.helpandsupport),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.hasSubmenu("user")&&ot.service.submenu.user),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.submenu.guide),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.service.submenu.support),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",ot.hasSubmenu("user")&&ot.service.submenu.user||ot.hasSubmenu("guide")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ot.showNotificationToasty&&!ot.hasSeenNotificationToasty&&ot.notificationCenter.unreadnotificationsCount>0&&!ot.service.submenu["notification-center"])}},styles:['pulse-sidebar-navigation{overflow-y:auto;flex-basis:280px;flex-shrink:0;display:flex;flex-direction:column;white-space:nowrap;overflow-x:hidden;transition:flex-basis .18s linear;width:280px}pulse-sidebar-navigation.mobile .icon-menu2{position:fixed;right:10px;top:10px;z-index:100;background-color:#2d373c;line-height:36px;width:36px;height:36px}pulse-sidebar-navigation.mobile:NOT(.hidden){flex-basis:100%}pulse-sidebar-navigation .pulse-sidebar-navigation{flex:1}pulse-sidebar-navigation.collapse{flex-basis:55px!important;white-space:nowrap}pulse-sidebar-navigation.collapse .sidenav-body ul{width:55px;overflow-x:hidden}pulse-sidebar-navigation.hidden{flex-basis:0!important}pulse-sidebar-navigation .sub-sidenav .sidenav-ul{margin:0;padding:0}pulse-sidebar-navigation .sub-sidenav .sidenav-ul .category-title{background:#2d373c;font-size:16px;padding:5px 10px;font-weight:500;color:#fff;border-left:2px solid #0f8287}pulse-sidebar-navigation .sub-sidenav .sidenav-ul .sidenav-item{display:flex;justify-content:space-between}pulse-sidebar-navigation .sub-sidenav .sidenav-ul .sidenav-item a{color:#fff;flex:1}pulse-sidebar-navigation .sidenav-body:not(.collapse) ul.sidenav-ul li.active .sidenav-ul li a{padding-left:12px}pulse-sidebar-navigation .sidenav-body:not(.collapse) ul.sidenav-ul li.active .sidenav-ul li .sidenav-ul li a{padding-left:24px!important}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul{padding:0}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li{color:inherit;outline:none;position:relative;list-style-type:none;height:40px;overflow:hidden;transition:height .3s linear}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li .sidenav-item i.icon-bell{top:-4px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li .sidenav-item:hover~i.icon-arrow-link-small-down,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li .sidenav-item:hover i.icon-arrow-link-small-right{color:#dfe6ed!important}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item.badge:before{position:absolute;content:"";width:8px;height:8px;background:#FF4B2B;border-radius:100%;left:25px;z-index:1000}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item{height:40px;color:inherit;display:flex;align-items:center;position:relative;padding:0 5px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item .subtitle,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item .subtitle{font-size:12px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item a,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item a{display:flex;flex:1;line-height:18px;white-space:nowrap;position:relative}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item a span.notification-badge,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item a span.notification-badge{height:14px;width:14px;background:#FF4B2B;position:absolute;left:20px;border-radius:50%;top:2px;font-size:10px;text-align:center;line-height:15px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item a div.title,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item a div.title{line-height:inherit;padding-left:2px;display:flex;align-items:center;flex:1;min-width:0;max-width:220px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item a div.title>span,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item a div.title>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item a div.title>.delegate-user-name,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item a div.title>.delegate-user-name{word-break:break-word}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i{color:inherit;line-height:37px;justify-content:center;display:flex;flex:40px 0 0;position:relative}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.big,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.big{font-size:28px!important}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.small,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.small{font-size:10px!important}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-tumblr-negative,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-tumblr-negative{font-size:14px;top:1px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-bookmark,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-bookmark{font-size:15px!important;margin-right:-1px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-settings,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-settings{top:2px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-chart-pie,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-table,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-chart-pie,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-table{top:-2px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.icon-search,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.icon-search{top:-1px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.action,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action{justify-content:center;display:flex;margin-top:2px;margin-right:-5px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.action:focus,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action:focus{color:#fff}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.action.icon-edit,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action.icon-edit{font-size:14px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.action.icon-edit:hover,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action.icon-edit:hover{color:#dfe6ed}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.action[class*=icon-arrow-link-small-],pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action[class*=icon-arrow-link-small-]{font-size:10px;position:relative;top:-1px}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item i.inline-icon,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item i.inline-icon{display:inline;font-size:inherit}pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item.active i.icon-arrow-link-small-down,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li div.sidenav-item.active i.icon-arrow-link-small-right,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item.active i.icon-arrow-link-small-down,pulse-sidebar-navigation .sidenav-body ul.sidenav-ul li pulse-navigationitem.sidenav-item.active i.icon-arrow-link-small-right{color:#dfe6ed!important}pulse-sidebar-navigation .sidenav-subtitle{margin-top:17px;display:flex;position:relative;flex-direction:row;padding:0 5px;align-items:center;white-space:normal;cursor:pointer}pulse-sidebar-navigation .sidenav-subtitle i{flex:40px 0 0;display:flex;justify-content:center}pulse-sidebar-navigation .sidenav-subtitle>a{position:absolute;padding-left:12px;font-weight:500;width:246px;-webkit-user-select:none;-moz-user-select:none;user-select:none}pulse-sidebar-navigation .sidenav-header{height:56px;padding:20px 15px 0 20px;font-weight:700;font-size:26px;text-align:center;color:#becdd7;display:flex;align-items:flex-start;justify-content:space-between}pulse-sidebar-navigation .sidenav-header .logo{position:relative;display:block;cursor:pointer;margin-top:-8px;height:18px;margin-left:-2px}pulse-sidebar-navigation .sidenav-header .logo.healthineers{margin-top:-9px;height:36px;margin-left:0}pulse-sidebar-navigation .sidenav-header .logo.energy{margin-top:-5px;height:34px;margin-left:-1px}pulse-sidebar-navigation .sidenav-header .logo img{height:inherit}pulse-sidebar-navigation .sidenav-header .icon-menu{width:24px;min-width:18px;height:24px;fill:#fff;position:relative;top:-2px;cursor:pointer}pulse-sidebar-navigation .sidenav-header .icon-menu:hover{fill:#becdd7}pulse-sidebar-navigation .sidenav-header .icon-menu2{font-size:21px;margin-top:0}pulse-sidebar-navigation .sidenav-header i{margin-left:auto;cursor:pointer}pulse-sidebar-navigation .sidenav-header i.icon-close2{font-size:16px}pulse-sidebar-navigation .sidenav-header i:hover{color:#dfe6ed}pulse-sidebar-navigation .sub-sidenav{position:absolute;z-index:200;top:0;left:280px;width:280px;border-left:1px solid transparent;box-shadow:10px 0 10px -10px #00000080;display:block;flex-direction:column;height:100%;color:#becdd7;overflow-x:hidden;transition:left .18s linear}pulse-sidebar-navigation .sub-sidenav.mobile{left:45px;width:340px}pulse-sidebar-navigation .sub-sidenav .sidenav-header{padding-left:10px;border-bottom:1px solid transparent}pulse-sidebar-navigation .sub-sidenav .sidenav-header .pulse-form-field{margin-top:-8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}pulse-sidebar-navigation .sub-sidenav .sidenav-header input{font-family:SiemensSans;border:none;padding:0!important;color:#fff;background-color:transparent}pulse-sidebar-navigation .sub-sidenav .sidenav-header input::-moz-placeholder{color:#fff}pulse-sidebar-navigation .sub-sidenav .sidenav-header input::placeholder{color:#fff}pulse-sidebar-navigation .sub-sidenav .sub-body{height:calc(100% - 56px)}pulse-sidebar-navigation .sub-sidenav .sub-body perfect-scrollbar{height:100%}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul{white-space:normal}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li{border-bottom:1px solid transparent}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item{align-items:center;padding:15px 5px 15px 10px}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item a,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item a{flex-direction:column}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item a div.title,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item a div.title{word-break:break-word;padding-left:0}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item a div.title.badge:before,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item a div.title.badge:before{position:absolute;content:"";width:8px;height:8px;background:#FF4B2B;border-radius:100%;right:10px;margin-top:5px;z-index:1000}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item i.action,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action{flex:0 0 40px;text-align:center}pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li div.sidenav-item i.action.icon-edit,pulse-sidebar-navigation .sub-sidenav ul.sidenav-ul li pulse-navigationitem.sidenav-item i.action.icon-edit{margin-top:-8px}pulse-sidebar-navigation .sidenav-body{display:flex!important;flex-direction:column;min-height:100%;color:#becdd7}pulse-sidebar-navigation .sidenav-body .sidenav-user{margin:27px 0 21px}pulse-sidebar-navigation .sidenav-body .sidenav-user:focus a{color:#fff}pulse-sidebar-navigation .sidenav-body .sidenav-user span.user-avatar-icon{background:#becdd7;border-radius:50%;width:27px;height:27px;margin:0 6px;position:relative;overflow:hidden}pulse-sidebar-navigation .sidenav-body .sidenav-user span.user-avatar-icon i.icon-user-account{position:absolute;color:#fff;left:1px;top:2px;font-size:25px}pulse-sidebar-navigation .sidenav-body .sidenav-user li:first-child .sidenav-item{line-height:normal!important;height:auto!important;min-height:40px;white-space:normal!important}pulse-sidebar-navigation .sidenav-body .sidenav-user li:first-child .sidenav-item .title{line-height:18px;height:35px!important;flex:1;align-items:center;display:flex;white-space:nowrap}pulse-sidebar-navigation .sidenav-body .sidenav-navigation{margin-top:0;margin-bottom:40px}pulse-sidebar-navigation .sidenav-body .sidenav-navigation.extra{margin-top:-40px}pulse-sidebar-navigation .sidenav-body .sidenav-project{margin-top:auto;margin-bottom:3px}pulse-sidebar-navigation .sidenav-body .sidenav-project .freeze-data{margin-top:10px}pulse-sidebar-navigation .sidenav-body .sidenav-project .freeze-data .sidenav-item a i{color:#ffb900}pulse-sidebar-navigation .sidenav-body .sidenav-project .freeze-data .sidenav-item a .title{color:#becdd7;white-space:normal}pulse-sidebar-navigation .sidenav-body .sidenav-project .pulse-brand{margin-top:10px}pulse-sidebar-navigation .sidenav-body .sidenav-project .pulse-brand .sidenav-item a>span{width:40px;flex-basis:40px;display:flex;justify-content:center;align-items:center}pulse-sidebar-navigation .sidenav-body .sidenav-project .pulse-brand .sidenav-item a>span img{height:20px;width:20px}pulse-sidebar-navigation .sidenav-body .sidenav-project .pulse-brand .sidenav-item a .title{color:#becdd7}pulse-sidebar-navigation .sidenav-body .sidenav-project .pulse-brand .sidenav-item a .title:hover{color:#becdd7}pulse-sidebar-navigation .sidenav-body.collapse~.sub-sidenav{left:55px!important}pulse-sidebar-navigation .sidenav-body.collapse .sidenav-subtitle i{display:flex}pulse-sidebar-navigation .sidenav-body.collapse .sidenav-subtitle a{width:55px;visibility:hidden}pulse-sidebar-navigation .sidenav-body.collapse .sidenav-header{padding:20px 15px 0}pulse-sidebar-navigation .sidenav-body.collapse .sidenav-header .logo{display:none}pulse-sidebar-navigation .sidenav-body.collapse ul.sidenav-ul{width:55px;overflow-x:hidden}pulse-sidebar-navigation .sidenav-body.collapse ul.sidenav-ul .title{visibility:hidden}pulse-sidebar-navigation .sidenav-body.collapse ul.sidenav-ul i.action{visibility:hidden}.helpernumber-right~.introjs-tooltipReferenceLayer>.introjs-helperNumberLayer{left:unset;right:-16px}.helpernumber-bottom~.introjs-tooltipReferenceLayer>.introjs-helperNumberLayer{top:unset;bottom:-16px}.introjs-showElement,.introjs-showElement *{color:#000!important}ul.sidenav-group-switch{list-style:none;background-color:#0003;display:flex;justify-content:space-between;margin:5px 10px 20px 11px;padding:6px;border-radius:10px;position:relative}ul.sidenav-group-switch:before{content:"";width:30px;height:35px;width:calc(50% - 7px);position:absolute;z-index:1;border-radius:6px;transition:.35s linear left;z-index:0}ul.sidenav-group-switch.active-0:before{left:6px}ul.sidenav-group-switch.active-1:before{left:50%}ul.sidenav-group-switch>li{height:35px;display:flex;align-items:center;border-radius:10px;width:50%;justify-content:center;z-index:1}ul.sidenav-group-switch>li.active{color:#fff;background-color:transparent}ul.sidenav-group-switch>li>a{color:#fff;font-weight:700;width:auto;white-space:pre-wrap;text-align:center;line-height:12px;font-size:11px}ul.sidenav-group-switch>li>a:hover{color:#dfe6ed}.toasty-notification-container{position:fixed;background-color:#fff;bottom:21px;right:21px;z-index:9999;padding:20px;display:flex;box-shadow:0 3px 6px #0003;border-bottom:2px solid #FF4B2B}.toasty-notification-container .toasty-notification-icon{display:flex;align-items:center;font-size:22px;color:#ff4b2b;border-right:1px solid #becdd7;padding-right:15px}.toasty-notification-container .toasty-notification-icon i.icon-bell{position:relative;top:-5px}.toasty-notification-container .toasty-notification-message{position:relative;padding:5px 20px}.toasty-notification-container .toasty-notification-message p{margin:0;text-align:center}.toasty-notification-container .toasty-notification-message>a.toasty-close{position:absolute;top:-12px;right:-10px;font-size:12px}\n'],encapsulation:2}),Ct})()},4371:(Se,pe,r)=>{"use strict";r.d(pe,{R:()=>u});var t=r(591),e=r(5e3),a=r(11735),s=r(98613),o=r(54620);const d=["navigationElement"];let u=(()=>{class g{constructor(i,m,E){this.router=i,this.userService=m,this.projectService=E,this.expandSideNavigation=new t.X(!0),this.widthState$=new t.X(""),this.sideNavigationWidth=280,this.isGlobalBadge=!1,this.submenu={},this.submenuDisplay={},this.title="",this.mailto="mailto:pulse@siemens.com",this.navigationItemsTop=[],this.navigationItemsBottom=[],this.sidebarDisplay=!0,this.isMobile=!1,this.badgeClicked={}}isExactLinkActive(i){const m=this.router.url.indexOf("?");return(-1!==m?this.router.url.slice(0,m):this.router.url)==="/"+i}isLinkActive(i){return!!i&&this.router.isActive(i,!1)}showSubmenu(i,m){m&&Object.keys(this.submenu).forEach(E=>{this.submenu[E]=!1}),this.submenu[i]=m}showSubmenuDisplay(i,m){this.submenuDisplay[i]=m}hideSidebar(){this.sidebarDisplay=!1,this.sidebar&&this.sidebar.hideSidebar()}showSidebar(){this.sidebarDisplay=!0,this.sidebar&&this.sidebar.showSidebar()}checkActiveGroup(i){if(this.activeGroup&&i)return i===this.activeGroup}showItem(i){if(i.data&&!i.data.disabled&&i.data.navigation){if(i.data.hasMenu&&this.projectService.hasMenu)return!!this.projectService.hasMenu[i.data.hasMenu];if(i.data.gos){let m=i.data.gos;return i.data.gos instanceof Function&&(m=i.data.gos()),this.projectService.checkOneGlobalObject(...m)}if(i.data.role)return i.data.role instanceof Array?this.userService.hasOneRole(...i.data.role):this.userService.hasRole(i.data.role);if(!i.data.checkChildren||!i.children)return i.data.isLocation?window.location.host.startsWith(i.data.isLocation):!i.data.isDisabled||!i.data.isDisabled();for(let m=0;m0?E:m.length),!!(i.data&&i.data.ignoreSubpath&&m.indexOf(i.currentPath)>-1||m.endsWith(i.currentPath))}isActive(i){return!!i.children&&this.itemActive(i)}itemActive(i){if(this.isSelected(i)||i.open)return!0;if(i.children)for(let m=0;m0){const i=Object.keys(this.badgeClicked);let m=0;return i.forEach(E=>{this.badgeClicked[E]&&m++}),m!==i.length}return!0}showBadge(i){return i.badge&&!localStorage.getItem("HelpSection_Id_"+i.id)}showGlobalBadge(i){for(let m=0;m{"use strict";r.d(pe,{O:()=>d});var t=r(5e3),e=r(69808),a=r(23322);const s=function(u){return{"spinner-relative":u}};function o(u,g){if(1&u&&(t.\u0275\u0275elementStart(0,"div",1)(1,"div",2),t.\u0275\u0275element(2,"div",3)(3,"div",3)(4,"div",3)(5,"div",3),t.\u0275\u0275elementEnd()()),2&u){const x=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(1,s,x.isRelative))}}let d=(()=>{class u{constructor(){this.isSpin=!0,this.isRelative=!1}ngOnInit(){}}return u.\u0275fac=function(x){return new(x||u)},u.\u0275cmp=t.\u0275\u0275defineComponent({type:u,selectors:[["pulse-spinner"]],inputs:{isSpin:"isSpin",isRelative:"isRelative"},decls:1,vars:1,consts:[["class","spinner",3,"ngClass",4,"ngIf"],[1,"spinner",3,"ngClass"],[1,"loading"],[1,"loading-bar"]],template:function(x,i){1&x&&t.\u0275\u0275template(0,o,6,3,"div",0),2&x&&t.\u0275\u0275property("ngIf",i.isSpin)},directives:[e.O5,a.oO,e.mk],styles:[".spinner[_ngcontent-%COMP%]{z-index:98;text-align:center;width:100%;top:0;left:0;height:100%;position:absolute}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:relative;top:50%}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]{display:inline-block;width:4px;margin-right:2px;height:23px;border-radius:4px;-webkit-animation:loading 1s ease-in-out infinite;animation:loading 1s ease-in-out infinite}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:0;animation-delay:0}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:.09s;animation-delay:.09s}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:.18s;animation-delay:.18s}.spinner[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:.27s;animation-delay:.27s}@-webkit-keyframes loading{0%{transform:scale(1)}20%{transform:scaleY(2.2)}40%{transform:scale(1)}}@keyframes loading{0%{transform:scale(1)}20%{transform:scaleY(2.2)}40%{transform:scale(1)}}.spinner.spinner-relative[_ngcontent-%COMP%]{position:relative;height:100px}"]}),u})()},37080:(Se,pe,r)=>{"use strict";r.d(pe,{j:()=>i});var t=r(5e3),e=r(23322),a=r(69808),s=r(87436);function o(m,E){if(1&m&&t.\u0275\u0275element(0,"i"),2&m){const C=t.\u0275\u0275nextContext().$implicit;t.\u0275\u0275classMap(C.icon)}}function d(m,E){if(1&m&&(t.\u0275\u0275elementStart(0,"span",6),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&m){const C=t.\u0275\u0275nextContext().index,v=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",v.errorCounts[C]," ")}}const u=function(m){return{active:m}};function g(m,E){if(1&m){const C=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"a",3),t.\u0275\u0275listener("click",function(){const S=t.\u0275\u0275restoreView(C).index;return t.\u0275\u0275nextContext().onNavbarClick(S+1)}),t.\u0275\u0275template(1,o,1,3,"i",4),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275template(4,d,2,1,"span",5),t.\u0275\u0275elementEnd()}if(2&m){const C=E.$implicit,v=E.index,h=t.\u0275\u0275nextContext();t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(6,u,h.activeTab===v+1)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",C.icon),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,4,C.title)," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",h.errorCounts[v])}}const x=function(m,E){return{"pulse-nav-team":m,"row pulse-nav":E}};let i=(()=>{class m{constructor(){this.activeTab=1,this.navbarTabs=[{title:"About Pulse"},{title:"Our Team"}],this.isTransparent=!1,this.errorCounts=[],this.activeTabChange=new t.EventEmitter}ngOnInit(){}onNavbarClick(C){this.activeTab=C,this.activeTabChange.emit(this.activeTab)}}return m.\u0275fac=function(C){return new(C||m)},m.\u0275cmp=t.\u0275\u0275defineComponent({type:m,selectors:[["pulse-tab-navigation"]],inputs:{activeTab:"activeTab",navbarTabs:"navbarTabs",isTransparent:"isTransparent",errorCounts:"errorCounts"},outputs:{activeTabChange:"activeTabChange"},decls:3,vars:5,consts:[[3,"ngClass"],[1,"pulse-nav-links"],["href","javascript:void(0)",3,"ngClass","click",4,"ngFor","ngForOf"],["href","javascript:void(0)",3,"ngClass","click"],[3,"class",4,"ngIf"],["class","badge",4,"ngIf"],[1,"badge"]],template:function(C,v){1&C&&(t.\u0275\u0275elementStart(0,"div",0)(1,"div",1),t.\u0275\u0275template(2,g,5,8,"a",2),t.\u0275\u0275elementEnd()()),2&C&&(t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction2(2,x,v.isTransparent,!v.isTransparent)),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngForOf",v.navbarTabs))},directives:[e.oO,a.mk,a.sg,a.O5],pipes:[s.k],styles:[".pulse-nav[_ngcontent-%COMP%]{background:#ffffff;box-shadow:inset 0 -3px #dfe6ed;overflow:hidden;top:0;left:0;right:0;text-align:center}.pulse-nav-team[_ngcontent-%COMP%]{background:inherit;box-shadow:none;overflow:hidden;top:0;left:0;right:0;text-align:center;display:flex}.pulse-nav-links[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:auto}.pulse-nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .pulse-nav-team[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#3c464b;font-size:16px;text-align:center;padding:15px 0;margin:0 10px;text-decoration:none;border-bottom:3px solid transparent}.pulse-nav-team[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#879baa}.pulse-nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%], .pulse-nav-team[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{border-bottom:3px solid #009999}.pulse-nav-team[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#3c464b}.pulse-nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .pulse-nav-team[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#3c464b!important}.badge[_ngcontent-%COMP%]{padding:2px 4px;border-radius:50%;background:#ff0000;position:relative;bottom:4px;color:#fff}"]}),m})()},24217:(Se,pe,r)=>{"use strict";r.d(pe,{U:()=>o});var t=r(5e3),e=r(93075),a=r(89273);const s={provide:e.NG_VALUE_ACCESSOR,useExisting:(0,t.forwardRef)(()=>o),multi:!0};let o=(()=>{class d{constructor(){this.disabled=!1,this.resizable=!1,this.placeholder="",this.valueChange=new t.EventEmitter,this.onTouch=()=>{}}set setDisabled(g){this.disabled=g}onChange(g){this.inputValue=g.html,this.valueChange.next(g.html?g.html:null)}writeValue(g){this.inputValue=g}registerOnChange(g){this.onChange=g}registerOnTouched(g){this.onTouch=g}}return d.\u0275fac=function(g){return new(g||d)},d.\u0275cmp=t.\u0275\u0275defineComponent({type:d,selectors:[["pulse-text-area"]],inputs:{inputValue:"inputValue",setDisabled:"setDisabled",disabled:"disabled",resizable:"resizable",placeholder:"placeholder"},outputs:{valueChange:"valueChange"},features:[t.\u0275\u0275ProvidersFeature([s])],decls:22,vars:5,consts:[[3,"ngModel","format","placeholder","onContentChanged"],["quill-editor-toolbar",""],[1,"ql-formats"],[1,"ql-header"],["value","1"],["value","2"],["value","3"],["value","4"],["value",""],[1,"ql-bold"],[1,"ql-italic"],[1,"ql-underline"],[1,"ql-strike"],["value","ordered","type","button",1,"ql-list"],["value","bullet","type","button",1,"ql-list"]],template:function(g,x){1&g&&(t.\u0275\u0275elementStart(0,"quill-editor",0),t.\u0275\u0275listener("onContentChanged",function(m){return x.onChange(m)}),t.\u0275\u0275elementStart(1,"div",1)(2,"span",2)(3,"select",3)(4,"option",4),t.\u0275\u0275text(5,"Heading 1"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(6,"option",5),t.\u0275\u0275text(7,"Heading 2"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(8,"option",6),t.\u0275\u0275text(9,"Heading 3"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(10,"option",7),t.\u0275\u0275text(11,"Heading 4"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(12,"option",8),t.\u0275\u0275text(13,"Normal"),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(14,"span",2),t.\u0275\u0275element(15,"button",9)(16,"button",10)(17,"button",11)(18,"button",12),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(19,"span",2),t.\u0275\u0275element(20,"button",13)(21,"button",14),t.\u0275\u0275elementEnd()()()),2&g&&(t.\u0275\u0275styleProp("height",200),t.\u0275\u0275property("ngModel",x.inputValue)("format","html")("placeholder",x.placeholder))},directives:[a.g6,e.NgControlStatus,e.NgModel,e.NgSelectOption,e.\u0275NgSelectMultipleOption],styles:[".noResize[_ngcontent-%COMP%]{resize:none}textarea[_ngcontent-%COMP%]{display:inline-block;width:100%;border:1px solid grey;height:40px;padding:10px 15px;color:#000}textarea.input-small[_ngcontent-%COMP%]{height:32px;font-size:14px;padding:2px 8px 0}textarea.disabled[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]:disabled{background-color:gray}.ql-toolbar.ql-snow[_ngcontent-%COMP%]{border:1px solid #cdd9e1;color:#000;background-color:#fff} .ql-container.ql-snow{border:1px solid #cdd9e1;color:#000;background-color:#fff}"],changeDetection:0}),d})()},85083:(Se,pe,r)=>{"use strict";r.d(pe,{G:()=>te});var t=r(5e3),e=r(8929),a=r(80013),s=r(75778);let o=(()=>{class ce{constructor(){this.isSingleSelection=!1}selectAll(se,ue){if(null!=se)for(const _e of se)_e.selected=ue,this.selectAll(_e.children,ue)}expandAll(se,ue){if(null!=se)for(const _e of se)_e.expanded=ue,this.expandAll(_e.children,ue)}updateTreeFromSelection(se,ue){let _e=!1,Ce=!1;if(null!=se&&null!=ue)for(const me of se){me.selected=!1;for(const we of ue)if(we.name===me.name){null!=me.children&&me.children.length>0&&null!=we.children&&we.children.length>0?me.selected=this.updateTreeFromSelection(me.children,we.children):(this.singleSelectedItem||(this.singleSelectedItem=me),me.selected=!0,this.checkDescendants(me,!0));break}!1===me.selected&&this.checkDescendants(me,!1),this.isSingleSelection&&void 0===me.selected&&(me.expanded=!0),(!0===me.selected||void 0===me.selected)&&(_e=!0),(!1===me.selected||void 0===me.selected)&&(Ce=!0)}return!(!_e||Ce||this.explicitChildren)||!(Ce&&!_e)&&void 0}updateTree(se,ue){this.singleSelectedItem=ue;let _e=!1,Ce=!1;if(null!=se)for(const me of se)me.selected||ue===me?(me.selected=!0,this.checkDescendants(me,!0)):(me.selected=!1,this.isSingleSelection&&(me.expanded=!1),me.children&&me.children.length>0&&(me.selected=this.updateTree(me.children,ue))),this.isSingleSelection&&void 0===me.selected&&(me.expanded=!0),(!0===me.selected||void 0===me.selected)&&(_e=!0),(!1===me.selected||void 0===me.selected)&&(Ce=!0);return!(!_e||Ce||this.explicitChildren)||!(Ce&&!_e)&&void 0}checkDescendants(se,ue){if(null!=se.children)for(const _e of se.children)_e.selected=se.selected,this.checkDescendants(_e,ue)}matchesSearched(se,ue){return"string"==typeof se.name&&se.name&&se.name.toLowerCase().indexOf(ue)>=0}checkDescendantsWithSearch(se,ue,_e){if(this.matchesSearched(se,_e))se.selected=ue,this.checkDescendants(se,ue);else if(null!=se.children)for(const Ce of se.children)this.checkDescendantsWithSearch(Ce,ue,_e);se.selected=this.checkChildSelection(se)}checkChildSelection(se){return se.children&&0!==se.children.length?1===se.children.length?se.children[0].selected:se.children.map(ue=>ue.selected).reduce((ue,_e)=>{if(!(void 0===ue||void 0===_e||ue&&!_e||!ue&&_e))return ue}):se.selected}}return ce.\u0275fac=function(se){return new(se||ce)},ce.\u0275prov=t.\u0275\u0275defineInjectable({token:ce,factory:ce.\u0275fac}),ce})();var d=r(75531),u=r(69808),g=r(8971),x=r(3068),i=r(23322),m=r(93075),E=r(87436);const C=function(ce,oe){return{"icon-minus":ce,"icon-plus":oe}};function v(ce,oe){if(1&ce){const se=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"i",9),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(se);const _e=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext().onExpandedChange(_e)}),t.\u0275\u0275elementEnd()}if(2&ce){const se=t.\u0275\u0275nextContext().$implicit;t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction2(1,C,!!se.expanded,!se.expanded))}}function h(ce,oe){1&ce&&t.\u0275\u0275element(0,"i")}function S(ce,oe){if(1&ce&&t.\u0275\u0275element(0,"span",14),2&ce){const se=t.\u0275\u0275nextContext(2).$implicit,ue=t.\u0275\u0275nextContext();t.\u0275\u0275property("innerHTML","toTranslate"!==se.html?se.html:se.getHtml(ue.translator),t.\u0275\u0275sanitizeHtml)}}function p(ce,oe){if(1&ce&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementContainerEnd()),2&ce){const se=t.\u0275\u0275nextContext(2).$implicit;t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",se.label?t.\u0275\u0275pipeBind1(2,1,se.label):t.\u0275\u0275pipeBind1(3,3,se.name)," ")}}function L(ce,oe){if(1&ce){const se=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"input",15),t.\u0275\u0275listener("ngModelChange",function(_e){t.\u0275\u0275restoreView(se);const Ce=t.\u0275\u0275nextContext(2).$implicit;return t.\u0275\u0275nextContext().onItemCheckboxChanged(Ce,_e)}),t.\u0275\u0275elementEnd()}if(2&ce){const se=t.\u0275\u0275nextContext(2).$implicit;t.\u0275\u0275property("ngModel",se.selected)("indeterminate",void 0===se.selected)}}function N(ce,oe){if(1&ce&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"label",10),t.\u0275\u0275template(2,S,1,1,"span",11),t.\u0275\u0275template(3,p,4,5,"ng-container",6),t.\u0275\u0275template(4,L,1,2,"input",12),t.\u0275\u0275element(5,"span",13),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&ce){const se=t.\u0275\u0275nextContext().$implicit,ue=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275classProp("checked",se.selected)("disabled",se.disabled)("hasHtml",se.html),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",se.html),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!se.html),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ue.showCheckbox)}}function j(ce,oe){if(1&ce){const se=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"label",16),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(se);const _e=t.\u0275\u0275nextContext().$implicit,Ce=t.\u0275\u0275nextContext();return _e.disabled?"":Ce.onItemSelected(_e)}),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()}if(2&ce){const se=t.\u0275\u0275nextContext().$implicit,ue=t.\u0275\u0275nextContext();t.\u0275\u0275classProp("clickable",!se.disabled)("selected",ue.service.singleSelectedItem===se)("disabled",se.disabled),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",se.label?t.\u0275\u0275pipeBind1(2,7,se.label):t.\u0275\u0275pipeBind1(3,9,se.name)," ")}}function P(ce,oe){if(1&ce){const se=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"pulse-treeview-item",17),t.\u0275\u0275listener("selectedItemChange",function(_e){return t.\u0275\u0275restoreView(se),t.\u0275\u0275nextContext(2).selectedItem=_e})("childCheckboxChange",function(){t.\u0275\u0275restoreView(se);const _e=t.\u0275\u0275nextContext().$implicit;return t.\u0275\u0275nextContext().onChildCheckboxChanged(_e)}),t.\u0275\u0275elementEnd()}if(2&ce){const se=t.\u0275\u0275nextContext().$implicit,ue=t.\u0275\u0275nextContext();t.\u0275\u0275property("isInheader",ue.isInheader)("tree",se.children)("selectedItem",ue.selectedItem)("isSingleSelection",ue.isSingleSelection)("filter",ue.filter)("explicitChildren",ue.explicitChildren)("limitNumberOfValuesConfig",ue.limitNumberOfValuesConfig)}}function I(ce,oe){if(1&ce&&(t.\u0275\u0275elementStart(0,"li",2)(1,"div",3),t.\u0275\u0275template(2,v,1,4,"i",4),t.\u0275\u0275template(3,h,1,0,"ng-template",null,5,t.\u0275\u0275templateRefExtractor),t.\u0275\u0275template(5,N,6,9,"ng-container",6),t.\u0275\u0275template(6,j,4,11,"label",7),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(7,P,1,7,"pulse-treeview-item",8),t.\u0275\u0275elementEnd()),2&ce){const se=oe.$implicit,ue=t.\u0275\u0275reference(4),_e=t.\u0275\u0275nextContext();t.\u0275\u0275property("hidden",!_e.isInFilter(se)),t.\u0275\u0275advance(1),t.\u0275\u0275classProp("inHeader",_e.isInheader),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",_e.showChildren&&se.children&&se.children.length>0)("ngIfElse",ue),t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",!_e.isSingleSelection),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",_e.isSingleSelection),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",_e.showChildren&&se.expanded)}}function A(ce,oe){if(1&ce){const se=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"li",18),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(se),t.\u0275\u0275nextContext().showMore()}),t.\u0275\u0275element(1,"i",19),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()}2&ce&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,1,"TREEFILTER.SHOWMORE")," "))}let O=(()=>{class ce{constructor(se,ue,_e){this.translator=se,this.service=ue,this._cd=_e,this.showCheckbox=!0,this.childCheckboxChange=new t.EventEmitter,this.selectedItemChange=new t.EventEmitter,this.showChildren=!0}set tree(se){this.prepareTree(se)}get tree(){return this._tree}get selectedItem(){return this.internalSelectedItem}set selectedItem(se){this.internalSelectedItem=se,this.selectedItemChange.emit(this.internalSelectedItem)}ngOnInit(){}isInFilter(se){if(void 0===this.filter||-1!==se.name.toLowerCase().indexOf(this.filter.toLowerCase()))return!0;if(null!=se.children)for(const ue of se.children)if(this.isInFilter(ue))return se.expanded=this.filter&&this.filter.length>0,!0;return!1}onItemSelected(se){this.selectedItem=se,se.selected=!0,this.service.singleSelectedItem=se,this.onItemCheckboxChanged(se,se.selected)}onItemCheckboxChanged(se,ue){(!se.children||0===se.children.length)&&(se.selected=ue),this.showCheckbox=!1,this._cd.detectChanges(),this.service.checkDescendantsWithSearch(se,ue,(this.filter||"").trim().toLowerCase()),this.childCheckboxChange.emit(se),this.showCheckbox=!0}onExpandedChange(se){se.expanded=!se.expanded}onChildCheckboxChanged(se){let ue,_e;for(const Ce of se.children)(!0===Ce.selected||void 0===Ce.selected)&&(ue=!0),(!1===Ce.selected||void 0===Ce.selected)&&(_e=!0);ue&&this.isSingleSelection&&(se.expanded=!0),se.selected=!(!ue||_e||this.explicitChildren)||!(_e&&!ue)&&void 0,this.childCheckboxChange.emit()}trackByFn(se,ue){return se}showMore(){this.limitedTree=this.tree.slice(0,this.limitedTree.length+this.limitNumberOfValuesConfig)}prepareTree(se){this._tree=se,se&&(this.limitedTree=se.slice(0,this.limitNumberOfValuesConfig?this.limitNumberOfValuesConfig:se.length))}}return ce.\u0275fac=function(se){return new(se||ce)(t.\u0275\u0275directiveInject(d.T),t.\u0275\u0275directiveInject(o),t.\u0275\u0275directiveInject(t.ChangeDetectorRef))},ce.\u0275cmp=t.\u0275\u0275defineComponent({type:ce,selectors:[["pulse-treeview-item"]],inputs:{limitNumberOfValuesConfig:"limitNumberOfValuesConfig",tree:"tree",isSingleSelection:"isSingleSelection",filter:"filter",explicitChildren:"explicitChildren",isInheader:"isInheader",showChildren:"showChildren",selectedItem:"selectedItem"},outputs:{childCheckboxChange:"childCheckboxChange",selectedItemChange:"selectedItemChange"},decls:3,vars:3,consts:[[3,"hidden",4,"ngFor","ngForOf","ngForTrackBy"],["class","show-more",3,"click",4,"ngIf"],[3,"hidden"],[1,"checkbox"],["class","clickable",3,"ngClass","click",4,"ngIf","ngIfElse"],["other",""],[4,"ngIf"],[3,"clickable","selected","disabled","click",4,"ngIf"],[3,"isInheader","tree","selectedItem","isSingleSelection","filter","explicitChildren","limitNumberOfValuesConfig","selectedItemChange","childCheckboxChange",4,"ngIf"],[1,"clickable",3,"ngClass","click"],[1,"pulse-checkbox-container"],[3,"innerHTML",4,"ngIf"],["type","checkbox","class","pulse-checkbox",3,"ngModel","indeterminate","ngModelChange",4,"ngIf"],[1,"checkmark"],[3,"innerHTML"],["type","checkbox",1,"pulse-checkbox",3,"ngModel","indeterminate","ngModelChange"],[3,"click"],[3,"isInheader","tree","selectedItem","isSingleSelection","filter","explicitChildren","limitNumberOfValuesConfig","selectedItemChange","childCheckboxChange"],[1,"show-more",3,"click"],[1,"icon-arrow-link-small-down"]],template:function(se,ue){1&se&&(t.\u0275\u0275elementStart(0,"ul"),t.\u0275\u0275template(1,I,8,8,"li",0),t.\u0275\u0275template(2,A,4,3,"li",1),t.\u0275\u0275elementEnd()),2&se&&(t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",ue.limitedTree)("ngForTrackBy",ue.trackByFn),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",ue.limitedTree&&ue.tree&&ue.limitedTree.length{class ce{constructor(se,ue,_e){this.cd=se,this.service=ue,this.langService=_e,this.searchText="",this.searchTree=null,this.searchChanged=new e.xQ,this.selectedItemChange=new t.EventEmitter,this.selectionChange=new t.EventEmitter,this.filterSearchChange=new t.EventEmitter,this.closeDropdown=new t.EventEmitter,this.buttonHeight="auto",this.dropdownMaxHeight="400px",this.dropdownMaxWidth="auto",this.noneLabel="No option selected",this.selectionKeys="name",this.itemsCountDropdownText=1,this.isOpen=!1,this.searchChanged.pipe((0,a.b)(300),(0,s.x)()).subscribe(Ce=>this.filterTree(Ce)),this.isFilterTypeahead=!1}set tree(se){this.service.tree=se}get tree(){return this.service.tree}get selectedItem(){return this.internalSelectedItem}set selectedItem(se){this.internalSelectedItem=se,this.isSingleSelection&&this.service.selectAll(this.service.tree,!1),this.selectedItemChange.emit(this.internalSelectedItem)}get selection(){return this.internalSelection}set selection(se){this.searchTree=null,this.searchText=null,this.searchChanged.next(null),this.internalSelection=se,this.service.updateTreeFromSelection(this.service.tree,se),this.updateDropdownText(),this.selectionChange.emit(this.internalSelection)}static flattenTree(se,ue,_e){const Ce=[];return se&&(se.forEach(me=>{me[ue]&&me[ue].length>0&&Array.prototype.push.apply(Ce,this.flattenTree(me[ue],ue,_e))}),Array.prototype.push.apply(Ce,se.filter(me=>!_e||!(me[ue]&&me[ue].length>0)).map(me=>me))),Ce}static FindInTree(se,ue){if(!se||0===se.length)return[];const _e=[];return se.forEach(Ce=>{(Ce.label&&Ce.label.toLowerCase().indexOf(ue)>-1||Ce.name&&Ce.name.toLowerCase().indexOf(ue)>-1)&&_e.push(Ce),_e.push(...ce.FindInTree(Ce.children,ue))}),_e}ngOnInit(){this.selectedPropertyNames=this.selectionKeys.split("|"),this.service.isSingleSelection=this.isSingleSelection,this.service.explicitChildren=this.explicitChildren,null!=this.allLabel&&"undefined"!==this.allLabel&&(this.service.tree=[{name:this.allLabel,label:this.allLabel,expanded:!0,children:this.tree}]),this.service.updateTreeFromSelection(this.service.tree,this.internalSelection),this.langSub=this.langService.langChanged$.subscribe(()=>{this.cd.markForCheck()}),this.updateDropdownText()}ngOnDestroy(){this.langSub.unsubscribe()}filterTree(se){se=se||this.searchText,this.hasOwnFilterSearchFunction?se&&(this.filterSearchChange.emit(se),setTimeout(()=>{this.cd.markForCheck()},180)):se&&(se=se.toLowerCase(),this.searchTree=ce.FindInTree(this.service.tree,se).sort((ue,_e)=>ue.name.length-_e.name.length).slice(0,50),this.cd.markForCheck())}changed(se){this.searchChanged.next(se)}openChange(se){!se&&se!==this.isOpen&&(this.closeDropdown.emit(),this.selectionChange.emit(this.internalSelection)),this.isOpen=se}onCheckboxChanged(se,ue=!1){if(this.hasOwnFilterSearchFunction)for(let _e=this.service.tree.length-1;_e>=0;_e--)!0===this.service.tree[_e].fromSearch&&!1===this.service.tree[_e].selected&&this.service.tree.splice(_e,1);!ue&&this.isSingleSelection&&se.close&&se.close(),this.isTokenSelection=!1,this.internalSelection=this.createSelectionFromTree(this.service.tree),this.updateDropdownText(),this.selectionChange.emit(this.internalSelection)}onChildCheckboxChange(se){const ue=this.service.tree.findIndex(_e=>_e.label===se.label);this.hasOwnFilterSearchFunction?(se.fromSearch=!0,-1===ue?this.service.tree.unshift(se):this.service.tree[ue].selected=se.selected,this.service.updateTree(this.service.tree,se),this.internalSelection=this.createSelectionFromTree(this.service.tree),this.updateDropdownText()):(this.service.isSingleSelection&&this.service.selectAll(this.service.tree,!1),se.selected=!0,this.service.updateTree(this.service.tree,se),this.internalSelection=this.createSelectionFromTree(this.service.tree),this.updateDropdownText(),this.selectionChange.emit(this.internalSelection),this.service.isSingleSelection&&this.treeDrop.close())}onTokenClicked(se){this.internalSelection=se.values,this.service.updateTreeFromSelection(this.service.tree,se.values),this.closeDropdown.emit(),this.selectionChange.emit(this.internalSelection),this.isTokenSelection=!0,this.dropdownText=se.name}checkTokenName(){if(this.tokens){const se=this.tokens.find(ue=>this.compareSelectionToken(this.internalSelection,ue.values));return se?se.name:""}}compareSelectionToken(se,ue){if(!se&&!ue)return!0;if(!se||!ue||se.length!==ue.length)return!1;let _e=!0;for(let Ce=0;Ce{"use strict";r.d(pe,{U:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(o){this.el=o,this.active=!1}ngAfterContentInit(){this.active&&this.el.nativeElement.focus()}}return a.\u0275fac=function(o){return new(o||a)(t.\u0275\u0275directiveInject(t.ElementRef))},a.\u0275dir=t.\u0275\u0275defineDirective({type:a,selectors:[["","pulseAutofocus",""]],inputs:{active:["pulseAutofocus","active"]}}),a})()},8971:(Se,pe,r)=>{"use strict";r.d(pe,{w:()=>a});var t=r(5e3),e=r(23753);let a=(()=>{class s{constructor(d,u){this.element=d,this.renderer=u,this.changeOpen=new t.EventEmitter,this.closeOnSecondClick=!1,this.isOpen=!1}ngOnInit(){this.close(),this.renderer.setStyle(this.pulseDropdownMenu,"position","absolute"),this.renderer.setStyle(this.pulseDropdownMenu,"z-index",110),this.renderer.addClass(this.pulseDropdownMenu,"pulse-dropdown")}onInsideClick(d){this.isOpen?this.closeOnSecondClick&&this.close():this.open()}onOutsideClick(d){this.isOpen&&(this.pulseDropdownMenu.contains(d)||this.element.nativeElement.contains(d)||this.close())}open(){this.isOpen=!0,this.renderer.removeStyle(this.pulseDropdownMenu,"display"),this.clickEvent$=(0,e.R)(document,"click").subscribe(d=>{this.onOutsideClick(d.target)}),this.changeOpen.emit(this.isOpen)}close(){this.clickEvent$&&this.clickEvent$.unsubscribe(),this.isOpen=!1,this.renderer.setStyle(this.pulseDropdownMenu,"display","none"),this.changeOpen.emit(this.isOpen)}}return s.\u0275fac=function(d){return new(d||s)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(t.Renderer2))},s.\u0275dir=t.\u0275\u0275defineDirective({type:s,selectors:[["","pulseDropdown",""]],hostBindings:function(d,u){1&d&&t.\u0275\u0275listener("click",function(x){return u.onInsideClick(x)})},inputs:{pulseDropdownMenu:"pulseDropdownMenu",closeOnSecondClick:"closeOnSecondClick"},outputs:{changeOpen:"changeOpen"},exportAs:["pulseDropdown"]}),s})()},20688:(Se,pe,r)=>{"use strict";r.d(pe,{C:()=>s});var t=r(5e3),e=r(69808),a=r(23753);let s=(()=>{class o{constructor(u,g,x){this.element=u,this.renderer=g,this.document=x,this.startId=0,this._startId=0,this.tmpStartId=0,this.timer=-1,this.loadData=new t.EventEmitter,this.showListChange=new t.EventEmitter,this.estimatedRowHeight=35,this.wrappedScrollContainer=!1,this.request={}}set rowCount(u){u&&this.rowCountValue!==u&&(this.rowCountValue=u,setTimeout(()=>{this.initialLoad()}))}get rowCount(){return this.rowCountValue}set rawList(u){u&&(this.rawListValue=u,this.rowCount=this.rawListValue.length,setTimeout(()=>{this.initialLoad()}))}get rawList(){return this.rawListValue}set showList(u){u&&(this.showListValue=u,this.showListChange.emit(this.showListValue))}get showList(){return this.showListValue}ngOnInit(){let u=this.document.getElementById(this.scrollContentId);this.wrappedScrollContainer&&(u=u.children[0]),this.scrollEvent$=(0,a.R)(u,"scroll").subscribe(g=>{-1!==this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.onElementChange(g.target)},5)}),this.resizeEvent$=(0,a.R)(window,"resize").subscribe(g=>{this.onElementChange(this.document.getElementById(this.scrollContentId))})}ngOnDestroy(){this.scrollEvent$&&this.scrollEvent$.unsubscribe(),this.resizeEvent$&&this.resizeEvent$.unsubscribe()}updateList(u,g){if(g>this.rowCount&&(g=this.rowCount),this.rawList){const x=this.rawList.slice(u,g);this.showList&&(this.showList=x)}this.calcList(u,g)}calcList(u,g){const i=Math.floor(u/(o.chunk-o.offset))*(o.chunk-o.offset);let m=i+o.chunk;m>=this.rowCount&&(m=this.rowCount),(i!==this.request.startIndex||m!==this.request.endIndex)&&(this.request.startIndex=i,this.request.endIndex=m),this.loadData.emit({startIndex:u,endIndex:g,request:this.request})}initialLoad(){this.calcTableHeight(),this.loadInitialItems()}loadInitialItems(){const u=this.getPossibleItemCount();0!==this.startId?(this.tmpStartId=this.startId,this.updateList(this.startId,this.startId+u+o.buffer),this.updatePadding(this.startId)):this.updateList(0,u+o.buffer)}getPossibleItemCount(){return Math.ceil(this.document.documentElement.clientHeight/this.estimatedRowHeight)}calcTableHeight(){this.tblHeight=this.rowCount*this.estimatedRowHeight,this.renderer.setStyle(this.element.nativeElement,"height",this.tblHeight+"px")}onElementChange(u){this.loadCurrentItems(u)}loadCurrentItems(u){const g=this.getStartPercentage(u),x=this.getEndPercentage(u);let i=!1;this.startId=Math.ceil(this.rowCount*g)-o.buffer,this.startId=this.startId>=0?this.startId:0;const m=Math.abs(this.startId-this.tmpStartId);m===o.threshold?i=!0:(m>=o.threshold||this.startId<=o.threshold)&&(i=!0,this.startId=this.tmpStartId>this.startId?this.startId%2==0?this.startId:this.startId-1:this.startId%2==0?this.startId:this.startId+1,this.startId=this.startId>=0?this.startId:0),this.startId=this.startId>=0?this.startId:0;let E=Math.ceil(this.rowCount*x)+o.buffer;E=E>=this.rowCount?this.rowCount:E,i&&this.jumpToIndex(this.startId,E)}jumpToIndex(u,g){this.startId=u,g||(g=this.startId+this.getPossibleItemCount()+o.buffer,this.document.getElementById(this.scrollContentId).scrollTop=this.startId*this.estimatedRowHeight),this.tmpStartId=this.startId,this.updatePadding(this.startId),this.updateList(this.startId,g)}updatePadding(u){this.topPadding=u*this.estimatedRowHeight,this.renderer.setStyle(this.element.nativeElement,"padding-top",this.topPadding+"px")}getStartPercentage(u){return u.scrollTop/u.scrollHeight}getEndPercentage(u){return(u.scrollTop+u.offsetHeight)/u.scrollHeight}}return o.buffer=12,o.threshold=6,o.offset=100,o.chunk=1e3,o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(t.Renderer2),t.\u0275\u0275directiveInject(e.K0))},o.\u0275dir=t.\u0275\u0275defineDirective({type:o,selectors:[["","pulseInfinityScroll",""]],inputs:{rowCount:"rowCount",scrollContentId:"scrollContentId",estimatedRowHeight:"estimatedRowHeight",wrappedScrollContainer:"wrappedScrollContainer",rawList:"rawList",showList:"showList"},outputs:{loadData:"loadData",showListChange:"showListChange"}}),o})()},19154:(Se,pe,r)=>{"use strict";r.d(pe,{b:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(o,d){this.elementRef=o,this.renderer=d,this.sortState={property:"",isDesc:null},this.iconClassDesc="icon-menu-down",this.iconClassAsc="icon-menu-up"}set sortProperty(o){this.sortState.property=o}setEventStream(o){this.stream$=o}sort(){this.stream$.next(this.sortState.property)}addSortIcon(o){this.sortState.isDesc=o,this.createSortIcon(),this.elementRef.nativeElement.appendChild(this.iconElement)}switchSortIcon(){const o=this.sortState.isDesc;if(this.iconElement){const d=this.getSortIconClass(o),u=this.getSortIconClass(!o);this.replaceIcon(d,u),this.sortState.isDesc=!this.sortState.isDesc}}removeSortIcon(){const o=this.elementRef.nativeElement;o.contains(this.iconElement)&&o.removeChild(this.iconElement),this.iconElement=null}replaceIcon(o,d){this.renderer.removeClass(this.iconElement,d),this.renderer.addClass(this.iconElement,o)}createSortIcon(){this.iconElement=this.renderer.createElement("i"),this.renderer.addClass(this.iconElement,"pulse-sort"),this.renderer.addClass(this.iconElement,this.sortState.isDesc?this.iconClassAsc:this.iconClassDesc)}getSortIconClass(o){return o?this.iconClassDesc:this.iconClassAsc}}return a.\u0275fac=function(o){return new(o||a)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(t.Renderer2))},a.\u0275dir=t.\u0275\u0275defineDirective({type:a,selectors:[["","pulseSort",""]],hostBindings:function(o,d){1&o&&t.\u0275\u0275listener("click",function(){return d.sort()})},inputs:{sortProperty:["pulseSort","sortProperty"]}}),a})()},16646:(Se,pe,r)=>{"use strict";r.d(pe,{H:()=>s});var t=r(5e3),e=r(8929),a=r(19154);let s=(()=>{class o{constructor(){this.sortState={property:"",isDesc:null},this.sortStream$=new e.xQ,this.onSort=new t.EventEmitter}ngOnInit(){this.initStream()}ngAfterViewInit(){this.setupSortDirectives(),this.initSort()}ngAfterViewChecked(){this.setupSortDirectives()}ngOnDestroy(){this.sub.unsubscribe()}initStream(){this.sub=this.sortStream$.subscribe(u=>{u===this.sortState.property?this.updateSortDirection():this.updateSortProperty(u),this.onSort.emit(this.sortState)})}initSort(){this.sortStream$.next(this.defaultSortState.property)}setupSortDirectives(){this.checkDirectives(),this.sortDirectives.forEach(u=>{u.setEventStream(this.sortStream$)})}updateSortProperty(u){this.updateViewAndState(u)}updateSortDirection(){this.updateViewAndState()}updateViewAndState(u){this.updateView(u),this.updateState(u)}updateView(u){u?(this.removeSortIconIfExists(),this.getDirective(u).addSortIcon(this.defaultSortState.isDesc)):this.getDirective(this.sortState.property).switchSortIcon()}updateState(u){u?(this.sortState.property=u,this.sortState.isDesc=this.defaultSortState.isDesc):this.sortState.isDesc=!this.sortState.isDesc}getDirective(u){try{return this.sortDirectives.find(g=>g.sortState.property===u)}catch(g){console.error("no sortable properties found. please use the pulseSort directive to set a header sortable")}}removeSortIconIfExists(){""!==this.sortState.property&&this.getDirective(this.sortState.property).removeSortIcon()}checkDirectives(){if(!(this.sortDirectives.length>0))throw new Error("no pulse sort directives found inside defined sortable row. please set a least one cell sortable with pulseSort")}}return o.\u0275fac=function(u){return new(u||o)},o.\u0275dir=t.\u0275\u0275defineDirective({type:o,selectors:[["","pulseSortable",""]],contentQueries:function(u,g,x){if(1&u&&t.\u0275\u0275contentQuery(x,a.b,4),2&u){let i;t.\u0275\u0275queryRefresh(i=t.\u0275\u0275loadQuery())&&(g.sortDirectives=i)}},inputs:{defaultSortState:["pulseSortable","defaultSortState"]},outputs:{onSort:"onSort"}}),o})()},34595:(Se,pe,r)=>{"use strict";r.d(pe,{z:()=>a});var t=r(5e3),e=r(23753);let a=(()=>{class s{constructor(d,u){this.element=d,this.renderer=u,this.changeSticky=new t.EventEmitter,this.isSticky=!1}ngOnInit(){document.getElementById(this.stickyContentId)&&(this.scrollEvent$=(0,e.R)(document.getElementById(this.stickyContentId),"scroll").subscribe(d=>{this.calcScrollposition(d.target.scrollTop)}))}onResize(d){document.getElementById(this.stickyContentId)&&this.calcScrollposition(document.getElementById(this.stickyContentId).scrollTop)}ngOnDestroy(){this.scrollEvent$&&this.scrollEvent$.unsubscribe()}getOffsetTop(d){return this.stickyTop||(this.stickyTop=d.getBoundingClientRect().top),this.stickyTop}calcScrollposition(d){let u=this.getOffsetTop(this.element.nativeElement)-d;this.offsetTop&&(u=this.offsetTop-d),u{"use strict";r.d(pe,{i:()=>s});var t=r(5e3),e=r(23753),a=r(22313);let s=(()=>{class o{constructor(u,g,x){this.elementRef=u,this.renderer=g,this.sanitizer=x,this.opened=new t.EventEmitter,this._showTooltip=!1,this._trigger="mouseover"}set trigger(u){switch(u){case"mouseover":default:this._trigger="mouseover";break;case"click":this._trigger="click"}this._trigger=u}get trigger(){return this._trigger}get pulseTooltip(){return this._pulseTooltip}set pulseTooltip(u){this._pulseTooltip!==u&&(this.removeExistingElement(),this._pulseTooltip=u)}onMouseEnter(){this._showTooltip?this.removeTooltip():this.showTooltip()}onScroll(u){this.setPosition(this.newElement)}ngOnDestroy(){this.removeTooltip(),this.$moveEvent&&this.$moveEvent.unsubscribe(),this.$triggerEvent.unsubscribe()}ngOnInit(){this.$triggerEvent=(0,e.R)(this.elementRef.nativeElement,this._trigger).subscribe(u=>{this.onMouseEnter()})}removeExistingElement(){this.newElement&&(this.newElement.remove(),this.newElement=null)}insertTooltip(){this.newElement||(this.newElement=this.renderer.createElement("div"),this.newElement.innerHTML=this._pulseTooltip,this.renderer.addClass(this.newElement,"pulse-tooltip"),this.renderer.addClass(this.newElement,"tooltip-"+this.getPosition())),document.body.appendChild(this.newElement),this.setPosition(this.newElement)}getPosition(){return["top","left","right","bottom","bottom-right","bottom-left"].indexOf(this.position)>-1?this.position:"right"}setPosition(u){const g=u.getBoundingClientRect(),x=this.elementRef.nativeElement.getBoundingClientRect(),m={top:0,left:0};switch(this.getPosition()){case"right":m.top=x.y+x.height/2-g.height/2,m.left=x.x+x.width+5+o.Offset;break;case"top":m.left=x.x+x.width/2-g.width/2,m.top=x.y-5-g.height-o.Offset;break;case"left":m.top=x.y+x.height/2-g.height/2,m.left=x.x-g.width-5-o.Offset;break;case"bottom":m.left=x.x+x.width/2-g.width/2,m.top=x.y+5+x.height+o.Offset;break;case"bottom-right":m.left=x.x-o.Offset,m.top=x.y+5+x.height+o.Offset;break;case"bottom-left":m.left=x.x+x.width-g.width+o.Offset,m.top=x.y+5+x.height+o.Offset}this.renderer.setStyle(this.newElement,"left",m.left+"px"),this.renderer.setStyle(this.newElement,"top",m.top+"px"),this.renderer.setStyle(this.newElement,"z-index","2000")}showTooltip(){this.opened.emit(!0),this._showTooltip||(this.$moveEvent=(0,e.R)(document,this._trigger).subscribe(u=>{this.elementRef.nativeElement.contains(u.target)||this._showTooltip&&this.removeTooltip()}),this._showTooltip=!0,this._pulseTooltip&&this._pulseTooltip.length>0&&this.insertTooltip())}removeTooltip(){this.opened.emit(!1),this._showTooltip&&(this.$moveEvent&&this.$moveEvent.unsubscribe(),this._showTooltip=!1,this._pulseTooltip&&this._pulseTooltip.length>0&&this.newElement&&document.body.removeChild(this.newElement))}}return o.Offset=2,o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(t.Renderer2),t.\u0275\u0275directiveInject(a.DomSanitizer))},o.\u0275dir=t.\u0275\u0275defineDirective({type:o,selectors:[["","pulseTooltip",""]],hostBindings:function(u,g){1&u&&t.\u0275\u0275listener("scroll",function(i){return g.onScroll(i)})},inputs:{position:"position",trigger:"trigger",pulseTooltip:"pulseTooltip"},outputs:{opened:"opened"}}),o})()},65351:(Se,pe,r)=>{"use strict";r.d(pe,{l:()=>e});var t=r(5e3);let e=(()=>{class a{transform(o,d){if(o){const u=o.reduce((g,x)=>(g[x[d]]?g[x[d]].push(x):g[x[d]]=[x],g),{});return Object.keys(u).map(g=>({key:g,value:u[g]}))}return null}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=t.\u0275\u0275definePipe({name:"groupBy",type:a,pure:!0}),a})()},11622:(Se,pe,r)=>{"use strict";r.d(pe,{o:()=>e});var t=r(5e3);let e=(()=>{class a{transform(o){return null!=o?o.toString().replace(/,/g,""):""}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=t.\u0275\u0275definePipe({name:"NoComma",type:a,pure:!0}),a})()},74171:(Se,pe,r)=>{"use strict";r.d(pe,{d:()=>e});var t=r(5e3);let e=(()=>{class a{static isString(o){return"string"==typeof o||o instanceof String}static caseInsensitiveSort(o,d){return a.isString(o)&&a.isString(d)?o.localeCompare(d):a.defaultCompare(o,d)}static defaultCompare(o,d){return o===d?0:null==o?1:null==d?-1:o>d?1:-1}static parseExpression(o){return(o=(o=o.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".")}static getValue(o,d){for(let u=0,g=d.length;ud?i?m(a.getValue(C,d),a.getValue(v,d)):C&&v?m(C[d],v[d]):m(C,v):m(C,v));return u?E.reverse():E}transformObject(o,d,u,g,x){const i=a.parseExpression(d);let m=i.pop(),E=a.getValue(o,i);return Array.isArray(E)||(i.push(m),m=null,E=a.getValue(o,i)),E&&a.setValue(o,this.transform(E,m,u,g),i),o}multiExpressionTransform(o,d,u,g=!1,x){return d.reverse().reduce((i,m)=>this.transform(i,m,u,g,x),o)}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=t.\u0275\u0275definePipe({name:"orderBy",type:a,pure:!1}),a})()},24969:(Se,pe,r)=>{"use strict";r.d(pe,{P:()=>a});var t=r(53527),e=r(5e3);let a=(()=>{class s{constructor(d){this.scaleService=d}transform(d,u){return this.scaleService.formatNumber(d,u?t.N.Integer:void 0)}}return s.\u0275fac=function(d){return new(d||s)(e.\u0275\u0275directiveInject(t.q,16))},s.\u0275pipe=e.\u0275\u0275definePipe({name:"scale",type:s,pure:!0}),s})()},49059:(Se,pe,r)=>{"use strict";r.d(pe,{W:()=>e});var t=r(5e3);let e=(()=>{class a{transform(o,d,u,g){return o&&o.length&&d&&o.sort((x,i)=>{const m=x[d],E=i[d];return void 0===m&&void 0===E?0:void 0===m&&void 0!==E?u?1:-1:void 0!==m&&void 0===E?u?-1:1:m===E?0:g?u?Number.parseFloat(m)>Number.parseFloat(E)?-1:1:Number.parseFloat(E)>Number.parseFloat(m)?-1:1:u?m.toString().toLowerCase()>E.toString().toLowerCase()?-1:1:E.toString().toLowerCase()>m.toString().toLowerCase()?-1:1}),o}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=t.\u0275\u0275definePipe({name:"sortBy",type:a,pure:!0}),a})()},87436:(Se,pe,r)=>{"use strict";r.d(pe,{k:()=>a});var t=r(5e3),e=r(75531);let a=(()=>{class s{constructor(d){this.langService=d}updateValue(d,u,g){}transform(d){return this.langService.translate(d)||d}}return s.\u0275fac=function(d){return new(d||s)(t.\u0275\u0275directiveInject(e.T,16))},s.\u0275pipe=t.\u0275\u0275definePipe({name:"translate",type:s,pure:!1}),s})()},94761:(Se,pe,r)=>{"use strict";r.d(pe,{s:()=>d});var t=r(61737),e=r(56498),a=r(27221),s=r(5e3),o=r(40520);let d=(()=>{class u{constructor(x){this.http=x}get(x,i){return this.http.get(x,i).pipe((0,a.K)((m,E)=>(0,t._)(m)))}post(x,i,m){return this.http.post(x,i,m)}postRequest(x){return this.http.request(x)}put(x,i,m){return new e.y}delete(x){return this.http.delete(x)}handleError(x){let i="";return i=x.error instanceof ErrorEvent?`client side Error: ${x.error.message}`:`server side Error: ${x.message} \n\n Error code: ${x.status} \n\n Error message: ${x.message} `,(0,t._)(x)}}return u.\u0275fac=function(x){return new(x||u)(s.\u0275\u0275inject(o.eN))},u.\u0275prov=s.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},61035:(Se,pe,r)=>{"use strict";r.d(pe,{X:()=>u});var t=r(40520),e=r(7206),a=r.n(e),s=r(12474),o=r(5e3),d=r(9133);let u=(()=>{class g{constructor(i,m){this.http=i,this.variables=m}static CreateURI(i,m,E){const C=g.CreateParameter(E);return"https://"+i+m+(""===C?"":"?"+C)}static CreateHost(i,m,E){return(null===i?"":i+".")+(null===m?"":m+".")+(null===E?"":E+".")+"amazonaws.com"}static CreateParameter(i){let m="";for(let E=0;E="A"&&v<="Z"||v>="a"&&v<="z"||v>="0"&&v<="9"||"_"===v||"-"===v||"~"===v||"."===v)E+=v;else if("/"===v)E+=m?"%2F":v;else{const h=g.CharCodeToUTF8(i.charCodeAt(C));for(let S=0;S>6|192,m[E++]=63&i|128):(m[E++]=i>>12|224,m[E++]=i>>6&63|128,m[E++]=63&i|128),m}static CalculateSignature(i,m,E,C,v,h,S,p,L){const N=i.substr(0,8),j=N+"/"+E+"/"+C+"/"+g.awsRequest,P=g.UriEncode(h,!1),I=[];for(const $ of S)I.push({key:g.UriEncode($.key,!0),value:g.UriEncode($.value,!0)});I.sort(($,K)=>$.key$.key$.key.toLowerCase()).join(";")+"\n"+a().SHA256(L).toString(a().enc.Hex),w=a().SHA256(M),R=g.awsAlgorithm+"\n"+i+"\n"+j+"\n"+w.toString(a().enc.Hex),D=a().HmacSHA256(N,g.awsSignature+m),Y=a().HmacSHA256(E,D),_=a().HmacSHA256(C,Y),y=a().HmacSHA256(g.awsRequest,_);return a().HmacSHA256(R,y).toString(a().enc.Hex)}static CalculateAuthorizationHeaderValue(i,m,E,C,v,h,S,p,L,N,j){const P=[];p.forEach(c=>P.push(c));const A=i+"/"+L.substr(0,8)+"/"+E+"/"+C+"/"+g.awsRequest;P.push({key:"host",value:j}),P.sort((c,M)=>c.keyc.key.toLowerCase()).join(";"),T=g.CalculateSignature(L,m,E,C,v,h,S,P,N);return g.awsAlgorithm+" Credential="+A+", SignedHeaders="+O+", Signature="+T}static ResolveObject(i){const m={};for(const E in i)E&&(m[E]=g.ResolveValueWithType(i[E]));return m}static ResolveArray(i){const m=[];for(const E of i)m.push(g.ResolveObject(E));return m}static ResolveValueWithType(i){if(i.NULL)return null;if(i.BOOL)return i.BOOL;if(i.S)return i.S;if(i.N)return parseFloat(i.N);if(i.L){const m=[];for(let E=0;E{"use strict";r.d(pe,{s:()=>i});var t=r(7206),e=r.n(t),a=r(16118),o=r(591),d=r(5e3),u=r(40520),g=r(61035),x=r(9133);let i=(()=>{class m{constructor(C,v,h){this.http=C,this.awsSignitureService=v,this.variables=h,this.credentials=new o.X(null)}setCredentials(C){this._credentials=C,this.credentials.next(C),this.credentials.complete()}getPreSignURLFromS3(C,v){let h=v.split("/");h=h.map(P=>encodeURIComponent(P));const S="https://"+C+".s3.eu-west-1.amazonaws.com/"+h.join("/"),p=60+((new Date).getTime()/1e3>>0),L=this.getQueryParameters(p),N=this.getSignature("GET",C,v,p);return this.getAuthorizedUrl(S,L,N)}getDataFromS3(C,v){const h={host:`${C}.s3.eu-west-1.amazonaws.com`,path:"/"+v+"?_t="+Date.now()};return a.sign(h,{secretAccessKey:this._credentials.secretAccessKey,accessKeyId:this._credentials.accessKeyId,sessionToken:this._credentials.securityToken}),delete h.headers.Host,this.http.get("https://"+h.host+h.path,h)}deleteFileFromS3(C,v){const h="https://"+C+".s3.eu-west-1.amazonaws.com/"+v,S=60+((new Date).getTime()/1e3>>0),p=this.getQueryParameters(S),L=this.getSignature("DELETE",C,v,S),N=this.getAuthorizedUrl(h,p,L);return this.http.delete(N).toPromise()}listFileFromS3(C,v){const h={host:`${C}.s3.eu-west-1.amazonaws.com`,path:"/"};return a.sign(h,{secretAccessKey:this._credentials.secretAccessKey,accessKeyId:this._credentials.accessKeyId,sessionToken:this._credentials.securityToken}),delete h.headers.Host,this.http.get("https://"+h.host+h.path,h).toPromise()}getQueryParameters(C){return"AWSAccessKeyId="+this._credentials.accessKeyId+"&Expires="+C.toString()+"&x-amz-security-token="+encodeURIComponent(this._credentials.securityToken)}getSignature(C,v,h,S){let p=h.split("/");p=p.map(j=>encodeURIComponent(j));const L=C+"\n\n\n"+S.toString()+"\nx-amz-security-token:"+this._credentials.securityToken+"\n/"+v+"/"+p.join("/");return e().HmacSHA1(L,this._credentials.secretAccessKey).toString(e().enc.Base64)}getAuthorizedUrl(C,v,h){return C+"?"+v+"&Signature="+encodeURIComponent(h)}}return m.\u0275fac=function(C){return new(C||m)(d.\u0275\u0275inject(u.eN),d.\u0275\u0275inject(g.X),d.\u0275\u0275inject(x.a))},m.\u0275prov=d.\u0275\u0275defineInjectable({token:m,factory:m.\u0275fac}),m})()},53403:(Se,pe,r)=>{"use strict";r.d(pe,{U:()=>a});var t=r(5e3),e=r(62474);let a=(()=>{class s{constructor(d){this.webApi=d}getServers(){return this.webApi.get("/api/datasource/servers")}getServerNames(){return this.webApi.get("/api/datasource/server/names")}getDatabases(d){return this.webApi.post("/api/datasource/databases",this.createParameters(d))}getDatabaseNames(d){return this.webApi.post("/api/datasource/database/names",this.createParameters(d))}getTablesAndViews(d,u){return this.webApi.post("/api/datasource/tables",this.createParameters(d,u,null,!0,!0))}getTableAndViewNames(d,u){return this.webApi.post("/api/datasource/table/names",this.createParameters(d,u,null,!0,!0))}getTables(d,u){return this.webApi.post("/api/datasource/tables",this.createParameters(d,u,null,!0,!1))}getTableNames(d,u){return this.webApi.post("/api/datasource/table/names",this.createParameters(d,u,null,!0,!1))}getViews(d,u){return this.webApi.post("/api/datasource/tables",this.createParameters(d,u,null,!1,!0))}getViewNames(d,u){return this.webApi.post("/api/datasource/table/names",this.createParameters(d,u,null,!1,!0))}getColumns(d,u,g){return this.webApi.post("/api/datasource/columns",this.createParameters(d,u,g))}getColumnNames(d,u,g){return this.webApi.post("/api/datasource/column/names",this.createParameters(d,u,g))}createParameters(d=null,u=null,g=null,x=null,i=null){let m={};return null!=d&&(m.serverName=d),null!=u&&(m.databaseName=u),null!=g&&(m.tableName=g),null!=x&&(m.getTables=x),null!=i&&(m.getViews=i),m}}return s.\u0275fac=function(d){return new(d||s)(t.\u0275\u0275inject(e.f))},s.\u0275prov=t.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac}),s})()},74564:(Se,pe,r)=>{"use strict";r.d(pe,{x:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(o,d,u){this.componentFactoryResolver=o,this.appRef=d,this.injector=u}open(o,d,u){return this.appendComponentTo(o,{inputs:d,outputs:u})}updateConfig(o,d){for(const u in d)u&&(o.instance[u]=d[u])}appendComponentTo(o,d){const u=this.componentFactoryResolver.resolveComponentFactory(o).create(this.injector);return this.attachConfig(d,u),this.appRef.attachView(u.hostView),document.body.appendChild(u.hostView.rootNodes[0]),this.childComponentRef=u,u}destroy(){this.appRef.detachView(this.childComponentRef.hostView),this.childComponentRef.destroy()}attachConfig(o,d){console.log(o);const u=o.inputs,g=o.outputs;for(const x in u)x&&(d.instance[x]=u[x]);for(const x in g)x&&(d.instance[x]=g[x])}}return a.\u0275fac=function(o){return new(o||a)(t.\u0275\u0275inject(t.ComponentFactoryResolver),t.\u0275\u0275inject(t.ApplicationRef),t.\u0275\u0275inject(t.Injector))},a.\u0275prov=t.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac}),a})()},46702:(Se,pe,r)=>{"use strict";r.d(pe,{N:()=>g});var t=r(591),e=r(85083),a=r(5e3),s=r(62474),o=r(62127),d=r(98613),u=r(22290);let g=(()=>{class x{constructor(m,E,C,v){this.webApi=m,this.userService=C,this.toastr=v,this.explanationSums=new t.X(null),this.commentableMainItems=new t.X(null),this.freeText=new t.X(null),this.explanationData=new t.X(null),E.frtService.subscribe(h=>this.frtService=h),this.user=C.getUser().subscribe(h=>{h&&(this.user={fullName:h.firstName+" "+h.lastName,userId:h.id})}),this.archivedExplanations=[],this.hasFreeze=!1,this.isFreeze=!1}setChartSeries(m){this.chartSeries=m}getChartSeries(){return this.chartSeries}hasFreezePermission(){this.frtService&&this.frtService.frtTable&&this.webApi.get("/Customer/FinancialReporting/HasFreezePermission?frtId="+this.frtService.frtId).then(m=>{this.hasFreeze=m,m&&this.webApi.post("/Customer/FinancialReporting/GetFreeze?frtId="+this.frtService.frtId,{frtTableName:this.frtService.frtTable}).then(C=>this.isFreeze=C)})}changeFreeze(){const m={};m.frtId=this.frtService.frtId,m.frtTableName=this.frtService.frtTable,m.isFreeze=this.isFreeze,this.webApi.post("/Customer/FinancialReporting/ChangeFreeze?frtId="+this.frtService.frtId,m).then(E=>this.isFreeze=E)}getExCel(m,E){const C=this.transformChartSerie(E[0].data),v={fileName:m.replace(/\s/g,"_"),jsonObject:C};this.webApi.post("/Customer/ExcelCustomer/GetCustomXLS?frtId="+this.frtService.frtId,v).then(h=>{null!==h?window.open(h,"_self"):this.toastr.warning("An error occured while downloading excel-file.","Download error")})}transformChartSerie(m){if(m){const E=m.find(v=>"Unexplained"===v.options.name);void 0!==E&&(m=m.filter(v=>"Unexplained"!==v.options.name));const C=[];return m.forEach(v=>{const h={},S=v.options.name;let p=Number(null==v.options.label||NaN===v.options.label?v.label:v.options.label);"Others"===v.options.name&&void 0!==E&&(p+=E.options.label),h.key=S,h.value=p,C.push(h)}),C}return null}saveExplanations(m,E,C,v){const h=[];if(v.length>0){const S=[];for(let p=0;pL.id===v[p].id&&L.financialReportingTableExplanationBridgeItemId===v[p].financialReportingTableExplanationBridgeItemId)&&-1!==v[p].id&&S.push(v[p]);S.length>0&&h.push(this.webApi.post("/Customer/FinancialReporting/explanationStatus2Hierarchy?frtId="+this.frtService.frtId,{explanations:S,deepestLevels:E,deviationId:this.deviationId}))}if(C.length>0&&h.push(this.webApi.put("/Customer/FinancialReporting/ArchiveExplanations?frtId="+this.frtService.frtId,{archivedExplanationIds:C,deviationId:this.deviationId})),m.length>0)for(let S=0;S{m[S].id=L[0].Value}));else if(-2===m[S].id){const L=this.currentExplanations.findIndex(N=>N.id===m[S].id&&N.financialReportingTableExplanationBridgeItemId===m[S].financialReportingTableExplanationBridgeItemId);if(null!==m[S].lowerExplanations&&m[S].lowerExplanations.length>0)if(-1===L)h.push(this.webApi.post("/Customer/FinancialReporting/explanationStatus2Hierarchy?frtId="+this.frtService.frtId,{explanations:m[S].lowerExplanations,deepestLevels:E,deviationId:this.deviationId}));else if(-1!==L){const N=[];m[S].lowerExplanations.forEach(j=>{const P=this.currentExplanations[L].lowerExplanations.findIndex(I=>I.id===j.id);(-1===P||this.currentExplanations[L].lowerExplanations[P].showExternal!==j.showExternal)&&N.push(j)}),N.length>0&&h.push(this.webApi.post("/Customer/FinancialReporting/explanationStatus2Hierarchy?frtId="+this.frtService.frtId,{explanations:N,deepestLevels:E,deviationId:this.deviationId}))}}else{const L=this.currentExplanations.findIndex(N=>N.id===m[S].id);-1!==L?this.currentExplanations[L].showExternal===m[S].showExternal&&this.currentExplanations[L].isHidden===m[S].isHidden&&this.currentExplanations[L].financialReportingTableExplanationBridgeItemId===m[S].financialReportingTableExplanationBridgeItemId&&this.currentExplanations[L].explanation===m[S].explanation&&this.currentExplanations[L].value===m[S].value||(p={explanation:m[S],deviationId:this.deviationId},h.push(this.webApi.put("/Customer/FinancialReporting/UpdateExplanationToFRT?frtId="+this.frtService.frtId,p))):-1!==this.archivedExplanations.findIndex(N=>N.id=m[S].id)&&h.push(this.webApi.post("/Customer/FinancialReporting/explanationStatus2Hierarchy?frtId="+this.frtService.frtId,{explanations:[m[S]],deepestLevels:E,deviationId:this.deviationId}))}}return new Promise((S,p)=>{Promise.all(h).then(()=>{this.currentExplanations=[],this.currentExplanations=JSON.parse(JSON.stringify(m)),this.archivedExplanations=[],S(m)},L=>{console.error(L)})})}deleteExplanations(m){}getCurrentExplanations(m,E,C,v){return new Promise((h,S)=>{this.loadCurrentExplanations&&this.loadCurrentExplanations.unsubscribe();const p={};m&&m.forEach(j=>{if(j){const I=e.G.flattenTree(j,"children",!0).reduce((A,O)=>((A[O.column]=A[O.column]||[]).push(O.name),A),{});this.extendObject(p,I)}});const L=[];Object.keys(p).forEach(j=>L.push({Key:j,Value:p[j]})),this.loadCurrentExplanations=this.webApi.postObserv("/Customer/FinancialReporting/GetCurrentExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,deviationId:C,frtTableName:this.frtService.frtTable,filterSelection:L.length>0?L:null,drilldown:E||null,requiredDrilldown:v}).subscribe(j=>{!1===j.hasOwnProperty("errMessages")&&(0===Object.keys(j.explanations).length&&j.explanations.constructor===Object&&(j.explanations.current=[],j.explanations.lower=[]),this.currentExplanations=!0===j.explanations.hasOwnProperty("current")?j.explanations.current:[],!0===j.explanations.hasOwnProperty("lower")&&j.explanations.lower.length>0&&j.explanations.lower.forEach(A=>this.currentExplanations.push({id:-2,bridgeItemSum:A.bridgeItemSum,financialReportingTableExplanationBridgeItemId:A.financialReportingTableExplanationBridgeItemId,lowerExplanations:[]})),this.lowerExplanationIds=!0===j.explanations.hasOwnProperty("lowerExplanationIds")?j.explanations.lowerExplanationIds:[],this.deviationId=C,this.deepestLevels=j.deepestLevels);const P=JSON.parse(JSON.stringify(j));h(P)},j=>{S(j)})})}getExplanations(m,E){return this.archivedExplanations=[],new Promise((C,v)=>(this.deviationId=m,this.deepestLevels=E,this.webApi.post("/Customer/FinancialReporting/GetExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable,deviationId:m,deepestLevels:E}).then(S=>{this.currentExplanations=S[0]?S[0].Value:[],S[1]&&S[1].Value.forEach(N=>this.currentExplanations.push({id:-2,bridgeItemSum:N.bridgeItemSum,financialReportingTableExplanationBridgeItemId:N.financialReportingTableExplanationBridgeItemId,lowerExplanations:[]})),this.lowerExplanationIds=S[2]?S[2].Value:[];const p=JSON.parse(JSON.stringify(S));C(p)},S=>{v(S)})))}hasExplanations(m,E){return this.deviationId=m,this.deepestLevels=E,this.webApi.postObserv("/Customer/FinancialReporting/hasExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable,deviationId:m,deepestLevels:E})}loadExplanationsPreviousMonth(m,E){return this.deviationId=m,this.deepestLevels=E,this.webApi.post("/Customer/FinancialReporting/getPreviousMonthExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable,deviationId:m,deepestLevels:E})}getCommentableValues(m){return this.webApi.post("/Customer/FinancialReporting/GetDrilldownForExplanation?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,requiredDrilldown:m,frtTableName:this.frtService.frtTable})}getLowerExplanations(m,E){return new Promise((C,v)=>this.webApi.post("/Customer/FinancialReporting/GetLowerExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable,deviationId:this.deviationId,bridgeItemId:m,lowerExplanationIds:this.lowerExplanationIds,deepestLevels:E}).then(S=>{const p=this.currentExplanations.findIndex(L=>-2===L.id&&L.financialReportingTableExplanationBridgeItemId===m);-1!==p&&(null===this.currentExplanations[p].lowerExplanations&&(this.currentExplanations[p].lowerExplanations=[]),JSON.parse(JSON.stringify(S)).forEach(N=>this.currentExplanations[p].lowerExplanations.push(N))),C(S)},S=>{v(S)}))}getArchivedExplanations(m){return new Promise((E,C)=>{0===this.archivedExplanations.length?this.webApi.post("/Customer/FinancialReporting/getArchivedExplanations?frtId="+this.frtService.frtId,{frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable,deviationId:this.deviationId,deepestLevels:m}).then(h=>{this.archivedExplanations=[],JSON.parse(JSON.stringify(h)).forEach(p=>this.archivedExplanations.push(p)),E(h)},h=>{C(h)}):E(new Array)})}checkForExplanation(m,E){const C={};if(m){m.forEach(S=>{if(S){const L=e.G.flattenTree(S,"children",!0).reduce((N,j)=>((N[j.column]=N[j.column]||[]).push(j.name),N),{});this.extendObject(C,L)}});const v=[];return Object.keys(C).forEach(S=>v.push({Key:S,Value:C[S]})),this.webApi.postObserv("/Customer/FinancialReporting/CheckForExplanation?frtId="+this.frtService.frtId,{filterSelection:v.length>0?v:null,drilldown:E||null,frtId:this.frtService.frtId,frtTableName:this.frtService.frtTable})}}checkExplanations(m,E,C,v,h){const S={};S.deviationIds=C,S.table=v,E&&(E=E.filter(p=>p.length>0),S.filterList=E.length>0&&1===E[0].length&&"All"===E[0][0].name?[]:E),S.frtId=m,S.level=h.map(p=>p.name),this.webApi.postObserv("/Customer/FinancialReporting/CheckExplanations?frtId="+m,S).subscribe(p=>{p&&(this.explanationSums.next(p.explanationStatus),this.commentableMainItems.next(p.commentableMainItems))})}getDrilldownList(m){const E=this.frtService.getTreelevel(m);return this.frtService.drilldown.slice(0,E+1).map(C=>({key:C,value:m[C]}))}getColumnsForExplanation(m,E,C){return{deviationName:C.label,deviationValue:Math.round(m.Value),deviationId:C.id,column1Name:this.getColumnLabel(C.column1id),column1Value:Math.round(E[this.getColumnName(C.column1id)]),column1Category:this.frtService.getCategoryById(C.column1id),column2Name:this.getColumnLabel(C.column2id),column2Value:Math.round(E[this.getColumnName(C.column2id)]),column2Category:this.frtService.getCategoryById(C.column2id)}}getCommmentableDeviations(){this.webApi.get("/Customer/FinancialReporting/GetCommentableDeviation?frtId="+this.frtService.frtId).then(m=>{})}getColumnName(m){return this.frtService.getNameById(m)}getColumnLabel(m){return this.frtService.getLabelById(m)}initComment(m,E,C){const v=[];if(null!=m.Value&&"NaN"!==m.Value&&0!==m.Value){const h=this.frtService.filterApplied,S=this.getDrilldownList(E),p=this.getColumnsForExplanation(m,E,C);v.push(this.checkForExplanation(h,S).subscribe(L=>{0===L[1].length?(m.hierarchy=L[0],v.push(this.hasExplanations(p.deviationId,L[0]).subscribe(N=>{m.isLoading=!1,m.isCommentable=!0,""!==N&&null!==N&&0!==N?(m.hasComments=!0,N===Math.round(p.deviationValue)&&(m.totallyExplained=!0)):m.hasComments=!1,this.frtService.calcData()}))):(m.isLoading=!1,m.isCommentable=!1,m.errMessage=L[1],this.frtService.calcData())}))}return v}extendObject(m,E){return Object.keys(E).forEach(C=>m[C]=E[C])}sortByKey(m,E,C){return m.sort(function(v,h){const S=v[E],p=h[E];return"asc"===C?Sp?1:0:Sp?-1:0})}}return x.\u0275fac=function(m){return new(m||x)(a.\u0275\u0275inject(s.f),a.\u0275\u0275inject(o.I),a.\u0275\u0275inject(d.K),a.\u0275\u0275inject(u._W))},x.\u0275prov=a.\u0275\u0275defineInjectable({token:x,factory:x.\u0275fac}),x})()},62026:(Se,pe,r)=>{"use strict";r.d(pe,{R:()=>e});var t=r(5e3);let e=(()=>{class a{constructor(){this.periods=["P04","P05","P06","P07","P08","P09","P10","P11","P12","P01","P02","P03"]}getPeriods(){return this.periods.sort()}getPeriod(){this.getPeriodOfDate(Date.now)}getPeriodOfDate(o,d){return o instanceof Date||(o.indexOf("T")>-1&&(o=o.split("T")[0]),(o=new Date(o)).setMinutes(o.getMinutes()+o.getTimezoneOffset())),d&&o.setMonth(o.getMonth()+d),this.periods[o.getMonth()]}getDateOfPeriod(o,d){const u=this.getPeriods().indexOf(o),g=new Date(d-1,9);return g.setMonth(g.getMonth()+u),g}getFiscalYear(o){return o?o instanceof Date||(o.indexOf("T")>-1&&(o=o.split("T")[0]),(o=new Date(o)).setMinutes(o.getMinutes()+o.getTimezoneOffset())):o=new Date,o.getMonth()>=9?o.getFullYear()+1:o.getFullYear()}getYear(o){return o?o instanceof Date||(o.indexOf("T")>-1&&(o=o.split("T")[0]),(o=new Date(o)).setMinutes(o.getMinutes()+o.getTimezoneOffset())):o=Date.now,o.getFullYear()}getMonth(o,d){return o?o instanceof Date||(o.indexOf("T")>-1&&(o=o.split("T")[0]),(o=new Date(o)).setMinutes(o.getMinutes()+o.getTimezoneOffset())):o=new Date,d&&o.setMonth(o.getMonth()+d),o.getMonth()+1}getPeriodName(o){return this.getPeriodOfDate(o)+" - ("+this.getFiscalYear(o)+")"}}return a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=t.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"}),a})()},62127:(Se,pe,r)=>{"use strict";r.d(pe,{I:()=>g});var t=r(40520),e=r(591),a=r(5e3),s=r(62474),o=r(97454),d=r(30745),u=r(14356);let g=(()=>{class x{constructor(m,E,C,v){this.webApi=m,this.bookmarkService=E,this.ngxSmartModalService=C,this.loadingBarService=v,this.frtService=new e.X(null),this.preventFrtTableLoad=[6038,6076,5652,6099],this.frtOptions={}}getCurrent(){return this.frtService.value}setFrtService(m){this.frtService.next(m)}getConfig(m,E){return this.webApi.get("/api/project/"+m+"/frt2/"+E)}loadHasComments(m){return this.webApi.post("/Customer/FinancialReporting/GetHasComments",m)}printSql(m){return this.webApi.post("/Customer/FinancialReporting/GetSQL",m)}getData(m,E){var C,v;let h=new t.LE;return!1===E&&(h=h.set("cached","false")),this.loadingBarService.start(),isNaN(m.loadLevel)?-1!==this.preventFrtTableLoad.indexOf(null==m?void 0:m.frtId)&&(null===(C=m.filterList)||void 0===C?void 0:C.length)<1?(this.loadingBarService.complete(),Promise.resolve([])):this.webApi.post("/Customer/FinancialReporting/GetData",m).then(S=>(this.loadingBarService.complete(),S),S=>(this.loadingBarService.complete(),S)):-1!==this.preventFrtTableLoad.indexOf(null==m?void 0:m.frtId)&&(null===(v=m.filterList)||void 0===v?void 0:v.length)<1?(this.loadingBarService.complete(),Promise.resolve([])):this.webApi.post("/Customer/FinancialReporting/InitData",m).then(S=>(this.loadingBarService.complete(),S),S=>(this.loadingBarService.complete(),S))}getTable(m,E){return this.webApi.get("/api/project/"+m+"/frt/"+E+"/table")}bookletexportDialog(){const m=this.getCurrent(),E={frtId:m.frtId,table:m.frtTable,fiscalyear:m.fiscalYear.value},C=[];this.bookmarkService.getBookmarksFrtExport(this.bookmarkService.prefix).then(h=>{h&&h.forEach(S=>{const p=this.bookmarkService.getSubtitle(S,this.bookmarkService.prefix),L={title:S.name,subtitle:p,id:S.id,link:S.where.split("/#")[1]};C.push(L)}),this.ngxSmartModalService.setModalData({bookmarks:C,request:E},"bookletExport"),this.ngxSmartModalService.getModal("bookletExport").open()})}addBookmark(m=!0){this.ngxSmartModalService.setModalData({showPeriod:m},"addBookmark"),this.ngxSmartModalService.getModal("addBookmark").open()}uploadDialog(m){this.ngxSmartModalService.setModalData({uploadId:m},"planningUpload"),this.ngxSmartModalService.getModal("planningUpload").open()}}return x.\u0275fac=function(m){return new(m||x)(a.\u0275\u0275inject(s.f),a.\u0275\u0275inject(o.F),a.\u0275\u0275inject(d.lu),a.\u0275\u0275inject(u.dL))},x.\u0275prov=a.\u0275\u0275defineInjectable({token:x,factory:x.\u0275fac}),x})()},75531:(Se,pe,r)=>{"use strict";r.d(pe,{T:()=>d});var t=r(591),e=r(5e3),a=r(62474),s=r(54620),o=r(22313);let d=(()=>{class u{constructor(x,i,m){this.webApi=x,this.projectGlobalService=i,this.santizier=m,this.langChanged$=new t.X(!1),this._cache=new Map,this.subs=[],this.languagesLoaded=new t.X(null),this.subs.push(this.projectGlobalService.projectObserv.subscribe(E=>{null!==E&&this.getLangProm(E.id).then(C=>{this._languages=C,this._languageCode=window.localStorage.getItem("language"),null===this._languageCode&&(this._languageCode=navigator.language.split("-")[0]),null===C.find(h=>h.key===this._languageCode)&&(this._languageCode=1===C.length?C[0].key:"en"),this._projectLanguage=this._languageCode,this.languagesLoaded.next(C)})}))}ngOnDestroy(){this.subs.forEach(x=>x.unsubscribe)}getLangProm(x){return new Promise((i,m)=>{x||m("ProjectId not set"),this._languages?i(this._languages):this.webApi.get("/api/language/GetLanguageMapping/"+x).then(E=>{(E=E.map(C=>(C.function=this.action,C)))&&(this._languages=E,this._languages[0]&&(this._languages[0].active=!0),this._languageCode=localStorage.getItem("language")),this._languageCode||(this._languageCode=navigator.language.split("-")[0]),this.selectDefaultLang(this._languageCode),i(E)},E=>m(E))})}get(x){const i=this.projectGlobalService.getProjectId();this.langChanged$.next(!1),this._cache.has(x+i)?this._cache.has(x+i)&&(this._translations=this._cache.get(x+i),this.langChanged$.next(!0)):this.webApi.get("/api/language/GetTranslationsByLangCode/"+x+"/"+this.projectGlobalService.getProjectId()).then(m=>{this._cache.set(x+i,m),this._translations=m,this.langChanged$.next(!0)})}getLanguages(){return this._languages}action(x,i){x.languageService.selectDefaultLang(i.key),x.activeLanguageName=i.lang;for(let m=0;m!0===m.active);this._languages[i].active=!1,i=this._languages.findIndex(m=>m.code===x),-1===i&&(i=0),this._languages[i].active=!0,this._languageCode=x,this.get(this._languageCode),this._languageName=this._languages[i].lang,window.localStorage.setItem("language",this._languageCode)}translate(x){return void 0!==this._translations&&this._translations[x]?this._translations[x]:x}translateHTML(x){return void 0!==this._translations&&this._translations[x]?this.santizier.bypassSecurityTrustHtml(this._translations[x]):x}}return u.\u0275fac=function(x){return new(x||u)(e.\u0275\u0275inject(a.f),e.\u0275\u0275inject(s.k),e.\u0275\u0275inject(o.DomSanitizer))},u.\u0275prov=e.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},96268:(Se,pe,r)=>{"use strict";r.d(pe,{F:()=>u});var t=r(40520),e=r(591),a=r(92340),s=r(5e3),o=r(62474),d=r(54620);let u=(()=>{class g{constructor(i,m,E){this.webApi=i,this.projectService=m,this.handler=E,this.projectObserv=new e.X(null),this.projectId=m.projectId,this.httpClient=new t.eN(E)}uploadBinary(i){const m=new t.WM;let v;m.append("Content-Type","application/json");const h=window.location.hostname;return v=a.N.api[h]?a.N.api[h].pulseBackend:a.N.api.default.pulseBackend,this.httpClient.post(v+"/api/project/admin/"+this.projectService.projectId+"/binary",i,{headers:m}).toPromise()}uploadImage(i){const m=new t.WM;let v;m.append("Content-Type","application/json");const h=window.location.hostname;return v=a.N.api[h]?a.N.api[h].pulseBackend:a.N.api.default.pulseBackend,this.httpClient.post(v+"/api/project/admin/"+this.projectService.projectId+"/image",i,{headers:m,withCredentials:!0}).toPromise()}updateProjectItem(i){return this.webApi.post("/api/dashboardadmin/"+this.projectService.projectId+"/updateprojectitem",i)}createGroup(i){return this.webApi.post("/api/project/admin/"+this.projectService.projectId+"/group",i)}updateGroup(i){return this.webApi.put("/api/project/admin/"+this.projectService.projectId+"/group/"+i.id,i)}createExternalLink(i){return this.webApi.post("/api/extlink/new/projectId/"+this.projectService.projectId,i)}updateExternalLink(i){return this.webApi.post("/api/extlink/update/"+i.id,i)}createImageFromApi(i){return this.webApi.get("/api/mobile/create_image/"+i)}getScreenshotFromApiImage(i){let m;const E=window.location.hostname;return m=a.N.api[E]?a.N.api[E].pulseBackend:a.N.api.default.pulseBackend,this.httpClient.get(m+"/api/project/"+this.projectService.projectId+"/dashboard/"+i+"/thumbnail").toPromise()}createDashboard(i){return this.webApi.post("/api/dashboardadmin/"+this.projectService.projectId+"/addnewdashboard",i)}updateDashboard(i){return this.webApi.post("/api/dashboardadmin/"+this.projectService.projectId+"/updatedashboard",i)}getGlobalObject(i){return this.webApi.get("/api/project/admin/"+this.projectService.projectId+"/globalobject/"+i)}updateGlobalObject(i){return this.webApi.post("/api/project/admin/"+this.projectService.projectId+"/globalobject/update/"+i.id,i)}getReportingInstances(){return this.webApi.get("/api/admin/reportinginstance")}createReponserateDashboard(i,m,E,C,v,h){return this.webApi.post("/api/responserate/"+i+"/create",{type:m,category:E,name:C,filterConfig:v,breakdowns:h})}existsReponserateDashboard(i){return this.webApi.get("/api/responserate/"+i+"/exists")}}return g.\u0275fac=function(i){return new(i||g)(s.\u0275\u0275inject(o.f),s.\u0275\u0275inject(d.k),s.\u0275\u0275inject(t.jN))},g.\u0275prov=s.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac,providedIn:"root"}),g})()},54620:(Se,pe,r)=>{"use strict";r.d(pe,{k:()=>E});var t=r(8929),e=r(591),a=r(27737),s=r(46809),o=r(5e3),d=r(62474),u=r(98613),g=r(69808),x=r(9133),i=r(23328),m=r(11735);let E=(()=>{class C{constructor(h,S,p,L,N,j){this.webApi=h,this.userService=S,this.location=p,this.variables=L,this.awsService=N,this.router=j,this.disableInfo=!1,this._groups$=new t.xQ,this.groups$=this._groups$.asObservable(),this.helpSection$=new e.X(null),this.projectObserv=new e.X(null)}setProject(h,S={msg:""}){return new Promise((p,L)=>{(h===this.projectId||h===this.projectAlias)&&p(this.project),isNaN(h)?this.setProjectWithAlias(h).then(N=>p(N),N=>L(N)):this.setProjectWithId(h,S).then(N=>p(N),N=>L(N))})}setProjectWithId(h,S={msg:""}){return new Promise((p,L)=>{const N=[];this.setProjectId(h),N.push(this.webApi.get("/Customer/ProjectCustomer/SetProject?projectId="+h).then(j=>this._setProject(j))),N.push(this.getProjectAlias(h)),Promise.all(N).then(()=>p(this.project),j=>{this.router.navigate(["error","403"],{queryParams:S,skipLocationChange:!0}),L(j)})})}setProjectWithAlias(h,S={msg:""}){return new Promise((p,L)=>{this.projectAlias=h.toLowerCase(),this.webApi.get("/Customer/ProjectCustomer/SetProjectAlias?alias="+h).then(N=>{this._setProject(N),this.setProjectId(N.id),p(this.project)},N=>{let j=N.error.text.split('"').find(P=>P.startsWith("mailto"));j&&(j=j.replace("//","")),void 0===S.link&&(S.link=j),this.router.navigate(["error","403"],{queryParams:S,skipLocationChange:!0}),L(N)})})}setProjectId(h){this.projectId!==h&&(this.projectId=h,this.variables.projectId=h,this.getGlobalObjects(),this.userService.updateRoles(h),this.webApi.assumeRole(h).then(S=>{this.awsService.setCredentials(S)}))}_setProject(h){this.project=h,this.projectObserv.next(h)}getProjectAlias(h){return this.webApi.get("/api/project/"+h+"/alias").then(S=>{this.projectAlias=void 0!==S.alias?S.alias.toLowerCase():S.alias},S=>console.error(S))}getGlobalObjects(){this.webApi.get("/api/project/"+this.projectId+"/globalobject").then(h=>this.globalObjects=h)}getHasMenuItems(){this.webApi.get("/api/project/"+this.projectId+"/getHasMenuItems").then(h=>this.hasMenu=h)}checkGlobalObject(...h){if(!this.globalObjects)return!1;for(let S=0;SL===p))return!1}return!0}checkOneGlobalObject(...h){if(!this.globalObjects)return!1;for(let S=0;SL===p))return!0}return!1}getProjectId(){return this.projectId}getUser(h=!1){return new Promise((S,p)=>{this.projectUser&&!h?S(this.projectUser):this.webApi.get("/api/project/"+this.projectId+"/user?"+s.Z.makeSurePostIsNotCached()).then(L=>{this.projectUser=L,S(this.projectUser)},L=>p(L))})}getProjects(){return this.webApi.get("/api/project/")}getInfos(){return new Promise((h,S)=>{this.infos?h(this.infos):this.webApi.get("/api/project/"+this.projectId+"/helppages/en").then(p=>{this.infos=p,h(this.infos)})})}getHelpSectionItems(){return this.webApi.get(this.variables.apiUrl+"/api/helpsection").then(h=>{this.helpSection$.next(h)})}getAllHelpSectionItems(){return this.webApi.get(this.variables.apiUrl+"/api/helpsection/all")}addHelpSectionItem(h){return this.webApi.post(this.variables.apiUrl+"/api/helpsection",h)}editHelpSectionItem(h){return this.webApi.put(this.variables.apiUrl+"/api/helpsection",h)}deleteHelpSectionItem(h){return this.webApi.delete(this.variables.apiUrl+"/api/helpsection/"+h)}updateProjectItem(h){return this.webApi.post("/api/dashboardadmin/"+this.projectId+"/updateprojectitem",h)}getGroups(){return this.updateGroups(),this.groups$}updateGroups(h){this.webApi.get("/api/project/"+this.projectId+"/group").then(S=>{h&&(S.find(p=>p.id===h).selected=!0),this._groups$.next(S)})}getDashboardItemByGlobalId(h){return this.webApi.get("/api/dashboard/go/"+h)}getScorecard(h){return this.webApi.get("/api/bsc/get/bscId/"+h)}getItems(h){return new Promise((S,p)=>{this.webApi.get("/api/project/"+h+"/item").then(L=>{this.projectItems=L,S(L)})})}getItemGo(h,S){switch(S){case a.S.sa:case a.S.sa2:const p=this.projectItems.find(L=>!!L.directPath&&L.directPath.endsWith(h));return p?p.go:-1}}getItemName(h,S){switch(S){case a.S.sa:case a.S.sa2:const p=this.projectItems.find(L=>!!L.directPath&&L.directPath.endsWith(h));if(p&&p.data&&p.data.navigation)return p.data.navigation;break;default:return""}}normalizeProjectPath(h){const S=(h=h.split("?")[0]).split("/"),p=S.findIndex(j=>"project"===j)+1,L=S[p];return S[p]=L===this.projectAlias?""+this.projectId:L,S.join("/")}doesMatchFullPath(h){return this.normalizeProjectPath(this.location.path())===this.normalizeProjectPath(h)}compareProjectPath(h,S){return this.normalizeProjectPath(S)===this.normalizeProjectPath(h)}}return C.\u0275fac=function(h){return new(h||C)(o.\u0275\u0275inject(d.f),o.\u0275\u0275inject(u.K),o.\u0275\u0275inject(g.Ye),o.\u0275\u0275inject(x.a),o.\u0275\u0275inject(i.s),o.\u0275\u0275inject(m.F0))},C.\u0275prov=o.\u0275\u0275defineInjectable({token:C,factory:C.\u0275fac}),C})()},19983:(Se,pe,r)=>{"use strict";r.d(pe,{i:()=>a});var t=r(11735),e=r(5e3);let a=(()=>{class s{constructor(d){this.router=d,this.previousUrl=void 0,this.currentUrl=void 0,this.currentUrl=this.router.url,d.events.subscribe(u=>{u instanceof t.m2&&(this.previousUrl=this.currentUrl,this.currentUrl=u.url)})}getPreviousUrl(){return this.previousUrl}routeTo(d){this.router.navigate([d])}}return s.\u0275fac=function(d){return new(d||s)(e.\u0275\u0275inject(t.F0))},s.\u0275prov=e.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac}),s})()},91123:(Se,pe,r)=>{"use strict";r.d(pe,{d:()=>s});var t=r(5e3),e=r(62474),a=r(61035);let s=(()=>{class o{constructor(u,g){this.webApi=u,this.awsSignatureService=g,this.cache={}}search(u){const g=btoa(u);return new Promise((x,i)=>{this.cache[g]?x(this.cache[g]):this.webApi.post("/api/scd/search",{search:u}).then(E=>{this.cache[g]=E,x(this.cache[g])})})}setWithProjectId(u){this.awsSignatureService.set(u)}}return o.\u0275fac=function(u){return new(u||o)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.X))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},52976:(Se,pe,r)=>{"use strict";r.d(pe,{t:()=>e});class e{constructor(){this.Title="Pulse Analytics Export",this.FileType="PPTX",this.EMailSubject="Pulse Analytics - Report",this.EMailTemplate="pulse-export-mail-template.txt",this.Language="de",this.IsManager=!1}}},78715:(Se,pe,r)=>{"use strict";r.d(pe,{j:()=>g});var t=r(5e3),e=r(62474),a=r(98613),s=r(61035),o=r(1862),d=r(75531),u=r(22290);let g=(()=>{class x{constructor(m,E,C,v,h,S){this.webApi=m,this.userService=E,this.awsSignatureService=C,this.uploadService=v,this.langService=h,this.toastyService=S,this.AWS_API_GATEWAY_ENDPOINT="eu-west-1.gateway.pulse.siemens.cloud",this.bucketName="pulse-user",this.userService.getUser().subscribe(p=>{p&&(this.userGid=p.gid,this.userMail=p.email)})}_btou(m){return btoa(unescape(encodeURIComponent(m)))}createSlides(m,E){const C=[];void 0!==E&&C.push({Type:"TitleSlide_de",title:E});for(let v=0;v{["Promoter","Passive","Detractor"].some(h=>v.innerHTML===h)&&(E=!0)}),E}createTitlePage(m){return{Type:"TitleSlide_de",title:m}}createSlide(m){const E={},C=m[0].getElementsByClassName("chart-header");C[0]&&(E.title=C[0].innerHTML),C[1]&&(E.subtitle=C[1].innerHTML);let v="";for(let h=0;h{this.exportData({bucket:this.bucketName,key:this.userGid+"/Payload/export.json",action:"generatePPT"}).then(C=>{C||this.toastyService.error("",this.langService.translate("EXPORTSERVICE.PPT.ERROR"))})})}getGlobalStyle(){const E=document.head.getElementsByTagName("style")[0];let C=E?E.innerHTML:"";return C=C.split("/*# sourceMappingURL=")[0].replace(/ url\('/g," url('http://localhost:4201/assets/fonts/"),C}saveExportInS3(m){const E=JSON.stringify(m);return this.uploadService.upload(E,this.bucketName,this.userGid+"/Payload/export.json")}exportData(m){return new Promise((E,C)=>{this.awsSignatureService.bucketName="hx3s7r8jah",this.awsSignatureService.Post('"'+JSON.stringify(m).replace(/"/g,'\\"')+'"',"/dev-hx3s7r8jah",[],[],this.AWS_API_GATEWAY_ENDPOINT).subscribe(v=>{v&&v.indexOf("sucessful")>-1?E(!0):E(!1)},v=>{C(v)}),this.awsSignatureService.bucketName="1ta6qoye04"})}}return x.\u0275fac=function(m){return new(m||x)(t.\u0275\u0275inject(e.f),t.\u0275\u0275inject(a.K),t.\u0275\u0275inject(s.X),t.\u0275\u0275inject(o.C),t.\u0275\u0275inject(d.T),t.\u0275\u0275inject(u._W))},x.\u0275prov=t.\u0275\u0275defineInjectable({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},1862:(Se,pe,r)=>{"use strict";r.d(pe,{C:()=>g});var t=r(40520),e=r(7206),a=r.n(e),s=r(5e3),o=r(62474),d=r(23328),u=r(54620);let g=(()=>{class x{constructor(m,E,C,v){this.http=m,this.webApi=E,this.awsService=C,this.projectService=v,this.progressValue=0,this.uploadStatus={},this.fileNames={},this.hideUploadButton={},this.projectId=this.projectService.projectId}upload(m,E,C,v){return new Promise((h,S)=>{if(this.projectId&&this.webApi.hasAssumeRole){const p=E,L="private",N=new Date(this.awsService.credentials.value.expiration),j=this.timestamp(),P=this.yyyymmdd(),I=this.awsService.credentials.value.accessKeyId+"/"+P+"/eu-west-1/S3/aws4_request",A={expiration:N,conditions:[{bucket:p},["starts-with","$key",""],{acl:L},["starts-with","$Content-Type",""],{"x-amz-security-token":this.awsService.credentials.value.securityToken},{"x-amz-algorithm":"AWS4-HMAC-SHA256"},{"x-amz-credential":I},{"x-amz-date":j}]};v&&A.conditions.push(["starts-with","$tagging",""]);const O=window.btoa(JSON.stringify(A)),T=a().HmacSHA256(P,"AWS4"+this.awsService.credentials.value.secretAccessKey),c=a().HmacSHA256("eu-west-1",T),M=a().HmacSHA256("s3",c),w=a().HmacSHA256("aws4_request",M),R=a().HmacSHA256(O,w).toString(a().enc.Hex);let D="";v&&v.length>0&&(D+="",v.forEach(H=>{D+=""+H.key+""+H.value+""}),D+="");const Y=new FormData;Y.append("key",C),Y.append("acl",L),Y.append("Content-Type",m.type?m.type:"application/json"),Y.append("policy",O),Y.append("x-amz-algorithm","AWS4-HMAC-SHA256"),Y.append("x-amz-credential",I),Y.append("x-amz-date",j),Y.append("x-amz-Signature",R),Y.append("x-amz-security-token",this.awsService.credentials.value.securityToken),v&&Y.append("tagging",D),Y.append("file",m);const y=new t.aW("POST","https://"+p+".s3.amazonaws.com/",Y,{reportProgress:!0});this.http.request(y).subscribe(H=>{H.type===t.dt.UploadProgress?this.progressValue=Math.round(100*H.loaded/H.total):H instanceof t.Zn&&h(null)},H=>{S(H)})}else h(null)})}timestamp(){const m=new Date;return m.getUTCFullYear()+(m.getUTCMonth()+1<10?"0":"")+(m.getUTCMonth()+1)+(m.getUTCDate()<10?"0":"")+m.getUTCDate()+"T"+(m.getUTCHours()<10?"0":"")+m.getUTCHours()+(m.getUTCMinutes()<10?"0":"")+m.getUTCMinutes()+(m.getUTCSeconds()<10?"0":"")+m.getUTCSeconds()+"Z"}yyyymmdd(){const m=new Date,E=m.getFullYear(),C=m.getMonth()+1,v=m.getDate();return E+(C<10?"0":"")+C+(v<10?"0":"")+v}recordTime(){const m=new Date;return m.getUTCFullYear()+(m.getUTCMonth()+1<10?"0":"")+(m.getUTCMonth()+1)+(m.getUTCDate()<10?"0":"")+m.getUTCDate()+(m.getUTCHours()<10?"0":"")+m.getUTCHours()+(m.getUTCMinutes()<10?"0":"")+m.getUTCMinutes()+(m.getUTCSeconds()<10?"0":"")+m.getUTCSeconds()+(m.getUTCMilliseconds()<10?"0":"")+m.getUTCMilliseconds()}}return x.\u0275fac=function(m){return new(m||x)(s.\u0275\u0275inject(t.eN),s.\u0275\u0275inject(o.f),s.\u0275\u0275inject(d.s),s.\u0275\u0275inject(u.k))},x.\u0275prov=s.\u0275\u0275defineInjectable({token:x,factory:x.\u0275fac}),x})()},98613:(Se,pe,r)=>{"use strict";r.d(pe,{K:()=>i});var t=r(591),e=r(30567),a=r(92198),s=r(24850),o=r(46809),d=r(5e3),u=r(62474),g=r(9133),x=r(40520);let i=(()=>{class m{constructor(C,v,h){this.webApi=C,this.variables=v,this.http=h,this.user=new t.X(void 0),this.delUser=null,this.delegatedUser=new t.X(null),this.delegatedUser$=this.delegatedUser.pipe((0,a.h)(S=>S)),this.isDelegationMode$=new t.X(!1),this._roles$$=new t.X(null),this.roles$=this._roles$$.asObservable(),this.firstRun=!1,this.variables.projectId$.subscribe(S=>{})}getUser(C){return C?this.webApi.getObserv("/api/user/"+C):(this.firstRun||this.variables.projectId$.subscribe(v=>{this.checkDelegation()}),this.user.pipe((0,a.h)(v=>v)))}getUserFromGID(C){return this.webApi.get("/api/user/fromGid/"+C)}getUsersFromGids(C){const v=[];return C.forEach(h=>{v.push(this.webApi.getObserv("/api/user/fromGid/"+h))}),(0,e.D)(v)}getUsers(C){return this.webApi.getObserv("/api/project/"+C+"/user?"+o.Z.makeSurePostIsNotCached())}searchUser(C){return new Promise((v,h)=>{this.webApi.post("/api/scd/search",{search:C}).then(S=>{v(S)},S=>h(S))})}searchUserSub(C,v=0){return this.webApi.postObserv(v>0?"/customer/AdminPanelCustomer/SearchProjectUser?projectId="+v:"/customer/AdminPanelCustomer/SearchUser",{searchValue:C})}logInUser(C,v=0){return new Promise(v>0?(h,S)=>{this.webApi.post("/Customer/AdminPanelCustomer/ProxyProjectLogin?projectId="+v,{gid:C,projectId:v}).then(p=>{h(p)},p=>S(p))}:(h,S)=>{this.webApi.post("/Customer/AdminPanelCustomer/ProxyLogin",{gid:C}).then(p=>{h(p)},p=>S(p))})}logOutUser(){return new Promise((C,v)=>{this.webApi.post("/Customer/AdminPanelCustomer/ProxyLogout",{}).then(h=>{C(h)},h=>v(h))})}updateRoles(C){this.webApi.get("/api/project/"+C+"/role").then(v=>{this._roles$$.next(v),this.roles=v},v=>v)}isProxy(){return!(+atob(this.variables.getCredentials()).split(";")[1]>=Math.round(((new Date).getTime()+72e5)/1e3))}getRoles(C){return new Promise((v,h)=>{C?this.roles?v(this.roles):this.webApi.get("/api/project/"+C+"/role").then(S=>{this._roles$$.next(S),this.roles=S,v(this.roles)},S=>h(S)):h("cannot get roles, missing project id")})}hasOneRole(...C){return!!this.roles&&(C=C.map(v=>v.toLowerCase()),this.roles.some(v=>C.indexOf(v.toLowerCase())>-1))}hasRole(C){return void 0!==this.roles&&this.roles.map(v=>v.toLowerCase()).indexOf(C.toLowerCase())>-1}getUserRoles(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/"+C+"/user/"+v+"/role").then(p=>{this.userRoles=p,h(this.userRoles)},p=>S(p))})}getUser2Role(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/"+C+"/user/"+v+"/user2role").then(p=>{this.user2Role=p,h(this.user2Role)},p=>S(p))})}postUser2Role(C,v,h){return new Promise((S,p)=>{this.webApi.post("/api/project/"+C+"/user/"+v+"/user2role",h)})}setUserProjectAdmin(C,v,h){return new Promise(h?(S,p)=>{this.webApi.post("/api/project/"+C+"/admin",h)}:(S,p)=>{this.webApi.delete("/api/project/"+C+"/admin/"+v)})}deleteUser2Role(C,v,h){return new Promise((S,p)=>{this.webApi.delete("/api/project/"+C+"/user/"+v+"/user2role/"+h)})}getGlobalObject(C){return new Promise((v,h)=>{this.webApi.get("/api/project/admin/"+C+"/globalobject").then(S=>{this.globalObject=S,v(this.globalObject)},S=>h(S))})}getUser2GlobalObject(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/admin/"+C+"/user/"+v+"/user2globalobject").then(p=>{this.user2GlobalObject=p,h(this.user2GlobalObject)},p=>S(p))})}postUser2GlobalObject(C,v,h){return new Promise((S,p)=>{this.webApi.post("/api/project/admin/"+v+"/user/"+C+"/user2globalobject",h).then(L=>{S(L)})})}deleteUser2GlobalObject(C,v,h){return new Promise((S,p)=>{this.webApi.delete("/api/project/admin/"+v+"/user/"+C+"/user2globalobject/"+h).then(L=>{S(L)})})}getUser2Project(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/admin/"+C+"/user/"+v+"/user2project").then(p=>{this.user2Project=p,h(this.user2Project)},p=>S(p))})}postUser2Project(C,v){return new Promise((h,S)=>{this.webApi.post("/api/project/admin/"+C+"/user",v).then(p=>{this.newUser=p,h(this.newUser)})})}deleteUser2Project(C,v){return new Promise((h,S)=>{this.webApi.delete("/api/project/admin/"+C+"/user/"+v.id).then(p=>{h(null)})})}putUser2Project(C,v,h){return new Promise((S,p)=>{this.webApi.put("/api/project/admin/"+C+"/user/"+v+"/user2project",h)})}getUserDashboards(C){return new Promise((v,h)=>{this.webApi.get("/api/project/admin/"+C+"/dashboard").then(S=>{this.userDashboards=S,v(this.userDashboards)},S=>h(S))})}getUser2Dashboard(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/admin/"+C+"/user/"+v+"/user2dashboard").then(p=>{this.user2Dashboard=p,h(this.user2Dashboard)},p=>S(p))})}postUser2Dashboard(C,v,h){return new Promise((S,p)=>{this.webApi.post("/api/project/admin/"+C+"/user/"+v+"/user2dashboard",h)})}putUser2Dashboard(C,v,h,S){return new Promise((p,L)=>{this.webApi.put("/api/project/admin/"+C+"/user/"+v+"/user2dashboard/"+h,S)})}deleteUser2Dashboard(C,v,h){return new Promise((S,p)=>{this.webApi.delete("/api/project/admin/"+C+"/user/"+v+"/user2dashboard/"+h)})}getProjectAdmins(C){return new Promise((v,h)=>{this.webApi.get("/api/project/"+C+"/admin").then(S=>{this.projectAdmin=S,v(this.projectAdmin)},S=>h(S))})}postProjectAdmin(C,v){return new Promise((h,S)=>{this.webApi.post("/api/project/"+C+"/admin/",v)})}deleteProjectAdmin(C,v){return new Promise((h,S)=>{this.webApi.delete("/api/project/"+C+"/admin/"+v)})}getHierarchyPermissions(C,v){return new Promise((h,S)=>{this.webApi.get("/api/project/admin/"+C+"/user/"+v+"/hierarchicPermission").then(p=>{h(p)},p=>S(p))})}getHierarchyPermission(C,v,h,S=null,p=null){return new Promise((L,N)=>{let j="";null!=S&&""!==S&&(j="?search="+S),null!=p&&(j+=(S?"&":"?")+"showAllColumn="+p),this.webApi.get("/api/project/admin/"+C+"/user/"+v+"/hierarchicPermission/"+j).then(P=>{L(P)},P=>N(P))})}updateHierarchyPermission(C,v,h){return new Promise((S,p)=>{this.webApi.post("/api/project/admin/"+v+"/user/"+h+"/hierarchicPermission",C).then(L=>{S(L)},L=>p(L))})}deleteDashboardPermissions(C,v){return this.webApi.delete(this.variables.apiUrl+`/api/Tableau/permissions/globalobject/${C}/user/${v}`)}getDelegation(C,v){return this.http.get(`https://auth.pulse.siemens.cloud/Auth/Delegate?gid=${C}&projectId=${v}`).subscribe(S=>{if(S){const p=btoa(`${S.authGid};${S.authExpires};${S.authSignature};${S.authProjectId};${S.delegatedGid}`);localStorage.setItem("credentials:"+S.authProjectId,p),location.reload()}else if(!1===S)throw new Error("Delegated Cred are not valid")},S=>{console.log("error occured on delegation",S)}),C}removeDelegation(){localStorage.removeItem("credentials:"+this.variables.projectId),location.reload()}checkDelegation(){if(this.checkDelegationMode()){const v=atob(this.variables.getCredentials()).split(";")[0];v?(this.isDelegationMode$.next(!0),this.getUserFromGID(v).then(h=>{!h||this.delegatedUser.next(h[0])},h=>{throw new Error("could not resolve delegated user from his gid")})):this.isDelegationMode$.next(!1)}this.webApi.get("/api/user/current").then(C=>{C&&this.user.next(C)})}checkDelegationMode(){const C=atob(this.variables.getCredentials());if(C){const v=C.split(";")[0],h=C.split(";")[4];return h&&h!==v?(this.isDelegationMode$.next(!0),!0):(this.isDelegationMode$.next(!1),!1)}return this.isDelegationMode$.next(!1),!1}updateUser2Project(C,v,h){this.webApi.put("/api/project/admin/"+v+"/user/"+h+"/user2project",C).then(S=>{})}updateUser(C,v){this.webApi.put("/api/project/admin/"+C+"/user",v,v.id)}initGeneralRoles(C,v){return(0,e.D)([this.webApi.getObserv(this.variables.oldApiUrl+"/api/project/admin/"+C+"/rawdata/"),this.webApi.getObserv(this.variables.oldApiUrl+"/api/project/"+C),this.webApi.getObserv(this.variables.oldApiUrl+"/api/project/admin/"+C+"/user/"+v+"/user2project")]).pipe((0,s.U)(([h,S,p])=>({configs:h,project:S,user2Project:p})))}}return m.\u0275fac=function(C){return new(C||m)(d.\u0275\u0275inject(u.f),d.\u0275\u0275inject(g.a),d.\u0275\u0275inject(x.eN))},m.\u0275prov=d.\u0275\u0275defineInjectable({token:m,factory:m.\u0275fac,providedIn:"root"}),m})()},27671:(Se,pe,r)=>{"use strict";r.d(pe,{r:()=>u});var t=r(5e3),e=r(23328),a=r(61035),s=r(98613),o=r(9133),d=r(40520);let u=(()=>{class g{constructor(i,m,E,C,v){this.newAwsService=i,this.awsSignatureService=m,this.userService=E,this.variables=C,this._http=v,this.transitionItem=null,this.AWS_API_GATEWAY_ENDPOINT="eu-west-1.gateway.pulse.siemens.cloud"}setTransitionItem(i){this.transitionItem=i}deleteTransitionItem(){this.transitionItem=null}trackRoute(i,m,E){setTimeout(()=>{this.variables.awsCredentials&&this.awsSignatureService.Post(JSON.stringify({ProjectId:this.variables.projectId,Route:i,Referrer:m,Transition:this.transitionItem,Action:null,SubAction:null}),"/prod-sl160giz9c/pulsetracking",[],[],this.AWS_API_GATEWAY_ENDPOINT).subscribe(v=>{this.deleteTransitionItem()})},1500)}trackAction(i,m){setTimeout(()=>{const E={ProjectId:this.variables.projectId,Route:window.location.href,Referrer:null,Transition:null,Action:i,SubAction:m||null};this.awsSignatureService.Post(JSON.stringify(E),"/prod-sl160giz9c/pulsetracking",[],[],this.AWS_API_GATEWAY_ENDPOINT).subscribe(C=>{})},1500)}}return g.\u0275fac=function(i){return new(i||g)(t.\u0275\u0275inject(e.s),t.\u0275\u0275inject(a.X),t.\u0275\u0275inject(s.K),t.\u0275\u0275inject(o.a),t.\u0275\u0275inject(d.eN))},g.\u0275prov=t.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac}),g})()},9133:(Se,pe,r)=>{"use strict";r.d(pe,{a:()=>d});var t=r(8929),e=r(591),a=r(92340),s=r(5e3),o=r(11735);let d=(()=>{class u{constructor(x){this.route=x,this.enableEditSubject=new t.xQ,this.pulseMediaQueries={mobile:"screen and (max-width: 40.062em)",desktop:{medium:"screen and (min-width: 40.064em) and (max-width: 64em)"}},this._projectId$$=new e.X(void 0),this.projectId$=this._projectId$$.asObservable(),this.isAuth=!1,this.enableCache=!0,this.enableEdit=!1,this.route.queryParams.subscribe(m=>{("false"===m.cached||"false"===m.cache)&&(this.enableCache=!1)});const i=window.location.hostname;a.N.api[i]?(this.oldApiUrl=a.N.api[i].pulseBackend,this.apiUrl=a.N.api[i].pulseBackend2):(this.oldApiUrl=a.N.api.default.pulseBackend,this.apiUrl=a.N.api.default.pulseBackend2)}getCredentials(){var x=localStorage.getItem("credentials:"+this.projectId);return atob(x).indexOf(""+this.projectId)>-1?x:localStorage.getItem("credentials")}set projectId(x){x&&this._projectId$$.next(x)}get projectId(){return this._projectId$$.getValue()}}return u.\u0275fac=function(x){return new(x||u)(s.\u0275\u0275inject(o.gz))},u.\u0275prov=s.\u0275\u0275defineInjectable({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},62474:(Se,pe,r)=>{"use strict";r.d(pe,{f:()=>o});var t=r(5e3),e=r(40520),a=r(9133),s=r(11735);let o=(()=>{class d{constructor(g,x,i){this.http=g,this.variables=x,this.router=i,this.hasAssumeRole=!1}checkCredentials(){const g=this.variables.getCredentials();g?this.checkExpiration(atob(g)):this.getAndSaveCredentials()}checkExpiration(g){const x=+g.split(";")[1],i=Math.round((new Date).getTime()/1e3);x>=i?(this.variables.isAuth||this.http.get("/Identity/Auth/CreateSession").subscribe(m=>{m?this.variables.isAuth=!0:this.getAndSaveCredentials()}),this.setNextCredentialsCheck(x-i)):this.getAndSaveCredentials()}setNextCredentialsCheck(g){this.$timer&&clearTimeout(this.$timer),this.$timer=setTimeout(()=>this.checkCredentials(),1e3*g)}getAndSaveCredentials(){localStorage.removeItem("credentials"),this.variables.isAuth=!1,this.http.get("https://auth.pulse.siemens.cloud/Auth/GetCredentials").subscribe(g=>{if(g){const x=btoa(`${g.authGid};${g.authExpires};${g.authSignature}`);localStorage.setItem("credentials",x),this.checkExpiration(atob(x))}else if(window.location.search.includes("hash=")&&window.location.search.includes("deviceuuid=")&&window.location.search.includes("usertodevicekey=")){const x=`https://auth.pulse.siemens.cloud/Auth/Mobile${window.location.search}&ReturnUrl=${encodeURIComponent(window.location.href)}`;window.location.href=x}else{const x="https://auth.pulse.siemens.cloud/Auth/Index?ReturnUrl="+encodeURIComponent(window.location.href);window.location.href=x}},g=>{this.router.navigate(["error",503],{queryParams:{msg:"Unable to authenticate via Entitlement."}})})}assumeRole(g){return new Promise((x,i)=>{this.get("/Identity/Auth/AssumeRole"+(g?"?projectId="+g:"")).then(m=>{const E={accessKeyId:m.AccessKeyId,expiration:m.Expiration,expired:!1,securityToken:m.SessionToken,secretAccessKey:m.SecretAccessKey,expireDate:new Date(m.Expiration)},C=E.expireDate.getTime()-(new Date).getTime();setTimeout(()=>{E.expired=!0,this.assumeRole(g)},C),this.variables.awsCredentials=E,this.hasAssumeRole=!0,x(E)})})}post(g,x,i){return this.http.post(g,x,i).toPromise()}postObserv(g,x,i){return this.http.post(g,x,i)}get(g,x){return this.http.get(g,x).toPromise()}getObserv(g,x){return this.http.get(g,x)}delete(g,x){return this.http.delete(g,x).toPromise()}deleteObserv(g,x){return this.http.delete(g,x)}put(g,x,i){return this.http.put(g,x,i).toPromise()}putObserv(g,x,i){return this.http.put(g,x,i)}}return d.\u0275fac=function(g){return new(g||d)(t.\u0275\u0275inject(e.eN),t.\u0275\u0275inject(a.a),t.\u0275\u0275inject(s.F0))},d.\u0275prov=t.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac}),d})()},36011:(Se,pe,r)=>{"use strict";r.d(pe,{m:()=>Wd});var t=r(89055),e=r(69808),a=r(40520),s=r(42155),o=r(93075),d=r(11735),u=r(14356),g=r(67795),x=r(70655),i=r(5e3),m=r(85876),E=r(22313);const C=["qrcElement"];let v=(()=>{class Ee{constructor(re,xe){this.renderer=re,this.sanitizer=xe,this.allowEmptyString=!1,this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.qrdata="",this.scale=4,this.width=10,this.qrCodeURL=new i.EventEmitter,this.context=null}ngOnChanges(){return(0,x.mG)(this,void 0,void 0,function*(){yield this.createQRCode()})}isValidQrCodeText(re){return!1===this.allowEmptyString?!(void 0===re||""===re||"null"===re||null===re):void 0!==re}toDataURL(re){return new Promise((xe,nt)=>{m.hz(this.qrdata,re,(Pt,pn)=>{Pt?nt(Pt):xe(pn)})})}toCanvas(re,xe){return new Promise((nt,Pt)=>{m.rT(re,this.qrdata,xe,pn=>{pn?Pt(pn):nt("success")})})}toSVG(re){return new Promise((xe,nt)=>{m.toString(this.qrdata,re,(Pt,pn)=>{Pt?nt(Pt):xe(pn)})})}renderElement(re){for(const xe of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,xe);this.renderer.appendChild(this.qrcElement.nativeElement,re)}createQRCode(){return(0,x.mG)(this,void 0,void 0,function*(){this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):void 0!==this.version&&isNaN(this.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");this.isValidQrCodeText(this.qrdata)&&""===this.qrdata&&(this.qrdata=" ");const re={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,type:this.elementType,version:this.version,width:this.width},xe=this.imageSrc,nt=this.imageHeight||40,Pt=this.imageWidth||40;switch(this.elementType){case"canvas":const pn=this.renderer.createElement("canvas");this.context=pn.getContext("2d"),this.toCanvas(pn,re).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(pn,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(pn,"title",`${this.title}`),xe&&this.context){this.centerImage=new Image(Pt,nt),xe!==this.centerImage.src&&(this.centerImage.src=xe),nt!==this.centerImage.height&&(this.centerImage.height=nt),Pt!==this.centerImage.width&&(this.centerImage.width=Pt);const Mi=this.centerImage;Mi&&(Mi.onload=()=>{var ji;null===(ji=this.context)||void 0===ji||ji.drawImage(Mi,pn.width/2-Pt/2,pn.height/2-nt/2,Pt,nt)})}this.renderElement(pn),this.emitQRCodeURL(pn)}).catch(Mi=>{console.error("[angularx-qrcode] canvas error:",Mi)});break;case"svg":const oi=this.renderer.createElement("div");this.toSVG(re).then(Mi=>{this.renderer.setProperty(oi,"innerHTML",Mi);const ji=oi.firstChild;this.renderer.setAttribute(ji,"height",`${this.width}`),this.renderer.setAttribute(ji,"width",`${this.width}`),this.renderElement(ji),this.emitQRCodeURL(ji)}).catch(Mi=>{console.error("[angularx-qrcode] svg error:",Mi)});break;default:const ci=this.renderer.createElement("img");this.toDataURL(re).then(Mi=>{this.alt&&ci.setAttribute("alt",this.alt),this.ariaLabel&&ci.setAttribute("aria-label",this.ariaLabel),ci.setAttribute("src",Mi),this.title&&ci.setAttribute("title",this.title),this.renderElement(ci),this.emitQRCodeURL(ci)}).catch(Mi=>{console.error("[angularx-qrcode] img/url error:",Mi)})}}catch(re){console.error("[angularx-qrcode] Error generating QR Code:",re.message)}})}emitQRCodeURL(re){const xe=re.constructor.name;if(xe===SVGSVGElement.name){const pn=new Blob([re.outerHTML],{type:"image/svg+xml"}),oi=URL.createObjectURL(pn),ci=this.sanitizer.bypassSecurityTrustUrl(oi);return void this.qrCodeURL.emit(ci)}let nt="";xe===HTMLCanvasElement.name&&(nt=re.toDataURL("image/png")),xe===HTMLImageElement.name&&(nt=re.src),fetch(nt).then(Pt=>Pt.blob()).then(Pt=>URL.createObjectURL(Pt)).then(Pt=>this.sanitizer.bypassSecurityTrustUrl(Pt)).then(Pt=>{this.qrCodeURL.emit(Pt)}).catch(Pt=>{console.error("[angularx-qrcode] Error when fetching image/png URL: "+Pt)})}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(i.Renderer2),i.\u0275\u0275directiveInject(E.DomSanitizer))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["qrcode"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(C,7),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.qrcElement=nt.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[i.\u0275\u0275NgOnChangesFeature],decls:2,vars:2,consts:[["qrcElement",""]],template:function(re,xe){1&re&&i.\u0275\u0275element(0,"div",null,0),2&re&&i.\u0275\u0275classMap(xe.cssClass)},encapsulation:2,changeDetection:0}),Ee})(),h=(()=>{class Ee{}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275mod=i.\u0275\u0275defineNgModule({type:Ee}),Ee.\u0275inj=i.\u0275\u0275defineInjector({providers:[]}),Ee})();var S=r(21409),P=(r(42654),r(23753),r(36787),r(61709),r(24850));r(7625),new i.InjectionToken("NGX_SLIMSCROLL_DEFAULTS");let ee=(()=>{class Ee{}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275mod=i.\u0275\u0275defineNgModule({type:Ee}),Ee.\u0275inj=i.\u0275\u0275defineInjector({}),Ee})();function le(Ee,tt){if(tt.length1?"s":"")+" required, but only "+tt.length+" present")}function de(Ee){le(1,arguments);var tt=Object.prototype.toString.call(Ee);return Ee instanceof Date||"object"==typeof Ee&&"[object Date]"===tt?new Date(Ee.getTime()):"number"==typeof Ee||"[object Number]"===tt?new Date(Ee):(("string"==typeof Ee||"[object String]"===tt)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function fe(Ee){return le(1,arguments),de(Ee).getFullYear()}var oe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function _e(Ee){return function(){var tt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},re=tt.width?String(tt.width):Ee.defaultWidth,xe=Ee.formats[re]||Ee.formats[Ee.defaultWidth];return xe}}var Re={date:_e({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:_e({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:_e({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ge={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ve(Ee){return function(tt,re){var Pt,xe=re||{};if("formatting"===(xe.context?String(xe.context):"standalone")&&Ee.formattingValues){var pn=Ee.defaultFormattingWidth||Ee.defaultWidth,oi=xe.width?String(xe.width):pn;Pt=Ee.formattingValues[oi]||Ee.formattingValues[pn]}else{var ci=Ee.defaultWidth,Mi=xe.width?String(xe.width):Ee.defaultWidth;Pt=Ee.values[Mi]||Ee.values[ci]}return Pt[Ee.argumentCallback?Ee.argumentCallback(tt):tt]}}function Wt(Ee){return function(tt){var re=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},xe=re.width,nt=xe&&Ee.matchPatterns[xe]||Ee.matchPatterns[Ee.defaultMatchWidth],Pt=tt.match(nt);if(!Pt)return null;var Mi,pn=Pt[0],oi=xe&&Ee.parsePatterns[xe]||Ee.parsePatterns[Ee.defaultParseWidth],ci=Array.isArray(oi)?Et(oi,function(mr){return mr.test(pn)}):gt(oi,function(mr){return mr.test(pn)});Mi=Ee.valueCallback?Ee.valueCallback(ci):ci,Mi=re.valueCallback?re.valueCallback(Mi):Mi;var ji=tt.slice(pn.length);return{value:Mi,rest:ji}}}function gt(Ee,tt){for(var re in Ee)if(Ee.hasOwnProperty(re)&&tt(Ee[re]))return re}function Et(Ee,tt){for(var re=0;re0?"in "+xe:xe+" ago":xe},formatLong:Re,formatRelative:function(Ee,tt,re,xe){return Ge[Ee]},localize:{ordinalNumber:function(Ee,tt){var re=Number(Ee),xe=re%100;if(xe>20||xe<10)switch(xe%10){case 1:return re+"st";case 2:return re+"nd";case 3:return re+"rd"}return re+"th"},era:ve({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ve({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(Ee){return Ee-1}}),month:ve({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ve({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ve({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function Jt(Ee){return function(tt){var re=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},xe=tt.match(Ee.matchPattern);if(!xe)return null;var nt=xe[0],Pt=tt.match(Ee.parsePattern);if(!Pt)return null;var pn=Ee.valueCallback?Ee.valueCallback(Pt[0]):Pt[0];pn=re.valueCallback?re.valueCallback(pn):pn;var oi=tt.slice(nt.length);return{value:pn,rest:oi}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(Ee){return parseInt(Ee,10)}}),era:Wt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Wt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(Ee){return Ee+1}}),month:Wt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/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,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Wt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};r(92198);const Nn=new i.InjectionToken("Datepicker config");function Uo(Ee){return Object.assign(Object.assign({},Lo),Ee)}const Lo={minDate:null,maxDate:null,minYear:fe(new Date)-30,maxYear:fe(new Date)+30,placeholder:"",format:"LLLL do yyyy",formatTitle:"LLLL yyyy",formatDays:"EEEEE",firstCalendarDay:0,locale:Ye,position:"bottom",inputClass:"",calendarClass:"datepicker-default",scrollBarColor:"#dfe3e9",enableKeyboard:!0};let Ki=(()=>{class Ee{static forRoot(re){return{ngModule:Ee,providers:[{provide:Nn,useValue:Uo(re)}]}}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275mod=i.\u0275\u0275defineNgModule({type:Ee}),Ee.\u0275inj=i.\u0275\u0275defineInjector({imports:[[e.ez,o.FormsModule,ee],e.ez,o.FormsModule]}),Ee})();var us=r(13165),Os=r(51422),Wo=r(85864),ro=r(3068),da=r(17650),wr=r(89273),ut=r(30745),Vt=r(22290),ht=r(97454),Zt=r(36885);function En(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",5)(1,"label")(2,"input",13),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().includePeriod=nt})("change",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().changePeriod()}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(3," include Period"),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(2),i.\u0275\u0275property("ngModel",re.includePeriod)}}let cn=(()=>{class Ee{constructor(re,xe,nt){this.bookmarkService=re,this.ngxSmartModalService=xe,this.tableService=nt,this.title=""}ngAfterViewInit(){this.ngxSmartModalService.getModal("addBookmark").onOpen.subscribe(re=>{this.dialog=re,this.data=re.getData(),this.showPeriod=this.data.showPeriod,this.showPeriod&&this.bookmark&&this.bookmarkService.getObject(this.bookmark.id).then(xe=>this.includePeriod=!!xe.table)})}add(){const re=[];this.includePeriod||re.push("table");const xe=this.bookmarkService.createBookmarkObj(re);this.bookmarkService.createBookmark(this.title,xe,xe.table).then(nt=>{this.title="",this.dialog.close()})}changePeriod(){const re=this.tableService.parseTableName();this.includePeriod&&-1===this.title.indexOf(re)?this.title+=" "+re:this.includePeriod||(this.title=this.title.split(" "+re)[0])}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(Zt._))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-add"]],inputs:{bookmark:"bookmark"},decls:19,vars:3,consts:[[3,"identifier"],["addBookmark",""],[1,"dialog-header"],[1,"icon-bookmark"],[1,"dialog-content"],[1,"pulse-form-field"],["placeholder","","autofocus","",1,"pulse-input",3,"ngModel","ngModelChange"],["class","pulse-form-field",4,"ngIf"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"],["type","checkbox",3,"ngModel","ngModelChange","change"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),i.\u0275\u0275element(4,"i",3),i.\u0275\u0275text(5,"Add Bookmark"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"div",4)(7,"div",5)(8,"label"),i.\u0275\u0275text(9,"Type in a Name"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(10,"input",6),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.title=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(11,En,4,1,"div",7),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(12,"div",8)(13,"button",9),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(14,"i",10),i.\u0275\u0275text(15," Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(16,"button",11),i.\u0275\u0275listener("click",function(){return xe.add()}),i.\u0275\u0275element(17,"i",12),i.\u0275\u0275text(18," Save"),i.\u0275\u0275elementEnd()()()}2&re&&(i.\u0275\u0275property("identifier","addBookmark"),i.\u0275\u0275advance(10),i.\u0275\u0275property("ngModel",xe.title),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.showPeriod))},directives:[ut.Q3,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,e.O5,o.CheckboxControlValueAccessor],styles:[".error[_ngcontent-%COMP%]{background-color:#dc0000;color:#fff;padding:4px 8px}input[_ngcontent-%COMP%]:focus{outline:#005578 solid 1px}input[_ngcontent-%COMP%]:focus.inputerror{outline:#dc0000 solid 1px} pulse-bookmark-add .nsm-dialog h3{display:flex;font-weight:500!important} pulse-bookmark-add .nsm-dialog h3 i.icon-bookmark{font-size:24px!important;position:relative!important;top:4px!important;margin-right:5px!important} pulse-bookmark-add .nsm-content{background-color:#ebf0f5} pulse-bookmark-add .nsm-content .nsm-dialog-btn-close{color:#879baa!important;right:15px!important;top:15px!important;font-size:18px!important} pulse-bookmark-add .nsm-content .nsm-dialog-btn-close:hover{color:#00737d!important}"]}),Ee})();var $t=r(54620),Ti=r(98613),Pr=r(4371),Xi=r(23322),Ni=r(57125);function hr(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i"),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275classMapInterpolate1("icon-",re.item.icon," ")}}function Ss(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",7),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.item.subtitle)}}function Vr(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",10),i.\u0275\u0275listener("click",function(){const Pt=i.\u0275\u0275restoreView(re).$implicit,pn=i.\u0275\u0275nextContext(2);return Pt.function(pn.item)}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=tt.$implicit;i.\u0275\u0275classMap(re.icon),i.\u0275\u0275property("pulseTooltip",re.label)}}function rs(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",8),i.\u0275\u0275listener("mouseleave",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().item.showMore=!1}),i.\u0275\u0275template(1,Vr,1,4,"i",9),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.item.actions)}}function bt(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",11),i.\u0275\u0275listener("mouseenter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().item.showMore=!0}),i.\u0275\u0275elementEnd()}}const dt=function(Ee){return{bmid:Ee}};let st=(()=>{class Ee{constructor(re,xe){this.sidenavService=re,this.route=xe}ngOnInit(){this.item.highlight=this.item.id===+this.route.snapshot.queryParams.bmid,this.sub=[this.route.queryParams.subscribe(re=>{this.item.highlight=this.item.id===+re.bmid})]}ngOnDestroy(){this.sub.forEach(re=>re.unsubscribe())}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(Pr.R),i.\u0275\u0275directiveInject(d.gz))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-item"]],inputs:{item:"item"},decls:8,vars:11,consts:[[1,"sidenav-item"],[3,"routerLink","queryParams","click"],[3,"class",4,"ngIf"],[1,"title"],["class","subtitle ",4,"ngIf"],["class","actions",3,"mouseleave",4,"ngIf"],["class","action icon-more",3,"mouseenter",4,"ngIf"],[1,"subtitle"],[1,"actions",3,"mouseleave"],["position","bottom","trigger","click",3,"class","pulseTooltip","click",4,"ngFor","ngForOf"],["position","bottom","trigger","click",3,"pulseTooltip","click"],[1,"action","icon-more",3,"mouseenter"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0)(1,"a",1),i.\u0275\u0275listener("click",function(){return xe.item.function(xe.item),xe.sidenavService.submenu.bookmark=!1}),i.\u0275\u0275template(2,hr,1,3,"i",2),i.\u0275\u0275elementStart(3,"div",3),i.\u0275\u0275text(4),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(5,Ss,2,1,"div",4),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(6,rs,2,1,"div",5),i.\u0275\u0275template(7,bt,1,0,"i",6),i.\u0275\u0275elementEnd()),2&re&&(i.\u0275\u0275classProp("highlight",xe.item.highlight),i.\u0275\u0275advance(1),i.\u0275\u0275property("routerLink",xe.item.link)("queryParams",i.\u0275\u0275pureFunction1(9,dt,xe.item.id)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.item.icon),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(xe.item.title),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.item.subtitle),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.item.showMore),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.item.showMore&&(null==xe.item.actions?null:xe.item.actions.length)>0))},directives:[d.yS,e.O5,e.sg,Ni.i],styles:[".sidenav-item[_ngcontent-%COMP%]{align-items:center;padding:15px 5px 15px 10px;min-height:40px;position:relative}.sidenav-item[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:12px}.sidenav-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:absolute;display:flex;height:100%;width:100%;top:0;right:0;text-align:center;align-items:center;color:#fff}.sidenav-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1;cursor:pointer}.sidenav-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{color:#000}"]}),Ee})();function Ut(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",4)(1,"label")(2,"input",12),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().includePeriod=nt})("change",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().changePeriod()}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(3," include Period"),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(2),i.\u0275\u0275property("ngModel",re.includePeriod)}}let ei=(()=>{class Ee{constructor(re,xe,nt){this.bookmarkService=re,this.tableService=xe,this.ngxSmartModalService=nt,this.canIncludePeriod=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("editBookmark").onOpen.subscribe(re=>{this.dialog=re,this.bookmark=re.getData(),this.title=this.bookmark.title,this.includePeriod=!1,this.bookmarkService.getObject(this.bookmark.id).then(xe=>this.includePeriod=!!xe.table),this.canIncludePeriod=!!this.tableService.parseTableName()})}rename(){this.bookmarkService.changeBookmark(this.bookmark.id,{name:this.title}),this.dialog.close()}update(){const re=[];this.includePeriod||re.push("table");const xe=this.bookmarkService.createBookmarkObj(re);this.bookmarkService.changeBookmark(this.bookmark.id,{name:this.title},xe,xe.table).then(()=>this.dialog.close())}changePeriod(){const re=this.tableService.parseTableName();this.includePeriod&&-1===this.title.indexOf(re)?this.title+=" "+re:this.includePeriod||(this.title=this.title.split(" "+re)[0])}close(){}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject(Zt._),i.\u0275\u0275directiveInject(ut.lu))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-edit"]],decls:22,vars:3,consts:[[3,"identifier"],["editBookmark",""],[1,"dialog-header"],[1,"icon-bookmark"],[1,"pulse-form-field"],["placeholder","","autofocus","",1,"pulse-input",3,"ngModel","ngModelChange"],["class","pulse-form-field",4,"ngIf"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"],["type","checkbox",3,"ngModel","ngModelChange","change"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),i.\u0275\u0275element(4,"i",3),i.\u0275\u0275text(5,"Change Bookmark"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"div")(7,"div",4)(8,"label"),i.\u0275\u0275text(9,"Type in a Name"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(10,"input",5),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.title=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(11,Ut,4,1,"div",6),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(12,"div",7)(13,"button",8),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(14,"i",9),i.\u0275\u0275text(15," Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(16,"button",10),i.\u0275\u0275listener("click",function(){return xe.rename()}),i.\u0275\u0275element(17,"i",11),i.\u0275\u0275text(18," Rename only"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(19,"button",10),i.\u0275\u0275listener("click",function(){return xe.update()}),i.\u0275\u0275element(20,"i",11),i.\u0275\u0275text(21," Update View"),i.\u0275\u0275elementEnd()()()}2&re&&(i.\u0275\u0275property("identifier","editBookmark"),i.\u0275\u0275advance(10),i.\u0275\u0275property("ngModel",xe.title),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.canIncludePeriod))},directives:[ut.Q3,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,e.O5,o.CheckboxControlValueAccessor],styles:[".user-table[_ngcontent-%COMP%]{padding-top:10px}.user-table[_ngcontent-%COMP%] .icon-delete2[_ngcontent-%COMP%]{cursor:pointer}.user-table-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.user-table-row.user-table-header[_ngcontent-%COMP%]{font-weight:500} pulse-bookmark-edit .nsm-dialog{max-width:700px}"]}),Ee})(),Di=(()=>{class Ee{constructor(re,xe){this.bookmarkService=re,this.ngxSmartModalService=xe}remove(){const re=this.ngxSmartModalService.getModal("removeBookmark");this.bookmark=re.getData(),!0!==this.bookmark.b2u.isShared&&(this.bookmark.b2uId>0?this.bookmarkService.deleteUser(this.bookmark.id,this.bookmark.b2uId,!0):this.bookmarkService.deleteBookmark(this.bookmark.id)),re.close()}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject(ut.lu))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-remove"]],decls:15,vars:1,consts:[[3,"identifier"],["removeBookmark",""],[1,"dialog-header"],[1,"icon-bookmark"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),i.\u0275\u0275element(4,"i",3),i.\u0275\u0275text(5,"Remove Bookmark"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"div"),i.\u0275\u0275text(7," Do you really want to delete this bookmark ? "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(8,"div",4)(9,"button",5),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(10,"i",6),i.\u0275\u0275text(11," No"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(12,"button",7),i.\u0275\u0275listener("click",function(){return xe.remove()}),i.\u0275\u0275element(13,"i",8),i.\u0275\u0275text(14," Yes"),i.\u0275\u0275elementEnd()()()}2&re&&i.\u0275\u0275property("identifier","removeBookmark")},directives:[ut.Q3],styles:[""]}),Ee})();var Lr=r(28606);function co(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"pulse-itempicker",9),i.\u0275\u0275listener("pickedItemsChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).selectedUser=nt}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("items",re.projectUser)("pickedItems",re.selectedUser)}}function Ks(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",3)(2,"h3"),i.\u0275\u0275element(3,"i",4),i.\u0275\u0275text(4,"Share Bookmark"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(5,"div"),i.\u0275\u0275text(6),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(7,co,1,2,"pulse-itempicker",5),i.\u0275\u0275elementStart(8,"div",6)(9,"button",7),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(10,"i",8),i.\u0275\u0275text(11," Ok"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(6),i.\u0275\u0275textInterpolate1('Share Bookmark "',re.bookmark.title,'" to:'),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.projectUser)}}let Ro=(()=>{class Ee{constructor(re,xe,nt,Pt){this.bookmarkService=re,this.userService=xe,this.projectService=nt,this.ngxSmartModalService=Pt,this.sub=[],this.isOpen=!1}ngOnDestroy(){}_prepareUser(re,xe){const nt={};return"id"!==xe&&(nt.user2bmId=re.id),nt.id=re[xe],nt.label=re.lastName+", "+re.firstName+" ("+re.orgId+")",nt}openModal(){this.isOpen=!0;const re=this.ngxSmartModalService.getModal("shareBookmark");if(this.bookmark=re.getData().bookmark,!this.bookmark)return;const xe=[];xe.push(this.bookmarkService.getUserList(this.bookmark.id)),xe.push(this.userService.getUsers(this.projectService.projectId).toPromise()),Promise.all(xe).then(nt=>{const Pt=this.userService.user.value;this.sharedUser=nt[0].filter(pn=>pn.userId!==Pt.id),this.selectedUser=this.sharedUser.map(pn=>this._prepareUser(pn,"userId")),this.projectUser=nt[1].filter(pn=>pn.id!==Pt.id).map(pn=>this._prepareUser(pn,"id"))})}closeModal(){const re=this.sharedUser.filter(nt=>!this.selectedUser.find(Pt=>Pt.id===nt.userId)).map(nt=>nt.id);this.selectedUser.filter(nt=>!this.sharedUser.find(Pt=>Pt.userId===nt.id)).map(nt=>nt.id).forEach(nt=>this.addUserById(nt)),re.forEach(nt=>this.removeUserById(nt)),this.isOpen=!1,this.sub.forEach(nt=>nt.unsubscribe())}ngOnInit(){}addUserById(re){return this.bookmarkService.postUser(this.bookmark.id,{userId:re,isDefault:!1,isShared:!0,bmId:this.bookmark.id}).then(nt=>{})}removeUserById(re){return this.bookmarkService.deleteUser(this.bookmark.id,re).then(()=>{})}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject(Ti.K),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(ut.lu))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-share"]],decls:3,vars:2,consts:[[3,"identifier","onOpen","onClose"],["shareBookmark",""],[4,"ngIf"],[1,"dialog-header"],[1,"icon-bookmark"],["itemsTypeTitle","Users","pickedItemsFilter","","unpickedItemsFilter","","labelProperty","label",3,"items","pickedItems","pickedItemsChange",4,"ngIf"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"],["itemsTypeTitle","Users","pickedItemsFilter","","unpickedItemsFilter","","labelProperty","label",3,"items","pickedItems","pickedItemsChange"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1),i.\u0275\u0275listener("onOpen",function(){return xe.openModal()})("onClose",function(){return xe.closeModal()}),i.\u0275\u0275template(2,Ks,12,2,"ng-container",2),i.\u0275\u0275elementEnd()),2&re&&(i.\u0275\u0275property("identifier","shareBookmark"),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",xe.isOpen))},directives:[ut.Q3,e.O5,Lr.G],styles:["pulse-bookmark-share .nsm-dialog{max-width:90%}"]}),Ee})(),ha=(()=>{class Ee{constructor(re){this.bookmarkService=re}close(){}ngOnInit(){}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark-share-info"]],decls:12,vars:1,consts:[[3,"identifier"],["shareInfoBookmark",""],[1,"dialog-header"],[1,"icon-bookmark"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","save",3,"click"],[1,"icon-check-mark"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),i.\u0275\u0275element(4,"i",3),i.\u0275\u0275text(5,"Share Bookmark"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"div"),i.\u0275\u0275text(7," Bookmark shared by: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(8,"div",4)(9,"button",5),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(10,"i",6),i.\u0275\u0275text(11," Ok"),i.\u0275\u0275elementEnd()()()}2&re&&i.\u0275\u0275property("identifier","shareInfoBookmark")},directives:[ut.Q3],styles:[""]}),Ee})();var si=r(49059),cr=r(65351);let pa=(()=>{class Ee{transform(re,xe,nt,Pt){return nt=nt.toLowerCase(),"!"===xe[0]?(xe=xe.substring(1),re.filter(pn=>this.compare(pn,xe,nt,Pt))):re.filter(pn=>this.compare(pn,xe,nt,Pt))}compare(re,xe,nt,Pt){return re[xe]?Pt?-1!==re[xe].toLowerCase().indexOf(nt):re[xe].toLowerCase()===nt:""}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275pipe=i.\u0275\u0275definePipe({name:"filterProperty",type:Ee,pure:!0}),Ee})();var ns=r(74171);const As=function(Ee){return{"bookmark-group":Ee}},Gr=function(Ee,tt){return{"icon-plus2":Ee,"icon-minus":tt}};function Is(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",9),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext().$implicit,Pt=i.\u0275\u0275nextContext();return Pt.openCategories[nt.key]=!Pt.openCategories[nt.key]})("drop",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).drop(nt)}),i.\u0275\u0275element(1,"i",10),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(3,As,xe.openCategories[re.key])),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction2(5,Gr,!xe.openCategories[re.key],xe.openCategories[re.key])),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.key," ")}}const La=function(Ee){return{"bookmark-dragover":Ee}};function To(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"li",13),i.\u0275\u0275listener("dragstart",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).dragstart(nt,Pt)})("dragover",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).dragover(nt,Pt)})("drop",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).drop(nt,Pt)}),i.\u0275\u0275element(1,"pulse-bookmark-item",14),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(2,La,re.isDragover)),i.\u0275\u0275advance(1),i.\u0275\u0275property("item",re)}}function Ji(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,To,2,4,"li",12),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.showItem(re))}}function zo(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"ul",11),i.\u0275\u0275template(1,Ji,2,1,"ng-container",6),i.\u0275\u0275pipe(2,"filterProperty"),i.\u0275\u0275pipe(3,"orderBy"),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(10,As,re.key)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind4(2,2,i.\u0275\u0275pipeBind2(3,7,re.value,"order"),"title",xe.bookmarkSearch,!0))}}function Rs(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,Is,3,8,"div",7),i.\u0275\u0275template(2,zo,4,12,"ul",8),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.openCategories[re.key])}}const jo=function(Ee){return{mobile:Ee}};let Js=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi){this.bookmarkService=re,this.projectService=xe,this.userService=nt,this.ngxSmartModalService=Pt,this.sidebarNavigationService=pn,this.router=oi,this.openCategories={Favorite:!0,"":!0},this.showShared=!0,this.showDefault=!0,this.bookmarks=[],this.bookmarkSearch="",this.sub=[]}ngOnInit(){this.bookmarkService.prefix=this.bookmarkPrefix.toLowerCase(),this.sub.push(this.userService.getUser().subscribe(re=>{re&&(this.user=re,this.sub.push(this.bookmarkService.getBookmarks(this.bookmarkPrefix).subscribe(xe=>{xe&&(xe=xe.filter(nt=>nt.Bookmark2User&&nt.Bookmark2User.filter(Pt=>!0===Pt.isShared&&void 0===Pt.userId||Pt.userId).length>0),this.bookmarks=xe.map(nt=>this.addActions(this.bookmarkService.prepareBookmark(nt,this.bookmarkPrefix,this.user.id))).sort(nt=>"Favorite"===nt.group?-1:0),this.sortBookmarks(this.router.routerState.snapshot.url))})))}),this.router.events.subscribe(re=>{re instanceof d.m2&&this.sortBookmarks(re.urlAfterRedirects)}))}ngOnDestroy(){this.sub.forEach(re=>re.unsubscribe())}showItem(re){return!re.go||this.projectService.checkOneGlobalObject(re.go)}sortBookmarks(re){this.bookmarkService.prefix.indexOf("project")>-1&&(this.bookmarks.forEach(xe=>{("Others"===xe.group||""===xe.group)&&(xe.group=this.projectService.doesMatchFullPath(xe.path)?"":"Others")}),this.bookmarks=[...this.bookmarks.sort((xe,nt)=>xe.link.endsWith(re.substring(re.length-8))||xe.link>nt.link?-1:xe.linknt.isDragover=!1),xe.isDragover=!0,re.preventDefault()}drop(re,xe){if(xe.group===this.dragBookmark.group){let nt=0;const Pt=this.bookmarks.filter(pn=>pn.group===xe.group&&pn.id!==this.dragBookmark.id).sort((pn,oi)=>pn.order-oi.order);xe.id?Pt.forEach(pn=>{pn.order=nt++,pn.id===xe.id&&(this.dragBookmark.order=nt++)}):(this.dragBookmark.order=nt++,Pt.forEach(pn=>{pn.order=nt++}))}re.preventDefault()}addActions(re){const xe=re.b2u;return re.actions=[],xe&&re.actions.push({icon:"icon-delete2",function:nt=>{this.deleteBookmark(nt)},label:"Delete bookmark"}),xe&&!xe.isShared?re.isDefault||re.actions.push({icon:"icon-share-newton-android",function:nt=>{this.shareBookmark(nt)},label:"Share bookmark"}):xe&&re.actions.push({icon:"icon-share-newton-android",function:nt=>{this.shareBookmarkInfo(nt)},label:"Share bookmark"}),xe&&xe.canEdit&&re.actions.push({icon:"icon-edit",function:nt=>{this.changeBookmark(nt)},label:"Edit bookmark"}),re.actions.push({icon:"icon-star",function:nt=>{this.changeFavorite(xe,re)},label:"Favorite"}),re}changeFavorite(re,xe){re.isFavorite=!re.isFavorite,this.bookmarkService.putUser(re.bmId,re)}shareBookmark(re){this.ngxSmartModalService.setModalData({bookmark:re},"shareBookmark",!0),this.ngxSmartModalService.getModal("shareBookmark").open()}shareBookmarkInfo(re){this.ngxSmartModalService.setModalData(re,"shareInfoBookmark",!0),this.ngxSmartModalService.getModal("shareInfoBookmark").open()}changeBookmark(re){this.ngxSmartModalService.setModalData(re,"editBookmark",!0),this.ngxSmartModalService.getModal("editBookmark").open()}deleteBookmark(re){this.ngxSmartModalService.setModalData(re,"removeBookmark",!0),this.ngxSmartModalService.getModal("removeBookmark").open()}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(Ti.K),i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(Pr.R),i.\u0275\u0275directiveInject(d.F0))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookmark"]],inputs:{bookmarkPrefix:"bookmarkPrefix",isMobile:"isMobile"},decls:13,vars:11,consts:[[1,"sub-sidenav",3,"ngClass"],[1,"sidenav-header"],[1,"pulse-form-field"],["type","text","placeholder","Search for ...","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[1,"icon-close2",3,"click"],[1,"sub-body"],[4,"ngFor","ngForOf"],["class","bookmark-category",3,"ngClass","click","drop",4,"ngIf"],["class","sidenav-ul",3,"ngClass",4,"ngIf"],[1,"bookmark-category",3,"ngClass","click","drop"],[3,"ngClass"],[1,"sidenav-ul",3,"ngClass"],["draggable","true",3,"ngClass","dragstart","dragover","drop",4,"ngIf"],["draggable","true",3,"ngClass","dragstart","dragover","drop"],[3,"item"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.bookmarkSearch=Pt}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(4,"i",4),i.\u0275\u0275listener("click",function(){return xe.sidebarNavigationService.submenu.bookmark=!1}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(5,"div",5),i.\u0275\u0275template(6,Rs,3,2,"ng-container",6),i.\u0275\u0275pipe(7,"sortBy"),i.\u0275\u0275pipe(8,"groupBy"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275element(9,"pulse-bookmark-edit")(10,"pulse-bookmark-remove")(11,"pulse-bookmark-share")(12,"pulse-bookmark-share-info")),2&re&&(i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(9,jo,xe.isMobile)),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",xe.bookmarkSearch),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind2(7,3,i.\u0275\u0275pipeBind2(8,6,xe.bookmarks,"group"),"key")))},directives:[Xi.oO,e.mk,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,e.sg,e.O5,st,ei,Di,Ro,ha],pipes:[si.W,cr.l,pa,ns.d],styles:[".bookmark-category[_ngcontent-%COMP%]{cursor:pointer;padding:15px 5px 15px 10px;border-bottom:1px solid #00646e;color:#2d373c!important;font-weight:700}.bookmark-group[_ngcontent-%COMP%]{color:#fff!important;background-color:#2d373c!important;border-left:1px solid #41aaaa}.bookmark-group[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .bookmark-group.bookmark-category[_ngcontent-%COMP%]{border-bottom:#2d373c!important}"]}),Ee})();var Mt=r(17717),mn=r(27859),Te=r(67742),rt=r(58342),wt=r(59077),St=r(46809),In=r(62474),vi=r(62127),rr=r(9133),Jn=r(27671);function pr(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"pulse-itempicker",15),i.\u0275\u0275listener("pickedItemsChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).selection=nt}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2),xe=i.\u0275\u0275reference(1);i.\u0275\u0275property("items",xe.getData().bookmarks)("pickedItems",re.selection)}}function $r(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",16),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("ngClass",re.iconClass)}}function bs(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",5)}function qr(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",16),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("ngClass",re.iconClass)}}function Dr(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",5)}function Es(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",16),2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275property("ngClass",re.iconClass)}}function rc(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",5)}function Rl(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"button",10),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(2);return nt.customExport(),nt.usertracking.trackAction("booklet-export","custom")}),i.\u0275\u0275template(1,Es,1,1,"i",11),i.\u0275\u0275template(2,rc,1,0,"i",12),i.\u0275\u0275text(3),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("disabled",!!re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.customExportConfig.label," ")}}function sc(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",3)(2,"div",4)(3,"h3"),i.\u0275\u0275element(4,"i",5),i.\u0275\u0275text(5,"Export"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275template(6,pr,1,2,"pulse-itempicker",6),i.\u0275\u0275elementStart(7,"div",7)(8,"button",8),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275element(9,"i",9),i.\u0275\u0275text(10," Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(11,"button",10),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext();return nt.rawDataExport(),nt.usertracking.trackAction("booklet-export","raw-data")}),i.\u0275\u0275template(12,$r,1,1,"i",11),i.\u0275\u0275template(13,bs,1,0,"i",12),i.\u0275\u0275text(14," Raw Data Export "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(15,"button",10),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext();return nt.export(),nt.usertracking.trackAction("booklet-export","current")}),i.\u0275\u0275template(16,qr,1,1,"i",11),i.\u0275\u0275template(17,Dr,1,0,"i",12),i.\u0275\u0275text(18),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(19,Rl,4,4,"button",13),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(20,"button",14),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().customExportSql()}),i.\u0275\u0275text(21,"SQL"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(),xe=i.\u0275\u0275reference(1);i.\u0275\u0275advance(6),i.\u0275\u0275property("ngIf",xe.hasData()),i.\u0275\u0275advance(5),i.\u0275\u0275property("disabled",!!re.iconClass||!re.frtService.frtService.value),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!re.iconClass),i.\u0275\u0275advance(2),i.\u0275\u0275property("disabled",!!re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!re.iconClass),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",0==re.selection.length?"Current":"Bookmark"," Export "),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.customExportConfig),i.\u0275\u0275advance(1),i.\u0275\u0275property("hidden",!0)}}let Do=(()=>{class Ee{constructor(re,xe,nt,Pt,pn){this.webApi=re,this.bookmarkService=xe,this.frtService=nt,this.variables=Pt,this.usertracking=pn,this.iconClass="",this.selection=[],this.isOpen=!1}export(re=!0){this.selection.length>0?this.bookmarkExport(re):this.currentExport(re)}rawDataExport(){this.export(!1)}customExport(){const re=this._preparecustomExport();re&&this.webApi.post(`${this.variables.apiUrl}/api/CustomExport/get/${this.customExportConfig.exportId}`,re).then(xe=>{xe.awsDownloadLink.forEach(nt=>St.Z.downloadLink(nt)),this.iconClass=""}).catch(()=>{this.iconClass=""})}customExportSql(){const re=this._preparecustomExport();re&&this.webApi.post(`${this.variables.apiUrl}/api/CustomExport/getSql/${this.customExportConfig.exportId}`,re).then(xe=>{this.iconClass=""}),this.iconClass=""}_preparecustomExport(){this.iconClass="spin";const re=this.bookmarkService.createBookmarkObj();if(re.filter&&this.customExportConfig.overrideFilters&&(this.customExportConfig.overrideFilters.forEach(xe=>{re.filter[xe.filterId]=xe.value}),this.customExportConfig.overrideFilters.forEach(xe=>{const nt=re.filterSelection.findIndex(Pt=>Pt[0].filterId===xe.filterId);nt>=0?re.filterSelection[nt]=xe.value:re.filterSelection.push(xe.value)})),re.frtId>0){let xe=St.Z.getUILocale();return{frtId:re.frtId,longlink:this.bookmarkService.getLongLink(re),filename:this.data.request.filename,uiLocale:xe}}return null}bookmarkExport(re){this.iconClass="spin";const xe={bookmarkList:this.selection.map(nt=>nt.id),fiscalYear:this.data.request.fiscalyear,frtId:this.data.request.frtId,table:this.data.request.table,filename:this.data.request.filename,hasRollUp:re};this.webApi.post("/Customer/FinancialReporting/GetExcelData",xe).then(nt=>{St.Z.downloadLink(nt),this.iconClass=""})}currentExport(re){this.iconClass="spin";const xe=this.bookmarkService.createBookmarkObj();if(xe.frtId>0){if(6038===xe.frtId){const Pt=["ProviderCountry","ProviderAre","CurrencyName","ProviderTglLevel2","ProviderTglLevel3","ProviderTglLevel4","ProviderTglIdDeepest","MainItem","MainItemLevel2","Bupos","PartnerTglLevel1","PartnerTglLevel2","PartnerTglLevel4","PartnerTglIdDeepest","PartnerAre"];xe.viewColumns=[5004,4224,4218,4225,4226,4220,4221,4216,4217],xe.drilldown=Pt}if(6099===xe.frtId){const Pt=["ProviderCountry","ProviderAre","CurrencyNameTransactional","ProviderTglLevel2","ProviderTglLevel3","ProviderTglLevel4","ProviderTglIdDeepest","MainItem","MainItemLevel2","Bupos","PartnerTglLevel1","PartnerTglLevel2","PartnerTglLevel4","PartnerTglIdDeepest","PartnerAre"];xe.viewColumns=[5164,5186,5169,5170,5171,5200,5201,5202,5203,5204,5159,5160,5161,5162,5180],xe.drilldown=Pt}const nt={frtId:xe.frtId,longlink:this.bookmarkService.getLongLink(xe),filename:this.data.request.filename,hasRollUp:re};this.webApi.post("/Customer/FinancialReporting/GetExcel",nt).then(Pt=>{St.Z.downloadLink(Pt),this.iconClass=""})}}openModal(re){this.isOpen=!0,this.data=re.getData()}close(){}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(In.f),i.\u0275\u0275directiveInject(ht.F),i.\u0275\u0275directiveInject(vi.I),i.\u0275\u0275directiveInject(rr.a),i.\u0275\u0275directiveInject(Jn.r))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-bookletexport"]],inputs:{customExportConfig:"customExportConfig"},decls:3,vars:2,consts:[[3,"identifier","onOpen"],["bookletExport",""],[4,"ngIf"],[1,"dialog-header"],[1,"pulse-col-12-6"],[1,"icon-download2"],["itemsTypeTitle","Bookmarks","pickedItemsFilter","","unpickedItemsFilter","","labelProperty","title","categoryProperty","subtitle",3,"items","pickedItems","pickedItemsChange",4,"ngIf"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-close2"],[1,"pulse-btn","save",3,"disabled","click"],["class","icon-refresh",3,"ngClass",4,"ngIf"],["class","icon-download2",4,"ngIf"],["class","pulse-btn save",3,"disabled","click",4,"ngIf"],["type","button",3,"hidden","click"],["itemsTypeTitle","Bookmarks","pickedItemsFilter","","unpickedItemsFilter","","labelProperty","title","categoryProperty","subtitle",3,"items","pickedItems","pickedItemsChange"],[1,"icon-refresh",3,"ngClass"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1),i.\u0275\u0275listener("onOpen",function(){i.\u0275\u0275restoreView(nt);const pn=i.\u0275\u0275reference(1);return xe.openModal(pn)}),i.\u0275\u0275template(2,sc,22,10,"ng-container",2),i.\u0275\u0275elementEnd()}2&re&&(i.\u0275\u0275property("identifier","bookletExport"),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",xe.isOpen))},directives:[ut.Q3,e.O5,Lr.G,Xi.oO,e.mk],styles:["h3[_ngcontent-%COMP%]{margin-bottom:18px;margin-top:-3px}.pulse-btn-group[_ngcontent-%COMP%]{margin-top:25px}.w-100.flex-center[_ngcontent-%COMP%]{padding-right:0} pulse-bookletexport .nsm-dialog{max-width:90%}"]}),Ee})();var wa=r(21086),so=(()=>{return(Ee=so||(so={}))[Ee.OVERVIEW=1]="OVERVIEW",Ee[Ee.TABLE=2]="TABLE",Ee[Ee.CHART=3]="CHART",Ee[Ee.ARCHIVE=4]="ARCHIVE",so;var Ee})();class kr{static createCopy(tt,re){let xe=JSON.parse(JSON.stringify(tt));return xe.id=null,xe.timestamp=null,xe.status="new",xe.userName=re.currentUser.currentUserName,xe.userId=re.currentUser.currentUserId,xe}static saveRow(tt,re){return(0,wa.of)(tt)}static get columns(){return[{name:"#",key:"index",class:"center col-span-2"},{name:"Timestamp",key:"timestamp",class:"left col-span-2"},{name:"Levels",key:"levels",class:"right col-span-4"},{name:"Author",key:"userName",class:"left col-span-2"},{name:"Bridge Item",key:"financialReportingTableExplanationBridgeItemId",class:"center col-span-2"},{name:"Value (\u20ac)",key:"value",class:"right col-span-2"},{name:"Explanation",key:"explanation",class:"left col-span-4"},{name:"Show public",key:"isHidden",class:"center col-checkboxtoggle-span"},{name:"Visible in Chart",key:"showExternal",class:"center col-span-2"},{name:"",key:"menu",class:"center"}]}}var Zs=r(61130),Qr=r(8929);let qs=(()=>{class Ee{constructor(){this.unexplained=0,this.explained=0,this.archivedExplanations={currentExplanations:[],lowerExplanations:[]},this.deviationId=0,this._updateBridge=new Zs.t(1),this.bridgeUpdated=this._updateBridge}initData(re){this.data=re,this.newExplanations=re.data.newExplanations,this.columns=re.columns,this.deviationId=re.columns.deviationId,this.currency=re.currency,this.bridgeItems=re.bridgeItems,this.detailedInformations=re.detailedInformations,this.deepestLevelsHier=Object.keys(re.detailedInformations).reduce((xe,nt)=>(xe[re.detailedInformations[nt].name]=re.detailedInformations[nt].value,xe),{}),this.deepestLevels=Object.keys(re.detailedInformations).map(xe=>({key:re.detailedInformations[xe].label,value:re.detailedInformations[xe].value})),this.currentUser=re.currentUser,this.isFreezed=re.isFreezed,this._updateBridge.next()}changeExplained(re){this.explained=re.reduce((xe,nt)=>nt.value?xe=+xe+ +nt.value:xe,0),this.unexplained=Math.round(this.columns.deviationValue-this.explained)}getInitialTableData(){const re=JSON.parse(JSON.stringify(this.newExplanations));let xe;return re.length&&(re.forEach(nt=>{nt.deepestLevelString=this.convertMapToString(nt.levels),nt.showInTable=!nt.isArchived,nt.editHidden=nt.isHidden,nt.deepestLevel=nt.levels.reduce((Pt,pn)=>(nt.levels.some(oi=>oi.level>pn.level&&pn.hierarchyFilterId===oi.hierarchyFilterId)||(Pt[pn.hierarchyKey]=pn.hierarchyValue),Pt),new Map)}),xe=re.sort(nt=>nt.timestamp).reduce((nt,Pt)=>(Pt.isLower?(nt.lower=nt.lower||[]).push(Pt):(nt.current=nt.current||[]).push(Pt),nt),{}),xe.lower?(xe.lower=xe.lower.reduce((nt,Pt)=>{let pn=nt.find(oi=>oi.financialReportingTableExplanationBridgeItemId===Pt.financialReportingTableExplanationBridgeItemId);return pn?(pn.value=Pt.isArchived?pn.value:pn.value+Pt.value,pn.explanations.push(Pt),pn.hasArchived=!!Pt.isArchived||pn.hasArchived,pn.showInTable=!Pt.isArchived||pn.showInTable):(pn={},pn.isGroup=!0,pn.value=Pt.isArchived?0:Pt.value,pn.explanations=[Pt],pn.changesInChild=new Qr.xQ,pn.hasArchived=Pt.isArchived,pn.showInTable=!Pt.isArchived,pn.financialReportingTableExplanationBridgeItemId=Pt.financialReportingTableExplanationBridgeItemId,nt.push(pn)),nt},[]),xe=(xe.current||[]).concat(xe.lower)):xe=xe.current),xe}convertMapToString(re){return re.reduce((xe,nt)=>(re.some(Pt=>Pt.level>nt.level&&nt.hierarchyFilterId===Pt.hierarchyFilterId)||(""!==xe&&(xe+=", "),xe+=nt.hierarchyValue||nt.value),xe),"")}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275prov=i.\u0275\u0275defineInjectable({token:Ee,factory:Ee.\u0275fac}),Ee})();var eo=r(49765),vo=r(46702),Ps=r(37080),Cs=r(24969);function ia(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1," \u20ac"),i.\u0275\u0275elementEnd())}function Va(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1," \u20ac"),i.\u0275\u0275elementEnd())}function Aa(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",4)(1,"label"),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(3),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(re.key),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.value," ")}}function Ra(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1," \u20ac"),i.\u0275\u0275elementEnd())}function nl(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1," \u20ac"),i.\u0275\u0275elementEnd())}let oc=(()=>{class Ee{constructor(re){this.service=re}ngOnInit(){}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(qs))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge-overview"]],decls:47,vars:34,consts:[[1,"chartContainer","chartRow"],[1,"chartBlock"],[1,"title"],[1,"value-grid"],[1,"display-value"],[4,"ngIf"],["class","display-value",4,"ngFor","ngForOf"],[1,"chartContainer"],[1,"contentRow","content"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"h3",2),i.\u0275\u0275text(3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(4,"div",3)(5,"div",4)(6,"label"),i.\u0275\u0275text(7),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(8),i.\u0275\u0275pipe(9,"scale"),i.\u0275\u0275template(10,ia,2,0,"span",5),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(11,"div",4)(12,"label"),i.\u0275\u0275text(13),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(14),i.\u0275\u0275pipe(15,"scale"),i.\u0275\u0275template(16,Va,2,0,"span",5),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(17,Aa,4,2,"div",6),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(18,"div",1)(19,"h3",2),i.\u0275\u0275text(20,"Deviation balance"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(21,"div",3)(22,"div",4)(23,"label"),i.\u0275\u0275text(24,"Unexplained value"),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(25),i.\u0275\u0275pipe(26,"scale"),i.\u0275\u0275template(27,Ra,2,0,"span",5),i.\u0275\u0275elementStart(28,"label"),i.\u0275\u0275text(29),i.\u0275\u0275pipe(30,"percent"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(31,"div",4)(32,"label"),i.\u0275\u0275text(33,"Explained value"),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(34),i.\u0275\u0275pipe(35,"scale"),i.\u0275\u0275template(36,nl,2,0,"span",5),i.\u0275\u0275elementStart(37,"label"),i.\u0275\u0275text(38),i.\u0275\u0275pipe(39,"percent"),i.\u0275\u0275elementEnd()()()()(),i.\u0275\u0275elementStart(40,"div",7)(41,"div",1)(42,"h3",2),i.\u0275\u0275text(43,"Latest explanations"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(44,"div",8)(45,"span"),i.\u0275\u0275text(46,"No explanations done yet."),i.\u0275\u0275elementEnd()()()()),2&re&&(i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate1("\u0394\xa0",xe.service.columns.deviationName,""),i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate(xe.service.columns.column2Name),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind2(9,14,xe.service.columns.column1Value,"FTE"===xe.service.currency)," "),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf","FTE"!==xe.service.currency),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(xe.service.columns.column1Name),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind2(15,17,xe.service.columns.column2Value,"FTE"===xe.service.currency)," "),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf","FTE"!==xe.service.currency),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.service.deepestLevels),i.\u0275\u0275advance(8),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind2(26,20,xe.service.unexplained,"FTE"===xe.service.currency)," "),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf","FTE"!==xe.service.currency),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind3(30,23,xe.service.unexplained/xe.service.columns.deviationValue,"1.2-2","de")),i.\u0275\u0275advance(5),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind2(35,27,xe.service.explained,"FTE"===xe.service.currency)," "),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf","FTE"!==xe.service.currency),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind3(39,30,xe.service.explained/xe.service.columns.deviationValue,"1.2-2","de")))},directives:[e.O5,e.sg],pipes:[Cs.P,e.Zx],styles:[".chartRow[_ngcontent-%COMP%]{flex-flow:row wrap;box-sizing:border-box;display:flex}.value-grid[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.display-value[_ngcontent-%COMP%]{font-size:15px;flex:1 1 50%;padding:5px 0}.display-value[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-weight:500;width:100%}h3[_ngcontent-%COMP%]{padding-left:0}.chartBlock[_ngcontent-%COMP%]{padding:5px 15px}"]}),Ee})();var Oo=r(32925),fa=r(38734),ma=r.n(fa),Ma=r(16712);const Ua=["bridgeItemInput"],il=["explanationInput"],Mr=function(Ee,tt){return{"icon-plus2 left":Ee,"icon-minus left":tt}};function un(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",11),2&Ee){const re=i.\u0275\u0275nextContext(6);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction2(1,Mr,!re.showChildren,re.showChildren))}}const Xe=function(Ee){return{expandable:Ee}};function lt(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",9),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(5).onShowChildren()}),i.\u0275\u0275template(1,un,1,4,"i",10),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(5);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(2,Xe,re.value.isGroup)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.value.isGroup)}}function Ht(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",15),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.label)}}const hn=function(Ee){return{disabled:Ee}};function Gn(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",12)(1,"select",13),i.\u0275\u0275listener("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(4).value[Pt.key]=nt}),i.\u0275\u0275template(2,Ht,2,2,"option",14),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(4);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(4,hn,xe.value.isGroup)),i.\u0275\u0275advance(1),i.\u0275\u0275property("disabled",xe.value.isGroup)("ngModel",xe.value[re.key]),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.service.bridgeItems)}}function _i(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"input",16),i.\u0275\u0275listener("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(4).value[Pt.key]=nt}),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(4);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngModel",xe.value[re.key])}}function Qi(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",6),i.\u0275\u0275template(1,lt,2,4,"div",7),i.\u0275\u0275template(2,Gn,3,6,"div",8),i.\u0275\u0275template(3,_i,2,1,"div",0),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275nextContext();const xe=i.\u0275\u0275reference(3);i.\u0275\u0275property("contextMenu",xe)("ngClass",re.class),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","index"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","financialReportingTableExplanationBridgeItemId"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","value"===re.key)}}function _r(Ee,tt){1&Ee&&(i.\u0275\u0275element(0,"i",18),i.\u0275\u0275elementStart(1,"span"),i.\u0275\u0275text(2," show lower"),i.\u0275\u0275elementEnd())}function ss(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275template(0,_r,3,0,"ng-template",17),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).onShowChildren()})}}function es(Ee,tt){1&Ee&&(i.\u0275\u0275element(0,"i",19),i.\u0275\u0275elementStart(1,"span"),i.\u0275\u0275text(2," hide lower"),i.\u0275\u0275elementEnd())}function at(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275template(0,es,3,0,"ng-template",17),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).onShowChildren()})}}function et(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,Qi,4,5,"div",3),i.\u0275\u0275elementStart(2,"context-menu",4,5),i.\u0275\u0275template(4,ss,1,0,null,0),i.\u0275\u0275template(5,at,1,0,null,0),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.columns),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!re.showChildren&&re.value.explanations),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.showChildren&&re.value.explanations)}}function Ue(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,et,6,3,"ng-container",0),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","delete"!==re.value.status&&!re.value.isArchived)}}function mt(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",11),2&Ee){const re=i.\u0275\u0275nextContext(5);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction2(1,Mr,!re.showChildren,re.showChildren))}}function kt(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",11),i.\u0275\u0275template(1,mt,1,4,"i",10),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(4);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(3,Xe,re.value.isGroup)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.value.isGroup),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.value.id||"New "+re.indexLabel," ")}}function nn(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275text(1),i.\u0275\u0275pipe(2,"date"),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind2(2,1,xe.value[re.key],"dd.MM.yyyy, H:mm")," ")}}function Mn(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(4);i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.value.deepestLevelString," ")}}function Pn(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",xe.value[re.key]," ")}}function ni(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",15),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.label)}}const Pi=function(Ee){return{invalid:Ee}};function fr(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",24)(1,"select",25,26),i.\u0275\u0275listener("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).value[Pt.key]=nt})("change",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("keyup",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)}),i.\u0275\u0275elementStart(3,"option",27),i.\u0275\u0275text(4,"Select"),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(5,ni,2,2,"option",14),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275reference(2),xe=i.\u0275\u0275nextContext().$implicit,nt=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("disabled","readonly"===nt.value.status)("ngModel",nt.value[xe.key])("ngClass",i.\u0275\u0275pureFunction1(4,Pi,re.invalid)),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngForOf",nt.service.bridgeItems)}}function Yi(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"input",28),i.\u0275\u0275listener("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).value[Pt.key]=nt})("change",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("keyup",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(2,"datalist",29),i.\u0275\u0275element(3,"option",30),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("disabled","readonly"===xe.value.status)("ngModel",xe.value[re.key]),i.\u0275\u0275advance(2),i.\u0275\u0275property("value",xe.service.unexplained)}}function Ar(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"textarea",31,32),i.\u0275\u0275listener("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).value[Pt.key]=nt})("change",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("keyup",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)}),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275reference(2),xe=i.\u0275\u0275nextContext().$implicit,nt=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("disabled","readonly"===nt.value.status)("ngModel",nt.value[xe.key])("ngClass",i.\u0275\u0275pureFunction1(3,Pi,!re.checkValidity()))}}function yr(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"pulse-checkbox-toggle",33),i.\u0275\u0275listener("change",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return!(i.\u0275\u0275nextContext(3).value[Pt.key]=nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("inverted",!0)("disabled",!xe.value.editHidden||"readonly"===xe.value.status)("ngModel",!xe.value[re.key])}}function ra(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",34)(1,"input",35),i.\u0275\u0275listener("change",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("keyup",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext(4);return nt.valueChanged(nt.value)})("ngModelChange",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).value[Pt.key]=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275element(2,"span",36),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngModel",xe.value[re.key])}}function sa(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",37),i.\u0275\u0275listener("click",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).openContextMenu(nt)}),i.\u0275\u0275element(1,"i",38),i.\u0275\u0275elementEnd()}}function Wa(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",6),i.\u0275\u0275template(1,kt,3,5,"div",10),i.\u0275\u0275template(2,nn,3,4,"div",0),i.\u0275\u0275template(3,Mn,2,1,"div",0),i.\u0275\u0275template(4,Pn,2,1,"div",0),i.\u0275\u0275template(5,fr,6,6,"div",21),i.\u0275\u0275template(6,Yi,4,3,"div",0),i.\u0275\u0275template(7,Ar,3,5,"div",0),i.\u0275\u0275template(8,yr,2,3,"ng-container",0),i.\u0275\u0275template(9,ra,3,1,"div",22),i.\u0275\u0275template(10,sa,2,0,"div",23),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275nextContext();const xe=i.\u0275\u0275reference(2),nt=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("contextMenu",xe)("ngClass",re.class),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","index"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","timestamp"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","levels"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","userName"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","financialReportingTableExplanationBridgeItemId"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","value"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","explanation"===re.key),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","isHidden"===re.key&&!nt.value.isGroup),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","showExternal"===re.key&&!nt.value.isGroup),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","menu"===re.key)}}function xl(Ee,tt){if(1&Ee&&(i.\u0275\u0275element(0,"i",39),i.\u0275\u0275elementStart(1,"span"),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" #",re.value.id||"New "+re.indexLabel," - duplicate")}}function rl(Ee,tt){if(1&Ee&&(i.\u0275\u0275element(0,"i",40),i.\u0275\u0275elementStart(1,"span"),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" #",re.value.id||"New "+re.indexLabel," - archive")}}function cu(Ee,tt){if(1&Ee&&(i.\u0275\u0275element(0,"i",41),i.\u0275\u0275elementStart(1,"span"),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" #",re.value.id||"New "+re.indexLabel," - delete")}}function Fu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275template(0,Wa,11,12,"div",3),i.\u0275\u0275elementStart(1,"context-menu",4,5),i.\u0275\u0275template(3,xl,3,1,"ng-template",20),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).onDuplicateInterceptor()}),i.\u0275\u0275template(4,rl,3,1,"ng-template",20),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).onArchiveInterceptor()}),i.\u0275\u0275template(5,cu,3,1,"ng-template",20),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).onDeleteInterceptor()}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("ngForOf",re.columns),i.\u0275\u0275advance(3),i.\u0275\u0275property("enabled",!re.service.isFreezed&&"edit"===re.value.status||"readonly"===re.value.status),i.\u0275\u0275advance(1),i.\u0275\u0275property("enabled",!re.value.markedAsInvalid||!re.service.isFreezed&&"edit"===re.value.status),i.\u0275\u0275advance(1),i.\u0275\u0275property("enabled",!re.service.isFreezed&&re.value.userId===re.service.currentUser.currentUserId)}}function za(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,Ue,2,1,"ng-container",1),i.\u0275\u0275elementStart(2,"form"),i.\u0275\u0275template(3,Fu,6,4,"ng-template",null,2,i.\u0275\u0275templateRefExtractor),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275reference(4),xe=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.value.isGroup)("ngIfElse",re)}}const jl=()=>{},uu={provide:o.NG_VALUE_ACCESSOR,useExisting:(0,i.forwardRef)(()=>Nl),multi:!0};let Nl=(()=>{class Ee{constructor(re,xe){this.service=re,this.changeDetection=xe,this.onTouchedCallback=jl,this.onChangeCallback=jl,this.prevRowIndex=0,this.deleteRow=new i.EventEmitter,this.archiveRow=new i.EventEmitter,this.duplicateRow=new i.EventEmitter,this.numberMask=ma()({prefix:"",suffix:"",includeThousandsSeparator:!0,thousandsSeparatorSymbol:".",allowDecimal:!0,decimalSymbol:","}),this.indexLabel="loading",this.showChildren=!1,this.subs=[]}get value(){return this.innerValue}set value(re){re!==this.innerValue&&(this.innerValue=re,this.onChangeCallback(re),this.changes.next())}ngOnChanges(){this.indexLabel=this.parentIndex?+this.parentIndex+"."+(this.rowIndex+this.prevRowIndex+1):this.rowIndex+this.prevRowIndex+1,this.changeDetection.detectChanges()}ngOnInit(){this.indexLabel=this.parentIndex?+this.parentIndex+"."+(this.rowIndex+this.prevRowIndex+1):this.rowIndex+this.prevRowIndex+1,this.changesInChild&&this.subs.push(this.changesInChild.subscribe(re=>{this.valueChanged(re)}))}valueChanged(re){this.changeDetection.detectChanges(),!this.value.isGroup&&"readonly"!==this.innerValue.status&&(this.innerValue.userName=this.service.currentUser.currentUserName,this.innerValue.userId=this.service.currentUser.currentUserId);const xe=!!this.value.isGroup&&this.value.explanations.some(Pt=>Pt.markedAsInvalid),nt=!(this.value.isGroup||this.bridgeItem.nativeElement.checkValidity()&&this.explanation.nativeElement.checkValidity());this.innerValue.markedAsInvalid=nt||xe,this.changes&&this.changes.next(re)}openContextMenu(re){re.target.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,button:2,clientX:re.clientX,clientY:re.clientY,composed:!0,screenX:re.screenX,screenY:re.screenY,view:re.view})),re.preventDefault(),re.stopPropagation()}onShowChildren(){this.value.showChildren=!this.value.showChildren,this.showChildren=!this.showChildren}onDeleteInterceptor(){this.value.delete=!0,this.valueChanged(this.value),this.deleteRow.emit(this.value)}onArchiveInterceptor(){this.value.isArchived=!0,this.value.showInTable=!1,this.valueChanged(this.value),this.archiveRow.emit(this.value)}onDuplicateInterceptor(){this.valueChanged(),this.duplicateRow.emit(this.value)}onBlur(){this.onTouchedCallback()}writeValue(re){re!==this.innerValue&&(this.innerValue=re,this.changeDetection.detectChanges())}registerOnChange(re){this.onChangeCallback=re}registerOnTouched(re){this.onTouchedCallback=re}setDisabledState(re){this.disabled=re}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(qs),i.\u0275\u0275directiveInject(i.ChangeDetectorRef))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge-tablerow-jh"]],viewQuery:function(re,xe){if(1&re&&(i.\u0275\u0275viewQuery(Ua,5),i.\u0275\u0275viewQuery(il,5)),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.bridgeItem=nt.first),i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.explanation=nt.first)}},inputs:{prevRowIndex:"prevRowIndex",rowIndex:"rowIndex",parentIndexTmp:"parentIndexTmp",parentIndex:"parentIndex",columns:"columns",unexplained:"unexplained",changes:"changes",changesInChild:"changesInChild"},outputs:{deleteRow:"deleteRow",archiveRow:"archiveRow",duplicateRow:"duplicateRow"},features:[i.\u0275\u0275ProvidersFeature([uu]),i.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["explanation",""],["class","pulse-table-cell",3,"contextMenu","ngClass",4,"ngFor","ngForOf"],["menuClass","pulse-contextmenu"],["optionMenu",""],[1,"pulse-table-cell",3,"contextMenu","ngClass"],[3,"ngClass","click",4,"ngIf"],["class","pulse-select",3,"ngClass",4,"ngIf"],[3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[1,"pulse-select",3,"ngClass"],["required","",1,"form-control","selectOption","text-center",3,"disabled","ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["name","value","step","1","placeholder","0","list","'unexplained'","disabled","true",1,"pulse-input","form-control","text-center",2,"text-align","right!important",3,"ngModel","ngModelChange"],["contextMenuItem","",3,"execute"],[1,"icon-plus2"],[1,"icon-minus"],["contextMenuItem","",3,"enabled","execute"],["class","pulse-select",4,"ngIf"],["class","pulse-checkbox-container",4,"ngIf"],["class","options",3,"click",4,"ngIf"],[1,"pulse-select"],["name","bridgeItem","required","",1,"form-control","selectOption","text-center",3,"disabled","ngModel","ngClass","ngModelChange","change","keyup"],["bridgeItemInput",""],["disabled",""],["name","value","step","1","placeholder","0","list","'unexplained'",1,"pulse-input","form-control","text-center",2,"text-align","right!important",3,"disabled","ngModel","ngModelChange","change","keyup"],["id","'unexplained'"],[3,"value"],["required","","name","explanation","rows","1","cols","10",1,"pulse-textarea",3,"disabled","ngModel","ngClass","ngModelChange","change","keyup"],["explanationInput",""],["name","isHidden",3,"inverted","disabled","ngModel","change","ngModelChange"],[1,"pulse-checkbox-container"],["name","showExternal","type","checkbox",1,"pulse-checkbox",3,"ngModel","change","keyup","ngModelChange"],[1,"checkmark"],[1,"options",3,"click"],[1,"action","icon-more"],[1,"icon-content_copy"],[1,"icon-folder-open"],[1,"icon-close-box-outline"]],template:function(re,xe){1&re&&i.\u0275\u0275template(0,za,5,2,"ng-container",0),2&re&&i.\u0275\u0275property("ngIf",xe.value)},directives:[e.O5,e.sg,us.HW,Xi.oO,e.mk,o.SelectControlValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,o.NgSelectOption,o.\u0275NgSelectMultipleOption,o.DefaultValueAccessor,us.GI,us.n5,o.\u0275NgNoValidate,o.NgControlStatusGroup,o.NgForm,Ma.g,o.CheckboxControlValueAccessor],pipes:[e.uU],styles:[".cdk-overlay-container{z-index:1040!important}.pulse-table-cell[_ngcontent-%COMP%]{border-width:0px}.pulse-table-cell.col-checkboxtoggle-span[_ngcontent-%COMP%]{min-width:70px}.pulse-table-cell.group[_ngcontent-%COMP%]{padding-top:5px}.pulse-table-cell[_ngcontent-%COMP%] .expandable[_ngcontent-%COMP%]{cursor:pointer}.pulse-table-cell[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:baseline;align-content:center;justify-content:space-between}.pulse-table-cell[_ngcontent-%COMP%] .options.disabled[_ngcontent-%COMP%]:active{pointer-events:none}.pulse-table-cell[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1 1 100%;cursor:pointer}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{width:100%;height:32px;font-size:14px;padding:0 8px}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select.disabled[_ngcontent-%COMP%]:after{right:15px;top:11px}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select.disabled[_ngcontent-%COMP%]:after{display:none}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:inherit}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%] select[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{opacity:1;border:0px;background-color:transparent}.pulse-table-cell[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{z-index:1}.pulse-table-cell[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{z-index:0}.pulse-table-cell[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{top:auto;left:auto}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;font-size:14px;resize:vertical}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#0000!important;border-width:0px 0px 0px 0px!important}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus, .pulse-table-cell[_ngcontent-%COMP%] textarea.invalid[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .pulse-table-cell[_ngcontent-%COMP%] input.invalid[_ngcontent-%COMP%]{border-width:0px 0px 1px 0px!important}.pulse-table-cell[_ngcontent-%COMP%] .invalid[_ngcontent-%COMP%]{border-color:#cd5c5c}.new[_ngcontent-%COMP%]{border-bottom-width:2px;border-bottom-color:#00008b}"]}),Ee})(),Kc=(()=>{class Ee{transform(re,xe,nt){return"!"===xe[0]?(xe=xe.substring(1),re.filter(Pt=>!0!==Pt[xe])):re.filter(Pt=>!1!==Pt[xe])}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275pipe=i.\u0275\u0275definePipe({name:"filter",type:Ee,pure:!0}),Ee})();function sl(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",15),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.name," ")}}function Bu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"pulse-frt-bridge-tablerow-jh",21),i.\u0275\u0275listener("deleteRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).deleteExplanationRow(nt)})("archiveRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).archiveExplanationRow(nt)})("duplicateRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(4).duplicateExplanationRow(nt)}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=tt.$implicit,xe=tt.index,nt=i.\u0275\u0275nextContext(2),Pt=nt.index,pn=nt.$implicit,oi=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("ngModel",re)("columns",oi.columns)("unexplained",oi.unexplained)("prevRowIndex",Pt)("rowIndex",xe)("parentIndexTmp",xe)("changes",pn.changesInChild)}}function bc(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,Bu,1,7,"pulse-frt-bridge-tablerow-jh",20),i.\u0275\u0275pipe(2,"filter"),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind2(2,1,re.explanations,"showInTable"))}}function ga(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"pulse-frt-bridge-tablerow-jh",18),i.\u0275\u0275listener("deleteRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).deleteExplanationRow(nt)})("archiveRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).archiveExplanationRow(nt)})("duplicateRow",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).duplicateExplanationRow(nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(2,bc,3,4,"ng-container",19),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=tt.$implicit,xe=tt.index,nt=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngModel",re)("columns",nt.columns)("unexplained",nt.unexplained)("rowIndex",xe)("changesInChild",re.changesInChild)("changes",nt.changesInChild),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.showInTable&&re.showChildren)}}function ja(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",16),i.\u0275\u0275template(1,ga,3,7,"ng-container",17),i.\u0275\u0275pipe(2,"filter"),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind2(2,1,re.rows,"showInTable"))}}let Fl=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi){this.service=re,this.frtService=xe,this.webapi=nt,this.project=Pt,this.toastr=pn,this.changeDetection=oi,this.frtBridgeTab=so,this.columns=kr.columns,this.invalidOrUnchanged=!0,this.rows=[],this.newRows=[],this.changedRows=[],this.deleteRows=[],this.frtId=this.frtService.frtId,this.frtTableName=this.frtService.frtTable,this.deviationId=this.service.deviationId,this.transactionActive=!1,this.changesInChild=new Qr.xQ,this.subs=[],this.subNum=0,this.errNum=0,this.subCtr=0}ngOnInit(){this.activeTab===this.frtBridgeTab.TABLE?this.subs.push(this.changesInChild.subscribe(re=>{this.service.changeExplained(this.rows);const xe=this.rows.some(nt=>nt.markedAsInvalid);this.invalidOrUnchanged=xe,re&&"edit"===re.status&&!this.changedRows.some(nt=>nt.id===re.id)&&(this.changedRows=this.changedRows.concat(re))}),this.service.bridgeUpdated.subscribe(()=>{this.getInitialTableData(),this.changeDetection.detectChanges(),this.invalidOrUnchanged=!0,this.transactionActive=!1})):this.activeTab===this.frtBridgeTab.OVERVIEW&&this.subs.push(this.service.bridgeUpdated.subscribe(()=>{this.getInitialOverviewData(),this.changeDetection.detectChanges(),this.invalidOrUnchanged=!0,this.transactionActive=!1}))}getInitialTableData(){this.invalidOrUnchanged=!0,JSON.parse(JSON.stringify(this.service.newExplanations)),this.newRows=[],this.changedRows=[],this.deleteRows=[],this.rows=this.service.getInitialTableData(),this.toastr.success("Explanations loaded!"),this.changeDetection.detectChanges(),this.service.changeExplained(this.rows)}getInitialOverviewData(){this.service.changeExplained(this.rows)}ngOnDestroy(){this.subs.forEach(re=>re.unsubscribe())}addExplanationRow(re){re.map(xe=>{xe.status="new",xe.editHidden=!0}),this.rows=re.concat(this.rows),this.newRows=this.newRows.concat(re),this.changesInChild.next()}deleteExplanationRow(re){re.delete=!0,this.rows.forEach(xe=>xe.explanations=xe.explanations?xe.explanations.filter(nt=>!nt.delete):xe.explanations),this.rows=this.rows.filter(xe=>!xe.delete),"edit"!==re.status||this.deleteRows.some(xe=>re.id===xe.id)?"new"===re.status&&(this.newRows=this.newRows.filter(xe=>!xe.delete)):(this.deleteRows=this.deleteRows.concat(re),this.changedRows=this.changedRows.filter(xe=>!xe.delete)),this.changesInChild.next()}archiveExplanationRow(re){this.rows.forEach(xe=>xe.explanations=xe.explanations?xe.explanations.filter(nt=>!nt.isArchived):xe.explanations),this.rows=this.rows.filter(xe=>!xe.isArchived),this.changesInChild.next()}duplicateExplanationRow(re){const xe=JSON.parse(JSON.stringify(re));xe.id=null,xe.userId=this.service.currentUser.currentUserId,xe.userName=this.service.currentUser.currentUserName,xe.timestamp=null,this.addExplanationRow([xe])}newExplanationRow(){const re=[{markedAsInvalid:!0,showInTable:!0,editable:!0,explanation:"",financialReportingTableExplanationBridgeItemId:null,id:null,isHidden:!0,showExternal:!1,status:"new",timestamp:null,userId:this.service.currentUser.currentUserId,userName:this.service.currentUser.currentUserName,value:null,deepestLevel:this.service.deepestLevelsHier,deepestLevelString:this.service.convertMapToString(this.service.deepestLevels)}];this.addExplanationRow(re)}onCancel(){this.transactionActive?this.toastr.error("Please wait for the previous transaction to finish!"):(this.transactionActive=!0,this.service.data.explainCell.next(),this.toastr.success("Reseting Data"))}onSave(){this.subNum=this.deleteRows.length+this.newRows.length+this.changedRows.length,!this.transactionActive&&this.subNum?(this.transactionActive=!0,this.subCtr=0,this.errNum=0,this.deleteRows.forEach(re=>this._deleteRow(re)),this.newRows.forEach(re=>this._postRow(re)),this.changedRows.forEach(re=>this._putRow(re))):this.transactionActive?this.toastr.error("Please wait for the previous transaction to finish!"):this.subNum||this.toastr.error("Sorry! No changes detected")}trackByIndex(re,xe){return re}_requestFinished(re){this.errNum=re?this.errNum++:this.errNum,this.subCtr++,this.subCtr===this.subNum&&(this.transactionActive=!1,this.toastr.success(this.subCtr+" explanation out of "+this.subNum+" updated with "+this.errNum+" Errors!")),this.transactionActive=!1,this.invalidOrUnchanged=!0,this.service.data.explainCell.next()}_postRow(re){re.frtId=this.frtId,re.frtTableName=this.frtTableName,re.deviationId=this.deviationId,this.webapi.postObserv("/api/project/"+this.project.projectId+"/frt/"+this.frtService.frtId+"/bridge",re).subscribe(nt=>{this.toastr.success("Explanation with id "+nt.id+" updated!"),this._requestFinished(!1)},nt=>{this.toastr.error("Explanation "+nt+" not updated!"),this._requestFinished(!0)},()=>{})}_putRow(re){re.frtId=this.frtId,re.frtTableName=this.frtTableName,re.deviationId=this.deviationId,this.webapi.putObserv("/api/project/"+this.project.projectId+"/frt/"+this.frtService.frtId+"/bridge/"+re.id,re).subscribe(nt=>{this.toastr.success("Explanation with id "+nt.id+" updated!"),this._requestFinished(!1)},nt=>{this.toastr.error("Explanation "+nt+" not updated!"),this._requestFinished(!0)},()=>{})}_deleteRow(re){re.frtId=this.frtId,re.frtTableName=this.frtTableName,re.deviationId=this.deviationId,this.webapi.deleteObserv("/api/project/"+this.project.projectId+"/frt/"+this.frtService.frtId+"/bridge/"+re.id,re).subscribe(nt=>{this.toastr.success("Explanation with id "+nt.id+" deleted!"),this._requestFinished(!1)},nt=>{this.toastr.error("Explanation "+nt+" not deleted!"),this._requestFinished(!0)},()=>{})}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(qs),i.\u0275\u0275directiveInject(eo.E),i.\u0275\u0275directiveInject(In.f),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject(i.ChangeDetectorRef))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge-table-jh"]],inputs:{activeTab:"activeTab"},decls:22,vars:6,consts:[["isRelative","true",3,"isSpin"],[1,"chartContainer"],[1,"chartBlock"],[1,"pulse-table"],[1,"pulse-table-header"],[1,"pulse-table-row"],["class","pulse-table-cell",3,"ngClass",4,"ngFor","ngForOf"],["class","pulse-table-body",4,"ngIf"],[1,"pulse-btn-group","horizontal"],[1,"pulse-btn","cancel",3,"click"],[1,"icon-table-row-plus-before"],[1,"icon-close2"],[1,"pulse-btn","save",3,"disabled","click"],[1,"icon-check-mark"],[1,"pulse-btn","save"],[1,"pulse-table-cell",3,"ngClass"],[1,"pulse-table-body"],[4,"ngFor","ngForOf"],[1,"pulse-table-row",3,"ngModel","columns","unexplained","rowIndex","changesInChild","changes","deleteRow","archiveRow","duplicateRow"],[4,"ngIf"],["class","pulse-table-row group",3,"ngModel","columns","unexplained","prevRowIndex","rowIndex","parentIndexTmp","changes","deleteRow","archiveRow","duplicateRow",4,"ngFor","ngForOf"],[1,"pulse-table-row","group",3,"ngModel","columns","unexplained","prevRowIndex","rowIndex","parentIndexTmp","changes","deleteRow","archiveRow","duplicateRow"]],template:function(re,xe){1&re&&(i.\u0275\u0275element(0,"pulse-spinner",0),i.\u0275\u0275text(1),i.\u0275\u0275elementStart(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5),i.\u0275\u0275template(7,sl,2,2,"div",6),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(8,ja,3,4,"div",7),i.\u0275\u0275elementStart(9,"div",8)(10,"button",9),i.\u0275\u0275listener("click",function(){return xe.newExplanationRow()}),i.\u0275\u0275element(11,"i",10),i.\u0275\u0275text(12," Add Row"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"button",9),i.\u0275\u0275listener("click",function(){return xe.onCancel()}),i.\u0275\u0275element(14,"i",11),i.\u0275\u0275text(15," Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(16,"button",12),i.\u0275\u0275listener("click",function(){return xe.onSave()}),i.\u0275\u0275element(17,"i",13),i.\u0275\u0275text(18," Save"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(19,"button",14),i.\u0275\u0275element(20,"i",13),i.\u0275\u0275text(21," Debugger"),i.\u0275\u0275elementEnd()()()()()),2&re&&(i.\u0275\u0275property("isSpin",xe.transactionActive),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate2(" ",xe.invalidOrUnchanged," | ",xe.transactionActive,"\n"),i.\u0275\u0275advance(6),i.\u0275\u0275property("ngForOf",xe.columns),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.rows.length),i.\u0275\u0275advance(8),i.\u0275\u0275property("disabled",xe.invalidOrUnchanged||xe.transactionActive))},directives:[Oo.O,e.sg,Xi.oO,e.mk,e.O5,Nl,o.NgControlStatus,o.NgModel],pipes:[Kc],styles:[".cdk-overlay-container{z-index:1040!important}.pulse-table-cell[_ngcontent-%COMP%]{border-width:0px}.pulse-table-cell.col-checkboxtoggle-span[_ngcontent-%COMP%]{min-width:70px}.pulse-table-cell.group[_ngcontent-%COMP%]{padding-top:5px}.pulse-table-cell[_ngcontent-%COMP%] .expandable[_ngcontent-%COMP%]{cursor:pointer}.pulse-table-cell[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:baseline;align-content:center;justify-content:space-between}.pulse-table-cell[_ngcontent-%COMP%] .options.disabled[_ngcontent-%COMP%]:active{pointer-events:none}.pulse-table-cell[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1 1 100%;cursor:pointer}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]{width:100%;height:32px;font-size:14px;padding:0 8px}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select.disabled[_ngcontent-%COMP%]:after{right:15px;top:11px}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select.disabled[_ngcontent-%COMP%]:after{display:none}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:inherit}.pulse-table-cell[_ngcontent-%COMP%] .pulse-select[_ngcontent-%COMP%] select[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{opacity:1;border:0px;background-color:transparent}.pulse-table-cell[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{z-index:1}.pulse-table-cell[_ngcontent-%COMP%] .pulse-checkbox-container[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{z-index:0}.pulse-table-cell[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{top:auto;left:auto}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;font-size:14px;resize:vertical}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#0000!important;border-width:0px 0px 0px 0px!important}.pulse-table-cell[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus, .pulse-table-cell[_ngcontent-%COMP%] textarea.invalid[_ngcontent-%COMP%], .pulse-table-cell[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .pulse-table-cell[_ngcontent-%COMP%] input.invalid[_ngcontent-%COMP%]{border-width:0px 0px 1px 0px!important}.pulse-table-cell[_ngcontent-%COMP%] .invalid[_ngcontent-%COMP%]{border-color:#cd5c5c}.new[_ngcontent-%COMP%]{border-bottom-width:2px;border-bottom-color:#00008b}"]}),Ee})();var ac=r(93470),Bl=r.n(ac),_o=r(53527),ol=r(82460);let al=(()=>{class Ee{constructor(re,xe,nt){this.scaleService=re,this.explanationService=xe,this.service=nt}ngOnInit(){this._options=this.initChart()}ngAfterViewInit(){this.calcThereInPosition(),this.explanationService.setChartSeries(this._options.series)}median(re){const xe=Math.floor(re.length/2);return re.length%2?re[xe]:(re[xe-1]+re[xe])/2}initChart(){const re=this,xe=this.getDataForChart();return{chart:{type:"waterfall"},title:{text:"waterfall",style:{display:"none"}},xAxis:{type:"category"},yAxis:{lineColor:"white",lineWidth:2,visible:!1,title:!1},credits:{enabled:!1},legend:{enabled:!1},tooltip:{shared:!0,valueSuffix:"\u20ac",style:{fontWeight:"bold"},useHTML:!0,pointFormatter:function(){return"waterfall"===this.type?re.scaleService.formatNumber(this.label):""}},series:[{type:"waterfall",color:"#879BAA",data:xe,dataLabels:{enabled:!0,allowOverlap:!0,inside:!1,formatter:function(){return this.point.label=this.point.reverse?-1*this.point.y:this.point.y,re.scaleService.formatNumber(this.point.label)},style:{fontWeight:"bold"}},pointPadding:0},{type:"line",data:null!==this.service.bridgeItems[0].isBeforeIntermediateTotal?this.getArrowData(xe):[],step:"right",color:"#879BAA"},{type:"line",data:null!==this.service.bridgeItems[0].isBeforeIntermediateTotal?this.getArrowData(xe,!0):[],step:"left",isArrow:!0,color:"#879BAA"}],plotOptions:{line:{enableMouseTracking:!1,marker:{enabled:!1}},waterfall:{pointWidth:50,borderColor:"#879BAA",events:{afterAnimate:function(){const nt=this.chart,pn=nt.series[0].data.find(Ur=>Ur.name.indexOf("Comparable")>-1);if(!pn)return;const oi=nt.series[0].data[nt.series[0].data.length-1],ci=(100*(oi.y/pn.y-1)).toFixed(0),ji=re.scaleService.formatNumber(oi.y-pn.y);let mr="Comparable "+nt.series[0].data[0].name+" to "+oi.name;mr+="
"+ci+" %
"+ji,nt.renderer.label(mr,nt.plotWidth+nt.plotLeft-500,10).css({color:"#000000"}).attr({"stroke-width":1,stroke:"rgba(0, 0, 0, 0.75)",r:1,padding:8,zIndex:6,fill:"#ffffff"}).add(),this.drawRec()}}}}}}saveInstance(re){this.chart=re}drawComparableBox(){const re=this.chart,xe=re.series[2].data,nt=re.series[0].data.slice(re.series[0].data.find(ms=>ms.hasOwnProperty("isIntermediateSum")).index,re.series[0].data.length).map(ms=>ms.index),Pt=this.median(nt);let pn=0,oi=0;Pt%1==0?(pn=xe[Pt].plotX-re.series[0].data[Pt].pointWidth/3,oi=xe[Pt].plotY-re.plotLeft):null!=Pt&&NaN!==Pt&&(pn=(xe[Math.round(Pt)].plotX+xe[Math.floor(Pt)].plotX)/2-re.series[0].data[Math.round(Pt)].pointWidth/3,oi=(xe[Math.round(Pt)].plotY+xe[Math.floor(Pt)].plotY)/2-re.plotLeft);const ci=re.series[0].data.find(ms=>ms.hasOwnProperty("isIntermediateSum"));if(!ci)return;const Mi=re.series[0].data[re.series[0].data.length-1],ji=(100*(Mi.y/ci.y-1)).toFixed(0),Kr=this.scaleService.formatNumber(Mi.y-ci.y)+"
"+ji+"%";re.renderer.label(Kr,pn,oi).css({color:"#879BAA"}).attr({r:1,padding:8,"text-align":"center",zIndex:6,fill:"#ffffff",id:"compBox"}).add()}drawRec(){const nt=this.chart.axes[0].series[2],Pt=this.chart.axes[0].series[2].data,Mi=[];let ji=null,mr=null;0===Pt[Pt.length-1].y?(ji=Pt[Pt.length-2],mr=Pt[Pt.length-1]):(ji=Pt[Pt.length-1],mr=Pt[Pt.length-2]),Mi.push("M",ji.plotX,ji.plotY),ji.plotX>mr.plotX?(Mi.push("L",ji.plotX+9*Math.cos(0),ji.plotY-9*Math.sin(0)),Mi.push(ji.plotX+9*Math.sin(0),ji.plotY+9*Math.cos(0)),Mi.push(ji.plotX-9*Math.cos(0),ji.plotY+9*Math.sin(0),"Z")):(Mi.push("L",ji.plotX-9*Math.cos(0),ji.plotY+9*Math.sin(0)),Mi.push(ji.plotX-9*Math.sin(0),ji.plotY-9*Math.cos(0)),Mi.push(ji.plotX+9*Math.cos(0),ji.plotY-9*Math.sin(0),"Z")),nt.chart.renderer.path(Mi).attr({fill:nt.color,id:"arrow"}).add(nt.group)}getArrowData(re,xe){if(re.filter(nt=>nt.hasOwnProperty("isIntermediateSum"))&&re.length>0&&!xe){const nt=[],Pt=re.indexOf(re.filter(ci=>ci.hasOwnProperty("isIntermediateSum"))[0]),pn=re.filter(ci=>re.indexOf(ci)>Pt).map(ci=>ci.sum),oi=Math.max(...pn);for(let ci=0;cint.hasOwnProperty("isIntermediateSum"))&&re.length>0&&xe){const nt=[],Pt=re.indexOf(re.filter(ci=>ci.hasOwnProperty("isIntermediateSum"))[0]),pn=re.filter(ci=>re.indexOf(ci)>Pt).map(ci=>ci.sum),oi=Math.max(...pn);for(let ci=0;ci!0===xe.hasOwnProperty("dataLabels")).forEach(xe=>{xe.dataLabels.y=xe.dataLabel.height+xe.shapeArgs.height+15})}getDataForChart(){let re=[],xe={};const nt=this.service.explanations,Pt=this.service.explanations.filter(Mi=>!0===Mi.showExternal),pn=this.service.explanations.filter(Mi=>-2===Mi.id&&null!==Mi.lowerExplanations&&Mi.lowerExplanations.length>0);for(let Mi=0;Mi!0===mr.showExternal).forEach(mr=>Pt.push(mr));const oi=this;this.explanationService.sortByKey(nt,"financialReportingTableExplanationBridgeItemId","asc");const ci=null!==this.service.bridgeItems[0].isBeforeIntermediateTotal;xe.type="waterfall",xe.name=this.service.columns.column1Name+" "+this.service.columns.column1Category,xe.y=this.service.columns.column1Value,re.push(xe),null!==this.service.bridgeItems[0].isBeforeIntermediateTotal&&(this.service.bridgeItems=this.explanationService.sortByKey(this.service.bridgeItems,"isBeforeIntermediateTotal","desc")),this.service.bridgeItems=this.explanationService.sortByKey(this.service.bridgeItems,"order","asc");for(let Mi=0;Mi0&&0===this.service.bridgeItems[Mi].isBeforeIntermediateTotal&&1===this.service.bridgeItems[Mi-1].isBeforeIntermediateTotal&&(xe.type="waterfall",xe.name=this.service.columns.column1Name+" "+this.service.columns.column1Category+" adapted",xe.isIntermediateSum=!0,re.push(xe));const ji=this.service.bridgeItems[Mi].id,mr=nt.filter(function(Ur){return Ur.financialReportingTableExplanationBridgeItemId===ji});if(mr.length>0){let Ur=0;if(mr.slice(0,mr.length).map(Kr=>{null!==Kr.value&&(Ur+=-2===Kr.id?Kr.bridgeItemSum:Kr.value)}),xe={},xe.type="waterfall",xe.name=mr[0].bridgeItemLabel,xe.y=Ur,7===mr[0].financialReportingTableExplanationBridgeItemId&&null!=mr[0].value&&(mr[0].value instanceof Number||"number"==typeof mr[0].value)&&(xe.color=Ur<0?"#CA1D04":"#0EA044"),Pt.filter(Kr=>Kr.bridgeItemLabel===mr[0].bridgeItemLabel).length>0){let Kr="Σ "+oi.scaleService.formatNumber(Ur).replace(/''/g,"''").replace(/'/g,"'")+'
therein:
    ';Pt.filter(ms=>ms.bridgeItemLabel===mr[0].bridgeItemLabel).forEach(ms=>{const ta=oi.scaleService.formatNumber(ms.value).replace(/''/g,"''").replace(/'/g,"'");ms.explanation.length>20&&(ms.explanation=ms.explanation.slice(0,20),ms.explanation+="..."),Kr+="
"}),Kr+="
  • "+ms.explanation+'
  • '+ta+"
    ",xe.dataLabels={color:"#000",shadow:!0,useHTML:!0,borderWidth:1,borderColor:"#AAA",shape:"callout",verticalAlign:"bottom",y:0,formatter:function(){return Kr},style:{fontWeight:"bold"}}}re.push(xe)}else xe={},xe.type="waterfall",xe.name=this.service.bridgeItems[Mi].label,xe.y=0,re.push(xe)}if(0!==this.service.unexplained&&(xe={},xe.type="waterfall",xe.name="Unexplained",xe.y=this.service.unexplained,xe.color=Bl().getOptions().colors[8],re.push(xe)),xe={},xe.type="waterfall",xe.name=this.service.columns.column2Name+" "+this.service.columns.column2Category,xe.label=this.service.columns.column2Value,xe.isSum=!0,re.push(xe),this.service.columns.column1Value<0||this.service.columns.column2Value<0){let Mi=0;re=re.map(ji=>(ji.reverse=!0,ji.label||(ji.label=ji.y),ji.y=-1*ji.y,ji.y&&(Mi+=ji.y),ji.sum=Mi,ji))}else{let Mi=0;re=re.map(ji=>(ji.reverse=!1,ji.label||(ji.label=ji.y),Mi+=ji.y,ji.sum=Mi,ji))}return re}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(_o.q),i.\u0275\u0275directiveInject(vo.N),i.\u0275\u0275directiveInject(qs))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge-chart"]],decls:3,vars:1,consts:[[1,"chartContainer"],[1,"chartBlock"],["id","bridge-chart",3,"options","load"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"pulse-chart",2),i.\u0275\u0275listener("load",function(Pt){return xe.saveInstance(Pt.context)}),i.\u0275\u0275elementEnd()()()),2&re&&(i.\u0275\u0275advance(2),i.\u0275\u0275property("options",xe._options))},directives:[ol.u],styles:[""]}),Ee})(),js=(()=>{class Ee{constructor(){}ngOnInit(){}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge-archive"]],decls:3,vars:0,consts:[[1,"chartContainer"],[1,"chartBlock"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0)(1,"div",1),i.\u0275\u0275text(2,"archived comments"),i.\u0275\u0275elementEnd()())},styles:[""]}),Ee})();function wc(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1,"\u20ac"),i.\u0275\u0275elementEnd())}function Zo(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1," \xbb\xa0"),i.\u0275\u0275elementEnd())}function bl(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"span",11),i.\u0275\u0275template(1,Zo,2,0,"span",0),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit,xe=tt.first;i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.value)}}function Mc(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1,"\u20ac"),i.\u0275\u0275elementEnd())}function ll(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"span"),i.\u0275\u0275text(1,"\u20ac"),i.\u0275\u0275elementEnd())}function dd(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",12),i.\u0275\u0275element(1,"pulse-frt-bridge-overview"),i.\u0275\u0275elementEnd())}function yo(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",12),i.\u0275\u0275element(1,"pulse-frt-bridge-table-jh",13),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("activeTab",re.activeTab)}}function uo(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",12),i.\u0275\u0275element(1,"pulse-frt-bridge-chart"),i.\u0275\u0275elementEnd())}function lc(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",12),i.\u0275\u0275element(1,"pulse-frt-bridge-archive"),i.\u0275\u0275elementEnd())}function Xs(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"div",1)(2,"div",2)(3,"h3"),i.\u0275\u0275text(4,"EXPLANATION"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"h4"),i.\u0275\u0275text(6),i.\u0275\u0275template(7,wc,2,0,"span",0),i.\u0275\u0275text(8),i.\u0275\u0275pipe(9,"scale"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(10,"h5"),i.\u0275\u0275template(11,bl,3,2,"span",3),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(12,"div",4)(13,"div",5)(14,"span",6),i.\u0275\u0275text(15,"\u03a3 explained"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(16,"div",7),i.\u0275\u0275template(17,Mc,2,0,"span",0),i.\u0275\u0275elementStart(18,"span"),i.\u0275\u0275text(19),i.\u0275\u0275pipe(20,"scale"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(21,"div",8)(22,"span",6),i.\u0275\u0275text(23,"\u03a3 unexplained"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(24,"div",7),i.\u0275\u0275template(25,ll,2,0,"span",0),i.\u0275\u0275elementStart(26,"span"),i.\u0275\u0275text(27),i.\u0275\u0275pipe(28,"scale"),i.\u0275\u0275elementEnd()()()()(),i.\u0275\u0275elementStart(29,"div")(30,"pulse-tab-navigation",9),i.\u0275\u0275listener("activeTabChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().onActiveTabChange(nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(31,dd,2,0,"div",10),i.\u0275\u0275template(32,yo,2,1,"div",10),i.\u0275\u0275template(33,uo,2,0,"div",10),i.\u0275\u0275template(34,lc,2,0,"div",10),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(6),i.\u0275\u0275textInterpolate1("\u0394\xa0",re.service.columns.deviationName,":\xa0"),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","FTE"!==re.service.currency),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(9,15,re.service.columns.deviationValue)),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",re.service.deepestLevels),i.\u0275\u0275advance(6),i.\u0275\u0275property("ngIf","FTE"!==re.service.currency),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(20,17,re.service.explained)),i.\u0275\u0275advance(6),i.\u0275\u0275property("ngIf","FTE"!==re.service.currency),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate(i.\u0275\u0275pipeBind1(28,19,re.service.unexplained)),i.\u0275\u0275advance(3),i.\u0275\u0275property("navbarTabs",re.navbarTabs)("activeTab",re.activeTab)("isTransparent",!0),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.activeTab===re.bridgeTabs.OVERVIEW),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.activeTab===re.bridgeTabs.TABLE),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.activeTab===re.bridgeTabs.CHART),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.activeTab===re.bridgeTabs.ARCHIVE)}}let Cl=(()=>{class Ee{constructor(re,xe,nt,Pt){this.ngxSmartModalService=re,this.frtService=xe,this.explService=nt,this.service=Pt,this.bridgeTabs=so,this.activeTab=so.OVERVIEW,this.navbarTabs=[{title:"Overview",icon:"small icon-icon_all_01"},{title:"Table",icon:"small icon-table-large"},{title:"Chart",icon:"small icon-chart-bar-stacked"},{title:"Archive",icon:"small icon-folder-open"}]}ngOnInit(){}ngAfterViewInit(){this.ngxSmartModalService.getModal("bridgeModal").onDataAdded.subscribe(re=>{this.service.initData(re)})}onActiveTabChange(re){this.activeTab=re}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(eo.E),i.\u0275\u0275directiveInject(vo.N),i.\u0275\u0275directiveInject(qs))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-bridge"]],features:[i.\u0275\u0275ProvidersFeature([qs])],decls:1,vars:1,consts:[[4,"ngIf"],[1,"dialog-header"],[1,"headerTitle"],["class","cell-hierarchy",4,"ngFor","ngForOf"],[1,"bridgeContainer"],[1,"bridgeBox","explained"],[1,"bridgeBox-header"],[1,"bridgeBox-body"],[1,"bridgeBox","unexplained"],[3,"navbarTabs","activeTab","isTransparent","activeTabChange"],["class","tab-content",4,"ngIf"],[1,"cell-hierarchy"],[1,"tab-content"],[3,"activeTab"]],template:function(re,xe){1&re&&i.\u0275\u0275template(0,Xs,35,21,"div",0),2&re&&i.\u0275\u0275property("ngIf",xe.service.data)},directives:[e.O5,e.sg,Ps.j,oc,Fl,al,js],pipes:[Cs.P],styles:["pulse-frt-bridge .tab-content{background-color:#ebf0f5;padding:15px;margin:0 -16px -26px}pulse-frt-bridge .dialog-header{padding:25px 0 0;flex-direction:row;display:flex;justify-content:space-between}pulse-frt-bridge .dialog-header .headerTitle{flex-direction:column;display:flex}pulse-frt-bridge .dialog-header .headerTitle h3{color:#099;font-weight:400}pulse-frt-bridge .dialog-header .headerTitle h4,pulse-frt-bridge .dialog-header .headerTitle h5{margin-top:0;color:#00646e}pulse-frt-bridge .dialog-header .headerTitle h5{font-weight:400}pulse-frt-bridge .dialog-header .bridgeContainer{text-align:right;display:flex;height:80px}pulse-frt-bridge .dialog-header .bridgeContainer .bridgeBox{min-width:230px;padding:20px;color:#fff}pulse-frt-bridge .dialog-header .bridgeContainer .bridgeBox .bridgeBox-header{font-size:15px}pulse-frt-bridge .dialog-header .bridgeContainer .bridgeBox div.bridgeBox-body{font-size:20px;display:flex;justify-content:space-between}pulse-frt-bridge .dialog-header .bridgeContainer .bridgeBox.unexplained{background-color:#ffb900}pulse-frt-bridge .dialog-header .bridgeContainer .bridgeBox.explained{background-color:#099;margin-right:1.75rem}pulse-frt-bridge .pulse-nav-links a:first-of-type{margin-left:0!important}\n"],encapsulation:2}),Ee})();var wl=r(22721);const du=function(Ee){return{"padding-left":Ee}};function Yu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",3)(2,"button",4),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().addWildcard()}),i.\u0275\u0275text(3),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngStyle",i.\u0275\u0275pureFunction1(2,du,re.getPadding())),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1("Add ",re.addTitle,"")}}function oa(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",6),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("ngClass",re.icon())}}function va(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",3),i.\u0275\u0275template(1,oa,1,1,"i",5),i.\u0275\u0275text(2),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngStyle",i.\u0275\u0275pureFunction1(3,du,re.getPadding())),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",-1!==re.rowData.treeLevel),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.drilldown," ")}}const Sc=function(Ee){return{pointer:Ee}};let qo=(()=>{class Ee{constructor(re,xe){this.service=re,this.planService=xe,this.addTitle="",this.treeLevel=0,this.rowData={}}ngOnInit(){this.fullDrilldown=this.service.getFullDrilldown(this.rowData),this.treeLevel=this.service.getTreelevel(this.rowData),this.drilldown=this.getDrilldown();const re=[];for(let xe=0;xePt.name===this.service.drilldown[xe]);nt&&re.push(nt)}this._lastDrilldown=re.pop(),this._plan=this.planService.findCurrentPlan(this.rowData,this._lastDrilldown,re),this._plan&&this._plan.FinancialReportingTableWhitelistGroup&&(this.addTitle=this._plan.FinancialReportingTableWhitelistGroup.name)}isOpen(){return!0===this.service.collapse[this.fullDrilldown]}icon(){return this.rowData.isLoading?"icon-loading spin":!0===this.service.collapse[this.fullDrilldown]?"icon-minus":"icon-plus2"}getPadding(){return-1===this.rowData[eo.E.TREELEVEL]?10+16*this.treeLevel+15+"px":10+16*this.treeLevel+"px"}getDrilldown(){return this.rowData[this.service.drilldown[this.treeLevel]]}addWildcard(){this.planService.addWildcard(this.rowData,this.treeLevel,this._plan,this._lastDrilldown)}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(eo.E),i.\u0275\u0275directiveInject(wl.t))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-cell-drilldown"]],inputs:{rowData:"rowData"},decls:4,vars:5,consts:[[3,"ngClass","click"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[3,"ngStyle"],[1,"pulse-btn","cancel","btn-small",3,"click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(re,xe){if(1&re&&(i.\u0275\u0275elementStart(0,"div",0),i.\u0275\u0275listener("click",function(){return xe.service.toggleCollapse(xe.rowData,xe.isOpen())}),i.\u0275\u0275template(1,Yu,4,4,"ng-container",1),i.\u0275\u0275template(2,va,3,5,"ng-template",null,2,i.\u0275\u0275templateRefExtractor),i.\u0275\u0275elementEnd()),2&re){const nt=i.\u0275\u0275reference(3);i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(3,Sc,-1!==xe.rowData.treeLevel)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","*"==xe.drilldown)("ngIfElse",nt)}},directives:[Xi.oO,e.mk,e.O5,Xi.Zl,e.PC],styles:["div[_ngcontent-%COMP%] .pulse-btn[_ngcontent-%COMP%]{margin-top:-5px;width:auto}div[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#879baa;width:18px;line-height:18px;text-align:center;margin-right:3px;margin-top:3px}div[_ngcontent-%COMP%] i.icon-minus[_ngcontent-%COMP%]{color:#005f87}div[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;align-items:center}div[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:#005f87}div.pointer[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0}),Ee})();var ds=r(88603);class Sa{transform(tt,re){return null!==tt&&!isNaN(tt)&&void 0!==tt&&""!==tt}}Sa.\u0275fac=function(tt){return new(tt||Sa)},Sa.\u0275pipe=i.\u0275\u0275definePipe({name:"checkNumber",type:Sa,pure:!0}),function(Ee,tt,re,xe){var pn,nt=arguments.length,Pt=nt<3?tt:null===xe?xe=Object.getOwnPropertyDescriptor(tt,re):xe;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)Pt=Reflect.decorate(Ee,tt,re,xe);else for(var oi=Ee.length-1;oi>=0;oi--)(pn=Ee[oi])&&(Pt=(nt<3?pn(Pt):nt>3?pn(tt,re,Pt):pn(tt,re))||Pt);nt>3&&Pt&&Object.defineProperty(tt,re,Pt)}([(0,ds.Z)()],Sa.prototype,"transform",null);var Yl=r(93870);function hu(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",1),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.cellEuro())}}const Bn=["*"];let Tc=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi){this.cd=re,this.scaleService=xe,this.service=nt,this.currencyService=Pt,this.commentService=pn,this.checkNumber=oi,this._sub=[]}showData(){return this.checkNumber.transform(this.cellData)?Number(this.cellData):null}showEuro(){return!!(this.service.isLocal&&this.currency&&"FTE"!==this.currencyFlag&&this.scaleService.formatNumber(this.currencyService.getEuro(this.showData(),this.currency,this.service.fiscalYear.value,this.column.exRate),"FTE"===this.currencyFlag&&this.scaleService.scale.value!==_o.N.Decimal?_o.N.Integer:"FTE"===this.currencyFlag&&this.scaleService.scale.value===_o.N.Decimal?_o.N.Decimal:void 0))||null}cellDisplay(){return this.scaleService.formatNumber(this.showData(),"FTE"===this.currencyFlag&&this.scaleService.scale.value!==_o.N.Decimal?_o.N.Integer:"FTE"===this.currencyFlag&&this.scaleService.scale.value===_o.N.Decimal?_o.N.Decimal:void 0)}cellEuro(){return this.service.isLocal?"\u20ac "+this.scaleService.formatNumber(this.currencyService.getEuro(this.showData(),this.currency,this.service.fiscalYear.value,this.column.exRate),"FTE"===this.currencyFlag&&this.scaleService.scale.value!==_o.N.Decimal?_o.N.Integer:"FTE"===this.currencyFlag&&this.scaleService.scale.value===_o.N.Decimal?_o.N.Decimal:void 0):null}checkIsNumber(){return null!==this.cellData&&!isNaN(this.cellData)&&void 0!==this.cellData&&""!==this.cellData}ngOnInit(){this._sub.push(this.scaleService.scale.subscribe(re=>{this.cd.markForCheck()}))}ngOnDestroy(){this._sub.forEach(re=>re.unsubscribe())}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(i.ChangeDetectorRef),i.\u0275\u0275directiveInject(_o.q),i.\u0275\u0275directiveInject(eo.E),i.\u0275\u0275directiveInject(Mt.i),i.\u0275\u0275directiveInject(Yl.b),i.\u0275\u0275directiveInject(Sa))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-cell"]],inputs:{cellData:"cellData",currencyFlag:"currencyFlag",currency:"currency",column:"column",drilldown:"drilldown",hasComment:"hasComment"},features:[i.\u0275\u0275ProvidersFeature([Sa])],ngContentSelectors:Bn,decls:5,vars:3,consts:[["class","cell-euro",4,"ngIf"],[1,"cell-euro"]],template:function(re,xe){1&re&&(i.\u0275\u0275projectionDef(),i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275projection(1),i.\u0275\u0275elementStart(2,"div"),i.\u0275\u0275text(3),i.\u0275\u0275template(4,hu,2,1,"div",0),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()),2&re&&(i.\u0275\u0275advance(2),i.\u0275\u0275attribute("copyValue",xe.showData()),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",xe.cellDisplay()," "),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.showEuro()))},directives:[e.O5],styles:[""],changeDetection:0}),Ee})();var ea=r(45478);const Hl=["deviationMenu"],Ai=function(Ee,tt,re,xe,nt){return{"icon-comment":Ee,"icon-loading spin":tt,"totally-explained":re,"partially-explained":xe,"not-explained":nt}};function Vl(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"pulse-frt-cell",4),i.\u0275\u0275listener("mouseenter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().enterDeviation()})("mouseleave",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().leaveDeviation()}),i.\u0275\u0275element(1,"i",5),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(),xe=i.\u0275\u0275reference(3);i.\u0275\u0275styleProp("cursor",re.isCommentable?"context-menu":"default"),i.\u0275\u0275property("ngClass",re.commenting.freeText?"corner-right-top-1":"")("cellData",re.cellData)("currencyFlag",re.rowData.currencyFlag)("contextMenu",re.isCommentable?xe:null),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction5(8,Ai,!re.commenting.isLoading&&re.isCommentable,re.commenting.isLoading,"totally explained"===re.commenting.status,"comments available"===re.commenting.status,"no comments available"===re.commenting.status))}}function Dc(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275element(1,"i",7),i.\u0275\u0275elementStart(2,"span"),i.\u0275\u0275text(3,"Bridge commenting"),i.\u0275\u0275elementEnd()()),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngClass","totally explained"===re.commenting.status?"totally-explained":"no comments available"===re.commenting.status?"not-explained":"partially-explained")}}function Oc(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275template(0,Dc,4,1,"ng-template",6),i.\u0275\u0275listener("execute",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().explainCell()})}}let Xc=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi,ci,Mi,ji){this.service=re,this.explanationService=xe,this.selections=nt,this.toastr=Pt,this.userService=pn,this.ref=oi,this.currencyService=ci,this.renderer=Mi,this.ngxSmartModalService=ji,this.explainCellFromBridge=new Qr.xQ,this.isNumber=!0,this.sub=[],this.commenting={Value:0,isLoading:!0}}ngOnInit(){this.treeLevel=this.service.getTreelevel(this.rowData),this.isNumber=this.checkIsNumber(),this.isNumber&&(this.commenting.Value=Number(this.cellData),this.commenting.isLoading=!0);const re=this.getExplanationStatus();if(re&&this.sub.push(re),this.deviation.commentable){const xe=this.service.frtDrilldown.filter(nt=>nt.isRequired).map(nt=>nt.name);this.sub.push(this.explanationService.commentableMainItems.subscribe(nt=>{this.isCommentable=!(!nt||-1===nt.indexOf(this.rowData[xe.toString()]))}),this.currencyService.currency.subscribe(nt=>{"group"!==nt&&(this.isCommentable=!1)}),this.explainCellFromBridge.subscribe(()=>{this.explainCell()}))}else this.isCommentable=!!this.deviation.commentable}ngOnDestroy(){this.sub.length>0&&this.sub.forEach(re=>re.unsubscribe())}showErrMsg(){this.toastr.warning('Comments only on "World Consolidated" level. '+this.commenting.errMessage,"Cannot explain cell:")}showRestrictionMsg(re){this.toastr.info(re,"Cannot explain cell:")}getExplanationStatus(){this.commenting.isLoading=!1}enterDeviation(){Array.from(document.getElementsByClassName("frt-colid"+this.deviation.column1id)).forEach(re=>this.renderer.setStyle(re,"background-color","rgba(190, 205, 215,0.7)")),Array.from(document.getElementsByClassName("frt-colid"+this.deviation.column2id)).forEach(re=>this.renderer.setStyle(re,"background-color","rgba(190, 205, 215,0.7)"))}leaveDeviation(){Array.from(document.getElementsByClassName("frt-colid"+this.deviation.column1id)).forEach(re=>this.renderer.removeStyle(re,"background-color")),Array.from(document.getElementsByClassName("frt-colid"+this.deviation.column2id)).forEach(re=>this.renderer.removeStyle(re,"background-color"))}commentingCell(re,xe){const nt=[];for(const Pt of this.service.frtDrilldownSelection)nt.push([Pt.name,this.rowData[Pt.name]]);this.ngxSmartModalService.setModalData({frtId:this.service.frtId,table:this.service.frtTable,filter:this.service.filterApplied,column:{id:re.id,name:re.name,type:"deviation"},drilldown:nt,value:xe},"frtComments"),this.ngxSmartModalService.getModal("frtComments").open(),this.ngxSmartModalService.getModal("frtComments").onClose.subscribe(Pt=>{this.commenting.freeText=Pt,this.service.calcData()})}explainCell(){if(this.isCommentable){this.commenting.isLoading=!0;const re=this.service.frtDrilldown.filter(Pt=>Pt.isRequired).map(Pt=>this.rowData[Pt.name]),xe=this.explanationService.getDrilldownList(this.rowData),nt=this.explanationService.getColumnsForExplanation(this.commenting,this.rowData,this.deviation);this.explanationService.getCurrentExplanations(this.service.filterApplied,xe,nt.deviationId,re).then(Pt=>{this.explanationService.user&&!1===Pt.hasOwnProperty("errMessages")&&Pt.bridgeItems.length>0?this.userService.getUser().subscribe(pn=>{if(pn){const oi=Object.keys(Pt.deepestLevels),ci=this.service.frtDrilldown.filter(mr=>-1!==oi.indexOf(mr.name));ci.map(mr=>{mr.name=mr.name,mr.label=mr.label,mr.value=Pt.deepestLevels[mr.name]});const Mi={data:Pt,columns:nt,currentExplanations:Pt.explanations.current,archivedExplanations:Pt.archivedExplanations,detailedInformations:ci,deepestLevels:Pt.deepestLevels,bridgeItems:Pt.bridgeItems,currentUser:{currentUserName:pn.firstName+" "+pn.lastName,currentUserId:pn.id},isFreezed:Pt.isFreeze,currency:this.rowData.currencyFlag,explainCell:this.explainCellFromBridge},ji=this.ngxSmartModalService.getModal("bridgeModal");ji.setData(Mi),this.ngxSmartModalService.resetModalData("bridgeModal"),ji.openedClass||ji.open(),ji.onClose.subscribe(()=>{this.explanationService.checkExplanations(this.service.frtId,this.service.filterApplied,this.service.deviations.map(mr=>mr.id),this.service.frtTable,this.service.frtDrilldownSelection),this.service.calcData()})}}):(this.commenting.isLoading=!1,this.commenting.errMessage=Pt.errMessages,this.showErrMsg(),this.service.calcData())})}}checkIsNumber(){return this.cellData=this.service.deviationValue(this.deviation,this.rowData),!isNaN(this.cellData)&&""!==this.cellData}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(eo.E),i.\u0275\u0275directiveInject(vo.N),i.\u0275\u0275directiveInject(ea.j),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject(Ti.K),i.\u0275\u0275directiveInject(i.ChangeDetectorRef),i.\u0275\u0275directiveInject(Mt.i),i.\u0275\u0275directiveInject(i.Renderer2),i.\u0275\u0275directiveInject(ut.lu))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-frt-deviation"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(Hl,7),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.deviationMenu=nt.first)}},inputs:{rowData:"rowData",deviation:"deviation",hasComment:"hasComment",cellData:"cellData"},decls:5,vars:4,consts:[["class","cell",3,"ngClass","cellData","currencyFlag","cursor","contextMenu","mouseenter","mouseleave",4,"ngIf"],["menuClass","pulse-contextmenu"],["deviationMenu",""],[4,"ngIf"],[1,"cell",3,"ngClass","cellData","currencyFlag","contextMenu","mouseenter","mouseleave"],[1,"bridgeIcon",3,"ngClass"],["contextMenuItem","",3,"execute"],[1,"icon-comment",3,"ngClass"]],template:function(re,xe){1&re&&(i.\u0275\u0275template(0,Vl,2,14,"pulse-frt-cell",0),i.\u0275\u0275pipe(1,"async"),i.\u0275\u0275elementStart(2,"context-menu",1,2),i.\u0275\u0275template(4,Oc,1,0,null,3),i.\u0275\u0275elementEnd()),2&re&&(i.\u0275\u0275property("ngIf",i.\u0275\u0275pipeBind1(1,2,xe.rowData.cd)&&xe.checkIsNumber()),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngIf",xe.isCommentable))},directives:[e.O5,Tc,Xi.oO,e.mk,us.HW,us.GI,us.n5],pipes:[e.Ov],styles:[""],changeDetection:0}),Ee})();var cl=r(87208),Ul=r(94005),Ic=r(4480);function Pc(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",10)}function to(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",11)}function Ea(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"span",7),i.\u0275\u0275listener("mousedown",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext(2).$implicit,pn=i.\u0275\u0275nextContext();return Pt[pn.itemPicker.expandedProperty]=!Pt[pn.itemPicker.expandedProperty],nt.stopPropagation()}),i.\u0275\u0275template(1,Pc,1,0,"i",8),i.\u0275\u0275template(2,to,1,0,"i",9),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2).$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!re[xe.itemPicker.expandedProperty]),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re[xe.itemPicker.expandedProperty])}}function cc(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",5),2&Ee){const re=i.\u0275\u0275nextContext(2).$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngClass",re[xe.itemPicker.iconProperty])}}const _a=function(Ee,tt){return{selected:Ee,fixed:tt}},Na=function(Ee){return{"item-label":Ee}};function Go(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",3),i.\u0275\u0275listener("dragstart",function(nt){i.\u0275\u0275restoreView(re);const Pt=i.\u0275\u0275nextContext().$implicit,pn=i.\u0275\u0275nextContext();return pn.itemPicker.setItemSelection(Pt,!0),pn.itemPicker.ondragstart(nt,!1)})("click",function(nt){return nt.stopPropagation()})("mousedown",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext().$implicit,Pt=i.\u0275\u0275nextContext();return Pt.itemPicker.unselectItems(!0),Pt.itemPicker.setItemSelection(nt)}),i.\u0275\u0275template(1,Ea,3,2,"span",4),i.\u0275\u0275elementStart(2,"span",5),i.\u0275\u0275template(3,cc,1,1,"i",6),i.\u0275\u0275text(4),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction2(6,_a,xe.itemPicker.getItemSelection(re),xe.itemPicker.isFixed(re)))("hidden",!re[xe.itemPicker.childrenProperty]&&null!=xe.itemPicker.unpickedItemsFilter&&re[xe.itemPicker.labelProperty]&&-1===re[xe.itemPicker.labelProperty].toLowerCase().indexOf(xe.itemPicker.unpickedItemsFilter.toLowerCase())),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.children&&re.children.length>0),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(9,Na,!(re.children&&re.children.length>0))),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.itemPicker.iconProperty),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re[xe.itemPicker.labelProperty])}}function ul(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",12),i.\u0275\u0275element(1,"pulse-itempicker-item",13),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext().$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("items",re[xe.itemPicker.childrenProperty])}}function Ml(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div"),i.\u0275\u0275template(1,Go,5,11,"div",1),i.\u0275\u0275template(2,ul,2,1,"div",2),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.itemPicker.isItemPicked(re)&&xe.hasUnPickedChildren(re)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re[xe.itemPicker.expandedProperty])}}let Ta=(()=>{class Ee{constructor(re){this.itemPicker=re}set items(re){this._items=re}get items(){return this._items}hasUnPickedChildren(re){if(re[this.itemPicker.childrenProperty]){for(const xe of re[this.itemPicker.childrenProperty])if(!this.itemPicker.isItemPicked(xe)||this.hasUnPickedChildren(xe))return!0;return!1}return!this.itemPicker.isItemPicked(re)}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(Lr.G))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-itempicker-item"]],inputs:{items:"items"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["draggable","true",3,"ngClass","hidden","dragstart","click","mousedown",4,"ngIf"],["style","padding-left: 20px",4,"ngIf"],["draggable","true",3,"ngClass","hidden","dragstart","click","mousedown"],["class","category clickable",3,"mousedown",4,"ngIf"],[3,"ngClass"],[3,"ngClass",4,"ngIf"],[1,"category","clickable",3,"mousedown"],["class","icon-plus",4,"ngIf"],["class","icon-minus",4,"ngIf"],[1,"icon-plus"],[1,"icon-minus"],[2,"padding-left","20px"],[3,"items"]],template:function(re,xe){1&re&&i.\u0275\u0275template(0,Ml,3,2,"div",0),2&re&&i.\u0275\u0275property("ngForOf",xe._items)},directives:[e.sg,e.O5,Xi.oO,e.mk,Ee],styles:[".selected[_ngcontent-%COMP%]{background-color:#0f8287;color:#fff}.item-label[_ngcontent-%COMP%]{display:flex}.item-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-basis:20px;font-size:12px}"]}),Ee})(),Ga=(()=>{class Ee{constructor(re,xe){this.webApi=re,this.variables=xe}generateQrCode(){return new Promise((re,xe)=>{this.webApi.get(this.variables.apiUrl+"/api/MobileAccess").then(nt=>{re(nt)},nt=>xe(nt))})}getDevices(){return new Promise((re,xe)=>{this.webApi.get(this.variables.apiUrl+"/api/MobileAccess/Devices").then(nt=>{re(nt)},nt=>xe(nt))})}deleteDevice(re){this.webApi.delete(this.variables.apiUrl+"/api/MobileAccess/"+re)}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275inject(In.f),i.\u0275\u0275inject(rr.a))},Ee.\u0275prov=i.\u0275\u0275defineInjectable({token:Ee,factory:Ee.\u0275fac,providedIn:"root"}),Ee})();var $a=r(77093);function Qs(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",14)(1,"h4"),i.\u0275\u0275text(2,"Get the Pulse App from the Siemens App-Store."),i.\u0275\u0275elementEnd()())}function pu(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",15)}function Qc(Ee,tt){1&Ee&&i.\u0275\u0275element(0,"i",16)}function no(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",17),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().onShowCode()}),i.\u0275\u0275elementStart(1,"h4"),i.\u0275\u0275text(2,"Create a new QR-Code "),i.\u0275\u0275element(3,"br"),i.\u0275\u0275text(4," and scan it with your device."),i.\u0275\u0275elementEnd()()}}function fu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"qrcode",23),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).generateQrCode()}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("qrdata",re.qrCode)("size",315)("level","M"),i.\u0275\u0275attribute("title","")}}function Hu(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",18),i.\u0275\u0275element(1,"div",19),i.\u0275\u0275template(2,fu,1,4,"qrcode",20),i.\u0275\u0275elementStart(3,"div",21)(4,"div",22),i.\u0275\u0275text(5),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(6," seconds "),i.\u0275\u0275elementEnd()()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",re.qrCodeLoaded),i.\u0275\u0275advance(2),i.\u0275\u0275styleProp("color",re.hideCodeIn<6?"red":re.hideCodeIn<11&&re.hideCodeIn>5?"yellow":"black"),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.hideCodeIn," ")}}function mu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",26)(1,"div",27),i.\u0275\u0275element(2,"i",28),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(3,"div",27),i.\u0275\u0275text(4),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div",29),i.\u0275\u0275text(6),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(7,"div",30),i.\u0275\u0275text(8),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"div",31)(10,"i",32),i.\u0275\u0275listener("click",function(){const Pt=i.\u0275\u0275restoreView(re).$implicit;return i.\u0275\u0275nextContext(2).deleteDevice(Pt.userToDeviceKey)}),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=tt.$implicit;i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate1(" ",re.devicePlatform," "),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",re.deviceName," "),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",re.deviceType," ")}}function Ka(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",24),i.\u0275\u0275template(1,mu,11,3,"div",25),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.devices)}}let kc=(()=>{class Ee{constructor(re,xe){this.qrGeneratorService=re,this.ngxSmartModalService=xe,this.qrCodeLoaded=!1,this.showQrCode=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("mobileAccessModal").onOpen.subscribe(re=>{this.devices||this.getDevices()})}generateQrCode(){this.qrGeneratorService.generateQrCode().then(re=>{this.qrCode=JSON.stringify(re),this.qrCodeLoaded=!0})}deleteDevice(re){this.qrGeneratorService.deleteDevice(re);for(var xe=0;xe{this.devices=re})}onShowCode(){var re=this.devices.length;this.generateQrCode(),this.showQrCode=!0,this.hideCodeIn=30;const xe=setInterval(()=>{this.hideCodeIn--,this.hideCodeIn%5==0&&this.getDevices(),(this.hideCodeIn<0||this.devices.length>re)&&(clearInterval(xe),this.showQrCode=!1)},1e3)}onOkClick(){this.ngxSmartModalService.getModal("mobileAccessModal").close()}onCancelClick(){this.onOkClick()}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(Ga),i.\u0275\u0275directiveInject(ut.lu))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-modal-mobile"]],decls:18,vars:7,consts:[["identifier","mobileAccessModal","customClass","pulse-modal",3,"dismissable","onClose"],["mobileAccessModal",""],["fxFlex","100%"],["class","pulse-app",4,"ngIf"],["class","qr-arrow-1 icon-arrow-link-small-down",4,"ngIf"],["class","qr-arrow-2 icon-arrow-link-small-down",4,"ngIf"],["class","pulse-code",3,"click",4,"ngIf"],["class","qr-code",4,"ngIf"],["class","devices-list",4,"ngIf"],[1,"modal-buttons"],[1,"button-modal",3,"click"],["title","Ok",1,"icon-check-mark"],[1,"button-modal-transparent",3,"click"],["title","Cancel",1,"icon-close2"],[1,"pulse-app"],[1,"qr-arrow-1","icon-arrow-link-small-down"],[1,"qr-arrow-2","icon-arrow-link-small-down"],[1,"pulse-code",3,"click"],[1,"qr-code"],[1,"qr-code-background"],[3,"qrdata","size","level","click",4,"ngIf"],[1,"qr-code-counter"],[2,"display","inline"],[3,"qrdata","size","level","click"],[1,"devices-list"],["class","device",4,"ngFor","ngForOf"],[1,"device"],["fxFlex","10%"],[1,"icon-cellphone-iphone"],["fxFlex","40%"],["fxFlex","35%"],["fxFlex","5%"],[1,"icon-delete2",3,"click"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1),i.\u0275\u0275listener("onClose",function(){return xe.hideCodeIn=0}),i.\u0275\u0275elementStart(2,"div",2)(3,"h3"),i.\u0275\u0275text(4,"Get Pulse Mobile Access"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(5,Qs,3,0,"div",3),i.\u0275\u0275template(6,pu,1,0,"i",4),i.\u0275\u0275template(7,Qc,1,0,"i",5),i.\u0275\u0275template(8,no,5,0,"div",6),i.\u0275\u0275template(9,Hu,7,4,"div",7),i.\u0275\u0275template(10,Ka,2,1,"div",8),i.\u0275\u0275elementStart(11,"div",9)(12,"button",10),i.\u0275\u0275listener("click",function(){return xe.onOkClick()}),i.\u0275\u0275element(13,"i",11),i.\u0275\u0275text(14," Ok"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(15,"button",12),i.\u0275\u0275listener("click",function(){return xe.onCancelClick()}),i.\u0275\u0275element(16,"i",13),i.\u0275\u0275text(17," Cancel"),i.\u0275\u0275elementEnd()()()),2&re&&(i.\u0275\u0275property("dismissable",!1),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",!xe.showQrCode),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.showQrCode),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.showQrCode),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.showQrCode),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.showQrCode),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.showQrCode))},directives:[ut.Q3,$a.yH,e.O5,v,e.sg],styles:[""]}),Ee})();var gu=r(5254),Lc=r(80013),Jc=r(75778),oo=r(87545),Da=r(22868);const Sl=[{langkey:"U_DELEGATION_VIEW_02",key:"name",class:"col-span-4"},{langkey:"U_DELEGATION_VIEW_03",key:"email",class:"lg-hide col-span-6"},{langkey:"U_DELEGATION_VIEW_04",key:"orgId",class:"md-hide col-span-6"},{langkey:"U_DELEGATION_VIEW_05",key:"gid",class:"col-span-2"}];var Ac=r(61035);let Wl=(()=>{class Ee{constructor(re){this.awsSignatureService=re,this.cache={}}search(re){const xe=btoa(re);return new Promise((nt,Pt)=>{this.cache[xe]?nt(this.cache[xe]):this.awsSignatureService.Post(JSON.stringify({searchString:re}),"/dev/user").subscribe(oi=>{this.cache[xe]=oi,nt(this.cache[xe])})})}setWithProjectId(re){this.awsSignatureService.set(re)}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275inject(Ac.X))},Ee.\u0275prov=i.\u0275\u0275defineInjectable({token:Ee,factory:Ee.\u0275fac,providedIn:"root"}),Ee})();var uc=r(4221),dc=r(75531),hc=r(87436);function Vu(Ee,tt){1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",16),i.\u0275\u0275element(2,"i",17),i.\u0275\u0275elementStart(3,"span",18),i.\u0275\u0275text(4),i.\u0275\u0275pipe(5,"translate"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementContainerEnd()),2&Ee&&(i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(5,1,"U_DELEGATION_VIEW_09")," "))}function ao(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",27)(1,"div",24),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,re.langkey)," ")}}function No(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",27)(1,"div",24),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,xe[re.key])," ")}}function dl(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",30),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).addDelegate(nt)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275elementEnd()}2&Ee&&i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,1,"U_DELEGATION_VIEW_07"))}function El(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",31),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(3).removeDelegate(nt.gid,!0)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275elementEnd()}2&Ee&&i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(1,1,"U_DELEGATION_DELETE"))}function Uu(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",21),i.\u0275\u0275template(1,No,4,4,"div",22),i.\u0275\u0275elementStart(2,"div",23)(3,"div",24),i.\u0275\u0275template(4,dl,2,3,"i",28),i.\u0275\u0275template(5,El,2,3,"ng-template",null,29,i.\u0275\u0275templateRefExtractor),i.\u0275\u0275elementEnd()()()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275reference(6),nt=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",nt.scdSearchResultsColumns),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!re.existAsDelegate)("ngIfElse",xe)}}function aa(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",19)(1,"div",20)(2,"div",21),i.\u0275\u0275template(3,ao,4,4,"div",22),i.\u0275\u0275elementStart(4,"div",23),i.\u0275\u0275element(5,"div",24),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(6,"div",25),i.\u0275\u0275template(7,Uu,7,3,"div",26),i.\u0275\u0275elementEnd()()),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",re.scdSearchResultsColumns),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngForOf",re.scdsearchResultsRows)}}function vu(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12),i.\u0275\u0275element(5,"input",13),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275element(7,"pulse-spinner",14),i.\u0275\u0275template(8,Vu,6,3,"ng-container",8),i.\u0275\u0275template(9,aa,8,2,"div",15),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(5),i.\u0275\u0275propertyInterpolate("placeholder",i.\u0275\u0275pipeBind1(6,5,"U_DELEGATION_VIEW_09")),i.\u0275\u0275property("formControl",re.scdSearchBoxCtrl),i.\u0275\u0275advance(2),i.\u0275\u0275property("isSpin",re.isSearchLoading),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",0===re.scdsearchResultsRows.length&&!re.isSearchLoading),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.scdsearchResultsRows.length>0&&!re.isSearchLoading)}}function Xa(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",16),i.\u0275\u0275element(1,"i",34),i.\u0275\u0275elementStart(2,"span",18),i.\u0275\u0275text(3),i.\u0275\u0275pipe(4,"translate"),i.\u0275\u0275elementEnd()()),2&Ee&&(i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(4,1,"U_DELEGATION_VIEW_EMPTY_02")," "))}function Qa(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",27)(1,"div",24),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,re.langkey)," ")}}function Tl(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",27)(1,"div",24),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,xe[re.key])," ")}}function Hi(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",21),i.\u0275\u0275template(1,Tl,4,4,"div",22),i.\u0275\u0275elementStart(2,"div",35)(3,"div",24)(4,"i",31),i.\u0275\u0275listener("click",function(){const Pt=i.\u0275\u0275restoreView(re).$implicit;return i.\u0275\u0275nextContext(3).removeDelegate(Pt.gid)}),i.\u0275\u0275pipe(5,"translate"),i.\u0275\u0275elementEnd()()()()}if(2&Ee){const re=i.\u0275\u0275nextContext(3);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.delegatesColumns),i.\u0275\u0275advance(3),i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(5,2,"U_DELEGATION_DELETE"))}}function U(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",19)(1,"div",20)(2,"div",21),i.\u0275\u0275template(3,Qa,4,4,"div",22),i.\u0275\u0275elementStart(4,"div",35),i.\u0275\u0275element(5,"div",24),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(6,"div",36),i.\u0275\u0275template(7,Hi,6,4,"div",26),i.\u0275\u0275pipe(8,"async"),i.\u0275\u0275elementEnd()()),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",re.delegatesColumns),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind1(8,2,re.delegatesRows$))}}function ae(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",9),i.\u0275\u0275template(2,Xa,5,3,"ng-template",null,32,i.\u0275\u0275templateRefExtractor),i.\u0275\u0275template(4,U,9,4,"div",33),i.\u0275\u0275pipe(5,"async"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=i.\u0275\u0275reference(3),xe=i.\u0275\u0275nextContext();let nt;i.\u0275\u0275advance(4),i.\u0275\u0275property("ngIf",(null==(nt=i.\u0275\u0275pipeBind1(5,2,xe.delegatesRows$))?null:nt.length)>0)("ngIfElse",re)}}let Me=(()=>{class Ee{constructor(re,xe,nt,Pt,pn){this.userSearchService=re,this.userService=xe,this.delegationService=nt,this.translator=Pt,this.toaster=pn,this.delegatesColumns=Sl,this.scdSearchBoxCtrl=new o.FormControl(""),this.scdSearchResults=[],this.scdSearchResultsColumns=Sl,this.scdsearchResultsRows=[],this.activeTab=1,this.navbarTabs=[{title:"U_DELEGATION_VIEW_08",icon:"small icon-search"},{title:"U_DELEGATION_VIEW_01",icon:"small icon-career"}],this.subs=[],this.userSearchService.setWithProjectId(5306),this.userService.getUser().subscribe(oi=>this.user=oi),this.delegatesRows$=this.delegationService.givenDelegations$}ngOnInit(){this.subscribeToUserInputs()}ngOnDestroy(){this.subs.forEach(re=>{re.unsubscribe()})}subscribeToUserInputs(){this.subs.push(this.scdSearchBoxCtrl.valueChanges.pipe((0,Lc.b)(200),(0,Jc.x)(),(0,P.U)(re=>this.internationalize(re)),(0,oo.w)(re=>(this.isSearchLoading=!0,""===re?(0,wa.of)([]):this.search(re))),(0,P.U)(re=>re.filter(xe=>!!xe.email)),(0,P.U)(re=>re.filter(xe=>this.excludeYourself(xe))),(0,Da.b)(re=>re.forEach(xe=>this.markAsExistingDelegates(xe)))).subscribe(re=>{this.scdsearchResultsRows=this.generateResultsRows(re),this.isSearchLoading=!1}))}onActiveTabChange(re){this.activeTab=re}search(re){return(0,gu.D)(this.userSearchService.search(re))}internationalize(re){const xe={\u00e4:"ae",\u00f6:"oe",\u00fc:"ue",\u00c4:"Ae",\u00d6:"Oe",\u00dc:"Ue",\u00df:"ss"};for(const nt in xe)xe.hasOwnProperty(nt)&&re.replace(nt,xe[nt]);return re}excludeYourself(re){if(this.user)return re.email.toLowerCase()!==this.user.email.toLowerCase()}excludeDelegates(re){const xe=this.delegatesRows$.value;return!(xe.length>0&&xe.find(nt=>nt.gid===re.gid))}markAsExistingDelegates(re){const xe=this.delegatesRows$.value;xe.length>0&&xe.find(Pt=>Pt.gid===re.gid)&&(re.existAsDelegate=!0)}generateResultsRows(re){return re.map(xe=>({name:xe.firstName+" "+xe.lastName,email:xe.email,orgId:xe.orgId,gid:xe.gid,existAsDelegate:!!xe.existAsDelegate}))}addDelegate(re){this.delegationService.addDelegation(re.gid).subscribe(xe=>{if(xe){this.delegationService.generateGivenDelegations(xe);const nt=this.scdsearchResultsRows.find(pn=>pn.gid===re.gid);void 0!==nt.existAsDelegate&&(nt.existAsDelegate=!0);const Pt=this.translator.translate("U_DELEGATION_ADD_SUCCESS");this.toaster.success(Pt)}else console.log("could not add delegation",xe)}),this.activeTab=2}removeDelegate(re,xe){this.delegationService.deleteDelegation(re).subscribe(nt=>{const pn=this.delegationService.givenDelegations$.value.filter(ci=>ci.gid!==re);if(xe){const ci=this.scdsearchResultsRows.find(Mi=>Mi.gid===re);void 0!==ci.existAsDelegate&&(ci.existAsDelegate=!1)}const oi=this.translator.translate("U_DELEGATION_DELETE_SUCCESS");this.toaster.success(oi),this.delegationService.givenDelegations$.next(pn)})}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(Wl),i.\u0275\u0275directiveInject(Ti.K),i.\u0275\u0275directiveInject(uc.O),i.\u0275\u0275directiveInject(dc.T),i.\u0275\u0275directiveInject(Vt._W))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-modal-user-delegations-config"]],inputs:{activeTab:"activeTab"},decls:15,vars:11,consts:[["identifier","userDelegationsConfigModal","customClass","pulse-modal--large"],["userDelegationsConfigModal",""],[1,"pulse-modal__header"],[1,"text--teal"],[1,"icon-career"],[1,"delegation-info"],[1,"icon-information"],[3,"activeTab","navbarTabs","isTransparent","activeTabChange"],[4,"ngIf"],[1,"pulse-modal__body"],[1,"pulse-search-group","mt-3","pulse-row"],[1,"pulse-col-12"],[1,"pulse-form-field","pulse-form-field--alone"],["type","text","autofocus","",1,"pulse-input","pulse-input--default","pulse-input--newton-label",3,"placeholder","formControl"],[3,"isSpin"],["class","pulse-table mt-3",4,"ngIf"],[1,"empty-state","empty-state--static","empty-state--fixed-height"],[1,"icon-search"],[1,"empty-state__title"],[1,"pulse-table","mt-3"],[1,"pulse-table-header"],[1,"pulse-table-row"],["class","pulse-table-cell left",3,"ngClass",4,"ngFor","ngForOf"],[1,"pulse-table-cell","center"],[1,"cell"],[1,"pulse-table-body","pulse-table-body--search"],["class","pulse-table-row",4,"ngFor","ngForOf"],[1,"pulse-table-cell","left",3,"ngClass"],["class","icon-plus pointable",3,"title","click",4,"ngIf","ngIfElse"],["deleteDelegateTemplate",""],[1,"icon-plus","pointable",3,"title","click"],[1,"icon-delete","pointable",3,"title","click"],["emptystate",""],["class","pulse-table mt-3",4,"ngIf","ngIfElse"],[1,"icon-users"],[1,"pulse-table-cell","center","col-span-2"],[1,"pulse-table-body"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h2",3),i.\u0275\u0275element(4,"i",4),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(7,"span",5),i.\u0275\u0275element(8,"i",6),i.\u0275\u0275text(9),i.\u0275\u0275pipe(10,"translate"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(11,"div")(12,"pulse-tab-navigation",7),i.\u0275\u0275listener("activeTabChange",function(Pt){return xe.onActiveTabChange(Pt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(13,vu,10,7,"ng-container",8),i.\u0275\u0275template(14,ae,6,4,"ng-container",8),i.\u0275\u0275elementEnd()()),2&re&&(i.\u0275\u0275advance(5),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(6,7,"U_DELEGATION_VIEW_07")," "),i.\u0275\u0275advance(4),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(10,9,"U_DELEGATION_VIEW_12"),""),i.\u0275\u0275advance(3),i.\u0275\u0275property("activeTab",xe.activeTab)("navbarTabs",xe.navbarTabs)("isTransparent",!0),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",1===xe.activeTab),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",2===xe.activeTab))},directives:[ut.Q3,Ps.j,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.FormControlDirective,Oo.O,e.sg,Xi.oO,e.mk],pipes:[hc.k,e.Ov],styles:[".empty-state[_ngcontent-%COMP%]{position:absolute;top:40%;left:40%;text-align:center;color:#cdd9e1}.empty-state.empty-state--static[_ngcontent-%COMP%]{position:static;margin-top:40%}.empty-state.empty-state--static.empty-state--fixed-height[_ngcontent-%COMP%]{height:100%;margin:auto;padding-top:55px}.empty-state.empty-state--static.empty-state--fixed-height[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{width:400px;font-size:20px}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%]{margin-top:0}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:60px;padding-bottom:5px}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{font-size:16px}.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:block;font-size:150px;padding-bottom:30px}.empty-state[_ngcontent-%COMP%] i.empty-state--small[_ngcontent-%COMP%]{font-size:60px}.empty-state[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{font-size:50px}.pointable[_ngcontent-%COMP%]{cursor:pointer}i[_ngcontent-%COMP%]{position:relative;top:3px}.text--teal[_ngcontent-%COMP%]{color:#00646e}.pr-2[_ngcontent-%COMP%]{padding-right:20px}.mt-3[_ngcontent-%COMP%]{margin-top:30px}.pulse-modal__body[_ngcontent-%COMP%]{height:300px;max-height:300px;position:relative}.delegation-info[_ngcontent-%COMP%]{margin-top:15px;opacity:.7}.delegation-info[_ngcontent-%COMP%] .icon-information[_ngcontent-%COMP%]{margin-top:-1px}.pulse-search-group[_ngcontent-%COMP%]{height:40px}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-9[_ngcontent-%COMP%]{flex:0 0 75%;max-width:75%}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-3[_ngcontent-%COMP%]{flex:0 0 25%;max-width:25%}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-12[_ngcontent-%COMP%]{width:100%}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field.pulse-form-field--alone[_ngcontent-%COMP%]{margin-top:0}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input.pulse-input--default[_ngcontent-%COMP%]{border-color:#cdd9e1 #cdd9e1 #879baa #cdd9e1}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input.pulse-input--newton-label[_ngcontent-%COMP%]{font-size:14px;font-family:SiemensSans!important}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]:focus{border-color:#00646e}.pulse-search-group[_ngcontent-%COMP%] .pulse-btn.pulse-btn--contained[_ngcontent-%COMP%]{height:100%}.pulse-table[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]{border-right:none}.pulse-table[_ngcontent-%COMP%] .pulse-table-header[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%]{border:none}.pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%]{overflow-y:auto;max-height:250px}.pulse-table[_ngcontent-%COMP%] .pulse-table-body.pulse-table-body--search[_ngcontent-%COMP%]{max-height:200px}@media screen and (max-width: 1024px){.pulse-table-cell.lg-hide[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 768px){.pulse-table-cell.md-hide[_ngcontent-%COMP%]{display:none}}"]}),Ee})();function je(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"div",8),i.\u0275\u0275element(1,"i",4),i.\u0275\u0275elementStart(2,"span",9),i.\u0275\u0275text(3),i.\u0275\u0275pipe(4,"translate"),i.\u0275\u0275elementEnd()()),2&Ee&&(i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(4,1,"U_DELEGATION_VIEW_EMPTY_01")," "))}function it(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",18)(1,"div",15),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,re.langkey)," ")}}function Yt(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",18)(1,"div",15),i.\u0275\u0275text(2),i.\u0275\u0275pipe(3,"translate"),i.\u0275\u0275elementEnd()()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275property("ngClass",re.class),i.\u0275\u0275advance(2),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(3,2,xe[re.key])," ")}}function bn(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",19),i.\u0275\u0275listener("click",function(){const Pt=i.\u0275\u0275restoreView(re).$implicit;return i.\u0275\u0275nextContext(2).useDelegation(Pt.gid)}),i.\u0275\u0275template(1,Yt,4,4,"div",13),i.\u0275\u0275elementStart(2,"div",14)(3,"div",15),i.\u0275\u0275element(4,"i",20),i.\u0275\u0275pipe(5,"translate"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.delegationsColumns),i.\u0275\u0275advance(3),i.\u0275\u0275propertyInterpolate("title",i.\u0275\u0275pipeBind1(5,2,"U_DELEGATION_VIEW_06"))}}function ai(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"div",10)(1,"div",11)(2,"div",12),i.\u0275\u0275template(3,it,4,4,"div",13),i.\u0275\u0275elementStart(4,"div",14),i.\u0275\u0275element(5,"div",15),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(6,"div",16),i.\u0275\u0275template(7,bn,6,4,"div",17),i.\u0275\u0275pipe(8,"async"),i.\u0275\u0275elementEnd()()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",re.delegationsColumns),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngForOf",i.\u0275\u0275pipeBind1(8,2,re.delegationsRows$))}}let Ri=(()=>{class Ee{constructor(re,xe,nt){this.delegationService=re,this.ngxSmartModalService=xe,this.projectService=nt,this.delegationsColumns=Sl}ngOnInit(){this.delegationsRows$=this.delegationService.receivedDelegations$}useDelegation(re){const xe=location.href.includes("sges")?"5306":""+this.projectService.projectId;this.delegationService.useDelegation(re,xe),this.ngxSmartModalService.close("userDelegationsViewModal")}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(uc.O),i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject($t.k))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-modal-user-delegations-view"]],decls:12,vars:7,consts:[["identifier","userDelegationsViewModal","customClass","pulse-modal--large"],["userDelegationsViewModal",""],[1,"pulse-modal__header"],[1,"text--teal"],[1,"icon-users"],[1,"pulse-modal__body"],["emptystate",""],["class","pulse-table mt-3",4,"ngIf","ngIfElse"],[1,"empty-state","empty-state--static","empty-state--fixed-height"],[1,"empty-state__title"],[1,"pulse-table","mt-3"],[1,"pulse-table-header"],[1,"pulse-table-row"],["class","pulse-table-cell left",3,"ngClass",4,"ngFor","ngForOf"],[1,"pulse-table-cell","center"],[1,"cell"],[1,"pulse-table-body"],["class","pulse-table-row pointable",3,"click",4,"ngFor","ngForOf"],[1,"pulse-table-cell","left",3,"ngClass"],[1,"pulse-table-row","pointable",3,"click"],[1,"icon-login-variant",3,"title"]],template:function(re,xe){if(1&re&&(i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h2",3),i.\u0275\u0275element(4,"i",4),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(7,"div",5),i.\u0275\u0275template(8,je,5,3,"ng-template",null,6,i.\u0275\u0275templateRefExtractor),i.\u0275\u0275template(10,ai,9,4,"div",7),i.\u0275\u0275pipe(11,"async"),i.\u0275\u0275elementEnd()()),2&re){const nt=i.\u0275\u0275reference(9);let Pt;i.\u0275\u0275advance(5),i.\u0275\u0275textInterpolate1(" ",i.\u0275\u0275pipeBind1(6,3,"U_HEAD_DELIGATION_01")," "),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",(null==(Pt=i.\u0275\u0275pipeBind1(11,5,xe.delegationsRows$))?null:Pt.length)>0)("ngIfElse",nt)}},directives:[ut.Q3,e.O5,e.sg,Xi.oO,e.mk],pipes:[hc.k,e.Ov],styles:[".empty-state[_ngcontent-%COMP%]{position:absolute;top:40%;left:40%;text-align:center;color:#cdd9e1}.empty-state.empty-state--static[_ngcontent-%COMP%]{position:static;margin-top:40%}.empty-state.empty-state--static.empty-state--fixed-height[_ngcontent-%COMP%]{height:100%;margin:auto;padding-top:55px}.empty-state.empty-state--static.empty-state--fixed-height[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{width:400px;font-size:20px}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%]{margin-top:0}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:60px;padding-bottom:5px}.empty-state.empty-state--static.empty-state--small[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{font-size:16px}.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:block;font-size:150px;padding-bottom:30px}.empty-state[_ngcontent-%COMP%] i.empty-state--small[_ngcontent-%COMP%]{font-size:60px}.empty-state[_ngcontent-%COMP%] .empty-state__title[_ngcontent-%COMP%]{font-size:50px}.pointable[_ngcontent-%COMP%]{cursor:pointer}i[_ngcontent-%COMP%]{position:relative;top:3px}.text--teal[_ngcontent-%COMP%]{color:#00646e}.pr-2[_ngcontent-%COMP%]{padding-right:20px}.mt-3[_ngcontent-%COMP%]{margin-top:30px}.pulse-modal__body[_ngcontent-%COMP%]{height:300px;max-height:300px;position:relative}.delegation-info[_ngcontent-%COMP%]{margin-top:15px;opacity:.7}.delegation-info[_ngcontent-%COMP%] .icon-information[_ngcontent-%COMP%]{margin-top:-1px}.pulse-search-group[_ngcontent-%COMP%]{height:40px}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-9[_ngcontent-%COMP%]{flex:0 0 75%;max-width:75%}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-3[_ngcontent-%COMP%]{flex:0 0 25%;max-width:25%}.pulse-search-group.pulse-row[_ngcontent-%COMP%] .pulse-col-12[_ngcontent-%COMP%]{width:100%}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field.pulse-form-field--alone[_ngcontent-%COMP%]{margin-top:0}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input.pulse-input--default[_ngcontent-%COMP%]{border-color:#cdd9e1 #cdd9e1 #879baa #cdd9e1}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input.pulse-input--newton-label[_ngcontent-%COMP%]{font-size:14px;font-family:SiemensSans!important}.pulse-search-group[_ngcontent-%COMP%] .pulse-form-field[_ngcontent-%COMP%] .pulse-input[_ngcontent-%COMP%]:focus{border-color:#00646e}.pulse-search-group[_ngcontent-%COMP%] .pulse-btn.pulse-btn--contained[_ngcontent-%COMP%]{height:100%}.pulse-table[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%] .pulse-table-cell[_ngcontent-%COMP%]{border-right:none}.pulse-table[_ngcontent-%COMP%] .pulse-table-header[_ngcontent-%COMP%] .pulse-table-row[_ngcontent-%COMP%]{border:none}.pulse-table[_ngcontent-%COMP%] .pulse-table-body[_ngcontent-%COMP%]{overflow-y:auto;max-height:250px}.pulse-table[_ngcontent-%COMP%] .pulse-table-body.pulse-table-body--search[_ngcontent-%COMP%]{max-height:200px}@media screen and (max-width: 1024px){.pulse-table-cell.lg-hide[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 768px){.pulse-table-cell.md-hide[_ngcontent-%COMP%]{display:none}}"]}),Ee})();var Or=r(47648),Ns=r(56551),ho=r(96268),hd=r(20731);const Zp=["imageInput"],Zc=["groupInput"];function Qh(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1," Add dashboard "),i.\u0275\u0275elementEnd())}function Rc(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1," Edit dashboard "),i.\u0275\u0275elementEnd())}function jc(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",19),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.name," ")}}function Jh(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",6)(1,"label"),i.\u0275\u0275text(2,"Guid: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(3,"input",20),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().guid=nt}),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.guid)}}function Id(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",19),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.db_application_name," ")}}function Pd(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",25,26),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}function qp(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"button",27),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(2).createImage()}),i.\u0275\u0275text(1,"Create Screenshot by Api"),i.\u0275\u0275elementEnd()}}function Nc(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"div",6)(2,"label"),i.\u0275\u0275text(3," Image: "),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(4,"div",6),i.\u0275\u0275template(5,Pd,2,1,"img",21),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(6,"div",16)(7,"input",22,23),i.\u0275\u0275listener("change",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().onFileChanged(nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(9,qp,2,0,"button",24),i.\u0275\u0275elementStart(10,"button",17),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().removeImage()}),i.\u0275\u0275text(11,"Delete"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",re.showImage),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngIf","BI DASHBOARD"==re.systemType||"BI REPORT"==re.systemType)}}function ef(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",19),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275styleProp("font-style",99===re.id?"italic":"normal"),i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.name," ")}}function kd(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",19),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1(" ",re.contentUrl," ")}}function Zh(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",6)(1,"label"),i.\u0275\u0275text(2," View: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(3,"select",28),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().guid=nt}),i.\u0275\u0275template(4,kd,2,2,"option",8),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.guid),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.views)}}function qh(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",29)(2,"div",6)(3,"label"),i.\u0275\u0275text(4," Width: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"input",30),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().width=nt}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(6,"div",6)(7,"label"),i.\u0275\u0275text(8," Height: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",31),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().height=nt}),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(10,"div",6)(11,"label"),i.\u0275\u0275text(12," Flags: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"div")(14,"label",32)(15,"input",33),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().public=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(16," Public "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(17,"label",32)(18,"input",34),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().export=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(19," Export "),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementContainerEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",re.width),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",re.height),i.\u0275\u0275advance(6),i.\u0275\u0275property("ngModel",re.public),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.export)}}let tf=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi,ci,Mi){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectGlobalService=Pt,this.sanitizer=pn,this.projectService=oi,this.apiClient=ci,this.variableService=Mi,this.showImage=!1,this.group=0,this.width=0,this.height=0,this.public=0,this.export=0,this.dashboardTypes=[{id:"BI DASHBOARD",name:"BI DASHBOARD"},{id:"DUNDAS DASHBOARD",name:"DUNDAS DASHBOARD"},{id:"TABLEAU DASHBOARD",name:"TABLEAU DASHBOARD"},{id:"GANTT",name:"GANTT"},{id:"CUSTOM APPLICATION",name:"CUSTOM APPLICATION"}],this.id=0,this.isEdit=!1,this.views=[],this.name="",this.description="",this.binardId=0,this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.systemType=this.dashboardTypes[0].id}ngAfterViewInit(){this.ngxSmartModalService.getModal("dashboard").onOpen.subscribe(re=>{const xe=re.getData();xe.isEdit?(this.isEdit=!0,this.name=xe.name,this.description=xe.description,this.binardId=xe.binardId,this.systemType=xe.systemType,this.guid=xe.guid,this.group=xe.id_group,this.width=xe.width,this.height=xe.height,this.public=xe.projectEnabled,this.export=xe.export,this.id=xe.id,this.globalObjectId=xe.globalObjectId,this.showImage=!0,this.imageSrc=xe.picUrl,this.reportingInstanceId=xe.ReportingInstanceId):(this.isEdit=!1,this.name="",this.description="",this.guid="",this.reportingInstanceId="",this.group=0,this.width=0,this.height=0,this.public=0,this.export=0),this.projectGlobalService.getGroups().subscribe(nt=>{this.groups=[{id:0,name:"no group"},...nt,{id:-1,name:"create group ..."}],this.groups.forEach(Pt=>{Pt.selected&&(this.group=Pt.id)})}),this.projectAdminService.getReportingInstances().then(nt=>{this.instances=nt,this.onSystemTypeChange(this.systemType)})})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}onKPIFileChanged(re){this.kpiFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.kpiSrc=xe.result,this.uploadKPI()},xe.readAsDataURL(this.kpiFile)}uploadImage(){const re=new FormData;re.append("id",this.globalObjectId),re.append("type","dash"),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadImage(re).then(xe=>{xe&&xe.success?(this.showImage=!0,this.imageSrc=xe.data,this.toasty.info("Image uploaded succesfully!")):this.toasty.error("Image uploaded failed!")})}uploadKPI(){const re=new FormData;re.append("binaryId","0"),re.append("filename",this.kpiFile.name),re.append("document",this.kpiSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadBinary(re).then(xe=>{xe&&xe.success&&(this.kpiDescription=xe.data.id)})}removeKPI(){this.kpiDescription=0,this.kpiFile=null,this.kpiSrc=null}create(){const re={description:this.description,guid:this.guid,height:this.height,width:this.width,id_group:this.group,name:this.name,projectEnabled:this.public?1:0,export:this.export?1:0,projectId:this.projectAdminService.projectId,ReportingInstanceId:this.reportingInstanceId,systemType:this.systemType,id:this.id};this.isEdit?this.projectAdminService.updateDashboard(re).then(xe=>{this.ngxSmartModalService.close("dashboard"),this.toasty.success("Dashboard updated!"),this.projectService.getLandingpageItems()}).catch(xe=>{this.ngxSmartModalService.close("dashboard"),this.toasty.error("Error occured!")}):this.projectAdminService.createDashboard(re).then(xe=>{this.ngxSmartModalService.close("dashboard"),this.toasty.success("Dashboard created!"),this.projectService.getLandingpageItems()}).catch(xe=>{this.ngxSmartModalService.close("dashboard"),this.toasty.error("Error occured!")})}createImage(){this.projectAdminService.createImageFromApi(this.guid).then(re=>{this.screenshot=re,this.projectAdminService.getScreenshotFromApiImage(this.guid).then(xe=>{this.showImage=!0,this.imageSrc="data:image/jpg;base64,"+xe,this.toasty.info("Image created successfully!")}).catch(xe=>this.toasty.error("Error creating image!"))}).catch(re=>this.toasty.error("Error creating image!"))}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value="",this.binardId=0}getTableauViews(){this.apiClient.get(this.variableService.apiUrl+"/api/Tableau/views").then(re=>{this.views=re}).catch(re=>{console.log("error occured while fetching tableau views")})}onSystemTypeChange(re){"TABLEAU DASHBOARD"===re?(0===this.views.length&&this.getTableauViews(),this.visibleInstances=this.instances?this.instances.filter(xe=>"DBI Warehouse"!==xe.db_warehouse_name):[],this.reportingInstanceId=this.visibleInstances[0].id):this.visibleInstances=this.instances?this.instances.filter(xe=>"DBI Warehouse"===xe.db_warehouse_name):[]}onGroupChange(re){-1===re&&(this.groupInput.nativeElement.selectedIndex=0,this.ngxSmartModalService.setModalData({isEdit:!1},"group",!0),this.ngxSmartModalService.open("group",!0))}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(E.DomSanitizer),i.\u0275\u0275directiveInject(hd.Y),i.\u0275\u0275directiveInject(In.f),i.\u0275\u0275directiveInject(rr.a))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-dashboard"]],viewQuery:function(re,xe){if(1&re&&(i.\u0275\u0275viewQuery(Zp,5),i.\u0275\u0275viewQuery(Zc,7)),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first),i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.groupInput=nt.first)}},decls:42,vars:17,consts:[["customClass","mediumDialog",3,"identifier"],["dashboard",""],[1,"dialog-header"],[4,"ngIf"],[2,"width","830px"],["addDashboardForm","ngForm"],[1,"pulse-form-field"],["name","systemType",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["type","text","placeholder","Name","name","name","autofocus","","required","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["class","pulse-form-field",4,"ngIf"],["type","text","placeholder","Description","name","description",1,"pulse-textarea",2,"height","100px",3,"ngModel","ngModelChange"],["name","reportingInstance",1,"pulse-input","input-small",3,"ngModel","disabled","ngModelChange"],["name","group",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["groupInput",""],[3,"ngValue","fontStyle",4,"ngFor","ngForOf"],[1,"pulse-btn-group","horizontal"],["color","accent",1,"pulse-btn","cancel",3,"click"],["color","primary",1,"pulse-btn","save",3,"disabled","click"],[3,"ngValue"],["type","text","placeholder","GUID","name","guid",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["id","img","style","width:50%;height: auto;",3,"src",4,"ngIf"],["type","file",3,"change"],["imageInput",""],["style","max-width: fit-content;","class","pulse-btn cancel","color","accent",3,"click",4,"ngIf"],["id","img",2,"width","50%","height","auto",3,"src"],["imageView",""],["color","accent",1,"pulse-btn","cancel",2,"max-width","fit-content",3,"click"],["name","view",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[2,"display","flex","flex-flow","row"],["name","width","type","number","placeholder","Width",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["name","height","type","number","placeholder","Height",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[2,"margin-left","35px"],["type","checkbox","name","public",1,"pulse-checkbox",3,"ngModel","ngModelChange"],["type","checkbox","name","export",1,"pulse-checkbox",3,"ngModel","ngModelChange"]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2),i.\u0275\u0275template(3,Qh,2,0,"h3",3),i.\u0275\u0275template(4,Rc,2,0,"h3",3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div",4)(6,"form",null,5)(8,"div",6)(9,"label"),i.\u0275\u0275text(10," System type: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(11,"select",7),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.systemType=pn})("ngModelChange",function(pn){return xe.onSystemTypeChange(pn)}),i.\u0275\u0275template(12,jc,2,2,"option",8),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(13,"div",6)(14,"label"),i.\u0275\u0275text(15," Name: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(16,"input",9),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.name=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(17,Jh,4,1,"div",10),i.\u0275\u0275elementStart(18,"div",6)(19,"label"),i.\u0275\u0275text(20," Description: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(21,"textarea",11),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.description=pn}),i.\u0275\u0275text(22," "),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(23,"div",6)(24,"label"),i.\u0275\u0275text(25," Reporting Instance: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(26,"select",12),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.reportingInstanceId=pn}),i.\u0275\u0275template(27,Id,2,2,"option",8),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(28,Nc,12,2,"div",3),i.\u0275\u0275elementStart(29,"div",6)(30,"label"),i.\u0275\u0275text(31," Group: "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(32,"select",13,14),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.group=pn})("ngModelChange",function(pn){return xe.onGroupChange(pn)}),i.\u0275\u0275template(34,ef,2,4,"option",15),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(35,Zh,5,2,"div",10),i.\u0275\u0275template(36,qh,20,4,"ng-container",3),i.\u0275\u0275elementStart(37,"div",16)(38,"button",17),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275text(39," Cancel "),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(40,"button",18),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(41," Ok "),i.\u0275\u0275elementEnd()()()()()}if(2&re){const nt=i.\u0275\u0275reference(7);i.\u0275\u0275property("identifier","dashboard"),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!xe.isEdit),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(7),i.\u0275\u0275property("ngModel",xe.systemType),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.dashboardTypes),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.name),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","TABLEAU DASHBOARD"!==xe.systemType),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.description),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",xe.reportingInstanceId)("disabled","TABLEAU DASHBOARD"===xe.systemType),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.visibleInstances),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.group),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngForOf",xe.groups),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","TABLEAU DASHBOARD"===xe.systemType),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","TABLEAU DASHBOARD"!==xe.systemType),i.\u0275\u0275advance(4),i.\u0275\u0275property("disabled",!nt.valid)}},directives:[ut.Q3,e.O5,o.\u0275NgNoValidate,o.NgControlStatusGroup,o.NgForm,o.SelectControlValueAccessor,o.NgControlStatus,o.NgModel,e.sg,o.NgSelectOption,o.\u0275NgSelectMultipleOption,o.DefaultValueAccessor,o.RequiredValidator,o.NumberValueAccessor,o.CheckboxControlValueAccessor],styles:[".pulse-form-field[_ngcontent-%COMP%]{display:flex}.pulse-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.pulse-form-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:32px}"]}),Ee})();const nf=["imageInput"];function rf(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Add external"),i.\u0275\u0275elementEnd())}function dh(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Edit external"),i.\u0275\u0275elementEnd())}function _u(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",15,16),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}function Ld(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"div",4)(2,"label"),i.\u0275\u0275text(3,"Image:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(4,"div",11),i.\u0275\u0275template(5,_u,2,1,"img",12),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(6,"div",8)(7,"input",13,14),i.\u0275\u0275listener("change",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().onFileChanged(nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"button",9),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().removeImage()}),i.\u0275\u0275text(10,"Delete"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",re.showImage)}}let zl=(()=>{class Ee{constructor(re,xe,nt,Pt){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectService=Pt,this.showImage=!1,this.isEdit=!1,this.name="",this.description="",this.extLink="",this.imageFile=null,this.imageSrc=null,this.showImage=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("external").onOpen.subscribe(re=>{const xe=re.getData();xe.isEdit?(this.isEdit=!0,this.name=xe.name,this.description=xe.description,this.extLink=xe.path,this.id=xe.id,this.showImage=!0,this.imageSrc=xe.picUrl):(this.id=0,this.isEdit=!1,this.name="",this.description="",this.extLink="")})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}uploadImage(){const re=new FormData;re.append("id",this.id),re.append("type","link"),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadImage(re).then(xe=>{xe&&xe.success?(this.showImage=!0,this.imageSrc=xe.data,this.toasty.info("Image uploaded succesfully!")):this.toasty.error("Image uploaded failed!")})}create(){const re={id:this.id,name:this.name,description:this.description,extLink:this.extLink,projectId:this.projectAdminService.projectId};this.isEdit?this.projectAdminService.updateExternalLink(re).then(()=>{this.toasty.success("","External Link updated",{closeButton:!0}),this.projectService.getLandingpageItems()}).catch(xe=>{this.ngxSmartModalService.close("external"),this.toasty.error("Error occured!")}):this.projectAdminService.createExternalLink(re).then(()=>{this.toasty.success("External Link created!"),this.projectService.getLandingpageItems(),this.ngxSmartModalService.close("external")}).catch(xe=>{this.ngxSmartModalService.close("external"),this.toasty.error("Error occured!")}),this.name="",this.description="",this.extLink=""}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value=""}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject(hd.Y))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-external-link"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(nf,5),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first)}},decls:24,vars:7,consts:[["customClass","mediumDialog",3,"identifier"],["external",""],[1,"dialog-header"],[4,"ngIf"],[1,"pulse-form-field"],["type","text","placeholder","Name","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["type","text","placeholder","Description",1,"pulse-textarea",2,"height","100px",3,"ngModel","ngModelChange"],["type","text","placeholder","URL",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[1,"pulse-btn-group","horizontal"],["color","accent",1,"pulse-btn","cancel",3,"click"],["color","primary",1,"pulse-btn","save",3,"click"],["align","center",1,"pulse-form-field"],["style","width:50%;height: auto;","id","img",3,"src",4,"ngIf"],["type","file",3,"change"],["imageInput",""],["id","img",2,"width","50%","height","auto",3,"src"],["imageView",""]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2),i.\u0275\u0275template(3,rf,2,0,"h3",3),i.\u0275\u0275template(4,dh,2,0,"h3",3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div")(6,"div",4)(7,"label"),i.\u0275\u0275text(8,"Name:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",5),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.name=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(10,"div",4)(11,"label"),i.\u0275\u0275text(12,"Description:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"textarea",6),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.description=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(14,Ld,11,1,"div",3),i.\u0275\u0275elementStart(15,"div",4)(16,"label"),i.\u0275\u0275text(17,"External Link:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(18,"input",7),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.extLink=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(19,"div",8)(20,"button",9),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275text(21,"Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(22,"button",10),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(23,"Ok"),i.\u0275\u0275elementEnd()()()()}2&re&&(i.\u0275\u0275property("identifier","external"),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!xe.isEdit),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",xe.name),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.description),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.extLink))},directives:[ut.Q3,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel],styles:[".pulse-form-field[_ngcontent-%COMP%]{display:flex}.pulse-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.pulse-form-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:32px}"]}),Ee})(),yu=(()=>{class Ee{constructor(re){this.webApi=re}getServers(){return this.webApi.post("/api/db/servers",null)}getDatabases(re){return this.webApi.post("/api/db/databases",re)}getTables(re){return this.webApi.post("/api/db/tables",re)}getViews(re){return this.webApi.post("/api/db/views",re)}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275inject(In.f))},Ee.\u0275prov=i.\u0275\u0275defineInjectable({token:Ee,factory:Ee.\u0275fac,providedIn:"root"}),Ee})();const Fc=["imageInput"];function Fo(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",39),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re)}}function pd(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",39),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.name)}}function hh(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",39),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.name)}}function Gl(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"option",39),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=tt.$implicit;i.\u0275\u0275property("ngValue",re.id),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.name)}}function qc(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",40),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}let fd=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectService=Pt,this.databaseService=pn,this.sanitizer=oi,this.showImage=!1,this.width=0,this.height=0,this.active=1,this.public=0,this.export=1,this.push=0,this.bookmark=1,this.pptExport=0,this.s=null,this.d=null,this.t=null,this.servers=[],this.databases=[],this.tables=[],this.tablesO=[],this.showResults=!1,this.dashboardTypes=[{id:"BI DASHBOARD",name:"BI DASHBOARD"},{id:"DUNDAS DASHBOARD",name:"DUNDAS DASHBOARD"},{id:"GANTT",name:"GANTT"},{id:"CUSTOM APPLICATION",name:"CUSTOM APPLICATION"}],this.name="",this.description="",this.binardId=0,this.imageFile=null,this.imageSrc=null,this.showImage=!1}serverChange(re){this.d=null,this.server={serverName:re.split(":")[1].trim()},this.databaseService.getDatabases(this.server).then(xe=>{this.databases=xe})}databaseChange(re){this.t=null,this.database=re.split(":")[1].trim(),this.table={serverName:this.server.serverName,databaseName:this.database},this.databaseService.getTables(this.table).then(xe=>{this.tables=xe,this.databaseService.getViews(this.table).then(nt=>{this.tables.concat(nt),this.tablesO=this.tables})})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}onKPIFileChanged(re){this.kpiFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.kpiSrc=xe.result,this.uploadKPI()},xe.readAsDataURL(this.kpiFile)}uploadImage(){const re=new FormData;re.append("binaryId","0"),re.append("filename",this.imageFile.name),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadBinary(re).then(xe=>{xe&&xe.success&&(this.binardId=xe.data.id)})}uploadKPI(){const re=new FormData;re.append("binaryId","0"),re.append("filename",this.kpiFile.name),re.append("document",this.kpiSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadBinary(re).then(xe=>{xe&&xe.success&&(this.kpiDescription=xe.data.id)})}removeKPI(){this.kpiDescription=0,this.kpiFile=null,this.kpiSrc=null}create(){this.projectAdminService.createDashboard({active:this.active?1:0,annotation:0,authType:"Standard",bookmark:this.bookmark?1:0,comment:this.comment,description:this.description,export:this.export?1:0,flag_export_excel:1,flag_export_image:1,flag_export_pdf:1,flag_export_ppt:1,forDesktop:0,forPPTExporterOnly:0,forSmartphone:0,forTablet:0,guid:this.guid,height:this.height,id_group:this.group,image_id:this.binardId,isSmartDashboard:0,name:this.name,newSessionOnDashboardCall:0,pptExport:this.pptExport?1:0,projectEnabled:this.public?1:0,projectId:this.projectAdminService.projectId,pushNotification:this.push?1:0,rawExport:0,sortOrder:0,systemType:this.systemType,usageType:0,width:this.width}).then(xe=>{this.ngxSmartModalService.close("frt")})}createImage(){this.projectAdminService.createImageFromApi(this.guid).then(re=>{this.screenshot=re,this.projectAdminService.getScreenshotFromApiImage(this.guid).then(xe=>{this.imageSrc="data:image/jpg;base64,"+xe,this.showImage=!0})})}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value="",this.binardId=0}focusOut(){this.showResults=!1}onFocus(){this.showResults=!0}onselectTable(re){this.t=re,this.showResults=!1}onTableKeyUp(){this.showResults=!0,this.tables=this.tablesO.filter(re=>re.toLowerCase().includes(this.t.toLowerCase()))}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(yu),i.\u0275\u0275directiveInject(E.DomSanitizer))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-frt"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(Fc,7),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first)}},decls:177,vars:16,consts:[["customClass","mediumDialog",3,"identifier"],["dashboard",""],[1,"dialog-header"],[2,"width","800px"],[1,"row"],[1,"col-2"],[1,"col-10"],[1,"form-group"],["type","text","placeholder","Name","autofocus","",1,"pulse-input",3,"ngModel","ngModelChange"],[2,"width","100%",3,"ngModel","ngModelChange"],[3,"value"],[3,"ngValue",4,"ngFor","ngForOf"],["type","text","placeholder","Description",1,"pulse-input",2,"height","100px",3,"ngModel","ngModelChange"],[2,"margin-top","6px"],[1,"col-sm-3"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"col-10",2,"display","flex"],[1,"col-sm-4","control-label","no-cursor"],["type","checkbox","ng-model","frTable.scaleDisable","ng-change","ifDisableButton()","ng-true-value","1","ng-false-value","0",2,"margin","0","vertical-align","middle"],[2,"padding-top","7px"],["style","width:100%;height: auto;","id","img",3,"src",4,"ngIf"],[1,"row",2,"align-items","center"],[1,"col-4",2,"align-self","center"],["type","file",3,"change"],["imageInput",""],[1,"col-2",2,"margin-left","40px"],["color","accent",1,"pulse-btn","cancel",3,"click"],["cellpadding","0","cellspacing","0",1,"table","gms_table","table-hover"],["ng-model","drillDown2","ng-change","ifDisableButton()"],["ng-mouseover","sortableOptionsDrill.disabled = (drill.isRequired?true:false)","ng-style","{'cursor':(drill.isRequired?'auto':'move')}","ng-repeat","drill in drillDown2"],["type","text","ng-model","drill.label","ng-change","ifDisableButton()",1,"form-control"],["type","checkbox","ng-model","drill.isRequired","ng-true-value","1","ng-false-value","0","ng-change","ifDisableButton()"],["ng-click","deleteDrillDown(drillDown2, drill);ifDisableButton()",1,"fa","fa-trash-o","pull-right",2,"cursor","pointer"],["ng-model","frTable.drillDownList2","ng-change","ifDisableButton()"],["ng-style","{'cursor':'move'}","ng-repeat","drill in frTable.drillDownList2 track by $index","ng-show","!inArray(frTable.drillDown2, 'name', drill.name)"],["ng-click","deleteDrillDown(frTable.drillDownList2, drill);ifDisableButton()",1,"fa","fa-trash-o","pull-right",2,"cursor","pointer"],["ng-click","addDrillDown(frTable.drillDown2, drill);ifDisableButton()",1,"fa","fa-plus-square","pull-right",2,"cursor","pointer"],[1,"pulse-btn-group","horizontal"],["color","primary",1,"pulse-btn","save",3,"click"],[3,"ngValue"],["id","img",2,"width","100%","height","auto",3,"src"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2)(3,"h3"),i.\u0275\u0275text(4,"Add frt"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(5,"div",3),i.\u0275\u0275element(6,"br"),i.\u0275\u0275elementStart(7,"div",4)(8,"div",5)(9,"label"),i.\u0275\u0275text(10,"Name:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(11,"div",6)(12,"div",7)(13,"input",8),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.name=Pt}),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(14,"br"),i.\u0275\u0275elementStart(15,"div",4)(16,"div",5)(17,"label"),i.\u0275\u0275text(18,"Table:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(19,"div",6)(20,"div",7)(21,"select",9),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.s=Pt}),i.\u0275\u0275elementStart(22,"option",10),i.\u0275\u0275text(23,"Select Table"),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(24,Fo,2,2,"option",11),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(25,"br"),i.\u0275\u0275elementStart(26,"div",4)(27,"div",5)(28,"label"),i.\u0275\u0275text(29,"Description:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(30,"div",6)(31,"div",7)(32,"textarea",12),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.description=Pt}),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(33,"br"),i.\u0275\u0275elementStart(34,"div",4)(35,"div",5)(36,"label"),i.\u0275\u0275text(37,"Flags:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(38,"div",13)(39,"label",14)(40,"input",15),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.public=Pt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(41," Public"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275element(42,"br"),i.\u0275\u0275elementStart(43,"div",4)(44,"div",5)(45,"label"),i.\u0275\u0275text(46,"Group:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(47,"div",6)(48,"div",7)(49,"select",9),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.group=Pt}),i.\u0275\u0275template(50,pd,2,2,"option",11),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(51,"br"),i.\u0275\u0275elementStart(52,"div",4)(53,"div",5)(54,"label"),i.\u0275\u0275text(55,"Scale:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(56,"div",16)(57,"div")(58,"div",7)(59,"select",9),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.group=Pt}),i.\u0275\u0275template(60,hh,2,2,"option",11),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(61,"div")(62,"label",17),i.\u0275\u0275text(63,"Disable scale: "),i.\u0275\u0275element(64,"input",18),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(65,"br"),i.\u0275\u0275elementStart(66,"div",4)(67,"div",5)(68,"label"),i.\u0275\u0275text(69,"Unique Local:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(70,"div",6)(71,"div",7)(72,"select",9),i.\u0275\u0275listener("ngModelChange",function(Pt){return xe.group=Pt}),i.\u0275\u0275template(73,Gl,2,2,"option",11),i.\u0275\u0275elementEnd()()()(),i.\u0275\u0275element(74,"br"),i.\u0275\u0275elementStart(75,"div",4)(76,"div",5)(77,"label"),i.\u0275\u0275text(78,"Hierarchy Filter:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(79,"div",6)(80,"div",7)(81,"div",19)(82,"button")(83,"strong")(84,"span"),i.\u0275\u0275text(85,"Create"),i.\u0275\u0275elementEnd()()()()()()(),i.\u0275\u0275element(86,"br"),i.\u0275\u0275elementStart(87,"div",4)(88,"div",5)(89,"label"),i.\u0275\u0275text(90,"Permission:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(91,"div",6)(92,"div",7)(93,"button")(94,"strong")(95,"span"),i.\u0275\u0275text(96,"Set"),i.\u0275\u0275elementEnd()()()()()(),i.\u0275\u0275element(97,"br"),i.\u0275\u0275elementStart(98,"div",4),i.\u0275\u0275element(99,"div",5),i.\u0275\u0275elementStart(100,"div",6)(101,"div",7),i.\u0275\u0275template(102,qc,1,1,"img",20),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275element(103,"br"),i.\u0275\u0275elementStart(104,"div",21)(105,"div",5)(106,"label"),i.\u0275\u0275text(107,"Image:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(108,"div",22)(109,"div",7)(110,"input",23,24),i.\u0275\u0275listener("change",function(Pt){return xe.onFileChanged(Pt)}),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(112,"div",25)(113,"button",26),i.\u0275\u0275listener("click",function(){return xe.removeImage()}),i.\u0275\u0275text(114,"Delete"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275element(115,"br"),i.\u0275\u0275elementStart(116,"div",4)(117,"div",5)(118,"label"),i.\u0275\u0275text(119,"Drill down:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(120,"div",6)(121,"div",7)(122,"table",27)(123,"thead")(124,"tr")(125,"th"),i.\u0275\u0275text(126,"Name"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(127,"th"),i.\u0275\u0275text(128,"Alias"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(129,"th"),i.\u0275\u0275text(130,"Required"),i.\u0275\u0275elementEnd(),i.\u0275\u0275element(131,"th"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(132,"tbody",28)(133,"tr",29)(134,"td"),i.\u0275\u0275text(135),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(136,"td"),i.\u0275\u0275element(137,"input",30),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(138,"td"),i.\u0275\u0275element(139,"input",31),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(140,"td"),i.\u0275\u0275element(141,"span",32),i.\u0275\u0275elementEnd()()()()()()(),i.\u0275\u0275element(142,"br"),i.\u0275\u0275elementStart(143,"div",4)(144,"div",5)(145,"label"),i.\u0275\u0275text(146,"List of drill down:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(147,"div",6)(148,"div",7)(149,"table",27)(150,"thead")(151,"tr")(152,"th"),i.\u0275\u0275text(153,"Name"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(154,"th"),i.\u0275\u0275text(155,"Alias"),i.\u0275\u0275elementEnd(),i.\u0275\u0275element(156,"th"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(157,"tbody",33)(158,"tr",34)(159,"td"),i.\u0275\u0275text(160),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(161,"td"),i.\u0275\u0275element(162,"input",30),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(163,"td"),i.\u0275\u0275element(164,"span",35)(165,"span",36),i.\u0275\u0275elementEnd()()()()()()(),i.\u0275\u0275element(166,"br"),i.\u0275\u0275elementStart(167,"div",4),i.\u0275\u0275element(168,"div",5),i.\u0275\u0275elementStart(169,"div",6),i.\u0275\u0275element(170,"div",7),i.\u0275\u0275elementEnd()(),i.\u0275\u0275element(171,"br"),i.\u0275\u0275elementStart(172,"div",37)(173,"button",26),i.\u0275\u0275listener("click",function(){return xe.dialog.close()}),i.\u0275\u0275text(174,"Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(175,"button",38),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(176,"Ok"),i.\u0275\u0275elementEnd()()()()),2&re&&(i.\u0275\u0275property("identifier","frt"),i.\u0275\u0275advance(13),i.\u0275\u0275property("ngModel",xe.name),i.\u0275\u0275advance(8),i.\u0275\u0275property("ngModel",xe.s),i.\u0275\u0275advance(1),i.\u0275\u0275property("value",null),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngForOf",xe.servers),i.\u0275\u0275advance(8),i.\u0275\u0275property("ngModel",xe.description),i.\u0275\u0275advance(8),i.\u0275\u0275property("ngModel",xe.public),i.\u0275\u0275advance(9),i.\u0275\u0275property("ngModel",xe.group),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.groups),i.\u0275\u0275advance(9),i.\u0275\u0275property("ngModel",xe.group),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.groups),i.\u0275\u0275advance(12),i.\u0275\u0275property("ngModel",xe.group),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",xe.groups),i.\u0275\u0275advance(29),i.\u0275\u0275property("ngIf",xe.showImage),i.\u0275\u0275advance(33),i.\u0275\u0275textInterpolate(null==xe.drill?null:xe.drill.name),i.\u0275\u0275advance(25),i.\u0275\u0275textInterpolate(null==xe.drill?null:xe.drill.name))},directives:[ut.Q3,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,o.SelectControlValueAccessor,o.NgSelectOption,o.\u0275NgSelectMultipleOption,e.sg,o.CheckboxControlValueAccessor,e.O5],styles:[".pulse-input[_ngcontent-%COMP%]{width:100%}.pulse-frt-table[_ngcontent-%COMP%]{word-wrap:break-word;display:table;width:100%;border:1px solid;padding:10px 15px;background-color:#fff;font-size:12px}.pulse-frt-table.disable-padding[_ngcontent-%COMP%]{padding:0}.pulse-frt-table.hide-border[_ngcontent-%COMP%]{border:none}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%]{padding-top:10px;display:flex;flex-wrap:wrap;font-size:14px}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-footer-header[_ngcontent-%COMP%]{flex:1;font-weight:500}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-footer-group[_ngcontent-%COMP%]{flex-basis:100%}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-footer-group[_ngcontent-%COMP%] .filter-row[_ngcontent-%COMP%]{padding:3px 0;border-bottom:1px solid #ffffff}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-footer-group[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{padding-right:15px}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-footer-group[_ngcontent-%COMP%] .filter-element[_ngcontent-%COMP%]{display:inline-block;padding-top:4px}.pulse-frt-table[_ngcontent-%COMP%] .frt-footer[_ngcontent-%COMP%] .frt-sum[_ngcontent-%COMP%]{align-self:flex-end;white-space:nowrap;margin-left:auto}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]{display:flex}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:hover{background-color:#879baa80!important}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:nth-child(odd){background:#ebf0f5}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]{word-break:break-word;flex:1;flex-direction:column;min-height:35px;text-align:left}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%] .frt-table-button[_ngcontent-%COMP%]{background:transparent;border:none;width:100%;cursor:pointer;height:100%}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%] .frt-table-button[_ngcontent-%COMP%]:focus{outline:0}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell.half[_ngcontent-%COMP%]{flex:.5}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{text-align:center}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]:first-child{flex:2;text-align:left}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]:first-child.half{flex:1}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]:first-child.small{flex:.5}.pulse-frt-table[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{padding:0 5px}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%]{background-color:#fff}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-of-type(1){font-size:18px!important}.pulse-frt-table[_ngcontent-%COMP%] .frt-header.sticky[_ngcontent-%COMP%]{border-top:1px solid #ffffff;padding:0 15px 0 0}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]{border:1px solid #ffffff;border-bottom:none}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]{padding:10px 0}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:first-child{border-color:#fff;border-top:none}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:first-child .frt-cell[_ngcontent-%COMP%]{text-align:center;padding:3px 0;border-right:1px solid transparent}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:first-child .frt-cell[_ngcontent-%COMP%]:first-child{text-align:left;padding-left:8px;padding-right:10px;border-right:2px solid transparent}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:last-child .frt-cell[_ngcontent-%COMP%]{font-weight:500;font-size:14px;padding:7px 0;text-align:left}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:last-child .frt-cell.center[_ngcontent-%COMP%]{text-align:center}.pulse-frt-table[_ngcontent-%COMP%] .frt-header[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:last-child .frt-cell.active[_ngcontent-%COMP%]{background-color:#41aaaa}.pulse-frt-table[_ngcontent-%COMP%] .frt-body[_ngcontent-%COMP%]{border:1px solid;border-top:none}.pulse-frt-table[_ngcontent-%COMP%] .frt-body[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]{padding:8px 0 0;font-size:14px}.pulse-frt-table[_ngcontent-%COMP%] .frt-body[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell.active[_ngcontent-%COMP%]{background-color:#41aaaa}.pulse-frt-table[_ngcontent-%COMP%] .frt-body[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%]:nth-child(2n+1) .frt-cell.active[_ngcontent-%COMP%]{background-color:#00646e}.pulse-frt-table[_ngcontent-%COMP%] .frt-body[_ngcontent-%COMP%] .frt-row[_ngcontent-%COMP%] .frt-cell[_ngcontent-%COMP%]:first-child{font-weight:500;position:relative;padding:8px}.dropdown-menu[_ngcontent-%COMP%]{max-height:500px;overflow-y:auto}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{color:#fff;text-decoration:none;background-color:#099;outline:0}"]}),Ee})();var Wu=r(27737);const zu=["imageInput"];function xu(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1("Add ",re.data.type,"")}}function ep(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate1("Edit ",re.data.type,"")}}function md(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",16,17),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}let Ad=(()=>{class Ee{constructor(re,xe,nt,Pt){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectService=Pt,this.showImage=!1,this.id=0,this.isEdit=!1,this.data={},this.imageFile=null,this.imageSrc=null,this.showImage=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("global").onOpen.subscribe(re=>{const xe=re.getData();switch(this.isEdit=!0,this.data=xe,this.showImage=!0,this.imageSrc=xe.picUrl,xe.type){case Wu.S.dashboard:xe.type="dash";break;case Wu.S.sa:xe.type="SurveyAnalytics"}})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}uploadImage(){const re=new FormData;re.append("id",this.data.id),re.append("type","dash"),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadImage(re).then(xe=>{xe&&xe.success?(this.showImage=!0,this.imageSrc=xe.data,this.toasty.info("Image uploaded succesfully!")):this.toasty.error("Image uploaded failed!")})}create(){this.data.flagPublic=this.data.flagPublic?1:0,this.isEdit&&this.projectAdminService.updateGlobalObject(this.data).then(re=>{this.toasty.success("Updated successfully!"),this.projectService.getLandingpageItems(),this.ngxSmartModalService.close("global")}).catch(re=>{this.ngxSmartModalService.close("global"),this.toasty.error("Error occured!")})}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value=""}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject(hd.Y))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-global"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(zu,7),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first)}},decls:35,vars:7,consts:[["customClass","mediumDialog",3,"identifier"],["global",""],[1,"dialog-header"],[4,"ngIf"],[1,"pulse-form-field"],["type","text","placeholder","Name","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["type","text","placeholder","Description",1,"pulse-textarea",2,"height","100px",3,"ngModel","ngModelChange"],["align","center",1,"pulse-form-field"],["style","width:50%;height: auto;","id","img",3,"src",4,"ngIf"],[1,"pulse-btn-group","horizontal"],["type","file",3,"change"],["imageInput",""],["color","accent",1,"pulse-btn","cancel",3,"click"],[2,"margin-left","35px"],["type","checkbox",1,"pulse-checkbox",3,"ngModel","ngModelChange"],["color","primary",1,"pulse-btn","save",3,"click"],["id","img",2,"width","50%","height","auto",3,"src"],["imageView",""]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2),i.\u0275\u0275template(3,xu,2,1,"h3",3),i.\u0275\u0275template(4,ep,2,1,"h3",3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div")(6,"div",4)(7,"label"),i.\u0275\u0275text(8,"Name:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",5),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.data.name=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(10,"div",4)(11,"label"),i.\u0275\u0275text(12,"Description:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"textarea",6),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.data.description=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(14,"div",4)(15,"label"),i.\u0275\u0275text(16,"Image:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(17,"div",7),i.\u0275\u0275template(18,md,2,1,"img",8),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(19,"div",9)(20,"input",10,11),i.\u0275\u0275listener("change",function(pn){return xe.onFileChanged(pn)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(22,"button",12),i.\u0275\u0275listener("click",function(){return xe.removeImage()}),i.\u0275\u0275text(23,"Delete"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(24,"div",4)(25,"label"),i.\u0275\u0275text(26,"Flags:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(27,"label",13)(28,"input",14),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.data.flagPublic=pn}),i.\u0275\u0275elementEnd(),i.\u0275\u0275text(29," Public"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(30,"div",9)(31,"button",12),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275text(32,"Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(33,"button",15),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(34,"Ok"),i.\u0275\u0275elementEnd()()()()}2&re&&(i.\u0275\u0275property("identifier","global"),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!xe.isEdit),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",xe.data.name),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.data.description),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",xe.showImage),i.\u0275\u0275advance(10),i.\u0275\u0275property("ngModel",xe.data.flagPublic))},directives:[ut.Q3,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,o.CheckboxControlValueAccessor],styles:[".pulse-form-field[_ngcontent-%COMP%]{display:flex}.pulse-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.pulse-form-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:32px}"]}),Ee})();const Rd=["imageInput"];function jd(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Add group"),i.\u0275\u0275elementEnd())}function eu(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Edit group"),i.\u0275\u0275elementEnd())}function la(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",14,15),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}function bu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div")(1,"div",4)(2,"label"),i.\u0275\u0275text(3,"Image:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(4,"div",10),i.\u0275\u0275template(5,la,2,1,"img",11),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(6,"div",7)(7,"input",12,13),i.\u0275\u0275listener("change",function(nt){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().onFileChanged(nt)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"button",8),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().removeImage()}),i.\u0275\u0275text(10,"Delete"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(5),i.\u0275\u0275property("ngIf",re.showImage)}}let Nd=(()=>{class Ee{constructor(re,xe,nt,Pt,pn){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectService=Pt,this.projectGlobalService=pn,this.showImage=!1,this.isEdit=!1,this.name="",this.description="",this.binardId=0,this.imageFile=null,this.imageSrc=null,this.showImage=!1}ngAfterViewInit(){this.ngxSmartModalService.getModal("group").onOpen.subscribe(re=>{const xe=re.getData();xe.isEdit?(this.isEdit=!0,this.name=xe.name,this.description=xe.description,this.binardId=xe.binardId,this.id=xe.id,this.showImage=!0,this.imageSrc=xe.picUrl):(this.id=0,this.isEdit=!1,this.name="",this.description="")})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}uploadImage(){const re=new FormData;re.append("id",""+this.id),re.append("type","group"),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadImage(re).then(xe=>{xe&&xe.success?(this.showImage=!0,this.imageSrc=xe.data,this.toasty.info("Image uploaded succesfully!")):this.toasty.error("Image uploaded failed!")})}create(){const re={groupname:this.name,description:this.description,binaryId:this.binardId,id:this.id,id_project:this.projectAdminService.projectId,order:0,type:"group"};this.isEdit?this.projectAdminService.updateGroup(re).then(()=>{this.toasty.success("","Group updated",{closeButton:!0}),this.projectService.getLandingpageItems()}).catch(xe=>{this.ngxSmartModalService.close("group"),this.toasty.error("Error occured!")}):this.projectAdminService.createGroup(re).then(xe=>{this.toasty.success("Group created!"),this.projectService.getLandingpageItems(),this.projectGlobalService.updateGroups(xe.id),this.ngxSmartModalService.close("group")}).catch(xe=>{this.ngxSmartModalService.close("group"),this.toasty.error("Error occured!")}),this.name="",this.description=""}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value="",this.binardId=0}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject(hd.Y),i.\u0275\u0275directiveInject($t.k))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-group"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery(Rd,5),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first)}},decls:20,vars:6,consts:[["customClass","mediumDialog",3,"identifier"],["group",""],[1,"dialog-header"],[4,"ngIf"],[1,"pulse-form-field"],["type","text","placeholder","Name","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["type","text","placeholder","Description",1,"pulse-textarea",2,"height","100px",3,"ngModel","ngModelChange"],[1,"pulse-btn-group","horizontal"],["color","accent",1,"pulse-btn","cancel",3,"click"],["color","primary",1,"pulse-btn","save",3,"click"],["align","center",1,"pulse-form-field"],["style","width:50%;height: auto;","id","img",3,"src",4,"ngIf"],["type","file",3,"change"],["imageInput",""],["id","img",2,"width","50%","height","auto",3,"src"],["imageView",""]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2),i.\u0275\u0275template(3,jd,2,0,"h3",3),i.\u0275\u0275template(4,eu,2,0,"h3",3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div")(6,"div",4)(7,"label"),i.\u0275\u0275text(8,"Name:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",5),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.name=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(10,"div",4)(11,"label"),i.\u0275\u0275text(12,"Description:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"textarea",6),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.description=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(14,bu,11,1,"div",3),i.\u0275\u0275elementStart(15,"div",7)(16,"button",8),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275text(17,"Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(18,"button",9),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(19,"Ok"),i.\u0275\u0275elementEnd()()()()}2&re&&(i.\u0275\u0275property("identifier","group"),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!xe.isEdit),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",xe.name),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.description),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit))},directives:[ut.Q3,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel],styles:[".pulse-form-field[_ngcontent-%COMP%]{display:flex}.pulse-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.pulse-form-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:32px}"]}),Ee})();var ya=r(47582);const $l=["imageInput"];function $s(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Add dashboard"),i.\u0275\u0275elementEnd())}function gd(Ee,tt){1&Ee&&(i.\u0275\u0275elementStart(0,"h3"),i.\u0275\u0275text(1,"Edit dashboard"),i.\u0275\u0275elementEnd())}function Fd(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",26),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext().removeItem(nt)}),i.\u0275\u0275elementEnd()}}function tu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",8)(1,"label",19),i.\u0275\u0275text(2,"Type:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(3,"input",20),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re).$implicit.Type=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(4,"label",21),i.\u0275\u0275text(5,"Column Name:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(6,"input",22),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re).$implicit.ColumnName=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(7,"label",23),i.\u0275\u0275text(8,"Order:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",24),i.\u0275\u0275listener("ngModelChange",function(nt){return i.\u0275\u0275restoreView(re).$implicit.Order=nt}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(10,Fd,1,0,"i",25),i.\u0275\u0275elementEnd()}if(2&Ee){const re=tt.$implicit;i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.Type)("readonly",!re.canRemove),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.ColumnName),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngModel",re.Order),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",re.canRemove)}}function nu(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"img",27,28),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("src",re.imageSrc,i.\u0275\u0275sanitizeUrl)}}let Dl=(()=>{class Ee{constructor(re,xe,nt,Pt,pn,oi){this.ngxSmartModalService=re,this.projectAdminService=xe,this.toasty=nt,this.projectGlobalService=Pt,this.sanitizer=pn,this.projectService=oi,this.showImage=!1,this.breakdowns=[],this.globalObjectType="responserate",this.globalObjectCategory="Dashboard"}ngAfterViewInit(){this.ngxSmartModalService.getModal("dashboard").onOpen.subscribe(re=>{const xe=re.getData();xe.isEdit?(this.isEdit=!0,this.name=xe.name,this.globalObjectId=xe.globalObjectId,this.showImage=!0,this.imageSrc=xe.picUrl):(this.isEdit=!1,this.name="",this.guid="")}),this.breakdowns.push({Type:"Regional",ColumnName:"COUNTRY_NAME",Order:0,canRemove:!1}),this.breakdowns.push({Type:"WorldMap",ColumnName:"COUNTRY",Order:0,canRemove:!1})}removeItem(re){this.breakdowns=this.breakdowns.filter(xe=>!(xe.ColumnName===re.ColumnName&&xe.Type===re.Type&&xe.canRemove))}addItem(){this.breakdowns.push({Type:"",ColumnName:"",Order:0,canRemove:!0})}onFileChanged(re){this.imageFile=re.target.files[0];const xe=new FileReader;xe.onload=nt=>{this.imageSrc=xe.result,this.uploadImage()},xe.readAsDataURL(this.imageFile),this.showImage=null!=this.imageFile}uploadImage(){const re=new FormData;re.append("id",this.globalObjectId),re.append("type","responserate"),re.append("document",this.imageSrc.replace(/^.+\,/,"")),this.projectAdminService.uploadImage(re).then(xe=>{xe&&xe.success?(this.showImage=!0,this.imageSrc=xe.data,this.toasty.info("Image uploaded succesfully!")):this.toasty.error("Image uploaded failed!")})}createImage(){this.projectAdminService.createImageFromApi(this.guid).then(re=>{this.screenshot=re,this.projectAdminService.getScreenshotFromApiImage(this.guid).then(xe=>{this.showImage=!0,this.imageSrc="data:image/jpg;base64,"+xe,this.toasty.info("Image created successfully!")}).catch(xe=>this.toasty.error("Error creating image!"))}).catch(re=>this.toasty.error("Error creating image!"))}removeImage(){this.imageFile=null,this.imageSrc=null,this.showImage=!1,this.imageInput.nativeElement.value="",this.binaryId=0}create(){this.projectAdminService.createReponserateDashboard(this.projectAdminService.projectId,this.globalObjectType,this.globalObjectCategory,this.name,this.filterConfig,this.breakdowns).then(re=>{this.toasty.success("Created Responserate Dashboard."),this.ngxSmartModalService.close("responserate")}).catch(re=>{this.toasty.error("Error occured!")})}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(ut.lu),i.\u0275\u0275directiveInject(ho.F),i.\u0275\u0275directiveInject(Vt._W),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(E.DomSanitizer),i.\u0275\u0275directiveInject(hd.Y))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-project-add-response-rate-dashboard"]],viewQuery:function(re,xe){if(1&re&&i.\u0275\u0275viewQuery($l,7),2&re){let nt;i.\u0275\u0275queryRefresh(nt=i.\u0275\u0275loadQuery())&&(xe.imageInput=nt.first)}},decls:37,vars:7,consts:[["customClass","mediumDialog",3,"identifier"],["responserate",""],[1,"dialog-header"],[4,"ngIf"],[2,"width","830px"],[1,"pulse-form-field"],["type","text","placeholder","Name","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["type","text","placeholder","Viewname","autofocus","",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],[1,"pulse-form-field","breakdown-form"],["class","pulse-form-field breakdown-form",4,"ngFor","ngForOf"],[1,"pulse-btn","save","add-breakdown",3,"click"],[1,"icon-plus2"],["align","center",1,"pulse-form-field"],["style","width:50%;height: auto;","id","img",3,"src",4,"ngIf"],[1,"pulse-btn-group","horizontal"],["type","file",3,"change"],["imageInput",""],["color","accent",1,"pulse-btn","cancel",3,"click"],["color","primary",1,"pulse-btn","save",3,"click"],["fxFlex","5"],["fxFlex","25","type","text","placeholder","Type",1,"pulse-input","input-small",3,"ngModel","readonly","ngModelChange"],["fxFlex","15"],["fxFlex","25","type","text","placeholder","ColumnName",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["fxFlex","10"],["fxFlex","10","type","text","placeholder","Order",1,"pulse-input","input-small",3,"ngModel","ngModelChange"],["fxFlex","5","style","cursor: pointer;","class","icon-delete2",3,"click",4,"ngIf"],["fxFlex","5",1,"icon-delete2",2,"cursor","pointer",3,"click"],["id","img",2,"width","50%","height","auto",3,"src"],["imageView",""]],template:function(re,xe){if(1&re){const nt=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"ngx-smart-modal",0,1)(2,"div",2),i.\u0275\u0275template(3,$s,2,0,"h3",3),i.\u0275\u0275template(4,gd,2,0,"h3",3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(5,"div",4)(6,"div",5)(7,"label"),i.\u0275\u0275text(8,"Name:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(9,"input",6),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.name=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(10,"div",5)(11,"label"),i.\u0275\u0275text(12,"Viewname:"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(13,"input",7),i.\u0275\u0275listener("ngModelChange",function(pn){return xe.filterConfig=pn}),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(14,"div",8)(15,"label"),i.\u0275\u0275text(16,"Breakdowns:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275template(17,tu,11,5,"div",9),i.\u0275\u0275elementStart(18,"button",10),i.\u0275\u0275listener("click",function(){return xe.addItem()}),i.\u0275\u0275element(19,"i",11),i.\u0275\u0275text(20," Add Breakdown"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(21,"div")(22,"div",5)(23,"label"),i.\u0275\u0275text(24,"Image:"),i.\u0275\u0275elementEnd()(),i.\u0275\u0275elementStart(25,"div",12),i.\u0275\u0275template(26,nu,2,1,"img",13),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(27,"div",14)(28,"input",15,16),i.\u0275\u0275listener("change",function(pn){return xe.onFileChanged(pn)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(30,"button",17),i.\u0275\u0275listener("click",function(){return xe.removeImage()}),i.\u0275\u0275text(31,"Delete"),i.\u0275\u0275elementEnd()()(),i.\u0275\u0275elementStart(32,"div",14)(33,"button",17),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(nt),i.\u0275\u0275reference(1).close()}),i.\u0275\u0275text(34,"Cancel"),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(35,"button",18),i.\u0275\u0275listener("click",function(){return xe.create()}),i.\u0275\u0275text(36,"Ok"),i.\u0275\u0275elementEnd()()()()}2&re&&(i.\u0275\u0275property("identifier","responserate"),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngIf",!xe.isEdit),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.isEdit),i.\u0275\u0275advance(5),i.\u0275\u0275property("ngModel",xe.name),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngModel",xe.filterConfig),i.\u0275\u0275advance(4),i.\u0275\u0275property("ngForOf",xe.breakdowns),i.\u0275\u0275advance(9),i.\u0275\u0275property("ngIf",xe.showImage))},directives:[ut.Q3,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,e.sg,$a.yH],styles:[".pulse-form-field[_ngcontent-%COMP%]{display:flex}.pulse-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.pulse-form-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:32px}.breakdown-form[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start}.breakdown-form[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .breakdown-form[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{text-align:center;display:flex;align-items:center}.breakdown-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-right:5px}.add-breakdown[_ngcontent-%COMP%]{margin:10px 0;max-width:20%}"]}),Ee})();var pc=r(10085),Bd=r(9200);function Cu(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",10),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275classMap(re.icon)}}function tp(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"a",7),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)})("keyup.enter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275template(2,Cu,1,3,"i",8),i.\u0275\u0275elementStart(3,"div",9)(4,"span"),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("routerLink",re.path)("title",!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(1,5,re.item.data.navigation)),i.\u0275\u0275attribute("tabindex",re.tabindex),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",re.icon),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(6,7,re.item.data.navigation))}}function Pm(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",10),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275classMap(re.icon)}}function Gu(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"a",11),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext();return nt.toggleActive(!nt.path)})("keyup.enter",function(){i.\u0275\u0275restoreView(re);const nt=i.\u0275\u0275nextContext();return nt.toggleActive(!nt.path)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275template(2,Pm,1,3,"i",8),i.\u0275\u0275elementStart(3,"div",9)(4,"span"),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("title",!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(1,4,re.item.data.navigation)),i.\u0275\u0275attribute("tabindex",re.tabindex),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",re.icon),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(6,6,re.item.data.navigation))}}function wu(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",10),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275classMap(re.icon)}}function Vs(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"a",12),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)})("keyup.enter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275template(2,wu,1,3,"i",8),i.\u0275\u0275elementStart(3,"div",9)(4,"span"),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("target",re.target)("href",null==re.item||null==re.item.data?null:re.item.data.link,i.\u0275\u0275sanitizeUrl)("title",!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(1,6,re.item.data.navigation)),i.\u0275\u0275attribute("tabindex",re.tabindex),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",re.icon),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(6,8,re.item.data.navigation))}}function Yd(Ee,tt){if(1&Ee&&i.\u0275\u0275element(0,"i",10),2&Ee){const re=i.\u0275\u0275nextContext(2);i.\u0275\u0275classMap(re.icon)}}function np(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"a",12),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)})("keyup.enter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!1)}),i.\u0275\u0275pipe(1,"translate"),i.\u0275\u0275template(2,Yd,1,3,"i",8),i.\u0275\u0275elementStart(3,"div",9)(4,"span"),i.\u0275\u0275text(5),i.\u0275\u0275pipe(6,"translate"),i.\u0275\u0275elementEnd()()()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("target",re.target)("href",re.link,i.\u0275\u0275sanitizeUrl)("title",!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(1,6,re.item.data.navigation)),i.\u0275\u0275attribute("tabindex",re.tabindex),i.\u0275\u0275advance(2),i.\u0275\u0275property("ngIf",re.icon),i.\u0275\u0275advance(3),i.\u0275\u0275textInterpolate(!0===re.item.data.navigation?re.item.path:i.\u0275\u0275pipeBind1(6,8,re.item.data.navigation))}}function ph(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"i",13),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(re.item.data.badge)}}const xa=function(Ee,tt){return{"icon-arrow-link-small-up":Ee,"icon-arrow-link-small-down":tt}};function Hd(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"i",14),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!0)})("keyup.enter",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext().toggleActive(!0)}),i.\u0275\u0275elementEnd()}if(2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction2(1,xa,re.active,!re.active))}}function ip(Ee,tt){if(1&Ee){const re=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"li",null,18)(2,"pulse-sidebar-navigationitem",19),i.\u0275\u0275listener("itemClick",function(){return i.\u0275\u0275restoreView(re),i.\u0275\u0275nextContext(3).emitClick(!0)}),i.\u0275\u0275elementEnd()()}if(2&Ee){const re=i.\u0275\u0275reference(1),xe=i.\u0275\u0275nextContext().$implicit,nt=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(2),i.\u0275\u0275property("parentIcon",nt.icon)("parentPath",nt.path)("item",xe)("navigationElement",re)("tabindex",nt.active||xe.children?0:-1)}}function km(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275template(1,ip,3,5,"li",17),i.\u0275\u0275elementContainerEnd()),2&Ee){const re=tt.$implicit,xe=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.service.showItem(re))}}function fh(Ee,tt){if(1&Ee&&(i.\u0275\u0275elementStart(0,"ul",15),i.\u0275\u0275template(1,km,2,1,"ng-container",16),i.\u0275\u0275elementEnd()),2&Ee){const re=i.\u0275\u0275nextContext();i.\u0275\u0275property("id",null==re.item.data?null:re.item.data.childrenContainerId),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",re.item.children)}}let rp=(()=>{class Ee{constructor(re,xe,nt,Pt,pn){this.router=re,this.service=xe,this._renderer=nt,this.projectService=Pt,this.variables=pn,this.itemClick=new i.EventEmitter,this._shouldToggle=!1,this.parentPath="",this.parentIcon="",this.tabindex="0",this.icon="",this.target="_blank",this.active=!1,this.selected=!1}ngOnInit(){this.sub=[],this.setPath(),this.compareRoute(this.router.routerState.snapshot.url),this.sub.push(this.router.events.subscribe(re=>{re instanceof d.R9&&this.compareRoute(re.url)})),this.parentIcon.length>0?this.icon=this.item.data&&this.item.data.icon?"small "+this.item.data.icon:"small "+this.parentIcon:this.item.data&&this.item.data.icon&&(this.icon=this.item.data.icon)}ngOnDestroy(){this.sub.forEach(re=>re.unsubscribe())}compareRoute(re){setTimeout(()=>{this.selected=this.service.isSelected(this.item),this.showMenu(this.service.isActive(this.item))})}setPath(){this.item.data&&this.item.data.old&&(this.link=this.variables.oldApiUrl+"/"+this.projectService.projectId+this.item.data.old,this.path=this.link,this.target="_self"),this.item.directPath?(0===this.item.directPath.indexOf("http")&&(this.link=this.item.directPath),this.path=this.item.directPath):this.path=this.item.path?this.parentPath+"/"+this.item.path:void 0,this.item.currentPath=this.path}toggleActive(re=!0){const xe=this.active;xe&&!re||this.showMenu(!xe)}showMenu(re){if(!this.navigationElement&&re!==this.active)return;const xe=this.navigationElement.children[0].children[1];re&&xe?(this._renderer.setStyle(this.navigationElement,"height",xe.offsetHeight+40+"px"),setTimeout(()=>this._renderer.setStyle(this.navigationElement,"height","auto"),300),this._renderer.addClass(this.navigationElement,"active")):(xe&&this.active&&this._renderer.setStyle(this.navigationElement,"height",xe.offsetHeight+40+"px"),setTimeout(()=>this._renderer.setStyle(this.navigationElement,"height","40px")),setTimeout(()=>this._renderer.removeClass(this.navigationElement,"active"),300)),this.active=re}hasChildrenData(){return!!this.item.children&&this.item.children.some(re=>re.data&&re.data.navigation)}emitClick(re=!1){(!this.hasChildrenData()||re)&&this.itemClick.emit()}}return Ee.\u0275fac=function(re){return new(re||Ee)(i.\u0275\u0275directiveInject(d.F0),i.\u0275\u0275directiveInject(Pr.R),i.\u0275\u0275directiveInject(i.Renderer2),i.\u0275\u0275directiveInject($t.k),i.\u0275\u0275directiveInject(rr.a))},Ee.\u0275cmp=i.\u0275\u0275defineComponent({type:Ee,selectors:[["pulse-sidebar-navigationitem"]],inputs:{item:"item",parentPath:"parentPath",parentIcon:"parentIcon",navigationElement:"navigationElement",tabindex:"tabindex"},outputs:{itemClick:"itemClick"},decls:8,vars:9,consts:[[1,"sidenav-item",3,"click"],[3,"routerLink","title","click","keyup.enter",4,"ngIf"],[3,"title","click","keyup.enter",4,"ngIf"],[3,"target","href","title","click","keyup.enter",4,"ngIf"],["class","beta-tag",4,"ngIf"],["class","action","tabindex","0",3,"ngClass","click","keyup.enter",4,"ngIf"],["class","sidenav-ul",3,"id",4,"ngIf"],[3,"routerLink","title","click","keyup.enter"],["aria-hidden","true",3,"class",4,"ngIf"],[1,"title"],["aria-hidden","true"],[3,"title","click","keyup.enter"],[3,"target","href","title","click","keyup.enter"],[1,"beta-tag"],["tabindex","0",1,"action",3,"ngClass","click","keyup.enter"],[1,"sidenav-ul",3,"id"],[4,"ngFor","ngForOf"],[4,"ngIf"],["navigationElement",""],[3,"parentIcon","parentPath","item","navigationElement","tabindex","itemClick"]],template:function(re,xe){1&re&&(i.\u0275\u0275elementStart(0,"div",0),i.\u0275\u0275listener("click",function(){return xe.emitClick()}),i.\u0275\u0275template(1,tp,7,9,"a",1),i.\u0275\u0275template(2,Gu,7,8,"a",2),i.\u0275\u0275template(3,Vs,7,10,"a",3),i.\u0275\u0275template(4,np,7,10,"a",3),i.\u0275\u0275template(5,ph,2,1,"i",4),i.\u0275\u0275template(6,Hd,1,4,"i",5),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(7,fh,2,2,"ul",6)),2&re&&(i.\u0275\u0275classProp("highlight",xe.selected),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.link&&xe.path&&!(null!=xe.item&&null!=xe.item.data&&xe.item.data.link)),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!xe.link&&!xe.path),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",null==xe.item||null==xe.item.data?null:xe.item.data.link),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.link),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.item.data.badge),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.hasChildrenData()),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",xe.item.children&&!(null!=xe.item.data&&xe.item.data.disabled)))},directives:[e.O5,d.yS,Xi.oO,e.mk,e.sg,Ee],pipes:[hc.k],styles:['i.beta-tag[_ngcontent-%COMP%]{background-color:#becdd7!important;color:#2d373c!important;line-height:17px!important;border-radius:10px}.badge[_ngcontent-%COMP%]{border-radius:100%;color:#fff;background:darkslategrey;width:15px;height:14px;font-size:9px;font-weight:700;display:flex;margin-left:5px;justify-content:center;align-items:center}div.sidenav-item.redBadge[_ngcontent-%COMP%]:before{position:absolute;content:"";width:8px;height:8px;background:#FF4B2B;border-radius:100%;left:25px;z-index:1000}']}),Ee})();r(19154),r(16646);var Vd=r(34595);let vd=(()=>{class Ee{transform(re,xe){return xe?re.filter(nt=>nt.hasValues):re}}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275pipe=i.\u0275\u0275definePipe({name:"emptyColumn",type:Ee,pure:!0}),Ee})();var sf=r(53403),hs=r(74564),Ud=r(19983),Mu=r(1862);const Fa={suppressScrollX:!0},gh=[["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{header:[1,2,3,4,5,6,!1]}],["clean"]];let Wd=(()=>{class Ee{}return Ee.\u0275fac=function(re){return new(re||Ee)},Ee.\u0275mod=i.\u0275\u0275defineNgModule({type:Ee}),Ee.\u0275inj=i.\u0275\u0275defineInjector({providers:[Pr.R,Mu.C,vi.I,Zt._,ht.F,wt.i,_o.q,hs.x,us.Lk,Ac.X,ut.lu,vo.N,e.JJ,Os.N,Mt.i,pc.F,Te.e,Ns.v,{provide:ro.op,useValue:Fa},sf.U,uc.O,Ud.i,cr.l],imports:[[d.Bz,a.JF,us.vI,o.FormsModule,s.o9,o.ReactiveFormsModule,S.l,Vt.Rh.forRoot({timeOut:1e4,positionClass:"toast-top-right",preventDuplicates:!0}),ro.Xd,t.xu,ut.Hd,h,Ki,g.QA,u.sS,da.jz,wr.fi.forRoot({modules:{toolbar:gh}}),Wo.n1.forRoot()],d.Bz,o.FormsModule,ut.Hd,o.ReactiveFormsModule,d.Bz,o.FormsModule,s.o9,t.xu,S.l,ro.Xd,g.QA,u.sS,da.jz]}),Ee})();i.\u0275\u0275setComponentScope(ea.j,[e.O5,ol.u,Xi.oO,e.mk,Ul.x,rt.w,Do,Ic.h],[e.Ov]),i.\u0275\u0275setComponentScope(cl.A,[qo,us.HW,e.sg,Tc,Xi.oO,e.mk,us.GI,us.n5,e.O5,Xc,Xi.Zl,e.PC,Ni.i],[e.Ov,vd,cr.l]),i.\u0275\u0275setComponentScope(Ul.x,[Oo.O,e.O5,mn.h,Vd.z,e.sg,Xi.oO,e.mk,us.HW,cl.A,us.GI,us.n5,ut.Q3,Cl],[cr.l,vd,e.Ov,Cs.P]),i.\u0275\u0275setComponentScope(Bd.n,[Xi.oO,e.mk,e.O5,d.rH,e.sg,rp,Js,cn,e.RF,e.n9,e.tP,kc,Ri,Me,Or.p],[hc.k,e.Ov,cr.l,ns.d]),i.\u0275\u0275setComponentScope(Lr.G,[$a.xw,$a.SQ,$a.Wh,$a.yH,e.O5,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,ro.Vv,Ta,e.sg,Xi.oO,e.mk],[]),i.\u0275\u0275setComponentScope(ya.i,[ut.Q3,o.SelectControlValueAccessor,o.NgControlStatus,o.NgModel,e.sg,o.NgSelectOption,o.\u0275NgSelectMultipleOption,Nd,tf,fd,zl,Ad,Dl],[])},92340:(Se,pe,r)=>{"use strict";r.d(pe,{N:()=>t});const t={production:!0,debug:!1,location:"",api:{"pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"},"app7.pulse.siemens.cloud":{pulseBackend:"https://stg.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"},"app9.pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://s.api.pulse.siemens.cloud"},"add10.pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://add9.pulse.siemens.cloud"},"s.pulse.siemens.cloud":{pulseBackend:"https://stg.pulse.siemens.cloud",pulseBackend2:"https://s.api.pulse.siemens.cloud"},"sp.pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"},"app8.pulse.siemens.cloud":{pulseBackend:"https://add5.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"},"i.pulse.siemens.cloud":{pulseBackend:"https://add5.pulse.siemens.cloud",pulseBackend2:"https://s.api.pulse.siemens.cloud"},"ip.pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"},"is.pulse.siemens.cloud":{pulseBackend:"https://stg.pulse.siemens.cloud",pulseBackend2:"https://s.api.pulse.siemens.cloud"},"awesomeness.pulse.siemens.cloud":{pulseBackend:"https://add1.pulse.siemens.cloud",pulseBackend2:"https://api.pulse.siemens.cloud"}},hrPhotoServiceUrl:{localhost:"https://www.int-profile.siemens.com/profile/api/photo/download?application=SRM&default=soc_default&gid=","add10.pulse.siemens.cloud":"https://www.int-profile.siemens.com/profile/api/photo/download?application=SRM&token=bd8f.=2,R$/@VK:&gid=","pulse.siemens.cloud":"https://www.profile.siemens.com/profile/api/photo/download?application=SRM&token=bd8f.=2,R$/@VK:&gid="},socOrganizationUrl:{localhost:"https://soc.siemens.cloud/orgcharts/orgchart?organizationUniqueName={ORGCODE}&userUniqueName={GID}","add10.pulse.siemens.cloud":"https://soc.siemens.cloud/orgcharts/orgchart?organizationUniqueName={ORGCODE}&userUniqueName={GID}","pulse.siemens.cloud":"https://soc.siemens.cloud/orgcharts/orgchart?organizationUniqueName={ORGCODE}&userUniqueName={GID}"}}},13360:(Se,pe,r)=>{"use strict";var t=r(22313);"undefined"!=typeof window&&window,"undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;"undefined"!=typeof global&&global;Object.keys({useClass:null}),Object.keys({useFactory:null}),Object.keys({useValue:null}),Object.keys({useExisting:null});var qn=r(5e3),Hh=r(69808),Sd=r(40520);const Pa=void 0,Vy=["de",[["AM","PM"],Pa,Pa],Pa,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xe4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xe4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],Pa,Pa],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",Pa,"{1} 'um' {0}",Pa],[",",".",";","%","+","-","E","\xb7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0\xa0%","#,##0.00\xa0\xa4","#E0"],"EUR","\u20ac","Euro",{ATS:["\xf6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],CUC:[Pa,"Cub$"],DEM:["DM"],FKP:[Pa,"Fl\xa3"],GHS:[Pa,"\u20b5"],GNF:[Pa,"F.G."],KMF:[Pa,"FC"],PHP:[Pa,"\u20b1"],RON:[Pa,"L"],RWF:[Pa,"F.Rw"],SYP:[],THB:["\u0e3f"],TWD:["NT$"],XXX:[],ZMW:[Pa,"K"]},"ltr",function wx(W){const l=Math.floor(Math.abs(W)),k=W.toString().replace(/^[^.]*\.?/,"").length;return 1===l&&0===k?1:5}];var So=r(41777);const gs=!1;function f_(W){return new qn.\u0275RuntimeError(3e3,gs)}function D_(){return"undefined"!=typeof window&&void 0!==window.document}function om(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function ad(W){switch(W.length){case 0:return new So.ZN;case 1:return W[0];default:return new So.ZE(W)}}function $g(W,n,l,k,ne={},ge={}){const Ie=[],Je=[];let pt=-1,Tt=null;if(k.forEach(rn=>{const xn=rn.offset,Xn=xn==pt,ti=Xn&&Tt||{};Object.keys(rn).forEach(Kn=>{let ui=Kn,wi=rn[Kn];if("offset"!==Kn)switch(ui=n.normalizePropertyName(ui,Ie),wi){case So.k1:wi=ne[Kn];break;case So.l3:wi=ge[Kn];break;default:wi=n.normalizeStyleValue(Kn,ui,wi,Ie)}ti[ui]=wi}),Xn||Je.push(ti),Tt=ti,pt=xn}),Ie.length)throw function o0(W){return new qn.\u0275RuntimeError(3502,gs)}();return Je}function am(W,n,l,k){switch(n){case"start":W.onStart(()=>k(l&&Ed(l,"start",W)));break;case"done":W.onDone(()=>k(l&&Ed(l,"done",W)));break;case"destroy":W.onDestroy(()=>k(l&&Ed(l,"destroy",W)))}}function Ed(W,n,l){const k=l.totalTime,ge=O_(W.element,W.triggerName,W.fromState,W.toState,n||W.phaseName,null==k?W.totalTime:k,!!l.disabled),Ie=W._data;return null!=Ie&&(ge._data=Ie),ge}function O_(W,n,l,k,ne="",ge=0,Ie){return{element:W,triggerName:n,fromState:l,toState:k,phaseName:ne,totalTime:ge,disabled:!!Ie}}function Gc(W,n,l){let k;return W instanceof Map?(k=W.get(n),k||W.set(n,k=l)):(k=W[n],k||(k=W[n]=l)),k}function Vh(W){const n=W.indexOf(":");return[W.substring(1,n),W.substr(n+1)]}let I_=(W,n)=>!1,Kg=(W,n,l)=>[],p0=null;function Xg(W){const n=W.parentNode||W.host;return n===p0?null:n}(om()||"undefined"!=typeof Element)&&(D_()?(p0=(()=>document.documentElement)(),I_=(W,n)=>{for(;n;){if(n===W)return!0;n=Xg(n)}return!1}):I_=(W,n)=>W.contains(n),Kg=(W,n,l)=>{if(l)return Array.from(W.querySelectorAll(n));const k=W.querySelector(n);return k?[k]:[]});let xr=null,f0=!1;function m0(W){xr||(xr=function Ex(){return"undefined"!=typeof document?document.body:null}()||{},f0=!!xr.style&&"WebkitAppearance"in xr.style);let n=!0;return xr.style&&!function Sx(W){return"ebkit"==W.substring(1,6)}(W)&&(n=W in xr.style,!n&&f0&&(n="Webkit"+W.charAt(0).toUpperCase()+W.substr(1)in xr.style)),n}const $p=I_,g0=Kg;let lm=(()=>{class W{validateStyleProperty(l){return m0(l)}matchesElement(l,k){return!1}containsElement(l,k){return $p(l,k)}getParentElement(l){return Xg(l)}query(l,k,ne){return g0(l,k,ne)}computeStyle(l,k,ne){return ne||""}animate(l,k,ne,ge,Ie,Je=[],pt){return new So.ZN(ne,ge)}}return W.\u0275fac=function(l){return new(l||W)},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})(),Ko=(()=>{class W{}return W.NOOP=new lm,W})();const L_="ng-enter",cm="ng-leave",um="ng-trigger",dm=".ng-trigger",A_="ng-animating",R_=".ng-animating";function Uh(W){if("number"==typeof W)return W;const n=W.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:j_(parseFloat(n[1]),n[2])}function j_(W,n){return"s"===n?1e3*W:W}function rh(W,n,l){return W.hasOwnProperty("duration")?W:function Tx(W,n,l){let ne,ge=0,Ie="";if("string"==typeof W){const Je=W.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===Je)return n.push(f_()),{duration:0,delay:0,easing:""};ne=j_(parseFloat(Je[1]),Je[2]);const pt=Je[3];null!=pt&&(ge=j_(parseFloat(pt),Je[4]));const Tt=Je[5];Tt&&(Ie=Tt)}else ne=W;if(!l){let Je=!1,pt=n.length;ne<0&&(n.push(function zy(){return new qn.\u0275RuntimeError(3100,gs)}()),Je=!0),ge<0&&(n.push(function m_(){return new qn.\u0275RuntimeError(3101,gs)}()),Je=!0),Je&&n.splice(pt,0,f_())}return{duration:ne,delay:ge,easing:Ie}}(W,n,l)}function Kp(W,n={}){return Object.keys(W).forEach(l=>{n[l]=W[l]}),n}function Au(W,n,l={}){if(n)for(let k in W)l[k]=W[k];else Kp(W,l);return l}function N_(W,n,l){return l?n+":"+l+";":""}function F_(W){let n="";for(let l=0;l{const ne=Jg(k);l&&!l.hasOwnProperty(k)&&(l[k]=W.style[ne]),W.style[ne]=n[k]}),om()&&F_(W))}function Wh(W,n){W.style&&(Object.keys(n).forEach(l=>{const k=Jg(l);W.style[k]=""}),om()&&F_(W))}function Td(W){return Array.isArray(W)?1==W.length?W[0]:(0,So.vP)(W):W}const B_=new RegExp("{{\\s*(.+?)\\s*}}","g");function y0(W){let n=[];if("string"==typeof W){let l;for(;l=B_.exec(W);)n.push(l[1]);B_.lastIndex=0}return n}function Qg(W,n,l){const k=W.toString(),ne=k.replace(B_,(ge,Ie)=>{let Je=n[Ie];return n.hasOwnProperty(Ie)||(l.push(function g_(W){return new qn.\u0275RuntimeError(3003,gs)}()),Je=""),Je.toString()});return ne==k?W:ne}function pm(W){const n=[];let l=W.next();for(;!l.done;)n.push(l.value),l=W.next();return n}const x0=/-+([a-z0-9])/g;function Jg(W){return W.replace(x0,(...n)=>n[1].toUpperCase())}function Dx(W){return W.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function $c(W,n,l){switch(n.type){case 7:return W.visitTrigger(n,l);case 0:return W.visitState(n,l);case 1:return W.visitTransition(n,l);case 2:return W.visitSequence(n,l);case 3:return W.visitGroup(n,l);case 4:return W.visitAnimate(n,l);case 5:return W.visitKeyframes(n,l);case 6:return W.visitStyle(n,l);case 8:return W.visitReference(n,l);case 9:return W.visitAnimateChild(n,l);case 10:return W.visitAnimateRef(n,l);case 11:return W.visitQuery(n,l);case 12:return W.visitStagger(n,l);default:throw function v_(W){return new qn.\u0275RuntimeError(3004,gs)}()}}function Ix(W,n){return window.getComputedStyle(W)[n]}function mm(W,n){const l=[];return"string"==typeof W?W.split(/\s*,\s*/).forEach(k=>function Px(W,n,l){if(":"==W[0]){const pt=function kx(W,n){switch(W){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(l,k)=>parseFloat(k)>parseFloat(l);case":decrement":return(l,k)=>parseFloat(k) *"}}(W,l);if("function"==typeof pt)return void n.push(pt);W=pt}const k=W.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==k||k.length<4)return l.push(function e0(W){return new qn.\u0275RuntimeError(3015,gs)}()),n;const ne=k[1],ge=k[2],Ie=k[3];n.push(w0(ne,Ie));"<"==ge[0]&&!("*"==ne&&"*"==Ie)&&n.push(w0(Ie,ne))}(k,l,n)):l.push(W),l}const qg=new Set(["true","1"]),ev=new Set(["false","0"]);function w0(W,n){const l=qg.has(W)||ev.has(W),k=qg.has(n)||ev.has(n);return(ne,ge)=>{let Ie="*"==W||W==ne,Je="*"==n||n==ge;return!Ie&&l&&"boolean"==typeof ne&&(Ie=ne?qg.has(W):ev.has(W)),!Je&&k&&"boolean"==typeof ge&&(Je=ge?qg.has(n):ev.has(n)),Ie&&Je}}const Lx=new RegExp("s*:selfs*,?","g");function U_(W,n,l,k){return new Ax(W).build(n,l,k)}class Ax{constructor(n){this._driver=n}build(n,l,k){const ne=new S0(l);this._resetContextStyleTimingState(ne);const ge=$c(this,Td(n),ne);return ne.unsupportedCSSPropertiesFound.size&&ne.unsupportedCSSPropertiesFound.keys(),ge}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles={},n.collectedStyles[""]={},n.currentTime=0}visitTrigger(n,l){let k=l.queryCount=0,ne=l.depCount=0;const ge=[],Ie=[];return"@"==n.name.charAt(0)&&l.errors.push(function y_(){return new qn.\u0275RuntimeError(3006,gs)}()),n.definitions.forEach(Je=>{if(this._resetContextStyleTimingState(l),0==Je.type){const pt=Je,Tt=pt.name;Tt.toString().split(/\s*,\s*/).forEach(rn=>{pt.name=rn,ge.push(this.visitState(pt,l))}),pt.name=Tt}else if(1==Je.type){const pt=this.visitTransition(Je,l);k+=pt.queryCount,ne+=pt.depCount,Ie.push(pt)}else l.errors.push(function x_(){return new qn.\u0275RuntimeError(3007,gs)}())}),{type:7,name:n.name,states:ge,transitions:Ie,queryCount:k,depCount:ne,options:null}}visitState(n,l){const k=this.visitStyle(n.styles,l),ne=n.options&&n.options.params||null;if(k.containsDynamicStyles){const ge=new Set,Ie=ne||{};k.styles.forEach(Je=>{if(gm(Je)){const pt=Je;Object.keys(pt).forEach(Tt=>{y0(pt[Tt]).forEach(rn=>{Ie.hasOwnProperty(rn)||ge.add(rn)})})}}),ge.size&&(pm(ge.values()),l.errors.push(function b_(W,n){return new qn.\u0275RuntimeError(3008,gs)}()))}return{type:0,name:n.name,style:k,options:ne?{params:ne}:null}}visitTransition(n,l){l.queryCount=0,l.depCount=0;const k=$c(this,Td(n.animation),l);return{type:1,matchers:mm(n.expr,l.errors),animation:k,queryCount:l.queryCount,depCount:l.depCount,options:Dd(n.options)}}visitSequence(n,l){return{type:2,steps:n.steps.map(k=>$c(this,k,l)),options:Dd(n.options)}}visitGroup(n,l){const k=l.currentTime;let ne=0;const ge=n.steps.map(Ie=>{l.currentTime=k;const Je=$c(this,Ie,l);return ne=Math.max(ne,l.currentTime),Je});return l.currentTime=ne,{type:3,steps:ge,options:Dd(n.options)}}visitAnimate(n,l){const k=function Nx(W,n){if(W.hasOwnProperty("duration"))return W;if("number"==typeof W)return W_(rh(W,n).duration,0,"");const l=W;if(l.split(/\s+/).some(ge=>"{"==ge.charAt(0)&&"{"==ge.charAt(1))){const ge=W_(0,0,"");return ge.dynamic=!0,ge.strValue=l,ge}const ne=rh(l,n);return W_(ne.duration,ne.delay,ne.easing)}(n.timings,l.errors);l.currentAnimateTimings=k;let ne,ge=n.styles?n.styles:(0,So.oB)({});if(5==ge.type)ne=this.visitKeyframes(ge,l);else{let Ie=n.styles,Je=!1;if(!Ie){Je=!0;const Tt={};k.easing&&(Tt.easing=k.easing),Ie=(0,So.oB)(Tt)}l.currentTime+=k.duration+k.delay;const pt=this.visitStyle(Ie,l);pt.isEmptyStep=Je,ne=pt}return l.currentAnimateTimings=null,{type:4,timings:k,style:ne,options:null}}visitStyle(n,l){const k=this._makeStyleAst(n,l);return this._validateStyleAst(k,l),k}_makeStyleAst(n,l){const k=[];Array.isArray(n.styles)?n.styles.forEach(Ie=>{"string"==typeof Ie?Ie==So.l3?k.push(Ie):l.errors.push(function C_(W){return new qn.\u0275RuntimeError(3002,gs)}()):k.push(Ie)}):k.push(n.styles);let ne=!1,ge=null;return k.forEach(Ie=>{if(gm(Ie)){const Je=Ie,pt=Je.easing;if(pt&&(ge=pt,delete Je.easing),!ne)for(let Tt in Je)if(Je[Tt].toString().indexOf("{{")>=0){ne=!0;break}}}),{type:6,styles:k,easing:ge,offset:n.offset,containsDynamicStyles:ne,options:null}}_validateStyleAst(n,l){const k=l.currentAnimateTimings;let ne=l.currentTime,ge=l.currentTime;k&&ge>0&&(ge-=k.duration+k.delay),n.styles.forEach(Ie=>{"string"!=typeof Ie&&Object.keys(Ie).forEach(Je=>{if(!this._driver.validateStyleProperty(Je))return delete Ie[Je],void l.unsupportedCSSPropertiesFound.add(Je);const pt=l.collectedStyles[l.currentQuerySelector],Tt=pt[Je];let rn=!0;Tt&&(ge!=ne&&ge>=Tt.startTime&&ne<=Tt.endTime&&(l.errors.push(function $y(W,n,l,k,ne){return new qn.\u0275RuntimeError(3010,gs)}()),rn=!1),ge=Tt.startTime),rn&&(pt[Je]={startTime:ge,endTime:ne}),l.options&&function hm(W,n,l){const k=n.params||{},ne=y0(W);ne.length&&ne.forEach(ge=>{k.hasOwnProperty(ge)||l.push(function Gg(W){return new qn.\u0275RuntimeError(3001,gs)}())})}(Ie[Je],l.options,l.errors)})})}visitKeyframes(n,l){const k={type:5,styles:[],options:null};if(!l.currentAnimateTimings)return l.errors.push(function Ky(){return new qn.\u0275RuntimeError(3011,gs)}()),k;let ge=0;const Ie=[];let Je=!1,pt=!1,Tt=0;const rn=n.steps.map(sr=>{const Oi=this._makeStyleAst(sr,l);let er=null!=Oi.offset?Oi.offset:function jx(W){if("string"==typeof W)return null;let n=null;if(Array.isArray(W))W.forEach(l=>{if(gm(l)&&l.hasOwnProperty("offset")){const k=l;n=parseFloat(k.offset),delete k.offset}});else if(gm(W)&&W.hasOwnProperty("offset")){const l=W;n=parseFloat(l.offset),delete l.offset}return n}(Oi.styles),vs=0;return null!=er&&(ge++,vs=Oi.offset=er),pt=pt||vs<0||vs>1,Je=Je||vs0&&ge{const er=Xn>0?Oi==ti?1:Xn*Oi:Ie[Oi],vs=er*wi;l.currentTime=Kn+ui.delay+vs,ui.duration=vs,this._validateStyleAst(sr,l),sr.offset=er,k.styles.push(sr)}),k}visitReference(n,l){return{type:8,animation:$c(this,Td(n.animation),l),options:Dd(n.options)}}visitAnimateChild(n,l){return l.depCount++,{type:9,options:Dd(n.options)}}visitAnimateRef(n,l){return{type:10,animation:this.visitReference(n.animation,l),options:Dd(n.options)}}visitQuery(n,l){const k=l.currentQuerySelector,ne=n.options||{};l.queryCount++,l.currentQuery=n;const[ge,Ie]=function M0(W){const n=!!W.split(/\s*,\s*/).find(l=>":self"==l);return n&&(W=W.replace(Lx,"")),W=W.replace(/@\*/g,dm).replace(/@\w+/g,l=>dm+"-"+l.substr(1)).replace(/:animating/g,R_),[W,n]}(n.selector);l.currentQuerySelector=k.length?k+" "+ge:ge,Gc(l.collectedStyles,l.currentQuerySelector,{});const Je=$c(this,Td(n.animation),l);return l.currentQuery=null,l.currentQuerySelector=k,{type:11,selector:ge,limit:ne.limit||0,optional:!!ne.optional,includeSelf:Ie,animation:Je,originalSelector:n.selector,options:Dd(n.options)}}visitStagger(n,l){l.currentQuery||l.errors.push(function Zy(){return new qn.\u0275RuntimeError(3013,gs)}());const k="full"===n.timings?{duration:0,delay:0,easing:"full"}:rh(n.timings,l.errors,!0);return{type:12,animation:$c(this,Td(n.animation),l),timings:k,options:null}}}class S0{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function gm(W){return!Array.isArray(W)&&"object"==typeof W}function Dd(W){return W?(W=Kp(W)).params&&(W.params=function Rx(W){return W?Kp(W):null}(W.params)):W={},W}function W_(W,n,l){return{duration:W,delay:n,easing:l}}function tv(W,n,l,k,ne,ge,Ie=null,Je=!1){return{type:1,element:W,keyframes:n,preStyleProps:l,postStyleProps:k,duration:ne,delay:ge,totalTime:ne+ge,easing:Ie,subTimeline:Je}}class vm{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,l){let k=this._map.get(n);k||this._map.set(n,k=[]),k.push(...l)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const Yx=new RegExp(":enter","g"),Hx=new RegExp(":leave","g");function nv(W,n,l,k,ne,ge={},Ie={},Je,pt,Tt=[]){return(new Vx).buildKeyframes(W,n,l,k,ne,ge,Ie,Je,pt,Tt)}class Vx{buildKeyframes(n,l,k,ne,ge,Ie,Je,pt,Tt,rn=[]){Tt=Tt||new vm;const xn=new G_(n,l,Tt,ne,ge,rn,[]);xn.options=pt,xn.currentTimeline.setStyles([Ie],null,xn.errors,pt),$c(this,k,xn);const Xn=xn.timelines.filter(ti=>ti.containsAnimation());if(Object.keys(Je).length){let ti;for(let Kn=Xn.length-1;Kn>=0;Kn--){const ui=Xn[Kn];if(ui.element===l){ti=ui;break}}ti&&!ti.allowOnlyTimelineStyles()&&ti.setStyles([Je],null,xn.errors,pt)}return Xn.length?Xn.map(ti=>ti.buildKeyframes()):[tv(l,[],[],[],0,0,"",!1)]}visitTrigger(n,l){}visitState(n,l){}visitTransition(n,l){}visitAnimateChild(n,l){const k=l.subInstructions.get(l.element);if(k){const ne=l.createSubContext(n.options),ge=l.currentTimeline.currentTime,Ie=this._visitSubInstructions(k,ne,ne.options);ge!=Ie&&l.transformIntoNewTimeline(Ie)}l.previousNode=n}visitAnimateRef(n,l){const k=l.createSubContext(n.options);k.transformIntoNewTimeline(),this.visitReference(n.animation,k),l.transformIntoNewTimeline(k.currentTimeline.currentTime),l.previousNode=n}_visitSubInstructions(n,l,k){let ge=l.currentTimeline.currentTime;const Ie=null!=k.duration?Uh(k.duration):null,Je=null!=k.delay?Uh(k.delay):null;return 0!==Ie&&n.forEach(pt=>{const Tt=l.appendInstructionToTimeline(pt,Ie,Je);ge=Math.max(ge,Tt.duration+Tt.delay)}),ge}visitReference(n,l){l.updateOptions(n.options,!0),$c(this,n.animation,l),l.previousNode=n}visitSequence(n,l){const k=l.subContextCount;let ne=l;const ge=n.options;if(ge&&(ge.params||ge.delay)&&(ne=l.createSubContext(ge),ne.transformIntoNewTimeline(),null!=ge.delay)){6==ne.previousNode.type&&(ne.currentTimeline.snapshotCurrentStyles(),ne.previousNode=iv);const Ie=Uh(ge.delay);ne.delayNextStep(Ie)}n.steps.length&&(n.steps.forEach(Ie=>$c(this,Ie,ne)),ne.currentTimeline.applyStylesToKeyframe(),ne.subContextCount>k&&ne.transformIntoNewTimeline()),l.previousNode=n}visitGroup(n,l){const k=[];let ne=l.currentTimeline.currentTime;const ge=n.options&&n.options.delay?Uh(n.options.delay):0;n.steps.forEach(Ie=>{const Je=l.createSubContext(n.options);ge&&Je.delayNextStep(ge),$c(this,Ie,Je),ne=Math.max(ne,Je.currentTimeline.currentTime),k.push(Je.currentTimeline)}),k.forEach(Ie=>l.currentTimeline.mergeTimelineCollectedStyles(Ie)),l.transformIntoNewTimeline(ne),l.previousNode=n}_visitTiming(n,l){if(n.dynamic){const k=n.strValue;return rh(l.params?Qg(k,l.params,l.errors):k,l.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,l){const k=l.currentAnimateTimings=this._visitTiming(n.timings,l),ne=l.currentTimeline;k.delay&&(l.incrementTime(k.delay),ne.snapshotCurrentStyles());const ge=n.style;5==ge.type?this.visitKeyframes(ge,l):(l.incrementTime(k.duration),this.visitStyle(ge,l),ne.applyStylesToKeyframe()),l.currentAnimateTimings=null,l.previousNode=n}visitStyle(n,l){const k=l.currentTimeline,ne=l.currentAnimateTimings;!ne&&k.getCurrentStyleProperties().length&&k.forwardFrame();const ge=ne&&ne.easing||n.easing;n.isEmptyStep?k.applyEmptyStep(ge):k.setStyles(n.styles,ge,l.errors,l.options),l.previousNode=n}visitKeyframes(n,l){const k=l.currentAnimateTimings,ne=l.currentTimeline.duration,ge=k.duration,Je=l.createSubContext().currentTimeline;Je.easing=k.easing,n.styles.forEach(pt=>{Je.forwardTime((pt.offset||0)*ge),Je.setStyles(pt.styles,pt.easing,l.errors,l.options),Je.applyStylesToKeyframe()}),l.currentTimeline.mergeTimelineCollectedStyles(Je),l.transformIntoNewTimeline(ne+ge),l.previousNode=n}visitQuery(n,l){const k=l.currentTimeline.currentTime,ne=n.options||{},ge=ne.delay?Uh(ne.delay):0;ge&&(6===l.previousNode.type||0==k&&l.currentTimeline.getCurrentStyleProperties().length)&&(l.currentTimeline.snapshotCurrentStyles(),l.previousNode=iv);let Ie=k;const Je=l.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!ne.optional,l.errors);l.currentQueryTotal=Je.length;let pt=null;Je.forEach((Tt,rn)=>{l.currentQueryIndex=rn;const xn=l.createSubContext(n.options,Tt);ge&&xn.delayNextStep(ge),Tt===l.element&&(pt=xn.currentTimeline),$c(this,n.animation,xn),xn.currentTimeline.applyStylesToKeyframe(),Ie=Math.max(Ie,xn.currentTimeline.currentTime)}),l.currentQueryIndex=0,l.currentQueryTotal=0,l.transformIntoNewTimeline(Ie),pt&&(l.currentTimeline.mergeTimelineCollectedStyles(pt),l.currentTimeline.snapshotCurrentStyles()),l.previousNode=n}visitStagger(n,l){const k=l.parentContext,ne=l.currentTimeline,ge=n.timings,Ie=Math.abs(ge.duration),Je=Ie*(l.currentQueryTotal-1);let pt=Ie*l.currentQueryIndex;switch(ge.duration<0?"reverse":ge.easing){case"reverse":pt=Je-pt;break;case"full":pt=k.currentStaggerTime}const rn=l.currentTimeline;pt&&rn.delayNextStep(pt);const xn=rn.currentTime;$c(this,n.animation,l),l.previousNode=n,k.currentStaggerTime=ne.currentTime-xn+(ne.startTime-k.currentTimeline.startTime)}}const iv={};class G_{constructor(n,l,k,ne,ge,Ie,Je,pt){this._driver=n,this.element=l,this.subInstructions=k,this._enterClassName=ne,this._leaveClassName=ge,this.errors=Ie,this.timelines=Je,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=iv,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=pt||new rv(this._driver,l,0),Je.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,l){if(!n)return;const k=n;let ne=this.options;null!=k.duration&&(ne.duration=Uh(k.duration)),null!=k.delay&&(ne.delay=Uh(k.delay));const ge=k.params;if(ge){let Ie=ne.params;Ie||(Ie=this.options.params={}),Object.keys(ge).forEach(Je=>{(!l||!Ie.hasOwnProperty(Je))&&(Ie[Je]=Qg(ge[Je],Ie,this.errors))})}}_copyOptions(){const n={};if(this.options){const l=this.options.params;if(l){const k=n.params={};Object.keys(l).forEach(ne=>{k[ne]=l[ne]})}}return n}createSubContext(n=null,l,k){const ne=l||this.element,ge=new G_(this._driver,ne,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(ne,k||0));return ge.previousNode=this.previousNode,ge.currentAnimateTimings=this.currentAnimateTimings,ge.options=this._copyOptions(),ge.updateOptions(n),ge.currentQueryIndex=this.currentQueryIndex,ge.currentQueryTotal=this.currentQueryTotal,ge.parentContext=this,this.subContextCount++,ge}transformIntoNewTimeline(n){return this.previousNode=iv,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,l,k){const ne={duration:null!=l?l:n.duration,delay:this.currentTimeline.currentTime+(null!=k?k:0)+n.delay,easing:""},ge=new Ux(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,ne,n.stretchStartingKeyframe);return this.timelines.push(ge),ne}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,l,k,ne,ge,Ie){let Je=[];if(ne&&Je.push(this.element),n.length>0){n=(n=n.replace(Yx,"."+this._enterClassName)).replace(Hx,"."+this._leaveClassName);let Tt=this._driver.query(this.element,n,1!=k);0!==k&&(Tt=k<0?Tt.slice(Tt.length+k,Tt.length):Tt.slice(0,k)),Je.push(...Tt)}return!ge&&0==Je.length&&Ie.push(function qy(W){return new qn.\u0275RuntimeError(3014,gs)}()),Je}}class rv{constructor(n,l,k,ne){this._driver=n,this.element=l,this.startTime=k,this._elementTimelineStylesLookup=ne,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(l),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(l,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const l=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||l?(this.forwardTime(this.currentTime+n),l&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,l){return this.applyStylesToKeyframe(),new rv(this._driver,n,l||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,l){this._localTimelineStyles[n]=l,this._globalTimelineStyles[n]=l,this._styleSummary[n]={time:this.currentTime,value:l}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&(this._previousKeyframe.easing=n),Object.keys(this._globalTimelineStyles).forEach(l=>{this._backFill[l]=this._globalTimelineStyles[l]||So.l3,this._currentKeyframe[l]=So.l3}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,l,k,ne){l&&(this._previousKeyframe.easing=l);const ge=ne&&ne.params||{},Ie=function Wx(W,n){const l={};let k;return W.forEach(ne=>{"*"===ne?(k=k||Object.keys(n),k.forEach(ge=>{l[ge]=So.l3})):Au(ne,!1,l)}),l}(n,this._globalTimelineStyles);Object.keys(Ie).forEach(Je=>{const pt=Qg(Ie[Je],ge,k);this._pendingStyles[Je]=pt,this._localTimelineStyles.hasOwnProperty(Je)||(this._backFill[Je]=this._globalTimelineStyles.hasOwnProperty(Je)?this._globalTimelineStyles[Je]:So.l3),this._updateStyle(Je,pt)})}applyStylesToKeyframe(){const n=this._pendingStyles,l=Object.keys(n);0!=l.length&&(this._pendingStyles={},l.forEach(k=>{this._currentKeyframe[k]=n[k]}),Object.keys(this._localTimelineStyles).forEach(k=>{this._currentKeyframe.hasOwnProperty(k)||(this._currentKeyframe[k]=this._localTimelineStyles[k])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(n=>{const l=this._localTimelineStyles[n];this._pendingStyles[n]=l,this._updateStyle(n,l)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let l in this._currentKeyframe)n.push(l);return n}mergeTimelineCollectedStyles(n){Object.keys(n._styleSummary).forEach(l=>{const k=this._styleSummary[l],ne=n._styleSummary[l];(!k||ne.time>k.time)&&this._updateStyle(l,ne.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,l=new Set,k=1===this._keyframes.size&&0===this.duration;let ne=[];this._keyframes.forEach((Je,pt)=>{const Tt=Au(Je,!0);Object.keys(Tt).forEach(rn=>{const xn=Tt[rn];xn==So.k1?n.add(rn):xn==So.l3&&l.add(rn)}),k||(Tt.offset=pt/this.duration),ne.push(Tt)});const ge=n.size?pm(n.values()):[],Ie=l.size?pm(l.values()):[];if(k){const Je=ne[0],pt=Kp(Je);Je.offset=0,pt.offset=1,ne=[Je,pt]}return tv(this.element,ne,ge,Ie,this.duration,this.startTime,this.easing,!1)}}class Ux extends rv{constructor(n,l,k,ne,ge,Ie,Je=!1){super(n,l,Ie.delay),this.keyframes=k,this.preStyleProps=ne,this.postStyleProps=ge,this._stretchStartingKeyframe=Je,this.timings={duration:Ie.duration,delay:Ie.delay,easing:Ie.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:l,duration:k,easing:ne}=this.timings;if(this._stretchStartingKeyframe&&l){const ge=[],Ie=k+l,Je=l/Ie,pt=Au(n[0],!1);pt.offset=0,ge.push(pt);const Tt=Au(n[0],!1);Tt.offset=E0(Je),ge.push(Tt);const rn=n.length-1;for(let xn=1;xn<=rn;xn++){let Xn=Au(n[xn],!1);Xn.offset=E0((l+Xn.offset*k)/Ie),ge.push(Xn)}k=Ie,l=0,ne="",n=ge}return tv(this.element,n,this.preStyleProps,this.postStyleProps,k,l,ne,!0)}}function E0(W,n=3){const l=Math.pow(10,n-1);return Math.round(W*l)/l}class _m{}class D0 extends _m{normalizePropertyName(n,l){return Jg(n)}normalizeStyleValue(n,l,k,ne){let ge="";const Ie=k.toString().trim();if(O0[l]&&0!==k&&"0"!==k)if("number"==typeof k)ge="px";else{const Je=k.match(/^[+-]?[\d\.]+([a-z]*)$/);Je&&0==Je[1].length&&ne.push(function __(W,n){return new qn.\u0275RuntimeError(3005,gs)}())}return Ie+ge}}const O0=(()=>function $_(W){const n={};return W.forEach(l=>n[l]=!0),n}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function K_(W,n,l,k,ne,ge,Ie,Je,pt,Tt,rn,xn,Xn){return{type:0,element:W,triggerName:n,isRemovalTransition:ne,fromState:l,fromStyles:ge,toState:k,toStyles:Ie,timelines:Je,queriedElements:pt,preStyleProps:Tt,postStyleProps:rn,totalTime:xn,errors:Xn}}const sv={};class I0{constructor(n,l,k){this._triggerName=n,this.ast=l,this._stateStyles=k}match(n,l,k,ne){return function X_(W,n,l,k,ne){return W.some(ge=>ge(n,l,k,ne))}(this.ast.matchers,n,l,k,ne)}buildStyles(n,l,k){const ne=this._stateStyles["*"],ge=this._stateStyles[n],Ie=ne?ne.buildStyles(l,k):{};return ge?ge.buildStyles(l,k):Ie}build(n,l,k,ne,ge,Ie,Je,pt,Tt,rn){const xn=[],Xn=this.ast.options&&this.ast.options.params||sv,Kn=this.buildStyles(k,Je&&Je.params||sv,xn),ui=pt&&pt.params||sv,wi=this.buildStyles(ne,ui,xn),sr=new Set,Oi=new Map,er=new Map,vs="void"===ne,Xo={params:Object.assign(Object.assign({},Xn),ui)},Qo=rn?[]:nv(n,l,this.ast.animation,ge,Ie,Kn,wi,Xo,Tt,xn);let Vo=0;if(Qo.forEach(Gs=>{Vo=Math.max(Gs.duration+Gs.delay,Vo)}),xn.length)return K_(l,this._triggerName,k,ne,vs,Kn,wi,[],[],Oi,er,Vo,xn);Qo.forEach(Gs=>{const Po=Gs.element,Wr=Gc(Oi,Po,{});Gs.preStyleProps.forEach(ws=>Wr[ws]=!0);const Ca=Gc(er,Po,{});Gs.postStyleProps.forEach(ws=>Ca[ws]=!0),Po!==l&&sr.add(Po)});const ka=pm(sr.values());return K_(l,this._triggerName,k,ne,vs,Kn,wi,Qo,ka,Oi,er,Vo)}}class Q_{constructor(n,l,k){this.styles=n,this.defaultParams=l,this.normalizer=k}buildStyles(n,l){const k={},ne=Kp(this.defaultParams);return Object.keys(n).forEach(ge=>{const Ie=n[ge];null!=Ie&&(ne[ge]=Ie)}),this.styles.styles.forEach(ge=>{if("string"!=typeof ge){const Ie=ge;Object.keys(Ie).forEach(Je=>{let pt=Ie[Je];pt.length>1&&(pt=Qg(pt,ne,l));const Tt=this.normalizer.normalizePropertyName(Je,l);pt=this.normalizer.normalizeStyleValue(Je,Tt,pt,l),k[Tt]=pt})}}),k}}class J_{constructor(n,l,k){this.name=n,this.ast=l,this._normalizer=k,this.transitionFactories=[],this.states={},l.states.forEach(ne=>{this.states[ne.name]=new Q_(ne.style,ne.options&&ne.options.params||{},k)}),k0(this.states,"true","1"),k0(this.states,"false","0"),l.transitions.forEach(ne=>{this.transitionFactories.push(new I0(n,ne,this.states))}),this.fallbackTransition=function zx(W,n,l){return new I0(W,{type:1,animation:{type:2,steps:[],options:null},matchers:[(Ie,Je)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,l,k,ne){return this.transitionFactories.find(Ie=>Ie.match(n,l,k,ne))||null}matchStyles(n,l,k){return this.fallbackTransition.buildStyles(n,l,k)}}function k0(W,n,l){W.hasOwnProperty(n)?W.hasOwnProperty(l)||(W[l]=W[n]):W.hasOwnProperty(l)&&(W[n]=W[l])}const Z_=new vm;class Gx{constructor(n,l,k){this.bodyNode=n,this._driver=l,this._normalizer=k,this._animations={},this._playersById={},this.players=[]}register(n,l){const k=[],ge=U_(this._driver,l,k,[]);if(k.length)throw function a0(W){return new qn.\u0275RuntimeError(3503,gs)}();this._animations[n]=ge}_buildPlayer(n,l,k){const ne=n.element,ge=$g(0,this._normalizer,0,n.keyframes,l,k);return this._driver.animate(ne,ge,n.duration,n.delay,n.easing,[],!0)}create(n,l,k={}){const ne=[],ge=this._animations[n];let Ie;const Je=new Map;if(ge?(Ie=nv(this._driver,l,ge,L_,cm,{},{},k,Z_,ne),Ie.forEach(rn=>{const xn=Gc(Je,rn.element,{});rn.postStyleProps.forEach(Xn=>xn[Xn]=null)})):(ne.push(function l0(){return new qn.\u0275RuntimeError(3300,gs)}()),Ie=[]),ne.length)throw function c0(W){return new qn.\u0275RuntimeError(3504,gs)}();Je.forEach((rn,xn)=>{Object.keys(rn).forEach(Xn=>{rn[Xn]=this._driver.computeStyle(xn,Xn,So.l3)})});const Tt=ad(Ie.map(rn=>{const xn=Je.get(rn.element);return this._buildPlayer(rn,{},xn)}));return this._playersById[n]=Tt,Tt.onDestroy(()=>this.destroy(n)),this.players.push(Tt),Tt}destroy(n){const l=this._getPlayer(n);l.destroy(),delete this._playersById[n];const k=this.players.indexOf(l);k>=0&&this.players.splice(k,1)}_getPlayer(n){const l=this._playersById[n];if(!l)throw function u0(W){return new qn.\u0275RuntimeError(3301,gs)}();return l}listen(n,l,k,ne){const ge=O_(l,"","","");return am(this._getPlayer(n),k,ge,ne),()=>{}}command(n,l,k,ne){if("register"==k)return void this.register(n,ne[0]);if("create"==k)return void this.create(n,l,ne[0]||{});const ge=this._getPlayer(n);switch(k){case"play":ge.play();break;case"pause":ge.pause();break;case"reset":ge.reset();break;case"restart":ge.restart();break;case"finish":ge.finish();break;case"init":ge.init();break;case"setPosition":ge.setPosition(parseFloat(ne[0]));break;case"destroy":this.destroy(n)}}}const q_="ng-animate-queued",Xp="ng-animate-disabled",Kx=[],ym={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Xx={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},yl="__ng_removed";class Gh{constructor(n,l=""){this.namespaceId=l;const k=n&&n.hasOwnProperty("value");if(this.value=function N0(W){return null!=W?W:null}(k?n.value:n),k){const ge=Kp(n);delete ge.value,this.options=ge}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(n){const l=n.params;if(l){const k=this.options.params;Object.keys(l).forEach(ne=>{null==k[ne]&&(k[ne]=l[ne])})}}}const xm="void",R0=new Gh(xm);class j0{constructor(n,l,k){this.id=n,this.hostElement=l,this._engine=k,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,lu(l,this._hostClassName)}listen(n,l,k,ne){if(!this._triggers.hasOwnProperty(l))throw function d0(W,n){return new qn.\u0275RuntimeError(3302,gs)}();if(null==k||0==k.length)throw function w_(W){return new qn.\u0275RuntimeError(3303,gs)}();if(!function F0(W){return"start"==W||"done"==W}(k))throw function M_(W,n){return new qn.\u0275RuntimeError(3400,gs)}();const ge=Gc(this._elementListeners,n,[]),Ie={name:l,phase:k,callback:ne};ge.push(Ie);const Je=Gc(this._engine.statesByElement,n,{});return Je.hasOwnProperty(l)||(lu(n,um),lu(n,um+"-"+l),Je[l]=R0),()=>{this._engine.afterFlush(()=>{const pt=ge.indexOf(Ie);pt>=0&&ge.splice(pt,1),this._triggers[l]||delete Je[l]})}}register(n,l){return!this._triggers[n]&&(this._triggers[n]=l,!0)}_getTrigger(n){const l=this._triggers[n];if(!l)throw function S_(W){return new qn.\u0275RuntimeError(3401,gs)}();return l}trigger(n,l,k,ne=!0){const ge=this._getTrigger(l),Ie=new ey(this.id,l,n);let Je=this._engine.statesByElement.get(n);Je||(lu(n,um),lu(n,um+"-"+l),this._engine.statesByElement.set(n,Je={}));let pt=Je[l];const Tt=new Gh(k,this.id);if(!(k&&k.hasOwnProperty("value"))&&pt&&Tt.absorbOptions(pt.options),Je[l]=Tt,pt||(pt=R0),Tt.value!==xm&&pt.value===Tt.value){if(!function ov(W,n){const l=Object.keys(W),k=Object.keys(n);if(l.length!=k.length)return!1;for(let ne=0;ne{Wh(n,wi),Ru(n,sr)})}return}const Xn=Gc(this._engine.playersByElement,n,[]);Xn.forEach(ui=>{ui.namespaceId==this.id&&ui.triggerName==l&&ui.queued&&ui.destroy()});let ti=ge.matchTransition(pt.value,Tt.value,n,Tt.params),Kn=!1;if(!ti){if(!ne)return;ti=ge.fallbackTransition,Kn=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:l,transition:ti,fromState:pt,toState:Tt,player:Ie,isFallbackTransition:Kn}),Kn||(lu(n,q_),Ie.onStart(()=>{Kh(n,q_)})),Ie.onDone(()=>{let ui=this.players.indexOf(Ie);ui>=0&&this.players.splice(ui,1);const wi=this._engine.playersByElement.get(n);if(wi){let sr=wi.indexOf(Ie);sr>=0&&wi.splice(sr,1)}}),this.players.push(Ie),Xn.push(Ie),Ie}deregister(n){delete this._triggers[n],this._engine.statesByElement.forEach((l,k)=>{delete l[n]}),this._elementListeners.forEach((l,k)=>{this._elementListeners.set(k,l.filter(ne=>ne.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const l=this._engine.playersByElement.get(n);l&&(l.forEach(k=>k.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,l){const k=this._engine.driver.query(n,dm,!0);k.forEach(ne=>{if(ne[yl])return;const ge=this._engine.fetchNamespacesByElement(ne);ge.size?ge.forEach(Ie=>Ie.triggerLeaveAnimation(ne,l,!1,!0)):this.clearElementCache(ne)}),this._engine.afterFlushAnimationsDone(()=>k.forEach(ne=>this.clearElementCache(ne)))}triggerLeaveAnimation(n,l,k,ne){const ge=this._engine.statesByElement.get(n),Ie=new Map;if(ge){const Je=[];if(Object.keys(ge).forEach(pt=>{if(Ie.set(pt,ge[pt].value),this._triggers[pt]){const Tt=this.trigger(n,pt,xm,ne);Tt&&Je.push(Tt)}}),Je.length)return this._engine.markElementAsRemoved(this.id,n,!0,l,Ie),k&&ad(Je).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const l=this._elementListeners.get(n),k=this._engine.statesByElement.get(n);if(l&&k){const ne=new Set;l.forEach(ge=>{const Ie=ge.name;if(ne.has(Ie))return;ne.add(Ie);const pt=this._triggers[Ie].fallbackTransition,Tt=k[Ie]||R0,rn=new Gh(xm),xn=new ey(this.id,Ie,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:Ie,transition:pt,fromState:Tt,toState:rn,player:xn,isFallbackTransition:!0})})}}removeNode(n,l){const k=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,l),this.triggerLeaveAnimation(n,l,!0))return;let ne=!1;if(k.totalAnimations){const ge=k.players.length?k.playersByQueriedElement.get(n):[];if(ge&&ge.length)ne=!0;else{let Ie=n;for(;Ie=Ie.parentNode;)if(k.statesByElement.get(Ie)){ne=!0;break}}}if(this.prepareLeaveAnimationListeners(n),ne)k.markElementAsRemoved(this.id,n,!1,l);else{const ge=n[yl];(!ge||ge===ym)&&(k.afterFlush(()=>this.clearElementCache(n)),k.destroyInnerAnimations(n),k._onRemovalComplete(n,l))}}insertNode(n,l){lu(n,this._hostClassName)}drainQueuedTransitions(n){const l=[];return this._queue.forEach(k=>{const ne=k.player;if(ne.destroyed)return;const ge=k.element,Ie=this._elementListeners.get(ge);Ie&&Ie.forEach(Je=>{if(Je.name==k.triggerName){const pt=O_(ge,k.triggerName,k.fromState.value,k.toState.value);pt._data=n,am(k.player,Je.phase,pt,Je.callback)}}),ne.markedForDestroy?this._engine.afterFlush(()=>{ne.destroy()}):l.push(k)}),this._queue=[],l.sort((k,ne)=>{const ge=k.transition.ast.depCount,Ie=ne.transition.ast.depCount;return 0==ge||0==Ie?ge-Ie:this._engine.driver.containsElement(k.element,ne.element)?1:-1})}destroy(n){this.players.forEach(l=>l.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let l=!1;return this._elementListeners.has(n)&&(l=!0),l=!!this._queue.find(k=>k.element===n)||l,l}}class Qx{constructor(n,l,k){this.bodyNode=n,this.driver=l,this._normalizer=k,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(ne,ge)=>{}}_onRemovalComplete(n,l){this.onRemovalComplete(n,l)}get queuedPlayers(){const n=[];return this._namespaceList.forEach(l=>{l.players.forEach(k=>{k.queued&&n.push(k)})}),n}createNamespace(n,l){const k=new j0(n,l,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,l)?this._balanceNamespaceList(k,l):(this.newHostElements.set(l,k),this.collectEnterElement(l)),this._namespaceLookup[n]=k}_balanceNamespaceList(n,l){const k=this._namespaceList,ne=this.namespacesByHostElement,ge=k.length-1;if(ge>=0){let Ie=!1;if(void 0!==this.driver.getParentElement){let Je=this.driver.getParentElement(l);for(;Je;){const pt=ne.get(Je);if(pt){const Tt=k.indexOf(pt);k.splice(Tt+1,0,n),Ie=!0;break}Je=this.driver.getParentElement(Je)}}else for(let Je=ge;Je>=0;Je--)if(this.driver.containsElement(k[Je].hostElement,l)){k.splice(Je+1,0,n),Ie=!0;break}Ie||k.unshift(n)}else k.push(n);return ne.set(l,n),n}register(n,l){let k=this._namespaceLookup[n];return k||(k=this.createNamespace(n,l)),k}registerTrigger(n,l,k){let ne=this._namespaceLookup[n];ne&&ne.register(l,k)&&this.totalAnimations++}destroy(n,l){if(!n)return;const k=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(k.hostElement),delete this._namespaceLookup[n];const ne=this._namespaceList.indexOf(k);ne>=0&&this._namespaceList.splice(ne,1)}),this.afterFlushAnimationsDone(()=>k.destroy(l))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const l=new Set,k=this.statesByElement.get(n);if(k){const ne=Object.keys(k);for(let ge=0;ge=0&&this.collectedLeaveElements.splice(Ie,1)}if(n){const Ie=this._fetchNamespace(n);Ie&&Ie.insertNode(l,k)}ne&&this.collectEnterElement(l)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,l){l?this.disabledNodes.has(n)||(this.disabledNodes.add(n),lu(n,Xp)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Kh(n,Xp))}removeNode(n,l,k,ne){if(bm(l)){const ge=n?this._fetchNamespace(n):null;if(ge?ge.removeNode(l,ne):this.markElementAsRemoved(n,l,!1,ne),k){const Ie=this.namespacesByHostElement.get(l);Ie&&Ie.id!==n&&Ie.removeNode(l,ne)}}else this._onRemovalComplete(l,ne)}markElementAsRemoved(n,l,k,ne,ge){this.collectedLeaveElements.push(l),l[yl]={namespaceId:n,setForRemoval:ne,hasAnimation:k,removedBeforeQueried:!1,previousTriggersValues:ge}}listen(n,l,k,ne,ge){return bm(l)?this._fetchNamespace(n).listen(l,k,ne,ge):()=>{}}_buildInstruction(n,l,k,ne,ge){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,k,ne,n.fromState.options,n.toState.options,l,ge)}destroyInnerAnimations(n){let l=this.driver.query(n,dm,!0);l.forEach(k=>this.destroyActiveAnimationsForElement(k)),0!=this.playersByQueriedElement.size&&(l=this.driver.query(n,R_,!0),l.forEach(k=>this.finishActiveQueriedAnimationOnElement(k)))}destroyActiveAnimationsForElement(n){const l=this.playersByElement.get(n);l&&l.forEach(k=>{k.queued?k.markedForDestroy=!0:k.destroy()})}finishActiveQueriedAnimationOnElement(n){const l=this.playersByQueriedElement.get(n);l&&l.forEach(k=>k.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return ad(this.players).onDone(()=>n());n()})}processLeaveNode(n){var l;const k=n[yl];if(k&&k.setForRemoval){if(n[yl]=ym,k.namespaceId){this.destroyInnerAnimations(n);const ne=this._fetchNamespace(k.namespaceId);ne&&ne.clearElementCache(n)}this._onRemovalComplete(n,k.setForRemoval)}(null===(l=n.classList)||void 0===l?void 0:l.contains(Xp))&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(ne=>{this.markElementAsDisabled(ne,!1)})}flush(n=-1){let l=[];if(this.newHostElements.size&&(this.newHostElements.forEach((k,ne)=>this._balanceNamespaceList(k,ne)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let k=0;kk()),this._flushFns=[],this._whenQuietFns.length){const k=this._whenQuietFns;this._whenQuietFns=[],l.length?ad(l).onDone(()=>{k.forEach(ne=>ne())}):k.forEach(ne=>ne())}}reportError(n){throw function E_(W){return new qn.\u0275RuntimeError(3402,gs)}()}_flushAnimations(n,l){const k=new vm,ne=[],ge=new Map,Ie=[],Je=new Map,pt=new Map,Tt=new Map,rn=new Set;this.disabledNodes.forEach(Vi=>{rn.add(Vi);const ar=this.driver.query(Vi,".ng-animate-queued",!0);for(let Sr=0;Sr{const Sr=L_+ui++;Kn.set(ar,Sr),Vi.forEach(is=>lu(is,Sr))});const wi=[],sr=new Set,Oi=new Set;for(let Vi=0;Visr.add(is)):Oi.add(ar))}const er=new Map,vs=$h(Xn,Array.from(sr));vs.forEach((Vi,ar)=>{const Sr=cm+ui++;er.set(ar,Sr),Vi.forEach(is=>lu(is,Sr))}),n.push(()=>{ti.forEach((Vi,ar)=>{const Sr=Kn.get(ar);Vi.forEach(is=>Kh(is,Sr))}),vs.forEach((Vi,ar)=>{const Sr=er.get(ar);Vi.forEach(is=>Kh(is,Sr))}),wi.forEach(Vi=>{this.processLeaveNode(Vi)})});const Xo=[],Qo=[];for(let Vi=this._namespaceList.length-1;Vi>=0;Vi--)this._namespaceList[Vi].drainQueuedTransitions(l).forEach(Sr=>{const is=Sr.player,Ha=Sr.element;if(Xo.push(is),this.collectedEnterElements.length){const Al=Ha[yl];if(Al&&Al.setForMove){if(Al.previousTriggersValues&&Al.previousTriggersValues.has(Sr.triggerName)){const ah=Al.previousTriggersValues.get(Sr.triggerName),lh=this.statesByElement.get(Sr.element);lh&&lh[Sr.triggerName]&&(lh[Sr.triggerName].value=ah)}return void is.destroy()}}const cd=!xn||!this.driver.containsElement(xn,Ha),ic=er.get(Ha),ud=Kn.get(Ha),Jo=this._buildInstruction(Sr,k,ud,ic,cd);if(Jo.errors&&Jo.errors.length)return void Qo.push(Jo);if(cd)return is.onStart(()=>Wh(Ha,Jo.fromStyles)),is.onDestroy(()=>Ru(Ha,Jo.toStyles)),void ne.push(is);if(Sr.isFallbackTransition)return is.onStart(()=>Wh(Ha,Jo.fromStyles)),is.onDestroy(()=>Ru(Ha,Jo.toStyles)),void ne.push(is);const cx=[];Jo.timelines.forEach(Al=>{Al.stretchStartingKeyframe=!0,this.disabledNodes.has(Al.element)||cx.push(Al)}),Jo.timelines=cx,k.append(Ha,Jo.timelines),Ie.push({instruction:Jo,player:is,element:Ha}),Jo.queriedElements.forEach(Al=>Gc(Je,Al,[]).push(is)),Jo.preStyleProps.forEach((Al,ah)=>{const lh=Object.keys(Al);if(lh.length){let ch=pt.get(ah);ch||pt.set(ah,ch=new Set),lh.forEach(mv=>ch.add(mv))}}),Jo.postStyleProps.forEach((Al,ah)=>{const lh=Object.keys(Al);let ch=Tt.get(ah);ch||Tt.set(ah,ch=new Set),lh.forEach(mv=>ch.add(mv))})});if(Qo.length){const Vi=[];Qo.forEach(ar=>{Vi.push(function T_(W,n){return new qn.\u0275RuntimeError(3505,gs)}())}),Xo.forEach(ar=>ar.destroy()),this.reportError(Vi)}const Vo=new Map,ka=new Map;Ie.forEach(Vi=>{const ar=Vi.element;k.has(ar)&&(ka.set(ar,ar),this._beforeAnimationBuild(Vi.player.namespaceId,Vi.instruction,Vo))}),ne.forEach(Vi=>{const ar=Vi.element;this._getPreviousPlayers(ar,!1,Vi.namespaceId,Vi.triggerName,null).forEach(is=>{Gc(Vo,ar,[]).push(is),is.destroy()})});const Gs=wi.filter(Vi=>H0(Vi,pt,Tt)),Po=new Map;wm(Po,this.driver,Oi,Tt,So.l3).forEach(Vi=>{H0(Vi,pt,Tt)&&Gs.push(Vi)});const Ca=new Map;ti.forEach((Vi,ar)=>{wm(Ca,this.driver,new Set(Vi),pt,So.k1)}),Gs.forEach(Vi=>{const ar=Po.get(Vi),Sr=Ca.get(Vi);Po.set(Vi,Object.assign(Object.assign({},ar),Sr))});const ws=[],tl=[],ju={};Ie.forEach(Vi=>{const{element:ar,player:Sr,instruction:is}=Vi;if(k.has(ar)){if(rn.has(ar))return Sr.onDestroy(()=>Ru(ar,is.toStyles)),Sr.disabled=!0,Sr.overrideTotalTime(is.totalTime),void ne.push(Sr);let Ha=ju;if(ka.size>1){let ic=ar;const ud=[];for(;ic=ic.parentNode;){const Jo=ka.get(ic);if(Jo){Ha=Jo;break}ud.push(ic)}ud.forEach(Jo=>ka.set(Jo,Ha))}const cd=this._buildAnimation(Sr.namespaceId,is,Vo,ge,Ca,Po);if(Sr.setRealPlayer(cd),Ha===ju)ws.push(Sr);else{const ic=this.playersByElement.get(Ha);ic&&ic.length&&(Sr.parentPlayer=ad(ic)),ne.push(Sr)}}else Wh(ar,is.fromStyles),Sr.onDestroy(()=>Ru(ar,is.toStyles)),tl.push(Sr),rn.has(ar)&&ne.push(Sr)}),tl.forEach(Vi=>{const ar=ge.get(Vi.element);if(ar&&ar.length){const Sr=ad(ar);Vi.setRealPlayer(Sr)}}),ne.forEach(Vi=>{Vi.parentPlayer?Vi.syncPlayerEvents(Vi.parentPlayer):Vi.destroy()});for(let Vi=0;Vi!cd.destroyed);Ha.length?B0(this,ar,Ha):this.processLeaveNode(ar)}return wi.length=0,ws.forEach(Vi=>{this.players.push(Vi),Vi.onDone(()=>{Vi.destroy();const ar=this.players.indexOf(Vi);this.players.splice(ar,1)}),Vi.play()}),ws}elementContainsData(n,l){let k=!1;const ne=l[yl];return ne&&ne.setForRemoval&&(k=!0),this.playersByElement.has(l)&&(k=!0),this.playersByQueriedElement.has(l)&&(k=!0),this.statesByElement.has(l)&&(k=!0),this._fetchNamespace(n).elementContainsData(l)||k}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,l,k,ne,ge){let Ie=[];if(l){const Je=this.playersByQueriedElement.get(n);Je&&(Ie=Je)}else{const Je=this.playersByElement.get(n);if(Je){const pt=!ge||ge==xm;Je.forEach(Tt=>{Tt.queued||!pt&&Tt.triggerName!=ne||Ie.push(Tt)})}}return(k||ne)&&(Ie=Ie.filter(Je=>!(k&&k!=Je.namespaceId||ne&&ne!=Je.triggerName))),Ie}_beforeAnimationBuild(n,l,k){const ge=l.element,Ie=l.isRemovalTransition?void 0:n,Je=l.isRemovalTransition?void 0:l.triggerName;for(const pt of l.timelines){const Tt=pt.element,rn=Tt!==ge,xn=Gc(k,Tt,[]);this._getPreviousPlayers(Tt,rn,Ie,Je,l.toState).forEach(ti=>{const Kn=ti.getRealPlayer();Kn.beforeDestroy&&Kn.beforeDestroy(),ti.destroy(),xn.push(ti)})}Wh(ge,l.fromStyles)}_buildAnimation(n,l,k,ne,ge,Ie){const Je=l.triggerName,pt=l.element,Tt=[],rn=new Set,xn=new Set,Xn=l.timelines.map(Kn=>{const ui=Kn.element;rn.add(ui);const wi=ui[yl];if(wi&&wi.removedBeforeQueried)return new So.ZN(Kn.duration,Kn.delay);const sr=ui!==pt,Oi=function Zx(W){const n=[];return Y0(W,n),n}((k.get(ui)||Kx).map(Vo=>Vo.getRealPlayer())).filter(Vo=>!!Vo.element&&Vo.element===ui),er=ge.get(ui),vs=Ie.get(ui),Xo=$g(0,this._normalizer,0,Kn.keyframes,er,vs),Qo=this._buildPlayer(Kn,Xo,Oi);if(Kn.subTimeline&&ne&&xn.add(ui),sr){const Vo=new ey(n,Je,ui);Vo.setRealPlayer(Qo),Tt.push(Vo)}return Qo});Tt.forEach(Kn=>{Gc(this.playersByQueriedElement,Kn.element,[]).push(Kn),Kn.onDone(()=>function Jx(W,n,l){let k;if(W instanceof Map){if(k=W.get(n),k){if(k.length){const ne=k.indexOf(l);k.splice(ne,1)}0==k.length&&W.delete(n)}}else if(k=W[n],k){if(k.length){const ne=k.indexOf(l);k.splice(ne,1)}0==k.length&&delete W[n]}return k}(this.playersByQueriedElement,Kn.element,Kn))}),rn.forEach(Kn=>lu(Kn,A_));const ti=ad(Xn);return ti.onDestroy(()=>{rn.forEach(Kn=>Kh(Kn,A_)),Ru(pt,l.toStyles)}),xn.forEach(Kn=>{Gc(ne,Kn,[]).push(ti)}),ti}_buildPlayer(n,l,k){return l.length>0?this.driver.animate(n.element,l,n.duration,n.delay,n.easing,k):new So.ZN(n.duration,n.delay)}}class ey{constructor(n,l,k){this.namespaceId=n,this.triggerName=l,this.element=k,this._player=new So.ZN,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,Object.keys(this._queuedCallbacks).forEach(l=>{this._queuedCallbacks[l].forEach(k=>am(n,l,void 0,k))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const l=this._player;l.triggerCallback&&n.onStart(()=>l.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,l){Gc(this._queuedCallbacks,n,[]).push(l)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const l=this._player;l.triggerCallback&&l.triggerCallback(n)}}function bm(W){return W&&1===W.nodeType}function Cm(W,n){const l=W.style.display;return W.style.display=null!=n?n:"none",l}function wm(W,n,l,k,ne){const ge=[];l.forEach(pt=>ge.push(Cm(pt)));const Ie=[];k.forEach((pt,Tt)=>{const rn={};pt.forEach(xn=>{const Xn=rn[xn]=n.computeStyle(Tt,xn,ne);(!Xn||0==Xn.length)&&(Tt[yl]=Xx,Ie.push(Tt))}),W.set(Tt,rn)});let Je=0;return l.forEach(pt=>Cm(pt,ge[Je++])),Ie}function $h(W,n){const l=new Map;if(W.forEach(Je=>l.set(Je,[])),0==n.length)return l;const ne=new Set(n),ge=new Map;function Ie(Je){if(!Je)return 1;let pt=ge.get(Je);if(pt)return pt;const Tt=Je.parentNode;return pt=l.has(Tt)?Tt:ne.has(Tt)?1:Ie(Tt),ge.set(Je,pt),pt}return n.forEach(Je=>{const pt=Ie(Je);1!==pt&&l.get(pt).push(Je)}),l}function lu(W,n){var l;null===(l=W.classList)||void 0===l||l.add(n)}function Kh(W,n){var l;null===(l=W.classList)||void 0===l||l.remove(n)}function B0(W,n,l){ad(l).onDone(()=>W.processLeaveNode(n))}function Y0(W,n){for(let l=0;lne.add(ge)):n.set(W,k),l.delete(W),!0}class ty{constructor(n,l,k){this.bodyNode=n,this._driver=l,this._normalizer=k,this._triggerCache={},this.onRemovalComplete=(ne,ge)=>{},this._transitionEngine=new Qx(n,l,k),this._timelineEngine=new Gx(n,l,k),this._transitionEngine.onRemovalComplete=(ne,ge)=>this.onRemovalComplete(ne,ge)}registerTrigger(n,l,k,ne,ge){const Ie=n+"-"+ne;let Je=this._triggerCache[Ie];if(!Je){const pt=[],rn=U_(this._driver,ge,pt,[]);if(pt.length)throw function s0(W,n){return new qn.\u0275RuntimeError(3404,gs)}();Je=function P0(W,n,l){return new J_(W,n,l)}(ne,rn,this._normalizer),this._triggerCache[Ie]=Je}this._transitionEngine.registerTrigger(l,ne,Je)}register(n,l){this._transitionEngine.register(n,l)}destroy(n,l){this._transitionEngine.destroy(n,l)}onInsert(n,l,k,ne){this._transitionEngine.insertNode(n,l,k,ne)}onRemove(n,l,k,ne){this._transitionEngine.removeNode(n,l,ne||!1,k)}disableAnimations(n,l){this._transitionEngine.markElementAsDisabled(n,l)}process(n,l,k,ne){if("@"==k.charAt(0)){const[ge,Ie]=Vh(k);this._timelineEngine.command(ge,l,Ie,ne)}else this._transitionEngine.trigger(n,l,k,ne)}listen(n,l,k,ne,ge){if("@"==k.charAt(0)){const[Ie,Je]=Vh(k);return this._timelineEngine.listen(Ie,l,Je,ge)}return this._transitionEngine.listen(n,l,k,ne,ge)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let U0=(()=>{class W{constructor(l,k,ne){this._element=l,this._startStyles=k,this._endStyles=ne,this._state=0;let ge=W.initialStylesByElement.get(l);ge||W.initialStylesByElement.set(l,ge={}),this._initialStyles=ge}start(){this._state<1&&(this._startStyles&&Ru(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ru(this._element,this._initialStyles),this._endStyles&&(Ru(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(W.initialStylesByElement.delete(this._element),this._startStyles&&(Wh(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Wh(this._element,this._endStyles),this._endStyles=null),Ru(this._element,this._initialStyles),this._state=3)}}return W.initialStylesByElement=new WeakMap,W})();function sh(W){let n=null;const l=Object.keys(W);for(let k=0;kn()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(n,l,k){return n.animate(l,k)}onStart(n){this._onStartFns.push(n)}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n={};if(this.hasStarted()){const l=this._finalKeyframe;Object.keys(l).forEach(k=>{"offset"!=k&&(n[k]=this._finished?l[k]:Ix(this.element,k))})}this.currentSnapshot=n}triggerCallback(n){const l="start"==n?this._onStartFns:this._onDoneFns;l.forEach(k=>k()),l.length=0}}class Wb{validateStyleProperty(n){return m0(n)}matchesElement(n,l){return!1}containsElement(n,l){return $p(n,l)}getParentElement(n){return Xg(n)}query(n,l,k){return g0(n,l,k)}computeStyle(n,l,k){return window.getComputedStyle(n)[l]}animate(n,l,k,ne,ge,Ie=[]){const pt={duration:k,delay:ne,fill:0==ne?"both":"forwards"};ge&&(pt.easing=ge);const Tt={},rn=Ie.filter(Xn=>Xn instanceof Xh);(function b0(W,n){return 0===W||0===n})(k,ne)&&rn.forEach(Xn=>{let ti=Xn.currentSnapshot;Object.keys(ti).forEach(Kn=>Tt[Kn]=ti[Kn])}),l=function Ox(W,n,l){const k=Object.keys(l);if(k.length&&n.length){let ge=n[0],Ie=[];if(k.forEach(Je=>{ge.hasOwnProperty(Je)||Ie.push(Je),ge[Je]=l[Je]}),Ie.length)for(var ne=1;neAu(Xn,!1)),Tt);const xn=function V0(W,n){let l=null,k=null;return Array.isArray(n)&&n.length?(l=sh(n[0]),n.length>1&&(k=sh(n[n.length-1]))):n&&(l=sh(n)),l||k?new U0(W,l,k):null}(n,l);return new Xh(n,l,pt,xn)}}let z0=(()=>{class W extends So._j{constructor(l,k){super(),this._nextAnimationId=0,this._renderer=l.createRenderer(k.body,{id:"0",encapsulation:qn.ViewEncapsulation.None,styles:[],data:{animation:[]}})}build(l){const k=this._nextAnimationId.toString();this._nextAnimationId++;const ne=Array.isArray(l)?(0,So.vP)(l):l;return ny(this._renderer,null,k,"register",[ne]),new G0(k,this._renderer)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(qn.RendererFactory2),qn.\u0275\u0275inject(Hh.K0))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();class G0 extends So.LC{constructor(n,l){super(),this._id=n,this._renderer=l}create(n,l){return new zb(this._id,n,l||{},this._renderer)}}class zb{constructor(n,l,k,ne){this.id=n,this.element=l,this._renderer=ne,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",k)}_listen(n,l){return this._renderer.listen(this.element,`@@${this.id}:${n}`,l)}_command(n,...l){return ny(this._renderer,this.element,this.id,n,l)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){var n,l;return null!==(l=null===(n=this._renderer.engine.players[+this.id])||void 0===n?void 0:n.getPosition())&&void 0!==l?l:0}}function ny(W,n,l,k,ne){return W.setProperty(n,`@@${l}:${k}`,ne)}const lv="@.disabled";let cv=(()=>{class W{constructor(l,k,ne){this.delegate=l,this.engine=k,this._zone=ne,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),k.onRemovalComplete=(ge,Ie)=>{const Je=null==Ie?void 0:Ie.parentNode(ge);Je&&Ie.removeChild(Je,ge)}}createRenderer(l,k){const ge=this.delegate.createRenderer(l,k);if(!(l&&k&&k.data&&k.data.animation)){let rn=this._rendererCache.get(ge);return rn||(rn=new iy("",ge,this.engine),this._rendererCache.set(ge,rn)),rn}const Ie=k.id,Je=k.id+"-"+this._currentId;this._currentId++,this.engine.register(Je,l);const pt=rn=>{Array.isArray(rn)?rn.forEach(pt):this.engine.registerTrigger(Ie,Je,l,rn.name,rn)};return k.data.animation.forEach(pt),new $0(this,Je,ge,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(l,k,ne){l>=0&&lk(ne)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(ge=>{const[Ie,Je]=ge;Ie(Je)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([k,ne]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(qn.RendererFactory2),qn.\u0275\u0275inject(ty),qn.\u0275\u0275inject(qn.NgZone))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();class iy{constructor(n,l,k){this.namespaceId=n,this.delegate=l,this.engine=k,this.destroyNode=this.delegate.destroyNode?ne=>l.destroyNode(ne):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(n,l){return this.delegate.createElement(n,l)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,l){this.delegate.appendChild(n,l),this.engine.onInsert(this.namespaceId,l,n,!1)}insertBefore(n,l,k,ne=!0){this.delegate.insertBefore(n,l,k),this.engine.onInsert(this.namespaceId,l,n,ne)}removeChild(n,l,k){this.engine.onRemove(this.namespaceId,l,this.delegate,k)}selectRootElement(n,l){return this.delegate.selectRootElement(n,l)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,l,k,ne){this.delegate.setAttribute(n,l,k,ne)}removeAttribute(n,l,k){this.delegate.removeAttribute(n,l,k)}addClass(n,l){this.delegate.addClass(n,l)}removeClass(n,l){this.delegate.removeClass(n,l)}setStyle(n,l,k,ne){this.delegate.setStyle(n,l,k,ne)}removeStyle(n,l,k){this.delegate.removeStyle(n,l,k)}setProperty(n,l,k){"@"==l.charAt(0)&&l==lv?this.disableAnimations(n,!!k):this.delegate.setProperty(n,l,k)}setValue(n,l){this.delegate.setValue(n,l)}listen(n,l,k){return this.delegate.listen(n,l,k)}disableAnimations(n,l){this.engine.disableAnimations(n,l)}}class $0 extends iy{constructor(n,l,k,ne){super(l,k,ne),this.factory=n,this.namespaceId=l}setProperty(n,l,k){"@"==l.charAt(0)?"."==l.charAt(1)&&l==lv?this.disableAnimations(n,k=void 0===k||!!k):this.engine.process(this.namespaceId,n,l.substr(1),k):this.delegate.setProperty(n,l,k)}listen(n,l,k){if("@"==l.charAt(0)){const ne=function K0(W){switch(W){case"body":return document.body;case"document":return document;case"window":return window;default:return W}}(n);let ge=l.substr(1),Ie="";return"@"!=ge.charAt(0)&&([ge,Ie]=function X0(W){const n=W.indexOf(".");return[W.substring(0,n),W.substr(n+1)]}(ge)),this.engine.listen(this.namespaceId,ne,ge,Ie,Je=>{this.factory.scheduleListenerCallback(Je._data||-1,k,Je)})}return this.delegate.listen(n,l,k)}}let Q0=(()=>{class W extends ty{constructor(l,k,ne){super(l.body,k,ne)}ngOnDestroy(){this.flush()}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(Hh.K0),qn.\u0275\u0275inject(Ko),qn.\u0275\u0275inject(_m))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();const ry=new qn.InjectionToken("AnimationModuleType"),sy=[{provide:So._j,useClass:z0},{provide:_m,useFactory:function J0(){return new D0}},{provide:ty,useClass:Q0},{provide:qn.RendererFactory2,useFactory:function Z0(W,n,l){return new cv(W,n,l)},deps:[t.\u0275DomRendererFactory2,ty,qn.NgZone]}],oy=[{provide:Ko,useFactory:()=>new Wb},{provide:ry,useValue:"BrowserAnimations"},...sy],Mm=[{provide:Ko,useClass:lm},{provide:ry,useValue:"NoopAnimations"},...sy];let q0=(()=>{class W{static withConfig(l){return{ngModule:W,providers:l.disableAnimations?Mm:oy}}}return W.\u0275fac=function(l){return new(l||W)},W.\u0275mod=qn.\u0275\u0275defineNgModule({type:W}),W.\u0275inj=qn.\u0275\u0275defineInjector({providers:oy,imports:[t.BrowserModule]}),W})();var xc=r(11735),ay=r(42466),ex=r(30745),Qp=r(25231),uv=r(27766);const nx=[{path:"project/5445",redirectTo:"capex"},{path:"project/5415",redirectTo:"smartware"},{path:"re",component:r(93144).e},{path:"wrs",redirectTo:"/project/workerreadiness/dash/2638"},{path:"project/5448",redirectTo:"prm"},{path:"project",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828)]).then(r.bind(r,29666)).then(W=>W.PulseModule)},{path:"sges",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(592),r.e(476)]).then(r.bind(r,19476)).then(W=>W.SGESModule)},{path:"onesrm",redirectTo:"smartware"},{path:"smartware",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(808)]).then(r.bind(r,80808)).then(W=>W.OneSRMModule)},{path:uv.A.GfbBase,loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(463),r.e(392),r.e(592),r.e(317)]).then(r.bind(r,81317)).then(W=>W.GfbModule)},{path:uv.A.GfbMoBase,loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(463),r.e(392),r.e(629)]).then(r.bind(r,13629)).then(W=>W.GfbMoModule)},{path:uv.A.GfbSeBase,loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(463),r.e(392),r.e(259)]).then(r.bind(r,32259)).then(W=>W.GfbSeModule)},{path:Qp.M.config.base,loadChildren:()=>Promise.all([r.e(290),r.e(64),r.e(463),r.e(592),r.e(351)]).then(r.bind(r,14720)).then(W=>W.CmappModule)},{path:Qp.M.configMo.base,loadChildren:()=>Promise.all([r.e(290),r.e(64),r.e(463),r.e(592),r.e(351)]).then(r.bind(r,14720)).then(W=>W.CmappModule)},{path:Qp.M.configSe.base,loadChildren:()=>Promise.all([r.e(290),r.e(64),r.e(463),r.e(592),r.e(351)]).then(r.bind(r,14720)).then(W=>W.CmappModule)},{path:Qp.M.configShs.base,loadChildren:()=>Promise.all([r.e(290),r.e(64),r.e(463),r.e(592),r.e(351)]).then(r.bind(r,14720)).then(W=>W.CmappModule)},{path:"capex",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(395)]).then(r.bind(r,73395)).then(W=>W.CapexModule)},{path:"demo",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(695)]).then(r.bind(r,93695)).then(W=>W.DemoModule)},{path:"prm",loadChildren:()=>Promise.all([r.e(290),r.e(592),r.e(708)]).then(r.bind(r,8708)).then(W=>W.PrmModule)},{path:"talent-profile",loadChildren:()=>Promise.all([r.e(290),r.e(742),r.e(64),r.e(828),r.e(898)]).then(r.bind(r,16898)).then(W=>W.TalentProfileModule)},{path:"",loadChildren:()=>r.e(900).then(r.bind(r,11900)).then(W=>W.LandingPageModule)}];let ix=(()=>{class W{}return W.\u0275fac=function(l){return new(l||W)},W.\u0275mod=qn.\u0275\u0275defineNgModule({type:W}),W.\u0275inj=qn.\u0275\u0275defineInjector({providers:[],imports:[[xc.Bz.forRoot(nx,{useHash:!1,scrollPositionRestoration:"enabled",anchorScrolling:"enabled",relativeLinkResolution:"legacy"})],xc.Bz]}),W})();var oh=r(9133),Sm=r(62474),Jp=r(27671);function eb(W,n){if(1&W&&(qn.\u0275\u0275elementStart(0,"a",2),qn.\u0275\u0275text(1),qn.\u0275\u0275elementEnd()),2&W){const l=qn.\u0275\u0275nextContext();qn.\u0275\u0275property("href",l.commit.url,qn.\u0275\u0275sanitizeUrl),qn.\u0275\u0275advance(1),qn.\u0275\u0275textInterpolate(l.commit.hash)}}function ly(W,n){1&W&&(qn.\u0275\u0275elementContainerStart(0),qn.\u0275\u0275element(1,"router-outlet"),qn.\u0275\u0275elementContainerEnd())}let ld=(()=>{class W{constructor(l,k,ne,ge,Ie,Je){this.variables=l,this._usertrackingService=Ie,this.http=Je,this.title="pulse",this.pulseReferrer=null,this.http.get("./assets/json/commitHash.json").toPromise().then(pt=>{pt&&(this.commit=pt)}),ge.checkCredentials(),ne.events.subscribe(pt=>{if(pt instanceof xc.OD){const Tt=pt.url;Tt.startsWith("/gfb-se")?k.addClass(document.getElementsByTagName("body")[0],"theme-purple"):Tt.startsWith(`/${uv.A.GetBase()}`)||Tt.startsWith(`/${Qp.M.GetConfig("base")}`)?k.addClass(document.getElementsByTagName("body")[0],"theme-teal"):Tt.startsWith("/talent-profile")?k.addClass(document.getElementsByTagName("body")[0],"theme-new"):k.addClass(document.getElementsByTagName("body")[0],"theme-dark")}pt instanceof xc.m2&&(this._usertrackingService.trackRoute(window.location.href,this.pulseReferrer?this.pulseReferrer:document.referrer,null),this.pulseReferrer=window.location.href)})}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275directiveInject(oh.a),qn.\u0275\u0275directiveInject(qn.Renderer2),qn.\u0275\u0275directiveInject(xc.F0),qn.\u0275\u0275directiveInject(Sm.f),qn.\u0275\u0275directiveInject(Jp.r),qn.\u0275\u0275directiveInject(Sd.eN))},W.\u0275cmp=qn.\u0275\u0275defineComponent({type:W,selectors:[["pulse-root"]],decls:2,vars:2,consts:[["class","commit-hash",3,"href",4,"ngIf"],[4,"ngIf"],[1,"commit-hash",3,"href"]],template:function(l,k){1&l&&(qn.\u0275\u0275template(0,eb,2,2,"a",0),qn.\u0275\u0275template(1,ly,2,0,"ng-container",1)),2&l&&(qn.\u0275\u0275property("ngIf",k.commit&&k.commit.hash),qn.\u0275\u0275advance(1),qn.\u0275\u0275property("ngIf",k.variables.isAuth||k.variables.hasError))},directives:[Hh.O5,xc.lC],styles:[".commit-hash[_ngcontent-%COMP%]{position:absolute;top:0;right:0;font-size:10px;background-color:#01010180;color:#fff}"]}),W})();var cy=r(54620);function dv(W,n){if(1&W&&(qn.\u0275\u0275elementStart(0,"a",11),qn.\u0275\u0275text(1," Ask for Access "),qn.\u0275\u0275elementEnd()),2&W){const l=qn.\u0275\u0275nextContext(2);qn.\u0275\u0275property("href",null==l.error?null:l.error.link,qn.\u0275\u0275sanitizeUrl)}}function Em(W,n){1&W&&(qn.\u0275\u0275elementStart(0,"a",12),qn.\u0275\u0275text(1," Back to Pulse "),qn.\u0275\u0275elementEnd())}function tb(W,n){if(1&W&&(qn.\u0275\u0275elementStart(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h1",5),qn.\u0275\u0275text(5),qn.\u0275\u0275elementEnd(),qn.\u0275\u0275elementStart(6,"h3",5),qn.\u0275\u0275text(7),qn.\u0275\u0275elementEnd(),qn.\u0275\u0275element(8,"br"),qn.\u0275\u0275elementStart(9,"p",5),qn.\u0275\u0275text(10,"You may want to head back to the homepage. If you think something is broken, report a problem."),qn.\u0275\u0275elementEnd(),qn.\u0275\u0275element(11,"br")(12,"br"),qn.\u0275\u0275elementStart(13,"div",6),qn.\u0275\u0275template(14,dv,2,1,"a",7),qn.\u0275\u0275template(15,Em,2,0,"a",8),qn.\u0275\u0275elementEnd(),qn.\u0275\u0275elementStart(16,"div",9)(17,"a",10),qn.\u0275\u0275text(18," Report a problem "),qn.\u0275\u0275elementEnd()()()()()()),2&W){const l=qn.\u0275\u0275nextContext();qn.\u0275\u0275advance(5),qn.\u0275\u0275textInterpolate(null==l.error?null:l.error.code),qn.\u0275\u0275advance(2),qn.\u0275\u0275textInterpolate(null==l.error?null:l.error.msg),qn.\u0275\u0275advance(7),qn.\u0275\u0275property("ngIf",null==l.error?null:l.error.link),qn.\u0275\u0275advance(1),qn.\u0275\u0275property("ngIf",!(null!=l.error&&l.error.link))}}let rx=(()=>{class W{constructor(l,k,ne,ge){this.router=l,this.route=k,this.projectService=ne,this.errors=[{code:301,msg:"The page you are looking for has been moved, you are being forwarded."},{code:401,msg:"Unauthorized, please sign in to access the content"},{code:403,msg:"Forbidden, you are not authorized to view this page",link:"mailto:pulse@siemens.com"},{code:404,msg:"Oops, the page you're looking for does not exist."},{code:408,msg:"Timeout, the request seems to be to heavy."}]}ngOnInit(){location.href.toLowerCase().indexOf("actions?")>0&&this.projectService.setProject(this.route.snapshot.url[0].path).then(k=>{if(k){const ge=location.href.toLowerCase().split("?")[1].split("&"),Ie={};ge.forEach(Je=>{const pt=Je.split("=");Ie[pt[0]]=!(pt.length>1)||pt[1]}),this.router.navigate(["/project",k.id,"action","management"],{queryParams:Ie})}}).catch(k=>{this.error=this.errors.find(ne=>404===ne.code)});const l=+this.route.snapshot.params.code;if(l){this.error={code:0,msg:"",link:""},this.error.code=l;const k=this.route.snapshot.queryParams.msg,ne=this.route.snapshot.queryParams.link;k||(this.error=this.errors.find(ge=>ge.code===l),this.error||(this.error=this.errors.find(ge=>404===ge.code))),k&&k.length>0&&(this.error.msg=k),ne&&(this.error.link=ne)}else this.projectService.setProject(this.route.snapshot.url[0].path).then(k=>{k&&this.router.navigate(["/project",k.id])}).catch(k=>{this.error=this.errors.find(ne=>404===ne.code)}),this.error=this.errors.find(k=>301===k.code)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275directiveInject(xc.F0),qn.\u0275\u0275directiveInject(xc.gz),qn.\u0275\u0275directiveInject(cy.k),qn.\u0275\u0275directiveInject(oh.a))},W.\u0275cmp=qn.\u0275\u0275defineComponent({type:W,selectors:[["pulse-error"]],decls:1,vars:1,consts:[["class","background",4,"ngIf"],[1,"background"],[1,"overlay"],[1,"error-box"],[1,"error-body"],[1,"white"],[1,"pull-left"],["class","pulse-btn btn back",3,"href",4,"ngIf"],["routerLink","/","class","pulse-btn btn back",4,"ngIf"],[1,"pull-right"],["href","mailto:pulse@siemens.com?subject=BugReport",1,"pulse-btn","btn","problem"],[1,"pulse-btn","btn","back",3,"href"],["routerLink","/",1,"pulse-btn","btn","back"]],template:function(l,k){1&l&&qn.\u0275\u0275template(0,tb,19,4,"div",0),2&l&&qn.\u0275\u0275property("ngIf",k.error)},directives:[Hh.O5,xc.yS],styles:[".background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;min-width:100%;min-height:100%;background:url(/src/../assets/img/van-logo.svg) no-repeat center fixed;background-size:cover}.overlay[_ngcontent-%COMP%]{background:rgba(0,0,0,.4);position:absolute;top:0;bottom:0;right:0;left:0}.error-box[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;min-height:24em}.error-body[_ngcontent-%COMP%]{width:30%;background:linear-gradient(to right,#50bebe,0,#41aaaa,#0099cb 100%);padding:25px;box-shadow:3px 3px 10px #888}.pull-left[_ngcontent-%COMP%]{float:left}.pull-right[_ngcontent-%COMP%]{float:right}.white[_ngcontent-%COMP%]{color:#fff}.btn[_ngcontent-%COMP%]{border:none;color:#fff}.btn.back[_ngcontent-%COMP%]{background-color:#c34673}.btn.problem[_ngcontent-%COMP%]{background-color:#faa50a}"]}),W})();const nb=[{path:"error/:code",component:rx},{path:"**",component:rx}];let hv=(()=>{class W{}return W.\u0275fac=function(l){return new(l||W)},W.\u0275mod=qn.\u0275\u0275defineNgModule({type:W}),W.\u0275inj=qn.\u0275\u0275defineInjector({imports:[[xc.Bz.forChild(nb)],xc.Bz]}),W})(),pv=(()=>{class W{}return W.\u0275fac=function(l){return new(l||W)},W.\u0275mod=qn.\u0275\u0275defineNgModule({type:W}),W.\u0275inj=qn.\u0275\u0275defineInjector({imports:[[hv,Hh.ez]]}),W})();var ib=r(90303);let rb=(()=>{class W extends xc.sz{parse(l){return super.parse(l.toLowerCase())}}return W.\u0275fac=function(){let n;return function(k){return(n||(n=qn.\u0275\u0275getInheritedFactory(W)))(k||W)}}(),W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();var fv=r(68896);let sx=(()=>{class W{constructor(l){this.variables=l}intercept(l,k){const ne=this.variables.projectId;let ge=this.variables.getCredentials();if(l.url.startsWith(this.variables.oldApiUrl)||l.url.startsWith(this.variables.apiUrl)){if(!ge)return fv.E;ne&&(ge=atob(ge),ge=btoa(ge+";"+ne));const Ie=l.headers.append("Authorization",`Basic ${ge}`);return l=l.clone({headers:Ie,withCredentials:!0}),k.handle(l)}return l.url.startsWith("https://auth.pulse.siemens.cloud")?(l=l.clone({withCredentials:!0}),k.handle(l)):(l.url.startsWith("https://dbi1.pulse.siemens.cloud")&&(l=l.clone({withCredentials:!0})),k.handle(l))}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(oh.a))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();var Tm=r(75531);let ox=(()=>{class W{constructor(l,k){this.variables=l,this.languageService=k}intercept(l,k){if(l.url.startsWith(this.variables.oldApiUrl)&&!l.url.includes("/ActionAttachment/Upload")&&!l.url.includes("/project/updateexcel")&&this.languageService._projectLanguage){const ne=l.headers.append("Content-Type","application/json").append("Accept-Language",this.languageService._projectLanguage);l=l.clone({headers:ne})}return k.handle(l)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(oh.a),qn.\u0275\u0275inject(Tm.T))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();var sb=r(16296);let ob=(()=>{class W{constructor(l,k,ne,ge,Ie){this.variables=l,this.sgesService=k,this.webApi=ne,this.langService=ge,this.http=Ie}intercept(l,k){const ne=window.location.pathname;if(ne.toLowerCase().startsWith("/sges"))return window.location.href="https://siemens.pulse.cloud/project/9/survey-reporting/19059/dashboard",fv.E;if(ne.toLowerCase().startsWith("/pulse-check-covid-19")&&l.url.indexOf("add1.pulse.siemens.cloud/api/language/GetTranslationsByLangCode")>-1){const Ie=this.langService._languages.map(Tt=>Tt.key),Je={credentials:localStorage.getItem("credentials"),langCode:Ie};return this.http.post("https://oyo0vb4ku6.execute-api.eu-west-1.amazonaws.com/production/corona/translation",Je).toPromise().then(Tt=>{Ie.forEach(rn=>{this.langService._cache.set(rn+5564,Tt[rn])}),this.langService._translations=Tt[this.langService._languageCode]}),fv.E}return k.handle(l)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(oh.a),qn.\u0275\u0275inject(sb.N),qn.\u0275\u0275inject(Sm.f),qn.\u0275\u0275inject(Tm.T),qn.\u0275\u0275inject(Sd.eN))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})(),Gb=(()=>{class W{constructor(l){this.variables=l}intercept(l,k){if(!this.variables.enableCache&&!l.params.has("cached")){const ne=l.params.append("cached","false");l=l.clone({params:ne})}return k.handle(l)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(oh.a))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})(),uy=(()=>{class W{constructor(l){this.variables=l}intercept(l,k){return!l.url.startsWith("http")&&!l.url.startsWith("wss")&&!l.url.startsWith(".")&&(l=l.clone({url:this.variables.oldApiUrl+l.url})),k.handle(l)}}return W.\u0275fac=function(l){return new(l||W)(qn.\u0275\u0275inject(oh.a))},W.\u0275prov=qn.\u0275\u0275defineInjectable({token:W,factory:W.\u0275fac}),W})();var dy=r(23328),ax=r(36011);(0,Hh.qS)(Vy,[[["Mitternacht","morgens","vorm.","mittags","nachm.","abends","nachts"],void 0,["Mitternacht","morgens","vormittags","mittags","nachmittags","abends","nachts"]],[["Mitternacht","Morgen","Vorm.","Mittag","Nachm.","Abend","Nacht"],void 0,["Mitternacht","Morgen","Vormittag","Mittag","Nachmittag","Abend","Nacht"]],["00:00",["05:00","10:00"],["10:00","12:00"],["12:00","13:00"],["13:00","18:00"],["18:00","24:00"],["00:00","05:00"]]]);const hy=[{provide:Sd.TP,useClass:uy,multi:!0},{provide:Sd.TP,useClass:ob,multi:!0},{provide:Sd.TP,useClass:sx,multi:!0},{provide:Sd.TP,useClass:Gb,multi:!0},{provide:Sd.TP,useClass:ox,multi:!0}];function py(W,n,l){return new Tm.T(W,n,l)}let ab=(()=>{class W{}return W.\u0275fac=function(l){return new(l||W)},W.\u0275mod=qn.\u0275\u0275defineNgModule({type:W,bootstrap:[ld]}),W.\u0275inj=qn.\u0275\u0275defineInjector({providers:[Jp.r,Sm.f,ib.J,cy.k,dy.s,hy,{provide:xc.Hx,useClass:rb}],imports:[[t.BrowserModule,Hh.ez,q0,ay.aw.forRoot({loader:{provide:ay.Zw,useFactory:py,deps:[Sm.f,cy.k]}}),ax.m,ix,ex.Hd.forRoot(),pv]]}),W})();var lx=r(92340);lx.N.production&&(0,qn.enableProdMode)(),t.platformBrowser().bootstrapModule(ab).then(W=>{if(!lx.N.production){const l=W.injector.get(qn.ApplicationRef).components[0];(0,t.enableDebugTools)(l)}}).catch(W=>console.log(W))},14356:(Se,pe,r)=>{"use strict";r.d(pe,{Nv:()=>x,dL:()=>g,sS:()=>i});var t=r(5e3),e=r(8929),a=r(80013),s=r(69808);function o(m,E){if(1&m&&(t.\u0275\u0275elementStart(0,"div",3),t.\u0275\u0275element(1,"div",4),t.\u0275\u0275elementEnd()),2&m){const C=t.\u0275\u0275nextContext(2);t.\u0275\u0275styleProp("color",C.color),t.\u0275\u0275advance(1),t.\u0275\u0275styleProp("width",C.diameter)("height",C.diameter)}}function d(m,E){if(1&m&&(t.\u0275\u0275elementStart(0,"div",5)(1,"div",6),t.\u0275\u0275element(2,"div",7),t.\u0275\u0275elementEnd()()),2&m){const C=t.\u0275\u0275nextContext().ngIf,v=t.\u0275\u0275nextContext();t.\u0275\u0275styleProp("color",v.color),t.\u0275\u0275advance(1),t.\u0275\u0275styleProp("background",v.color)("height",v.height)("width",C+"%"),t.\u0275\u0275advance(1),t.\u0275\u0275styleProp("height",v.height)}}function u(m,E){if(1&m&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,o,2,6,"div",1),t.\u0275\u0275template(2,d,3,10,"div",2),t.\u0275\u0275elementContainerEnd()),2&m){const C=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",C.includeSpinner),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",C.includeBar)}}class g{constructor(E){this.platformId=E,this.progress$=(new e.xQ).pipe((0,a.b)(0)),this._pendingRequests=0,this._value=0}start(E=2){++this._pendingRequests,(0===this._value||1===this._pendingRequests)&&this.set(1===this._pendingRequests&&this._value>0?this._value:E)}stop(){for(this.complete();this._pendingRequests>0;)this.complete()}complete(){0===this._pendingRequests&&0===this._value||(this._pendingRequests>0&&--this._pendingRequests,(0===this._pendingRequests||0===this._pendingRequests&&this._value>0)&&(100!==this._value&&this.set(100),setTimeout(()=>this.set(0),500)))}set(E){(0,s.NF)(this.platformId)?(0===E&&this._pendingRequests>0&&(E=2),this._value=E,this.progress$.next(E),0!==this._pendingRequests&&(clearTimeout(this._incTimeout),this._value>0&&this._value<100&&(this._incTimeout=setTimeout(()=>this.increment(),250)))):this._pendingRequests=0}increment(E=0){E>0&&this.set(this._value+E);const C=this._value;E=C>=0&&C<25?3*Math.random()+3:C>=25&&C<65?3*Math.random():C>=65&&C<90?2*Math.random():C>=90&&C<99?.5:0,this.set(this._value+E)}ngOnDestroy(){this.progress$.complete()}}g.\u0275fac=function(E){return new(E||g)(t.\u0275\u0275inject(t.PLATFORM_ID))},g.\u0275prov=t.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac,providedIn:"root"}),g.ngInjectableDef=(0,t.defineInjectable)({factory:function(){return new g((0,t.inject)(t.PLATFORM_ID))},token:g,providedIn:"root"});let x=(()=>{class m{constructor(C){this.loader=C,this.includeSpinner=!0,this.includeBar=!0,this.fixed=!0,this.value=null}}return m.\u0275fac=function(C){return new(C||m)(t.\u0275\u0275directiveInject(g))},m.\u0275cmp=t.\u0275\u0275defineComponent({type:m,selectors:[["ngx-loading-bar"]],hostVars:2,hostBindings:function(C,v){2&C&&t.\u0275\u0275classProp("loading-bar-fixed",v.fixed)},inputs:{includeSpinner:"includeSpinner",includeBar:"includeBar",fixed:"fixed",value:"value",color:"color",height:"height",diameter:"diameter"},decls:2,vars:3,consts:[[4,"ngIf"],["id","loading-bar-spinner",3,"color",4,"ngIf"],["id","loading-bar",3,"color",4,"ngIf"],["id","loading-bar-spinner"],[1,"spinner-icon"],["id","loading-bar"],[1,"bar"],[1,"peg"]],template:function(C,v){1&C&&(t.\u0275\u0275template(0,u,3,2,"ng-container",0),t.\u0275\u0275pipe(1,"async")),2&C&&t.\u0275\u0275property("ngIf",null!==v.value?v.value:t.\u0275\u0275pipeBind1(1,1,v.loader.progress$))},directives:[s.O5],pipes:[s.Ov],styles:["[_nghost-%COMP%]{position:relative;display:block}.loading-bar-fixed[_nghost-%COMP%] > div[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{position:fixed}.loading-bar-fixed[_nghost-%COMP%] > div#loading-bar-spinner[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}[dir=rtl] .loading-bar-fixed[_nghost-%COMP%] > div#loading-bar-spinner[_ngcontent-%COMP%]{right:10px;left:unset}.loading-bar-fixed[_nghost-%COMP%] > div[_ngcontent-%COMP%] .peg[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:none;transition:350ms linear;color:#29d}[_nghost-%COMP%] > div[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{transition:width 350ms;background:#29d;position:absolute;z-index:10002;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}[dir=rtl] [_nghost-%COMP%] > div[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{right:0;left:unset}[_nghost-%COMP%] > div[_ngcontent-%COMP%] .peg[_ngcontent-%COMP%]{display:none;position:absolute;width:70px;right:0;top:0;height:2px;opacity:.45;box-shadow:1px 0 6px 1px;color:inherit;border-radius:100%}[_nghost-%COMP%] > div#loading-bar-spinner[_ngcontent-%COMP%]{display:block;position:absolute;z-index:10002;top:5px;left:0}[_nghost-%COMP%] > div#loading-bar-spinner[_ngcontent-%COMP%] .spinner-icon[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid transparent;border-top-color:inherit;border-left-color:inherit;border-radius:50%;-webkit-animation:.4s linear infinite loading-bar-spinner;animation:.4s linear infinite loading-bar-spinner}@-webkit-keyframes loading-bar-spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading-bar-spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"]}),m})(),i=(()=>{class m{}return m.\u0275fac=function(C){return new(C||m)},m.\u0275mod=t.\u0275\u0275defineNgModule({type:m}),m.\u0275inj=t.\u0275\u0275defineInjector({imports:[[s.ez]]}),m})()},42466:(Se,pe,r)=>{"use strict";r.d(pe,{Zw:()=>m,aw:()=>R,sK:()=>c});var t=r(5e3),e=r(21086),a=r(36787),s=r(56498),o=r(61221),d=r(72986),u=r(12474),g=r(24850),x=r(40963),i=r(87545);class m{}let E=(()=>{class D extends m{getTranslation(_){return(0,e.of)({})}}return D.\u0275fac=function(){let Y;return function(y){return(Y||(Y=t.\u0275\u0275getInheritedFactory(D)))(y||D)}}(),D.\u0275prov=t.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})();class C{}let v=(()=>{class D{handle(_){return _.key}}return D.\u0275fac=function(_){return new(_||D)},D.\u0275prov=t.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})();class h{}let S=(()=>{class D extends h{compile(_,y){return _}compileTranslations(_,y){return _}}return D.\u0275fac=function(){let Y;return function(y){return(Y||(Y=t.\u0275\u0275getInheritedFactory(D)))(y||D)}}(),D.\u0275prov=t.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})();function L(D){return null!=D}function N(D){return D&&"object"==typeof D&&!Array.isArray(D)}function j(D,Y){let _=Object.assign({},D);return N(D)&&N(Y)&&Object.keys(Y).forEach(y=>{N(Y[y])?y in D?_[y]=j(D[y],Y[y]):Object.assign(_,{[y]:Y[y]}):Object.assign(_,{[y]:Y[y]})}),_}class P{}let I=(()=>{class D extends P{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(_,y){let H;return H="string"==typeof _?this.interpolateString(_,y):"function"==typeof _?this.interpolateFunction(_,y):_,H}getValue(_,y){let H=y.split(".");y="";do{y+=H.shift(),!L(_)||!L(_[y])||"object"!=typeof _[y]&&H.length?H.length?y+=".":_=void 0:(_=_[y],y="")}while(H.length);return _}interpolateFunction(_,y){return _(y)}interpolateString(_,y){return y?_.replace(this.templateMatcher,(H,$)=>{let K=this.getValue(y,$);return L(K)?K:H}):_}}return D.\u0275fac=function(){let Y;return function(y){return(Y||(Y=t.\u0275\u0275getInheritedFactory(D)))(y||D)}}(),D.\u0275prov=t.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})();class A{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new t.EventEmitter,this.onLangChange=new t.EventEmitter,this.onDefaultLangChange=new t.EventEmitter}}const O=new t.InjectionToken("USE_STORE"),T=new t.InjectionToken("USE_DEFAULT_LANG");let c=(()=>{class D{constructor(_,y,H,$,K,z=!0,G=!1){this.store=_,this.currentLoader=y,this.compiler=H,this.parser=$,this.missingTranslationHandler=K,this.useDefaultLang=z,this.isolate=G,this.pending=!1,this._onTranslationChange=new t.EventEmitter,this._onLangChange=new t.EventEmitter,this._onDefaultLangChange=new t.EventEmitter,this._langs=[],this._translations={},this._translationRequests={}}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(_){this.isolate?this._defaultLang=_:this.store.defaultLang=_}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(_){this.isolate?this._currentLang=_:this.store.currentLang=_}get langs(){return this.isolate?this._langs:this.store.langs}set langs(_){this.isolate?this._langs=_:this.store.langs=_}get translations(){return this.isolate?this._translations:this.store.translations}set translations(_){this.isolate?this._translations=_:this.store.translations=_}setDefaultLang(_){if(_===this.defaultLang)return;let y=this.retrieveTranslations(_);void 0!==y?(this.defaultLang||(this.defaultLang=_),y.pipe((0,d.q)(1)).subscribe(H=>{this.changeDefaultLang(_)})):this.changeDefaultLang(_)}getDefaultLang(){return this.defaultLang}use(_){if(_===this.currentLang)return(0,e.of)(this.translations[_]);let y=this.retrieveTranslations(_);return void 0!==y?(this.currentLang||(this.currentLang=_),y.pipe((0,d.q)(1)).subscribe(H=>{this.changeLang(_)}),y):(this.changeLang(_),(0,e.of)(this.translations[_]))}retrieveTranslations(_){let y;return void 0===this.translations[_]&&(this._translationRequests[_]=this._translationRequests[_]||this.getTranslation(_),y=this._translationRequests[_]),y}getTranslation(_){this.pending=!0;const y=this.currentLoader.getTranslation(_).pipe((0,u.B)());return this.loadingTranslations=y.pipe((0,d.q)(1),(0,g.U)(H=>this.compiler.compileTranslations(H,_)),(0,u.B)()),this.loadingTranslations.subscribe(H=>{this.translations[_]=H,this.updateLangs(),this.pending=!1},H=>{this.pending=!1}),y}setTranslation(_,y,H=!1){y=this.compiler.compileTranslations(y,_),this.translations[_]=H&&this.translations[_]?j(this.translations[_],y):y,this.updateLangs(),this.onTranslationChange.emit({lang:_,translations:this.translations[_]})}getLangs(){return this.langs}addLangs(_){_.forEach(y=>{-1===this.langs.indexOf(y)&&this.langs.push(y)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(_,y,H){let $;if(y instanceof Array){let K={},z=!1;for(let G of y)K[G]=this.getParsedResult(_,G,H),"function"==typeof K[G].subscribe&&(z=!0);if(z){let G;for(let Z of y){let B="function"==typeof K[Z].subscribe?K[Z]:(0,e.of)(K[Z]);G=void 0===G?B:(0,a.T)(G,B)}return G.pipe((0,x.q)(),(0,g.U)(Z=>{let B={};return Z.forEach((X,ee)=>{B[y[ee]]=X}),B}))}return K}if(_&&($=this.parser.interpolate(this.parser.getValue(_,y),H)),void 0===$&&this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&($=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],y),H)),void 0===$){let K={key:y,translateService:this};void 0!==H&&(K.interpolateParams=H),$=this.missingTranslationHandler.handle(K)}return void 0!==$?$:y}get(_,y){if(!L(_)||!_.length)throw new Error('Parameter "key" required');if(this.pending)return s.y.create(H=>{let $=z=>{H.next(z),H.complete()},K=z=>{H.error(z)};this.loadingTranslations.subscribe(z=>{"function"==typeof(z=this.getParsedResult(z,_,y)).subscribe?z.subscribe($,K):$(z)},K)});{let H=this.getParsedResult(this.translations[this.currentLang],_,y);return"function"==typeof H.subscribe?H:(0,e.of)(H)}}stream(_,y){if(!L(_)||!_.length)throw new Error('Parameter "key" required');return(0,o.z)(this.get(_,y),this.onLangChange.pipe((0,i.w)(H=>{const $=this.getParsedResult(H.translations,_,y);return"function"==typeof $.subscribe?$:(0,e.of)($)})))}instant(_,y){if(!L(_)||!_.length)throw new Error('Parameter "key" required');let H=this.getParsedResult(this.translations[this.currentLang],_,y);if(void 0!==H.subscribe){if(_ instanceof Array){let $={};return _.forEach((K,z)=>{$[_[z]]=_[z]}),$}return _}return H}set(_,y,H=this.currentLang){this.translations[H][_]=this.compiler.compile(y,H),this.updateLangs(),this.onTranslationChange.emit({lang:H,translations:this.translations[H]})}changeLang(_){this.currentLang=_,this.onLangChange.emit({lang:_,translations:this.translations[_]}),this.defaultLang||this.changeDefaultLang(_)}changeDefaultLang(_){this.defaultLang=_,this.onDefaultLangChange.emit({lang:_,translations:this.translations[_]})}reloadLang(_){return this.resetLang(_),this.getTranslation(_)}resetLang(_){this._translationRequests[_]=void 0,this.translations[_]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let _=window.navigator.languages?window.navigator.languages[0]:null;return _=_||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,-1!==_.indexOf("-")&&(_=_.split("-")[0]),-1!==_.indexOf("_")&&(_=_.split("_")[0]),_}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let _=window.navigator.languages?window.navigator.languages[0]:null;return _=_||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,_}}return D.\u0275fac=function(_){return new(_||D)(t.\u0275\u0275inject(A),t.\u0275\u0275inject(m),t.\u0275\u0275inject(h),t.\u0275\u0275inject(P),t.\u0275\u0275inject(C),t.\u0275\u0275inject(T),t.\u0275\u0275inject(O))},D.\u0275prov=t.\u0275\u0275defineInjectable({token:D,factory:D.\u0275fac}),D})(),R=(()=>{class D{static forRoot(_={}){return{ngModule:D,providers:[_.loader||{provide:m,useClass:E},_.compiler||{provide:h,useClass:S},_.parser||{provide:P,useClass:I},_.missingTranslationHandler||{provide:C,useClass:v},A,{provide:O,useValue:_.isolate},{provide:T,useValue:_.useDefaultLang},c]}}static forChild(_={}){return{ngModule:D,providers:[_.loader||{provide:m,useClass:E},_.compiler||{provide:h,useClass:S},_.parser||{provide:P,useClass:I},_.missingTranslationHandler||{provide:C,useClass:v},{provide:O,useValue:_.isolate},{provide:T,useValue:_.useDefaultLang},c]}}}return D.\u0275fac=function(_){return new(_||D)},D.\u0275mod=t.\u0275\u0275defineNgModule({type:D}),D.\u0275inj=t.\u0275\u0275defineInjector({}),D})()},67795:(Se,pe,r)=>{"use strict";var e=r(5e3),a=r(93075),s=r(22313),o=r(2243),d=r(5e3);pe.wR={provide:a.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return x}),multi:!0};var x=function(){function E(C,v,h){this._renderer=C,this._elementRef=v,this._compositionMode=h,this.textMaskConfig={mask:[],guide:!0,placeholderChar:"_",pipe:void 0,keepCharPositions:!1},this.onChange=function(S){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function g(){var E=s.\u0275getDOM()?s.\u0275getDOM().getUserAgent():"";return/android (\d+)/.test(E.toLowerCase())}())}return E.prototype.ngOnChanges=function(C){this._setupMask(!0),void 0!==this.textMaskInputElement&&this.textMaskInputElement.update(this.inputElement.value)},E.prototype.writeValue=function(C){this._setupMask(),this._renderer.setProperty(this.inputElement,"value",null==C?"":C),void 0!==this.textMaskInputElement&&this.textMaskInputElement.update(C)},E.prototype.registerOnChange=function(C){this.onChange=C},E.prototype.registerOnTouched=function(C){this.onTouched=C},E.prototype.setDisabledState=function(C){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",C)},E.prototype._handleInput=function(C){(!this._compositionMode||this._compositionMode&&!this._composing)&&(this._setupMask(),void 0!==this.textMaskInputElement&&(this.textMaskInputElement.update(C),this.onChange(C=this.inputElement.value)))},E.prototype._setupMask=function(C){void 0===C&&(C=!1),this.inputElement||(this.inputElement="INPUT"===this._elementRef.nativeElement.tagName.toUpperCase()?this._elementRef.nativeElement:this._elementRef.nativeElement.getElementsByTagName("INPUT")[0]),this.inputElement&&C&&(this.textMaskInputElement=o.createTextMaskInputElement(Object.assign({inputElement:this.inputElement},this.textMaskConfig)))},E.prototype._compositionStart=function(){this._composing=!0},E.prototype._compositionEnd=function(C){this._composing=!1,this._compositionMode&&this._handleInput(C)},E.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[a.COMPOSITION_BUFFER_MODE]}]}]},E.propDecorators={textMaskConfig:[{type:e.Input,args:["textMask"]}]},E.\u0275fac=function(v){return new(v||E)(d.\u0275\u0275directiveInject(d.Renderer2),d.\u0275\u0275directiveInject(d.ElementRef),d.\u0275\u0275directiveInject(a.COMPOSITION_BUFFER_MODE,8))},E.\u0275dir=d.\u0275\u0275defineDirective({type:E,selectors:[["","textMask",""]],hostBindings:function(v,h){1&v&&d.\u0275\u0275listener("input",function(p){return h._handleInput(p.target.value)})("blur",function(){return h.onTouched()})("compositionstart",function(){return h._compositionStart()})("compositionend",function(p){return h._compositionEnd(p.target.value)})},inputs:{textMaskConfig:["textMask","textMaskConfig"]},exportAs:["textMask"],features:[d.\u0275\u0275ProvidersFeature([pe.wR]),d.\u0275\u0275NgOnChangesFeature]}),E}();pe.hd=x;var i=function(){function E(){}return E.ctorParameters=function(){return[]},E.\u0275fac=function(v){return new(v||E)},E.\u0275mod=d.\u0275\u0275defineNgModule({type:E}),E.\u0275inj=d.\u0275\u0275defineInjector({}),E}();pe.QA=i;var m=r(2243);pe.xm=m.conformToMask},77466:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(58319),r(9493),r(37865),r(53057),function(){var e=t,s=e.lib.BlockCipher,o=e.algo,d=[],u=[],g=[],x=[],i=[],m=[],E=[],C=[],v=[],h=[];!function(){for(var L=[],N=0;N<256;N++)L[N]=N<128?N<<1:N<<1^283;var j=0,P=0;for(N=0;N<256;N++){var I=P^P<<1^P<<2^P<<3^P<<4;d[j]=I=I>>>8^255&I^99,u[I]=j;var c,A=L[j],O=L[A],T=L[O];g[j]=(c=257*L[I]^16843008*I)<<24|c>>>8,x[j]=c<<16|c>>>16,i[j]=c<<8|c>>>24,m[j]=c,E[I]=(c=16843009*T^65537*O^257*A^16843008*j)<<24|c>>>8,C[I]=c<<16|c>>>16,v[I]=c<<8|c>>>24,h[I]=c,j?(j=A^L[L[L[T^A]]],P^=L[L[P]]):j=P=1}}();var S=[0,1,2,4,8,16,32,64,128,27,54],p=o.AES=s.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var L=this._keyPriorReset=this._key,N=L.words,j=L.sigBytes/4,I=4*((this._nRounds=j+6)+1),A=this._keySchedule=[],O=0;O6&&O%j==4&&(T=d[T>>>24]<<24|d[T>>>16&255]<<16|d[T>>>8&255]<<8|d[255&T]):(T=d[(T=T<<8|T>>>24)>>>24]<<24|d[T>>>16&255]<<16|d[T>>>8&255]<<8|d[255&T],T^=S[O/j|0]<<24),A[O]=A[O-j]^T}for(var c=this._invKeySchedule=[],M=0;M>>24]]^C[d[T>>>16&255]]^v[d[T>>>8&255]]^h[d[255&T]]}},encryptBlock:function(L,N){this._doCryptBlock(L,N,this._keySchedule,g,x,i,m,d)},decryptBlock:function(L,N){var j=L[N+1];L[N+1]=L[N+3],L[N+3]=j,this._doCryptBlock(L,N,this._invKeySchedule,E,C,v,h,u),j=L[N+1],L[N+1]=L[N+3],L[N+3]=j},_doCryptBlock:function(L,N,j,P,I,A,O,T){for(var c=this._nRounds,M=L[N]^j[0],w=L[N+1]^j[1],R=L[N+2]^j[2],D=L[N+3]^j[3],Y=4,_=1;_>>24]^I[w>>>16&255]^A[R>>>8&255]^O[255&D]^j[Y++],H=P[w>>>24]^I[R>>>16&255]^A[D>>>8&255]^O[255&M]^j[Y++],$=P[R>>>24]^I[D>>>16&255]^A[M>>>8&255]^O[255&w]^j[Y++],K=P[D>>>24]^I[M>>>16&255]^A[w>>>8&255]^O[255&R]^j[Y++];M=y,w=H,R=$,D=K}y=(T[M>>>24]<<24|T[w>>>16&255]<<16|T[R>>>8&255]<<8|T[255&D])^j[Y++],H=(T[w>>>24]<<24|T[R>>>16&255]<<16|T[D>>>8&255]<<8|T[255&M])^j[Y++],$=(T[R>>>24]<<24|T[D>>>16&255]<<16|T[M>>>8&255]<<8|T[255&w])^j[Y++],K=(T[D>>>24]<<24|T[M>>>16&255]<<16|T[w>>>8&255]<<8|T[255&R])^j[Y++],L[N]=y,L[N+1]=H,L[N+2]=$,L[N+3]=K},keySize:8});e.AES=s._createHelper(p)}(),t.AES)},53057:function(Se,pe,r){var a,s,o,d,u,g,i,E,C,h,S,p,N,P,A,O,c,M,t;Se.exports=(t=r(67585),r(37865),void(t.lib.Cipher||(a=t,s=a.lib,o=s.Base,d=s.WordArray,u=s.BufferedBlockAlgorithm,g=a.enc,i=g.Base64,E=a.algo.EvpKDF,C=s.Cipher=u.extend({cfg:o.extend(),createEncryptor:function(w,R){return this.create(this._ENC_XFORM_MODE,w,R)},createDecryptor:function(w,R){return this.create(this._DEC_XFORM_MODE,w,R)},init:function(w,R,D){this.cfg=this.cfg.extend(D),this._xformMode=w,this._key=R,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){return w&&this._append(w),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(R){return"string"==typeof R?M:O}return function(R){return{encrypt:function(D,Y,_){return w(Y).encrypt(R,D,Y,_)},decrypt:function(D,Y,_){return w(Y).decrypt(R,D,Y,_)}}}}()}),s.StreamCipher=C.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),h=a.mode={},S=s.BlockCipherMode=o.extend({createEncryptor:function(w,R){return this.Encryptor.create(w,R)},createDecryptor:function(w,R){return this.Decryptor.create(w,R)},init:function(w,R){this._cipher=w,this._iv=R}}),p=h.CBC=function(){var w=S.extend();function R(D,Y,_){var y=this._iv;if(y){var H=y;this._iv=undefined}else H=this._prevBlock;for(var $=0;$<_;$++)D[Y+$]^=H[$]}return w.Encryptor=w.extend({processBlock:function(D,Y){var _=this._cipher,y=_.blockSize;R.call(this,D,Y,y),_.encryptBlock(D,Y),this._prevBlock=D.slice(Y,Y+y)}}),w.Decryptor=w.extend({processBlock:function(D,Y){var _=this._cipher,y=_.blockSize,H=D.slice(Y,Y+y);_.decryptBlock(D,Y),R.call(this,D,Y,y),this._prevBlock=H}}),w}(),N=(a.pad={}).Pkcs7={pad:function(w,R){for(var D=4*R,Y=D-w.sigBytes%D,_=Y<<24|Y<<16|Y<<8|Y,y=[],H=0;H>>2]}},s.BlockCipher=C.extend({cfg:C.cfg.extend({mode:p,padding:N}),reset:function(){C.reset.call(this);var w=this.cfg,R=w.iv,D=w.mode;if(this._xformMode==this._ENC_XFORM_MODE)var Y=D.createEncryptor;else Y=D.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==Y?this._mode.init(this,R&&R.words):(this._mode=Y.call(D,this,R&&R.words),this._mode.__creator=Y)},_doProcessBlock:function(w,R){this._mode.processBlock(w,R)},_doFinalize:function(){var w=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){w.pad(this._data,this.blockSize);var R=this._process(!0)}else R=this._process(!0),w.unpad(R);return R},blockSize:4}),P=s.CipherParams=o.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),A=(a.format={}).OpenSSL={stringify:function(w){var R=w.ciphertext,D=w.salt;if(D)var Y=d.create([1398893684,1701076831]).concat(D).concat(R);else Y=R;return Y.toString(i)},parse:function(w){var R=i.parse(w),D=R.words;if(1398893684==D[0]&&1701076831==D[1]){var Y=d.create(D.slice(2,4));D.splice(0,4),R.sigBytes-=16}return P.create({ciphertext:R,salt:Y})}},O=s.SerializableCipher=o.extend({cfg:o.extend({format:A}),encrypt:function(w,R,D,Y){Y=this.cfg.extend(Y);var _=w.createEncryptor(D,Y),y=_.finalize(R),H=_.cfg;return P.create({ciphertext:y,key:D,iv:H.iv,algorithm:w,mode:H.mode,padding:H.padding,blockSize:w.blockSize,formatter:Y.format})},decrypt:function(w,R,D,Y){return Y=this.cfg.extend(Y),R=this._parse(R,Y.format),w.createDecryptor(D,Y).finalize(R.ciphertext)},_parse:function(w,R){return"string"==typeof w?R.parse(w,this):w}}),c=(a.kdf={}).OpenSSL={execute:function(w,R,D,Y){Y||(Y=d.random(8));var _=E.create({keySize:R+D}).compute(w,Y),y=d.create(_.words.slice(R),4*D);return _.sigBytes=4*R,P.create({key:_,iv:y,salt:Y})}},M=s.PasswordBasedCipher=O.extend({cfg:O.cfg.extend({kdf:c}),encrypt:function(w,R,D,Y){var _=(Y=this.cfg.extend(Y)).kdf.execute(D,w.keySize,w.ivSize);Y.iv=_.iv;var y=O.encrypt.call(this,w,R,_.key,Y);return y.mixIn(_),y},decrypt:function(w,R,D,Y){Y=this.cfg.extend(Y),R=this._parse(R,Y.format);var _=Y.kdf.execute(D,w.keySize,w.ivSize,R.salt);return Y.iv=_.iv,O.decrypt.call(this,w,R,_.key,Y)}}))))},67585:function(Se,pe){var t,a,s,o,d,u,g,x,i,m,E,v,r;Se.exports=(r=r||(t=Math,a=Object.create||function(){function h(){}return function(S){var p;return h.prototype=S,p=new h,h.prototype=null,p}}(),o=(s={}).lib={},d=o.Base={extend:function(h){var S=a(this);return h&&S.mixIn(h),(!S.hasOwnProperty("init")||this.init===S.init)&&(S.init=function(){S.$super.init.apply(this,arguments)}),S.init.prototype=S,S.$super=this,S},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var S in h)h.hasOwnProperty(S)&&(this[S]=h[S]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}},u=o.WordArray=d.extend({init:function(h,S){h=this.words=h||[],this.sigBytes=null!=S?S:4*h.length},toString:function(h){return(h||x).stringify(this)},concat:function(h){var S=this.words,p=h.words,L=this.sigBytes,N=h.sigBytes;if(this.clamp(),L%4)for(var j=0;j>>2]|=(p[j>>>2]>>>24-j%4*8&255)<<24-(L+j)%4*8;else for(j=0;j>>2]=p[j>>>2];return this.sigBytes+=N,this},clamp:function(){var h=this.words,S=this.sigBytes;h[S>>>2]&=4294967295<<32-S%4*8,h.length=t.ceil(S/4)},clone:function(){var h=d.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var N,S=[],p=function(I){I=I;var A=987654321,O=4294967295;return function(){var T=((A=36969*(65535&A)+(A>>16)&O)<<16)+(I=18e3*(65535&I)+(I>>16)&O)&O;return T/=4294967296,(T+=.5)*(t.random()>.5?1:-1)}},L=0;L>>2]>>>24-N%4*8&255;L.push((j>>>4).toString(16)),L.push((15&j).toString(16))}return L.join("")},parse:function(h){for(var S=h.length,p=[],L=0;L>>3]|=parseInt(h.substr(L,2),16)<<24-L%8*4;return new u.init(p,S/2)}},i=g.Latin1={stringify:function(h){for(var S=h.words,p=h.sigBytes,L=[],N=0;N>>2]>>>24-N%4*8&255));return L.join("")},parse:function(h){for(var S=h.length,p=[],L=0;L>>2]|=(255&h.charCodeAt(L))<<24-L%4*8;return new u.init(p,S)}},m=g.Utf8={stringify:function(h){try{return decodeURIComponent(escape(i.stringify(h)))}catch(S){throw new Error("Malformed UTF-8 data")}},parse:function(h){return i.parse(unescape(encodeURIComponent(h)))}},E=o.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(h){"string"==typeof h&&(h=m.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var S=this._data,p=S.words,L=S.sigBytes,N=this.blockSize,P=L/(4*N),I=(P=h?t.ceil(P):t.max((0|P)-this._minBufferSize,0))*N,A=t.min(4*I,L);if(I){for(var O=0;O>>2]>>>24-C%4*8&255)<<16|(x[C+1>>>2]>>>24-(C+1)%4*8&255)<<8|x[C+2>>>2]>>>24-(C+2)%4*8&255,L=0;L<4&&C+.75*L>>6*(3-L)&63));var N=m.charAt(64);if(N)for(;E.length%4;)E.push(N);return E.join("")},parse:function(g){var x=g.length,i=this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var E=0;E>>6-C%4*2;m[E>>>2]|=(v|h)<<24-E%4*8,E++}return s.create(m,E)}(g,x,m)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},t.enc.Base64)},79012:function(Se,pe,r){var t;Se.exports=(t=r(67585),function(){var s=t.lib.WordArray,o=t.enc;function u(g){return g<<8&4278255360|g>>>8&16711935}o.Utf16=o.Utf16BE={stringify:function(g){for(var x=g.words,i=g.sigBytes,m=[],E=0;E>>2]>>>16-E%4*8&65535));return m.join("")},parse:function(g){for(var x=g.length,i=[],m=0;m>>1]|=g.charCodeAt(m)<<16-m%2*16;return s.create(i,2*x)}},o.Utf16LE={stringify:function(g){for(var x=g.words,i=g.sigBytes,m=[],E=0;E>>2]>>>16-E%4*8&65535);m.push(String.fromCharCode(C))}return m.join("")},parse:function(g){for(var x=g.length,i=[],m=0;m>>1]|=u(g.charCodeAt(m)<<16-m%2*16);return s.create(i,2*x)}}}(),t.enc.Utf16)},37865:function(Se,pe,r){var e,a,s,o,d,g,t;Se.exports=(t=r(67585),r(75162),r(43764),o=(a=(e=t).lib).WordArray,g=(d=e.algo).EvpKDF=(s=a.Base).extend({cfg:s.extend({keySize:4,hasher:d.MD5,iterations:1}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,i){for(var m=this.cfg,E=m.hasher.create(),C=o.create(),v=C.words,h=m.keySize,S=m.iterations;v.lengthE&&(i=x.finalize(i)),i.clamp();for(var C=this._oKey=i.clone(),v=this._iKey=i.clone(),h=C.words,S=v.words,p=0;p>>2]|=u[i]<<24-i%4*8;o.call(this,x,g)}else o.apply(this,arguments)};d.prototype=s}}(),t.lib.WordArray)},9493:function(Se,pe,r){var t;Se.exports=(t=r(67585),function(e){var a=t,s=a.lib,o=s.WordArray,d=s.Hasher,u=a.algo,g=[];!function(){for(var v=0;v<64;v++)g[v]=4294967296*e.abs(e.sin(v+1))|0}();var x=u.MD5=d.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,h){for(var S=0;S<16;S++){var p=h+S,L=v[p];v[p]=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8)}var N=this._hash.words,j=v[h+0],P=v[h+1],I=v[h+2],A=v[h+3],O=v[h+4],T=v[h+5],c=v[h+6],M=v[h+7],w=v[h+8],R=v[h+9],D=v[h+10],Y=v[h+11],_=v[h+12],y=v[h+13],H=v[h+14],$=v[h+15],K=N[0],z=N[1],G=N[2],Z=N[3];K=i(K,z,G,Z,j,7,g[0]),Z=i(Z,K,z,G,P,12,g[1]),G=i(G,Z,K,z,I,17,g[2]),z=i(z,G,Z,K,A,22,g[3]),K=i(K,z,G,Z,O,7,g[4]),Z=i(Z,K,z,G,T,12,g[5]),G=i(G,Z,K,z,c,17,g[6]),z=i(z,G,Z,K,M,22,g[7]),K=i(K,z,G,Z,w,7,g[8]),Z=i(Z,K,z,G,R,12,g[9]),G=i(G,Z,K,z,D,17,g[10]),z=i(z,G,Z,K,Y,22,g[11]),K=i(K,z,G,Z,_,7,g[12]),Z=i(Z,K,z,G,y,12,g[13]),G=i(G,Z,K,z,H,17,g[14]),K=m(K,z=i(z,G,Z,K,$,22,g[15]),G,Z,P,5,g[16]),Z=m(Z,K,z,G,c,9,g[17]),G=m(G,Z,K,z,Y,14,g[18]),z=m(z,G,Z,K,j,20,g[19]),K=m(K,z,G,Z,T,5,g[20]),Z=m(Z,K,z,G,D,9,g[21]),G=m(G,Z,K,z,$,14,g[22]),z=m(z,G,Z,K,O,20,g[23]),K=m(K,z,G,Z,R,5,g[24]),Z=m(Z,K,z,G,H,9,g[25]),G=m(G,Z,K,z,A,14,g[26]),z=m(z,G,Z,K,w,20,g[27]),K=m(K,z,G,Z,y,5,g[28]),Z=m(Z,K,z,G,I,9,g[29]),G=m(G,Z,K,z,M,14,g[30]),K=E(K,z=m(z,G,Z,K,_,20,g[31]),G,Z,T,4,g[32]),Z=E(Z,K,z,G,w,11,g[33]),G=E(G,Z,K,z,Y,16,g[34]),z=E(z,G,Z,K,H,23,g[35]),K=E(K,z,G,Z,P,4,g[36]),Z=E(Z,K,z,G,O,11,g[37]),G=E(G,Z,K,z,M,16,g[38]),z=E(z,G,Z,K,D,23,g[39]),K=E(K,z,G,Z,y,4,g[40]),Z=E(Z,K,z,G,j,11,g[41]),G=E(G,Z,K,z,A,16,g[42]),z=E(z,G,Z,K,c,23,g[43]),K=E(K,z,G,Z,R,4,g[44]),Z=E(Z,K,z,G,_,11,g[45]),G=E(G,Z,K,z,$,16,g[46]),K=C(K,z=E(z,G,Z,K,I,23,g[47]),G,Z,j,6,g[48]),Z=C(Z,K,z,G,M,10,g[49]),G=C(G,Z,K,z,H,15,g[50]),z=C(z,G,Z,K,T,21,g[51]),K=C(K,z,G,Z,_,6,g[52]),Z=C(Z,K,z,G,A,10,g[53]),G=C(G,Z,K,z,D,15,g[54]),z=C(z,G,Z,K,P,21,g[55]),K=C(K,z,G,Z,w,6,g[56]),Z=C(Z,K,z,G,$,10,g[57]),G=C(G,Z,K,z,c,15,g[58]),z=C(z,G,Z,K,y,21,g[59]),K=C(K,z,G,Z,O,6,g[60]),Z=C(Z,K,z,G,Y,10,g[61]),G=C(G,Z,K,z,I,15,g[62]),z=C(z,G,Z,K,R,21,g[63]),N[0]=N[0]+K|0,N[1]=N[1]+z|0,N[2]=N[2]+G|0,N[3]=N[3]+Z|0},_doFinalize:function(){var v=this._data,h=v.words,S=8*this._nDataBytes,p=8*v.sigBytes;h[p>>>5]|=128<<24-p%32;var L=e.floor(S/4294967296),N=S;h[15+(p+64>>>9<<4)]=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),h[14+(p+64>>>9<<4)]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8),v.sigBytes=4*(h.length+1),this._process();for(var j=this._hash,P=j.words,I=0;I<4;I++){var A=P[I];P[I]=16711935&(A<<8|A>>>24)|4278255360&(A<<24|A>>>8)}return j},clone:function(){var v=d.clone.call(this);return v._hash=this._hash.clone(),v}});function i(v,h,S,p,L,N,j){var P=v+(h&S|~h&p)+L+j;return(P<>>32-N)+h}function m(v,h,S,p,L,N,j){var P=v+(h&p|S&~p)+L+j;return(P<>>32-N)+h}function E(v,h,S,p,L,N,j){var P=v+(h^S^p)+L+j;return(P<>>32-N)+h}function C(v,h,S,p,L,N,j){var P=v+(S^(h|~p))+L+j;return(P<>>32-N)+h}a.MD5=d._createHelper(x),a.HmacMD5=d._createHmacHelper(x)}(Math),t.MD5)},4424:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(53057),t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function a(s,o,d,u){var g=this._iv;if(g){var x=g.slice(0);this._iv=void 0}else x=this._prevBlock;u.encryptBlock(x,0);for(var i=0;i>24&255)){var u=d>>16&255,g=d>>8&255,x=255&d;255===u?(u=0,255===g?(g=0,255===x?x=0:++x):++g):++u,d=0,d+=u<<16,d+=g<<8,d+=x}else d+=1<<24;return d}var o=e.Encryptor=e.extend({processBlock:function(d,u){var g=this._cipher,x=g.blockSize,i=this._iv,m=this._counter;i&&(m=this._counter=i.slice(0),this._iv=void 0),function s(d){return 0===(d[0]=a(d[0]))&&(d[1]=a(d[1])),d}(m);var E=m.slice(0);g.encryptBlock(E,0);for(var C=0;C>>2]|=d<<24-u%4*8,e.sigBytes+=d},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.pad.Ansix923)},64630:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(53057),t.pad.Iso10126={pad:function(e,a){var s=4*a,o=s-e.sigBytes%s;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.pad.Iso10126)},187:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(53057),t.pad.Iso97971={pad:function(e,a){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,a)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971)},63237:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(53057),t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding)},81691:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(53057),t.pad.ZeroPadding={pad:function(e,a){var s=4*a;e.clamp(),e.sigBytes+=s-(e.sigBytes%s||s)},unpad:function(e){for(var a=e.words,s=e.sigBytes-1;!(a[s>>>2]>>>24-s%4*8&255);)s--;e.sigBytes=s+1}},t.pad.ZeroPadding)},98812:function(Se,pe,r){var e,a,s,o,d,g,x,t;Se.exports=(t=r(67585),r(75162),r(43764),o=(a=(e=t).lib).WordArray,g=(d=e.algo).HMAC,x=d.PBKDF2=(s=a.Base).extend({cfg:s.extend({keySize:4,hasher:d.SHA1,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,m){for(var E=this.cfg,C=g.create(E.hasher,i),v=o.create(),h=o.create([1]),S=v.words,p=h.words,L=E.keySize,N=E.iterations;S.length>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],v=this._C=[m[2]<<16|m[2]>>>16,4294901760&m[0]|65535&m[1],m[3]<<16|m[3]>>>16,4294901760&m[1]|65535&m[2],m[0]<<16|m[0]>>>16,4294901760&m[2]|65535&m[3],m[1]<<16|m[1]>>>16,4294901760&m[3]|65535&m[0]];this._b=0;for(var h=0;h<4;h++)i.call(this);for(h=0;h<8;h++)v[h]^=C[h+4&7];if(E){var S=E.words,p=S[0],L=S[1],N=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),j=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),P=N>>>16|4294901760&j,I=j<<16|65535&N;for(v[0]^=N,v[1]^=P,v[2]^=j,v[3]^=I,v[4]^=N,v[5]^=P,v[6]^=j,v[7]^=I,h=0;h<4;h++)i.call(this)}},_doProcessBlock:function(m,E){var C=this._X;i.call(this),d[0]=C[0]^C[5]>>>16^C[3]<<16,d[1]=C[2]^C[7]>>>16^C[5]<<16,d[2]=C[4]^C[1]>>>16^C[7]<<16,d[3]=C[6]^C[3]>>>16^C[1]<<16;for(var v=0;v<4;v++)d[v]=16711935&(d[v]<<8|d[v]>>>24)|4278255360&(d[v]<<24|d[v]>>>8),m[E+v]^=d[v]},blockSize:4,ivSize:2});function i(){for(var m=this._X,E=this._C,C=0;C<8;C++)u[C]=E[C];for(E[0]=E[0]+1295307597+this._b|0,E[1]=E[1]+3545052371+(E[0]>>>0>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0>>0?1:0)|0,this._b=E[7]>>>0>>0?1:0,C=0;C<8;C++){var v=m[C]+E[C],h=65535&v,S=v>>>16;g[C]=((h*h>>>17)+h*S>>>15)+S*S^((4294901760&v)*v|0)+((65535&v)*v|0)}m[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,m[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,m[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,m[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,m[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,m[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,m[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,m[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}e.RabbitLegacy=s._createHelper(x)}(),t.RabbitLegacy)},28182:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(58319),r(9493),r(37865),r(53057),function(){var e=t,s=e.lib.StreamCipher,d=[],u=[],g=[],x=e.algo.Rabbit=s.extend({_doReset:function(){for(var m=this._key.words,E=this.cfg.iv,C=0;C<4;C++)m[C]=16711935&(m[C]<<8|m[C]>>>24)|4278255360&(m[C]<<24|m[C]>>>8);var v=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],h=this._C=[m[2]<<16|m[2]>>>16,4294901760&m[0]|65535&m[1],m[3]<<16|m[3]>>>16,4294901760&m[1]|65535&m[2],m[0]<<16|m[0]>>>16,4294901760&m[2]|65535&m[3],m[1]<<16|m[1]>>>16,4294901760&m[3]|65535&m[0]];for(this._b=0,C=0;C<4;C++)i.call(this);for(C=0;C<8;C++)h[C]^=v[C+4&7];if(E){var S=E.words,p=S[0],L=S[1],N=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),j=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),P=N>>>16|4294901760&j,I=j<<16|65535&N;for(h[0]^=N,h[1]^=P,h[2]^=j,h[3]^=I,h[4]^=N,h[5]^=P,h[6]^=j,h[7]^=I,C=0;C<4;C++)i.call(this)}},_doProcessBlock:function(m,E){var C=this._X;i.call(this),d[0]=C[0]^C[5]>>>16^C[3]<<16,d[1]=C[2]^C[7]>>>16^C[5]<<16,d[2]=C[4]^C[1]>>>16^C[7]<<16,d[3]=C[6]^C[3]>>>16^C[1]<<16;for(var v=0;v<4;v++)d[v]=16711935&(d[v]<<8|d[v]>>>24)|4278255360&(d[v]<<24|d[v]>>>8),m[E+v]^=d[v]},blockSize:4,ivSize:2});function i(){for(var m=this._X,E=this._C,C=0;C<8;C++)u[C]=E[C];for(E[0]=E[0]+1295307597+this._b|0,E[1]=E[1]+3545052371+(E[0]>>>0>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0>>0?1:0)|0,this._b=E[7]>>>0>>0?1:0,C=0;C<8;C++){var v=m[C]+E[C],h=65535&v,S=v>>>16;g[C]=((h*h>>>17)+h*S>>>15)+S*S^((4294901760&v)*v|0)+((65535&v)*v|0)}m[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,m[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,m[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,m[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,m[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,m[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,m[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,m[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}e.Rabbit=s._createHelper(x)}(),t.Rabbit)},10486:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(58319),r(9493),r(37865),r(53057),function(){var e=t,s=e.lib.StreamCipher,o=e.algo,d=o.RC4=s.extend({_doReset:function(){for(var x=this._key,i=x.words,m=x.sigBytes,E=this._S=[],C=0;C<256;C++)E[C]=C;C=0;for(var v=0;C<256;C++){var h=C%m,p=E[C];E[C]=E[v=(v+E[C]+(i[h>>>2]>>>24-h%4*8&255))%256],E[v]=p}this._i=this._j=0},_doProcessBlock:function(x,i){x[i]^=u.call(this)},keySize:8,ivSize:0});function u(){for(var x=this._S,i=this._i,m=this._j,E=0,C=0;C<4;C++){var v=x[i=(i+1)%256];x[i]=x[m=(m+x[i])%256],x[m]=v,E|=x[(x[i]+x[m])%256]<<24-8*C}return this._i=i,this._j=m,E}e.RC4=s._createHelper(d);var g=o.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var x=this.cfg.drop;x>0;x--)u.call(this)}});e.RC4Drop=s._createHelper(g)}(),t.RC4)},34973:function(Se,pe,r){var t;Se.exports=(t=r(67585),function(e){var a=t,s=a.lib,o=s.WordArray,d=s.Hasher,u=a.algo,g=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),x=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),i=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),E=o.create([0,1518500249,1859775393,2400959708,2840853838]),C=o.create([1352829926,1548603684,1836072691,2053994217,0]),v=u.RIPEMD160=d.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(P,I){for(var A=0;A<16;A++){var O=I+A,T=P[O];P[O]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8)}var y,H,$,K,z,G,Z,B,X,ee,le,c=this._hash.words,M=E.words,w=C.words,R=g.words,D=x.words,Y=i.words,_=m.words;for(G=y=c[0],Z=H=c[1],B=$=c[2],X=K=c[3],ee=z=c[4],A=0;A<80;A+=1)le=y+P[I+R[A]]|0,le+=A<16?h(H,$,K)+M[0]:A<32?S(H,$,K)+M[1]:A<48?p(H,$,K)+M[2]:A<64?L(H,$,K)+M[3]:N(H,$,K)+M[4],le=(le=j(le|=0,Y[A]))+z|0,y=z,z=K,K=j($,10),$=H,H=le,le=G+P[I+D[A]]|0,le+=A<16?N(Z,B,X)+w[0]:A<32?L(Z,B,X)+w[1]:A<48?p(Z,B,X)+w[2]:A<64?S(Z,B,X)+w[3]:h(Z,B,X)+w[4],le=(le=j(le|=0,_[A]))+ee|0,G=ee,ee=X,X=j(B,10),B=Z,Z=le;le=c[1]+$+X|0,c[1]=c[2]+K+ee|0,c[2]=c[3]+z+G|0,c[3]=c[4]+y+Z|0,c[4]=c[0]+H+B|0,c[0]=le},_doFinalize:function(){var P=this._data,I=P.words,A=8*this._nDataBytes,O=8*P.sigBytes;I[O>>>5]|=128<<24-O%32,I[14+(O+64>>>9<<4)]=16711935&(A<<8|A>>>24)|4278255360&(A<<24|A>>>8),P.sigBytes=4*(I.length+1),this._process();for(var T=this._hash,c=T.words,M=0;M<5;M++){var w=c[M];c[M]=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8)}return T},clone:function(){var P=d.clone.call(this);return P._hash=this._hash.clone(),P}});function h(P,I,A){return P^I^A}function S(P,I,A){return P&I|~P&A}function p(P,I,A){return(P|~I)^A}function L(P,I,A){return P&A|I&~A}function N(P,I,A){return P^(I|~A)}function j(P,I){return P<>>32-I}a.RIPEMD160=d._createHelper(v),a.HmacRIPEMD160=d._createHmacHelper(v)}(Math),t.RIPEMD160)},75162:function(Se,pe,r){var e,a,s,o,u,g,t;Se.exports=(t=r(67585),s=(a=(e=t).lib).WordArray,u=[],g=e.algo.SHA1=(o=a.Hasher).extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,i){for(var m=this._hash.words,E=m[0],C=m[1],v=m[2],h=m[3],S=m[4],p=0;p<80;p++){if(p<16)u[p]=0|x[i+p];else{var L=u[p-3]^u[p-8]^u[p-14]^u[p-16];u[p]=L<<1|L>>>31}var N=(E<<5|E>>>27)+S+u[p];N+=p<20?1518500249+(C&v|~C&h):p<40?1859775393+(C^v^h):p<60?(C&v|C&h|v&h)-1894007588:(C^v^h)-899497514,S=h,h=v,v=C<<30|C>>>2,C=E,E=N}m[0]=m[0]+E|0,m[1]=m[1]+C|0,m[2]=m[2]+v|0,m[3]=m[3]+h|0,m[4]=m[4]+S|0},_doFinalize:function(){var x=this._data,i=x.words,m=8*this._nDataBytes,E=8*x.sigBytes;return i[E>>>5]|=128<<24-E%32,i[14+(E+64>>>9<<4)]=Math.floor(m/4294967296),i[15+(E+64>>>9<<4)]=m,x.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var x=o.clone.call(this);return x._hash=this._hash.clone(),x}}),e.SHA1=o._createHelper(g),e.HmacSHA1=o._createHmacHelper(g),t.SHA1)},68769:function(Se,pe,r){var e,s,o,d,u,t;Se.exports=(t=r(67585),r(31817),s=(e=t).lib.WordArray,u=(o=e.algo).SHA224=(d=o.SHA256).extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var g=d._doFinalize.call(this);return g.sigBytes-=4,g}}),e.SHA224=d._createHelper(u),e.HmacSHA224=d._createHmacHelper(u),t.SHA224)},31817:function(Se,pe,r){var t;Se.exports=(t=r(67585),function(e){var a=t,s=a.lib,o=s.WordArray,d=s.Hasher,u=a.algo,g=[],x=[];!function(){function E(S){for(var p=e.sqrt(S),L=2;L<=p;L++)if(!(S%L))return!1;return!0}function C(S){return 4294967296*(S-(0|S))|0}for(var v=2,h=0;h<64;)E(v)&&(h<8&&(g[h]=C(e.pow(v,.5))),x[h]=C(e.pow(v,1/3)),h++),v++}();var i=[],m=u.SHA256=d.extend({_doReset:function(){this._hash=new o.init(g.slice(0))},_doProcessBlock:function(E,C){for(var v=this._hash.words,h=v[0],S=v[1],p=v[2],L=v[3],N=v[4],j=v[5],P=v[6],I=v[7],A=0;A<64;A++){if(A<16)i[A]=0|E[C+A];else{var O=i[A-15],c=i[A-2];i[A]=((O<<25|O>>>7)^(O<<14|O>>>18)^O>>>3)+i[A-7]+((c<<15|c>>>17)^(c<<13|c>>>19)^c>>>10)+i[A-16]}var R=h&S^h&p^S&p,_=I+((N<<26|N>>>6)^(N<<21|N>>>11)^(N<<7|N>>>25))+(N&j^~N&P)+x[A]+i[A];I=P,P=j,j=N,N=L+_|0,L=p,p=S,S=h,h=_+(((h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22))+R)|0}v[0]=v[0]+h|0,v[1]=v[1]+S|0,v[2]=v[2]+p|0,v[3]=v[3]+L|0,v[4]=v[4]+N|0,v[5]=v[5]+j|0,v[6]=v[6]+P|0,v[7]=v[7]+I|0},_doFinalize:function(){var E=this._data,C=E.words,v=8*this._nDataBytes,h=8*E.sigBytes;return C[h>>>5]|=128<<24-h%32,C[14+(h+64>>>9<<4)]=e.floor(v/4294967296),C[15+(h+64>>>9<<4)]=v,E.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var E=d.clone.call(this);return E._hash=this._hash.clone(),E}});a.SHA256=d._createHelper(m),a.HmacSHA256=d._createHmacHelper(m)}(Math),t.SHA256)},21971:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(70401),function(e){var a=t,s=a.lib,o=s.WordArray,d=s.Hasher,g=a.x64.Word,x=a.algo,i=[],m=[],E=[];!function(){for(var h=1,S=0,p=0;p<24;p++){i[h+5*S]=(p+1)*(p+2)/2%64;var N=(2*h+3*S)%5;h=S%5,S=N}for(h=0;h<5;h++)for(S=0;S<5;S++)m[h+5*S]=S+(2*h+3*S)%5*5;for(var j=1,P=0;P<24;P++){for(var I=0,A=0,O=0;O<7;O++){if(1&j){var T=(1<>>24)|4278255360&(j<<24|j>>>8),(I=p[N]).high^=P=16711935&(P<<8|P>>>24)|4278255360&(P<<24|P>>>8),I.low^=j}for(var A=0;A<24;A++){for(var O=0;O<5;O++){for(var T=0,c=0,M=0;M<5;M++)T^=(I=p[O+5*M]).high,c^=I.low;var w=C[O];w.high=T,w.low=c}for(O=0;O<5;O++){var R=C[(O+4)%5],D=C[(O+1)%5],Y=D.high,_=D.low;for(T=R.high^(Y<<1|_>>>31),c=R.low^(_<<1|Y>>>31),M=0;M<5;M++)(I=p[O+5*M]).high^=T,I.low^=c}for(var y=1;y<25;y++){var H=(I=p[y]).high,$=I.low,K=i[y];K<32?(T=H<>>32-K,c=$<>>32-K):(T=$<>>64-K,c=H<>>64-K);var z=C[m[y]];z.high=T,z.low=c}var G=C[0],Z=p[0];for(G.high=Z.high,G.low=Z.low,O=0;O<5;O++)for(M=0;M<5;M++){var B=C[y=O+5*M],X=C[(O+1)%5+5*M],ee=C[(O+2)%5+5*M];(I=p[y]).high=B.high^~X.high&ee.high,I.low=B.low^~X.low&ee.low}var I,le=E[A];(I=p[0]).high^=le.high,I.low^=le.low}},_doFinalize:function(){var h=this._data,S=h.words,L=8*h.sigBytes,N=32*this.blockSize;S[L>>>5]|=1<<24-L%32,S[(e.ceil((L+1)/N)*N>>>5)-1]|=128,h.sigBytes=4*S.length,this._process();for(var j=this._state,P=this.cfg.outputLength/8,I=P/8,A=[],O=0;O>>24)|4278255360&(c<<24|c>>>8),A.push(M=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8)),A.push(c)}return new o.init(A,P)},clone:function(){for(var h=d.clone.call(this),S=h._state=this._state.slice(0),p=0;p<25;p++)S[p]=S[p].clone();return h}});a.SHA3=d._createHelper(v),a.HmacSHA3=d._createHmacHelper(v)}(Math),t.SHA3)},6787:function(Se,pe,r){var e,a,s,o,d,u,g,t;Se.exports=(t=r(67585),r(70401),r(83351),s=(a=(e=t).x64).Word,o=a.WordArray,g=(d=e.algo).SHA384=(u=d.SHA512).extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var x=u._doFinalize.call(this);return x.sigBytes-=16,x}}),e.SHA384=u._createHelper(g),e.HmacSHA384=u._createHmacHelper(g),t.SHA384)},83351:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(70401),function(){var e=t,s=e.lib.Hasher,o=e.x64,d=o.Word,u=o.WordArray,g=e.algo;function x(){return d.create.apply(d,arguments)}var i=[x(1116352408,3609767458),x(1899447441,602891725),x(3049323471,3964484399),x(3921009573,2173295548),x(961987163,4081628472),x(1508970993,3053834265),x(2453635748,2937671579),x(2870763221,3664609560),x(3624381080,2734883394),x(310598401,1164996542),x(607225278,1323610764),x(1426881987,3590304994),x(1925078388,4068182383),x(2162078206,991336113),x(2614888103,633803317),x(3248222580,3479774868),x(3835390401,2666613458),x(4022224774,944711139),x(264347078,2341262773),x(604807628,2007800933),x(770255983,1495990901),x(1249150122,1856431235),x(1555081692,3175218132),x(1996064986,2198950837),x(2554220882,3999719339),x(2821834349,766784016),x(2952996808,2566594879),x(3210313671,3203337956),x(3336571891,1034457026),x(3584528711,2466948901),x(113926993,3758326383),x(338241895,168717936),x(666307205,1188179964),x(773529912,1546045734),x(1294757372,1522805485),x(1396182291,2643833823),x(1695183700,2343527390),x(1986661051,1014477480),x(2177026350,1206759142),x(2456956037,344077627),x(2730485921,1290863460),x(2820302411,3158454273),x(3259730800,3505952657),x(3345764771,106217008),x(3516065817,3606008344),x(3600352804,1432725776),x(4094571909,1467031594),x(275423344,851169720),x(430227734,3100823752),x(506948616,1363258195),x(659060556,3750685593),x(883997877,3785050280),x(958139571,3318307427),x(1322822218,3812723403),x(1537002063,2003034995),x(1747873779,3602036899),x(1955562222,1575990012),x(2024104815,1125592928),x(2227730452,2716904306),x(2361852424,442776044),x(2428436474,593698344),x(2756734187,3733110249),x(3204031479,2999351573),x(3329325298,3815920427),x(3391569614,3928383900),x(3515267271,566280711),x(3940187606,3454069534),x(4118630271,4000239992),x(116418474,1914138554),x(174292421,2731055270),x(289380356,3203993006),x(460393269,320620315),x(685471733,587496836),x(852142971,1086792851),x(1017036298,365543100),x(1126000580,2618297676),x(1288033470,3409855158),x(1501505948,4234509866),x(1607167915,987167468),x(1816402316,1246189591)],m=[];!function(){for(var C=0;C<80;C++)m[C]=x()}();var E=g.SHA512=s.extend({_doReset:function(){this._hash=new u.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(C,v){for(var h=this._hash.words,S=h[0],p=h[1],L=h[2],N=h[3],j=h[4],P=h[5],I=h[6],A=h[7],O=S.high,T=S.low,c=p.high,M=p.low,w=L.high,R=L.low,D=N.high,Y=N.low,_=j.high,y=j.low,H=P.high,$=P.low,K=I.high,z=I.low,G=A.high,Z=A.low,B=O,X=T,ee=c,le=M,de=w,fe=R,te=D,ce=Y,oe=_,se=y,ue=H,_e=$,Ce=K,me=z,we=G,Re=Z,Ne=0;Ne<80;Ne++){var Ge=m[Ne];if(Ne<16)var Pe=Ge.high=0|C[v+2*Ne],Ae=Ge.low=0|C[v+2*Ne+1];else{var ve=m[Ne-15],Oe=ve.high,Be=ve.low,qe=(Be>>>1|Oe<<31)^(Be>>>8|Oe<<24)^(Be>>>7|Oe<<25),xt=m[Ne-2],At=xt.high,Lt=xt.low,yt=(Lt>>>19|At<<13)^(Lt<<3|At>>>29)^(Lt>>>6|At<<26),Wt=m[Ne-7],Jt=m[Ne-16],On=Jt.low;Ge.high=Pe=(Pe=(Pe=((Oe>>>1|Be<<31)^(Oe>>>8|Be<<24)^Oe>>>7)+Wt.high+((Ae=qe+Wt.low)>>>0>>0?1:0))+((At>>>19|Lt<<13)^(At<<3|Lt>>>29)^At>>>6)+((Ae+=yt)>>>0>>0?1:0))+Jt.high+((Ae+=On)>>>0>>0?1:0),Ge.low=Ae}var _n,Wn=oe&ue^~oe&Ce,an=se&_e^~se&me,kn=B&ee^B&de^ee&de,An=(X>>>28|B<<4)^(X<<30|B>>>2)^(X<<25|B>>>7),hi=i[Ne],Ui=hi.low,Ve=we+((oe>>>14|se<<18)^(oe>>>18|se<<14)^(oe<<23|se>>>9))+((_n=Re+((se>>>14|oe<<18)^(se>>>18|oe<<14)^(se<<23|oe>>>9)))>>>0>>0?1:0),Ye=An+(X&le^X&fe^le&fe);we=Ce,Re=me,Ce=ue,me=_e,ue=oe,_e=se,oe=te+(Ve=(Ve=(Ve=Ve+Wn+((_n+=an)>>>0>>0?1:0))+hi.high+((_n+=Ui)>>>0>>0?1:0))+Pe+((_n+=Ae)>>>0>>0?1:0))+((se=ce+_n|0)>>>0>>0?1:0)|0,te=de,ce=fe,de=ee,fe=le,ee=B,le=X,B=Ve+(((B>>>28|X<<4)^(B<<30|X>>>2)^(B<<25|X>>>7))+kn+(Ye>>>0>>0?1:0))+((X=_n+Ye|0)>>>0<_n>>>0?1:0)|0}T=S.low=T+X,S.high=O+B+(T>>>0>>0?1:0),M=p.low=M+le,p.high=c+ee+(M>>>0>>0?1:0),R=L.low=R+fe,L.high=w+de+(R>>>0>>0?1:0),Y=N.low=Y+ce,N.high=D+te+(Y>>>0>>0?1:0),y=j.low=y+se,j.high=_+oe+(y>>>0>>0?1:0),$=P.low=$+_e,P.high=H+ue+($>>>0<_e>>>0?1:0),z=I.low=z+me,I.high=K+Ce+(z>>>0>>0?1:0),Z=A.low=Z+Re,A.high=G+we+(Z>>>0>>0?1:0)},_doFinalize:function(){var C=this._data,v=C.words,h=8*this._nDataBytes,S=8*C.sigBytes;return v[S>>>5]|=128<<24-S%32,v[30+(S+128>>>10<<5)]=Math.floor(h/4294967296),v[31+(S+128>>>10<<5)]=h,C.sigBytes=4*v.length,this._process(),this._hash.toX32()},clone:function(){var C=s.clone.call(this);return C._hash=this._hash.clone(),C},blockSize:32});e.SHA512=s._createHelper(E),e.HmacSHA512=s._createHmacHelper(E)}(),t.SHA512)},57243:function(Se,pe,r){var t;Se.exports=(t=r(67585),r(58319),r(9493),r(37865),r(53057),function(){var e=t,a=e.lib,s=a.WordArray,o=a.BlockCipher,d=e.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],g=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],x=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],E=d.DES=o.extend({_doReset:function(){for(var p=this._key.words,L=[],N=0;N<56;N++){var j=u[N]-1;L[N]=p[j>>>5]>>>31-j%32&1}for(var P=this._subKeys=[],I=0;I<16;I++){var A=P[I]=[],O=x[I];for(N=0;N<24;N++)A[N/6|0]|=L[(g[N]-1+O)%28]<<31-N%6,A[4+(N/6|0)]|=L[28+(g[N+24]-1+O)%28]<<31-N%6;for(A[0]=A[0]<<1|A[0]>>>31,N=1;N<7;N++)A[N]=A[N]>>>4*(N-1)+3;A[7]=A[7]<<5|A[7]>>>27}var T=this._invSubKeys=[];for(N=0;N<16;N++)T[N]=P[15-N]},encryptBlock:function(S,p){this._doCryptBlock(S,p,this._subKeys)},decryptBlock:function(S,p){this._doCryptBlock(S,p,this._invSubKeys)},_doCryptBlock:function(S,p,L){this._lBlock=S[p],this._rBlock=S[p+1],C.call(this,4,252645135),C.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),C.call(this,1,1431655765);for(var N=0;N<16;N++){for(var j=L[N],P=this._lBlock,I=this._rBlock,A=0,O=0;O<8;O++)A|=i[O][((I^j[O])&m[O])>>>0];this._lBlock=I,this._rBlock=P^A}var T=this._lBlock;this._lBlock=this._rBlock,this._rBlock=T,C.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),C.call(this,16,65535),C.call(this,4,252645135),S[p]=this._lBlock,S[p+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function C(S,p){var L=(this._lBlock>>>S^this._rBlock)&p;this._rBlock^=L,this._lBlock^=L<>>S^this._lBlock)&p;this._lBlock^=L,this._rBlock^=L<{"use strict";var pe={single_source_shortest_paths:function(r,t,e){var a={},s={};s[t]=0;var d,u,g,x,i,E,o=pe.PriorityQueue.make();for(o.push(t,0);!o.empty();)for(g in x=(d=o.pop()).cost,i=r[u=d.value]||{})i.hasOwnProperty(g)&&(E=x+i[g],(void 0===s[g]||s[g]>E)&&(s[g]=E,o.push(g,E),a[g]=u));if(void 0!==e&&void 0===s[e]){var h=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(h)}return a},extract_shortest_path_from_predecessor_list:function(r,t){for(var e=[],a=t;a;)e.push(a),a=r[a];return e.reverse(),e},find_path:function(r,t,e){var a=pe.single_source_shortest_paths(r,t,e);return pe.extract_shortest_path_from_predecessor_list(a,e)},PriorityQueue:{make:function(r){var a,t=pe.PriorityQueue,e={};for(a in r=r||{},t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e.queue=[],e.sorter=r.sorter||t.default_sorter,e},default_sorter:function(r,t){return r.cost-t.cost},push:function(r,t){this.queue.push({value:r,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};Se.exports=pe},92735:function(Se){Se.exports=function(){"use strict";var r=Object.hasOwnProperty,t=Object.setPrototypeOf,e=Object.isFrozen,a=Object.getPrototypeOf,s=Object.getOwnPropertyDescriptor,o=Object.freeze,d=Object.seal,u=Object.create,g="undefined"!=typeof Reflect&&Reflect,x=g.apply,i=g.construct;x||(x=function(_e,Ce,me){return _e.apply(Ce,me)}),o||(o=function(_e){return _e}),d||(d=function(_e){return _e}),i||(i=function(_e,Ce){return new(Function.prototype.bind.apply(_e,[null].concat(function pe(ue){if(Array.isArray(ue)){for(var _e=0,Ce=Array(ue.length);_e1?Ce-1:0),we=1;we/gm),Z=d(/^data-[\-\w.\u00B7-\uFFFF]/),B=d(/^aria-[\-\w]+$/),X=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=d(/^(?:\w+script|data):/i),le=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ue){return typeof ue}:function(ue){return ue&&"function"==typeof Symbol&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue};function fe(ue){if(Array.isArray(ue)){for(var _e=0,Ce=Array(ue.length);_e0&&void 0!==arguments[0]?arguments[0]:te(),_e=function(jn){return oe(jn)};if(_e.version="2.3.5",_e.removed=[],!ue||!ue.document||9!==ue.document.nodeType)return _e.isSupported=!1,_e;var Ce=ue.document,me=ue.document,we=ue.DocumentFragment,Re=ue.HTMLTemplateElement,Ne=ue.Node,Ge=ue.Element,Pe=ue.NodeFilter,Ae=ue.NamedNodeMap,ve=void 0===Ae?ue.NamedNodeMap||ue.MozNamedAttrMap:Ae,Oe=ue.HTMLFormElement,Be=ue.DOMParser,ze=ue.trustedTypes,qe=Ge.prototype,xt=T(qe,"cloneNode"),At=T(qe,"nextSibling"),Lt=T(qe,"childNodes"),qt=T(qe,"parentNode");if("function"==typeof Re){var yt=me.createElement("template");yt.content&&yt.content.ownerDocument&&(me=yt.content.ownerDocument)}var Wt=ce(ze,Ce),gt=Wt?Wt.createHTML(""):"",Jt=me.implementation,en=me.createNodeIterator,On=me.createDocumentFragment,Wn=me.getElementsByTagName,an=Ce.importNode,kn={};try{kn=O(me).documentMode?me.documentMode:{}}catch(bi){}var vn={};_e.isSupported="function"==typeof qt&&Jt&&void 0!==Jt.createHTMLDocument&&9!==kn;var Dn=z,An=G,Zn=Z,Qn=B,hi=ee,Gi=le,Ui=X,_n=null,Ve=A({},[].concat(fe(c),fe(M),fe(w),fe(D),fe(_))),Ye=null,Qe=A({},[].concat(fe(y),fe(H),fe($),fe(K))),_t=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,Bt=null,Le=!0,ot=!0,He=!1,$e=!1,Ke=!1,vt=!1,Nt=!1,Qt=!1,sn=!1,yn=!1,Ft=!0,tn=!0,on=!1,Tn={},$n=null,ii=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$i=null,Wi=A({},["audio","video","img","source","image","track"]),yi=null,Fr=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rr="http://www.w3.org/1998/Math/MathML",_s="http://www.w3.org/2000/svg",br="http://www.w3.org/1999/xhtml",lr=br,Hr=!1,fs=void 0,Ts=["application/xhtml+xml","text/html"],ur="text/html",Ys=void 0,Jr=null,zr=me.createElement("form"),ys=function(jn){return jn instanceof RegExp||jn instanceof Function},Ls=function(jn){Jr&&Jr===jn||((!jn||"object"!==(void 0===jn?"undefined":de(jn)))&&(jn={}),jn=O(jn),_n="ALLOWED_TAGS"in jn?A({},jn.ALLOWED_TAGS):Ve,Ye="ALLOWED_ATTR"in jn?A({},jn.ALLOWED_ATTR):Qe,yi="ADD_URI_SAFE_ATTR"in jn?A(O(Fr),jn.ADD_URI_SAFE_ATTR):Fr,$i="ADD_DATA_URI_TAGS"in jn?A(O(Wi),jn.ADD_DATA_URI_TAGS):Wi,$n="FORBID_CONTENTS"in jn?A({},jn.FORBID_CONTENTS):ii,Ct="FORBID_TAGS"in jn?A({},jn.FORBID_TAGS):{},Bt="FORBID_ATTR"in jn?A({},jn.FORBID_ATTR):{},Tn="USE_PROFILES"in jn&&jn.USE_PROFILES,Le=!1!==jn.ALLOW_ARIA_ATTR,ot=!1!==jn.ALLOW_DATA_ATTR,He=jn.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=jn.SAFE_FOR_TEMPLATES||!1,Ke=jn.WHOLE_DOCUMENT||!1,Qt=jn.RETURN_DOM||!1,sn=jn.RETURN_DOM_FRAGMENT||!1,yn=jn.RETURN_TRUSTED_TYPE||!1,Nt=jn.FORCE_BODY||!1,Ft=!1!==jn.SANITIZE_DOM,tn=!1!==jn.KEEP_CONTENT,on=jn.IN_PLACE||!1,Ui=jn.ALLOWED_URI_REGEXP||Ui,lr=jn.NAMESPACE||br,jn.CUSTOM_ELEMENT_HANDLING&&ys(jn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_t.tagNameCheck=jn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),jn.CUSTOM_ELEMENT_HANDLING&&ys(jn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_t.attributeNameCheck=jn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),jn.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof jn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_t.allowCustomizedBuiltInElements=jn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fs=fs=-1===Ts.indexOf(jn.PARSER_MEDIA_TYPE)?ur:jn.PARSER_MEDIA_TYPE,Ys="application/xhtml+xml"===fs?function(ri){return ri}:v,$e&&(ot=!1),sn&&(Qt=!0),Tn&&(_n=A({},[].concat(fe(_))),Ye=[],!0===Tn.html&&(A(_n,c),A(Ye,y)),!0===Tn.svg&&(A(_n,M),A(Ye,H),A(Ye,K)),!0===Tn.svgFilters&&(A(_n,w),A(Ye,H),A(Ye,K)),!0===Tn.mathMl&&(A(_n,D),A(Ye,$),A(Ye,K))),jn.ADD_TAGS&&(_n===Ve&&(_n=O(_n)),A(_n,jn.ADD_TAGS)),jn.ADD_ATTR&&(Ye===Qe&&(Ye=O(Ye)),A(Ye,jn.ADD_ATTR)),jn.ADD_URI_SAFE_ATTR&&A(yi,jn.ADD_URI_SAFE_ATTR),jn.FORBID_CONTENTS&&($n===ii&&($n=O($n)),A($n,jn.FORBID_CONTENTS)),tn&&(_n["#text"]=!0),Ke&&A(_n,["html","head","body"]),_n.table&&(A(_n,["tbody"]),delete Ct.tbody),o&&o(jn),Jr=jn)},os=A({},["mi","mo","mn","ms","mtext"]),jr=A({},["foreignobject","desc","title","annotation-xml"]),Zr=A({},M);A(Zr,w),A(Zr,R);var ts=A({},D);A(ts,Y);var qi=function(jn){var ri=qt(jn);(!ri||!ri.tagName)&&(ri={namespaceURI:br,tagName:"template"});var Ci=v(jn.tagName),dr=v(ri.tagName);if(jn.namespaceURI===_s)return ri.namespaceURI===br?"svg"===Ci:ri.namespaceURI===Rr?"svg"===Ci&&("annotation-xml"===dr||os[dr]):Boolean(Zr[Ci]);if(jn.namespaceURI===Rr)return ri.namespaceURI===br?"math"===Ci:ri.namespaceURI===_s?"math"===Ci&&jr[dr]:Boolean(ts[Ci]);if(jn.namespaceURI===br){if(ri.namespaceURI===_s&&!jr[dr]||ri.namespaceURI===Rr&&!os[dr])return!1;var ls=A({},["title","style","font","a","script"]);return!ts[Ci]&&(ls[Ci]||!Zr[Ci])}return!1},Hs=function(jn){C(_e.removed,{element:jn});try{jn.parentNode.removeChild(jn)}catch(ri){try{jn.outerHTML=gt}catch(Ci){jn.remove()}}},as=function(jn,ri){try{C(_e.removed,{attribute:ri.getAttributeNode(jn),from:ri})}catch(Ci){C(_e.removed,{attribute:null,from:ri})}if(ri.removeAttribute(jn),"is"===jn&&!Ye[jn])if(Qt||sn)try{Hs(ri)}catch(Ci){}else try{ri.setAttribute(jn,"")}catch(Ci){}},go=function(jn){var ri=void 0,Ci=void 0;if(Nt)jn=""+jn;else{var dr=h(jn,/^[\r\n\t ]+/);Ci=dr&&dr[0]}"application/xhtml+xml"===fs&&(jn=''+jn+"");var ls=Wt?Wt.createHTML(jn):jn;if(lr===br)try{ri=(new Be).parseFromString(ls,fs)}catch(Xr){}if(!ri||!ri.documentElement){ri=Jt.createDocument(lr,"template",null);try{ri.documentElement.innerHTML=Hr?"":ls}catch(Xr){}}var cs=ri.body||ri.documentElement;return jn&&Ci&&cs.insertBefore(me.createTextNode(Ci),cs.childNodes[0]||null),lr===br?Wn.call(ri,Ke?"html":"body")[0]:Ke?ri.documentElement:cs},ln=function(jn){return en.call(jn.ownerDocument||jn,jn,Pe.SHOW_ELEMENT|Pe.SHOW_COMMENT|Pe.SHOW_TEXT,null,!1)},Un=function(jn){return jn instanceof Oe&&("string"!=typeof jn.nodeName||"string"!=typeof jn.textContent||"function"!=typeof jn.removeChild||!(jn.attributes instanceof ve)||"function"!=typeof jn.removeAttribute||"function"!=typeof jn.setAttribute||"string"!=typeof jn.namespaceURI||"function"!=typeof jn.insertBefore)},We=function(jn){return"object"===(void 0===Ne?"undefined":de(Ne))?jn instanceof Ne:jn&&"object"===(void 0===jn?"undefined":de(jn))&&"number"==typeof jn.nodeType&&"string"==typeof jn.nodeName},Dt=function(jn,ri,Ci){!vn[jn]||m(vn[jn],function(dr){dr.call(_e,ri,Ci,Jr)})},Kt=function(jn){var ri=void 0;if(Dt("beforeSanitizeElements",jn,null),Un(jn)||h(jn.nodeName,/[\u0080-\uFFFF]/))return Hs(jn),!0;var Ci=Ys(jn.nodeName);if(Dt("uponSanitizeElement",jn,{tagName:Ci,allowedTags:_n}),!We(jn.firstElementChild)&&(!We(jn.content)||!We(jn.content.firstElementChild))&&N(/<[/\w]/g,jn.innerHTML)&&N(/<[/\w]/g,jn.textContent)||"select"===Ci&&N(/