PageSourceSearch

https://cloudatler.com/admin-management-routes-6QPUH4DT.js

js cloudatler.com collected 2026-10-08 11:27:12 UTC 1,296,762 bytes, 12 lines download raw bytes

1import{a as Cs,b as xs,c as ha,d as _a,e as Ca,f as yr,g as vs,h as bs,i as ys,j as Ms,k as Ss,l as Os,m as re,n as Rn,o as Ps,p as xa,q as Je,r as eo,s as Ft,t as Es,u as ws,v as Is,w as Ts}from"./chunk-TH6DOZW7.js";import{a as E,b as V}from"./chunk-EUTY33J6.js";import{c as Kt}from"./chunk-C4FW4IKT.js";import{$ as Cr,C as Jt,D as Pe,E as Ee,F as we,G as Ie,H as Te,I as Ae,J as De,K as Re,L as ke,M as Ne,N as gn,O as fn,P as Zi,Q as Xi,R as ti,S as ni,T as ds,U as ps,V as ms,W as Zt,X as Xt,Y as en,Z as tn,_ as nn,a as Pt,aa as xr,b as rs,ba as gt,c as as,ca as us,d as Nt,da as gs,e as ei,ea as fs,fa as vr,g as An,ga as br,ha as hs,i as Dn,ia as _s,ja as z,k as ue,l as fe,m as ls,o as Et,p as Qt,q as Se,r as ss,s as Yi,t as Ki,u as Qi,v as cs,w as Ji}from"./chunk-CRUZ5YSX.js";import{A as ze,B as un,C as Yt,b as mr,c as ve,e as U,h as me,i as $e,j as Oo,k as es,l as Vt,m as mt,n as mn,o as qi,p as ur,q as gr,r as Hi,s as fr,t as hr,u as We,v as Ge,w as ts,x as Gt,y as _r,z as ns}from"./chunk-YUVX7EGE.js";import{pa as Gi,ra as ut}from"./chunk-N2KSKSDO.js";import{a as ye}from"./chunk-5PTYXEGK.js";import{$ as Tt,$b as F,$c as Wi,Aa as Jn,Ab as bt,Ac as Zn,Bb as ht,Bc as Ht,Cb as _t,Cc as Xn,D as ji,Dc as pt,Ec as Xl,Fc as Wt,G as tr,Ga as Qe,Gb as Ce,Gc as N,Ha as et,Hb as pe,Hc as pn,Ia as sr,Ib as Y,Jb as yn,Ka as c,Kb as l,Lb as C,Mb as x,N as $i,Nb as rt,Oa as Ql,Ob as In,P as nr,Pa as y,Pb as Pi,Q as ir,Qb as Jl,Rb as ae,Sb as le,T as or,Ta as k,Tb as se,U as Xe,Ub as Zl,Uc as Tn,Vc as is,Wc as Le,Xb as J,Xc as os,Ya as g,Yb as zn,Yc as G,Zb as Ei,_ as rr,_b as fa,a as Ke,ac as X,b as Kn,bc as ie,cb as He,cc as at,e as Hl,ea as Gl,f as je,g as xu,h as So,i as vu,ia as ga,ib as p,j as St,jb as o,jc as Z,ka as O,kb as a,la as P,lb as h,ma as Qn,mb as vn,n as Rt,na as ar,nb as bn,o as Oi,ob as wn,p as Wl,pa as Yl,pb as I,qa as kt,qb as T,ra as be,rc as xe,sb as A,sc as $,tc as B,ub as v,uc as cr,va as En,vc as dr,wb as u,xa as lr,xc as pr,ya as Kl}from"./chunk-KRQHIATF.js";var yp=je(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.IFRAME_COMMS_MESSAGE_TYPE=go.DASHBOARD_UI_FILTER_CONFIG_URL_PARAM_KEY=void 0;var LF=go.IFRAME_COMMS_MESSAGE_TYPE="__embedded_comms__",VF=go.DASHBOARD_UI_FILTER_CONFIG_URL_PARAM_KEY={visible:"show_filters",expanded:"expand_filters"}});function cb(t){return t.switchboardAction===Fn.GET}function db(t){return t.switchboardAction===Fn.REPLY}function pb(t){return t.switchboardAction===Fn.EMIT}function mb(t){return t.switchboardAction===Fn.ERROR}var Fn,ea,Mp,ul=Hl(()=>{Fn=(function(t){return t.GET="get",t.REPLY="reply",t.EMIT="emit",t.ERROR="error",t})(Fn||{});ea=class{constructor(r){this.port=void 0,this.name="",this.methods={},this.incrementor=1,this.debugMode=void 0,this.isInitialised=void 0,r&&this.init(r)}init(r){if(this.isInitialised){this.logError("already initialized");return}let{port:e,name:n="switchboard",debug:i=!1}=r;this.port=e,this.name=n,this.debugMode=i,e.addEventListener("message",s=>St(this,null,function*(){this.log("message received",s);let d=s.data;if(cb(d))this.port.postMessage(yield this.getMethodResult(d));else if(pb(d)){let{method:m,args:f}=d,_=this.methods[m];_&&_(f)}})),this.isInitialised=!0}getMethodResult(i){return St(this,arguments,function*({messageId:r,method:e,args:n}){let s=this.methods[e];if(s==null)return{switchboardAction:Fn.ERROR,messageId:r,error:`[${this.name}] Method "${e}" is not defined`};try{let d=yield s(n);return{switchboardAction:Fn.REPLY,messageId:r,result:d}}catch(d){return this.logError(d),{switchboardAction:Fn.ERROR,messageId:r,error:`[${this.name}] Method "${e}" threw an error`}}})}defineMethod(r,e){this.methods[r]=e}get(r,e=void 0){return new Promise((n,i)=>{if(!this.isInitialised){i(new Error("Switchboard not initialised"));return}let s=this.getNewMessageId(),d=f=>{let _=f.data;if(_.messageId===s)if(this.port.removeEventListener("message",d),db(_))n(_.result);else{let b=mb(_)?_.error:"Unexpected response message";i(new Error(b))}};this.port.addEventListener("message",d),this.port.start();let m={switchboardAction:Fn.GET,method:r,messageId:s,args:e};this.port.postMessage(m)})}emit(r,e=void 0){if(!this.isInitialised){this.logError("Switchboard not initialised");return}let n={switchboardAction:Fn.EMIT,method:r,args:e};this.port.postMessage(n)}
1start(){if(!this.isInitialised){this.logError("Switchboard not initialised");return}this.port.start()}log(...r){this.debugMode&&console.debug(`[${this.name}]`,...r)}logError(...r){console.error(`[${this.name}]`,...r)}getNewMessageId(){return`m_${this.name}_${this.incrementor++}`}},Mp=new ea});var Sp={};xu(Sp,{Switchboard:()=>ea,default:()=>ub});var ub,Op=Hl(()=>{ul();ul();ub=Mp});var Pp=je(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.jwtDecode=fo.InvalidTokenError=void 0;var fi=class extends Error{};fo.InvalidTokenError=fi;fi.prototype.name="InvalidTokenError";function gb(t){return decodeURIComponent(atob(t).replace(/(.)/g,(r,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function fb(t){let r=t.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return gb(r)}catch(e){return atob(r)}}function hb(t,r){if(typeof t!="string")throw new fi("Invalid token specified: must be a string");r||(r={});let e=r.header===!0?0:1,n=t.split(".")[e];if(typeof n!="string")throw new fi(`Invalid token specified: missing part #${e+1}`);let i;try{i=fb(n)}catch(s){throw new fi(`Invalid token specified: invalid base64 for part #${e+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new fi(`Invalid token specified: invalid json for part #${e+1} (${s.message})`)}}fo.jwtDecode=hb});var Ep=je(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.REFRESH_TIMING_BUFFER_MS=qn.MIN_REFRESH_WAIT_MS=qn.DEFAULT_TOKEN_EXP_MS=void 0;qn.getGuestTokenRefreshTiming=bb;var _b=Pp(),Cb=qn.REFRESH_TIMING_BUFFER_MS=5e3,xb=qn.MIN_REFRESH_WAIT_MS=1e4,vb=qn.DEFAULT_TOKEN_EXP_MS=3e5;function bb(t){let r=(0,_b.jwtDecode)(t),e=new Date(/[^0-9\.]/g.test(r.exp)?r.exp:parseFloat(r.exp)*1e3);return(e.toString()!=="Invalid Date"?Math.max(xb,e.getTime()-Date.now()):vb)-Cb}});var Tp=je(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.embedDashboard=Mb;var wp=yp(),yb=(Op(),vu(Sp)),Ip=Ep();function Mb(_){return St(this,arguments,function*({id:t,supersetDomain:r,mountPoint:e,fetchGuestToken:n,dashboardUiConfig:i,debug:s=!1,iframeTitle:d="Embedded Dashboard",iframeSandboxExtras:m=[],referrerPolicy:f}){function b(...de){s&&console.debug(`[superset-embedded-sdk][dashboard ${t}]`,...de)}b("embedding"),r.endsWith("/")&&(r=r.slice(0,-1));function M(){let de=0;return i&&(i.hideTitle&&(de+=1),i.hideTab&&(de+=2),i.hideChartControls&&(de+=8),i.emitDataMasks&&(de+=16)),de}function S(){return St(this,null,function*(){return new Promise(de=>{let Me=document.createElement("iframe"),dt=i?{uiConfig:`${M()}`}:void 0,ct=i?.filters||{},Ze=Object.keys(ct),K=Object.fromEntries(Ze.map(it=>[wp.DASHBOARD_UI_FILTER_CONFIG_URL_PARAM_KEY[it],ct[it]])),ee=Ke(Ke(Ke({},dt),K),i?.urlParams),ge=Object.keys(ee).length?"?"+new URLSearchParams(ee).toString():"";Me.sandbox.add("allow-same-origin"),Me.sandbox.add("allow-scripts"),Me.sandbox.add("allow-presentation"),Me.sandbox.add("allow-downloads"),Me.sandbox.add("allow-forms"),Me.sandbox.add("allow-popups"),m.forEach(it=>{Me.sandbox.add(it)}),f&&(Me.referrerPolicy=f),Me.addEventListener("load",()=>{let it=new MessageChannel,$t=it.port1,Be=it.port2;Me.contentWindow.postMessage({type:wp.IFRAME_COMMS_MESSAGE_TYPE,handshake:"port transfer"},r,[Be]),b("sent message channel to the iframe"),de(new yb.Switchboard({port:$t,name:"superset-embedded-sdk",debug:s}))}),Me.src=`${r}/embedded/${t}${ge}`,Me.title=d,e.replaceChildren(Me),b("placed the iframe")})})}let[w,D]=yield Promise.all([n(),S()]);D.emit("guestToken",{guestToken:w}
1),b("sent guest token");function R(){return St(this,null,function*(){let de=yield n();D.emit("guestToken",{guestToken:de}),setTimeout(R,(0,Ip.getGuestTokenRefreshTiming)(de))})}setTimeout(R,(0,Ip.getGuestTokenRefreshTiming)(w));function W(){b("unmounting"),e.replaceChildren()}return{getScrollSize:()=>D.get("getScrollSize"),unmount:W,getDashboardPermalink:de=>D.get("getDashboardPermalink",{anchor:de}),getActiveTabs:()=>D.get("getActiveTabs"),observeDataMask:de=>{D.start(),D.defineMethod("observeDataMask",de)},getDataMask:()=>D.get("getDataMask"),setThemeConfig:de=>St(null,null,function*(){try{D.emit("setThemeConfig",{themeConfig:de}),b("Theme config sent successfully (or at least message dispatched)")}catch(Me){throw b('Error sending theme config. Ensure the iframe side implements the "setThemeConfig" method.'),Me}})}})}});var Dp=je((KF,Ap)=>{Ap.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var hi=je(Li=>{var fl,Sb=[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];Li.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17};Li.getSymbolTotalCodewords=function(r){return Sb[r]};Li.getBCHDigit=function(t){let r=0;for(;t!==0;)r++,t>>>=1;return r};Li.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');fl=r};Li.isKanjiModeEnabled=function(){return typeof fl<"u"};Li.toSJIS=function(r){return fl(r)}});var ta=je(_n=>{_n.L={bit:1};_n.M={bit:0};_n.Q={bit:3};_n.H={bit:2};function Ob(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return _n.L;case"m":case"medium":return _n.M;case"q":case"quartile":return _n.Q;case"h":case"high":return _n.H;default:throw new Error("Unknown EC Level: "+t)}}_n.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4};_n.from=function(r,e){if(_n.isValid(r))return r;try{return Ob(r)}catch(n){return e}}});var Np=je((ZF,kp)=>{function Rp(){this.buffer=[],this.length=0}Rp.prototype={get:function(t){let r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let e=0;e<r;e++)this.putBit((t>>>r-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}};kp.exports=Rp});var zp=je((XF,Fp)=>{function Go(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Go.prototype.set=function(t,r,e,n){let i=t*this.size+r;this.data[i]=e,n&&(this.reservedBit[i]=!0)};Go.prototype.get=function(t,r){return this.data[t*this.size+r]};Go.prototype.xor=function(t,r,e){this.data[t*this.size+r]^=e};Go.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]};Fp.exports=Go});var Lp=je(na=>{var Pb=hi().getSymbolSize;na.getRowColCoords=function(r){if(r===1)return[];let e=Math.floor(r/7)+2,n=Pb(r),i=n===145?26:Math.ceil((n-13)/(2*e-2))*2,s=[n-7];for(let d=1;d<e-1;d++)s[d]=s[d-1]-i;return s.push(6),s.reverse()};na.getPositions=function(r){let e=[],n=na.getRowColCoords(r),i=n.length;for(let s=0;s<i;s++)for(let d=0;d<i;d++)s===0&&d===0||s===0&&d===i-1||s===i-1&&d===0||e.push([n[s],n[d]]);return e}});var Up=je(Bp=>{var Eb=hi().getSymbolSize,Vp=7;Bp.getPositions=function(r){let e=Eb(r);return[[0,0],[e-Vp,0],[0,e-Vp]]}});var jp=je(st=>{st.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Vi={N1:3,N2:3,N3:40,N4:10};st.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7};st.from=function(r){return st.isValid(r)?parseInt(r,10):void 0};st.getPenaltyN1=function(r){let e=r.size,n=0,i=0,s=0,d=null,m=null;for(let f=0;f<e;f++){i=s=0,d=m=null;for(let _=0;_<e;_++){let b=r.get(f,_);b===d?i++:(i>=5&&(n+=Vi.N1+(i-5)),d=b,i=1),b=r.get(_,f),b===m?s++:(s>=5&&(n+=Vi.N1+(s-5)),m=b,s=1)}i>=5&&(n+=Vi.N1+(i-5)),s>=5&&(n+=Vi.N1+(s-5))}return n};st.getPenaltyN2=function(r){let e=r.size,n=0;for(let i=0;i<e-1;i++)for(let s=0;s<e-1;s++){let d=r.get(i,s)+r.get(i,s+1)+r.get(i+1,s)+r.get(i+1,s+1);(d===4||d===0)&&n++}return n*Vi.N2};st.getPenaltyN3=function(r){let e=r.size,n=0,i=0,s=0;for(let d=0;d<e;d++){i=s=0;for(let m=0;m<e;m++)i=i<<1&2047|r.get(d,m),m>=10&&(i===1488||i===93)&&n++,s=s<<1&2047|r.get(m,d),m>=10&&(s===1488||s===93)&&n++}return n*Vi.N3};st.getPenaltyN4=function(r){let e=0,n=r.data.length;for(let s=0;s<n;s++)e+=r.data[s];return Math.abs(Math.ceil(e*100/n/5)-10)*Vi.N4};function wb(t,r,e){switch(t){case st.Patterns.PATTERN000:return(r+e)%2===0;case st.Patterns.PATTERN001:return r%2===0;case st.Patterns.PATTERN010:return e%3===0;case st.Patterns.PATTERN011:return(r+e)%3===0;case st.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(e/3))%2===0;case st.Patterns.PATTERN101:return r*e%2+r*e%3===0;case st.Patterns.PATTERN110:return(r*e%2+r*e%3)%2===0;case st.Patterns.PATTERN111:return(r*e%3+(r+e)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}st.applyMask=function(r,e){let n=e.size;
1for(let i=0;i<n;i++)for(let s=0;s<n;s++)e.isReserved(s,i)||e.xor(s,i,wb(r,s,i))};st.getBestMask=function(r,e){let n=Object.keys(st.Patterns).length,i=0,s=1/0;for(let d=0;d<n;d++){e(d),st.applyMask(d,r);let m=st.getPenaltyN1(r)+st.getPenaltyN2(r)+st.getPenaltyN3(r)+st.getPenaltyN4(r);st.applyMask(d,r),m<s&&(s=m,i=d)}return i}});var _l=je(hl=>{var _i=ta(),ia=[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],oa=[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];hl.getBlocksCount=function(r,e){switch(e){case _i.L:return ia[(r-1)*4+0];case _i.M:return ia[(r-1)*4+1];case _i.Q:return ia[(r-1)*4+2];case _i.H:return ia[(r-1)*4+3];default:return}};hl.getTotalCodewordsCount=function(r,e){switch(e){case _i.L:return oa[(r-1)*4+0];case _i.M:return oa[(r-1)*4+1];case _i.Q:return oa[(r-1)*4+2];case _i.H:return oa[(r-1)*4+3];default:return}}});var $p=je(aa=>{var Yo=new Uint8Array(512),ra=new Uint8Array(256);(function(){let r=1;for(let e=0;e<255;e++)Yo[e]=r,ra[r]=e,r<<=1,r&256&&(r^=285);for(let e=255;e<512;e++)Yo[e]=Yo[e-255]})();aa.log=function(r){if(r<1)throw new Error("log("+r+")");return ra[r]};aa.exp=function(r){return Yo[r]};aa.mul=function(r,e){return r===0||e===0?0:Yo[ra[r]+ra[e]]}});var qp=je(Ko=>{var Cl=$p();Ko.mul=function(r,e){let n=new Uint8Array(r.length+e.length-1);for(let i=0;i<r.length;i++)for(let s=0;s<e.length;s++)n[i+s]^=Cl.mul(r[i],e[s]);return n};Ko.mod=function(r,e){let n=new Uint8Array(r);for(;n.length-e.length>=0;){let i=n[0];for(let d=0;d<e.length;d++)n[d]^=Cl.mul(e[d],i);let s=0;for(;s<n.length&&n[s]===0;)s++;n=n.slice(s)}return n};Ko.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let n=0;n<r;n++)e=Ko.mul(e,new Uint8Array([1,Cl.exp(n)]));return e}});var Gp=je((az,Wp)=>{var Hp=qp();function xl(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}xl.prototype.initialize=function(r){this.degree=r,this.genPoly=Hp.generateECPolynomial(this.degree)};xl.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(r.length+this.degree);e.set(r);let n=Hp.mod(e,this.genPoly),i=this.degree-n.length;if(i>0){let s=new Uint8Array(this.degree);return s.set(n,i),s}return n};Wp.exports=xl});var vl=je(Yp=>{Yp.isValid=function(r){return!isNaN(r)&&r>=1&&r<=40}});var bl=je(Hn=>{var Kp="[0-9]+",Ib="[A-Z $%*+\\-./:]+",Qo="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Qo=Qo.replace(/u/g,"\\u");var Tb="(?:(?![A-Z0-9 $%*+\\-./:]|"+Qo+`)(?:.|[\r
2]))+`;Hn.KANJI=new RegExp(Qo,"g");Hn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Hn.BYTE=new RegExp(Tb,"g");Hn.NUMERIC=new RegExp(Kp,"g");Hn.ALPHANUMERIC=new RegExp(Ib,"g");var Ab=new RegExp("^"+Qo+"$"),Db=new RegExp("^"+Kp+"$"),Rb=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Hn.testKanji=function(r){return Ab.test(r)};Hn.testNumeric=function(r){return Db.test(r)};Hn.testAlphanumeric=function(r){return Rb.test(r)}});var Ci=je(yt=>{var kb=vl(),yl=bl();yt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};yt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};yt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};yt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};yt.MIXED={bit:-1};yt.getCharCountIndicator=function(r,e){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!kb.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?r.ccBits[0]:e<27?r.ccBits[1]:r.ccBits[2]};yt.getBestModeForData=function(r){return yl.testNumeric(r)?yt.NUMERIC:yl.testAlphanumeric(r)?yt.ALPHANUMERIC:yl.testKanji(r)?yt.KANJI:yt.BYTE};yt.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")};yt.isValid=function(r){return r&&r.bit&&r.ccBits};function Nb(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return yt.NUMERIC;case"alphanumeric":return yt.ALPHANUMERIC;case"kanji":return yt.KANJI;case"byte":return yt.BYTE;default:throw new Error("Unknown mode: "+t)}}yt.from=function(r,e){if(yt.isValid(r))return r;try{return Nb(r)}catch(n){return e}}});var em=je(Bi=>{var la=hi(),Fb=_l(),Qp=ta(),xi=Ci(),Ml=vl(),Zp=7973,Jp=la.getBCHDigit
2(Zp);function zb(t,r,e){for(let n=1;n<=40;n++)if(r<=Bi.getCapacity(n,e,t))return n}function Xp(t,r){return xi.getCharCountIndicator(t,r)+4}function Lb(t,r){let e=0;return t.forEach(function(n){let i=Xp(n.mode,r);e+=i+n.getBitsLength()}),e}function Vb(t,r){for(let e=1;e<=40;e++)if(Lb(t,e)<=Bi.getCapacity(e,r,xi.MIXED))return e}Bi.from=function(r,e){return Ml.isValid(r)?parseInt(r,10):e};Bi.getCapacity=function(r,e,n){if(!Ml.isValid(r))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=xi.BYTE);let i=la.getSymbolTotalCodewords(r),s=Fb.getTotalCodewordsCount(r,e),d=(i-s)*8;if(n===xi.MIXED)return d;let m=d-Xp(n,r);switch(n){case xi.NUMERIC:return Math.floor(m/10*3);case xi.ALPHANUMERIC:return Math.floor(m/11*2);case xi.KANJI:return Math.floor(m/13);case xi.BYTE:default:return Math.floor(m/8)}};Bi.getBestVersionForData=function(r,e){let n,i=Qp.from(e,Qp.M);if(Array.isArray(r)){if(r.length>1)return Vb(r,i);if(r.length===0)return 1;n=r[0]}else n=r;return zb(n.mode,n.getLength(),i)};Bi.getEncodedBits=function(r){if(!Ml.isValid(r)||r<7)throw new Error("Invalid QR Code version");let e=r<<12;for(;la.getBCHDigit(e)-Jp>=0;)e^=Zp<<la.getBCHDigit(e)-Jp;return r<<12|e}});var om=je(im=>{var Sl=hi(),nm=1335,Bb=21522,tm=Sl.getBCHDigit(nm);im.getEncodedBits=function(r,e){let n=r.bit<<3|e,i=n<<10;for(;Sl.getBCHDigit(i)-tm>=0;)i^=nm<<Sl.getBCHDigit(i)-tm;return(n<<10|i)^Bb}});var am=je((mz,rm)=>{var Ub=Ci();function ho(t){this.mode=Ub.NUMERIC,this.data=t.toString()}ho.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)};ho.prototype.getLength=function(){return this.data.length};ho.prototype.getBitsLength=function(){return ho.getBitsLength(this.data.length)};ho.prototype.write=function(r){let e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),r.put(i,10);let s=this.data.length-e;s>0&&(n=this.data.substr(e),i=parseInt(n,10),r.put(i,s*3+1))};rm.exports=ho});var sm=je((uz,lm)=>{var jb=Ci(),Ol=["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 _o(t){this.mode=jb.ALPHANUMERIC,this.data=t}_o.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)};_o.prototype.getLength=function(){return this.data.length};_o.prototype.getBitsLength=function(){return _o.getBitsLength(this.data.length)};_o.prototype.write=function(r){let e;for(e=0;e+2<=this.data.length;e+=2){let n=Ol.indexOf(this.data[e])*45;n+=Ol.indexOf(this.data[e+1]),r.put(n,11)}this.data.length%2&&r.put(Ol.indexOf(this.data[e]),6)};lm.exports=_o});var dm=je((gz,cm)=>{var $b=Ci();function Co(t){this.mode=$b.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Co.getBitsLength=function(r){return r*8};Co.prototype.getLength=function(){return this.data.length};Co.prototype.getBitsLength=function(){return Co.getBitsLength(this.data.length)};Co.prototype.write=function(t){for(let r=0,e=this.data.length;r<e;r++)t.put(this.data[r],8)};cm.exports=Co});var mm=je((fz,pm)=>{var qb=Ci(),Hb=hi();function xo(t){this.mode=qb.KANJI,this.data=t}xo.getBitsLength=function(r){return r*13};xo.prototype.getLength=function(){return this.data.length};xo.prototype.getBitsLength=function(){return xo.getBitsLength(this.data.length)};xo.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let e=Hb.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
3Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),t.put(e,13)}};pm.exports=xo});var um=je((hz,Pl)=>{"use strict";var Jo={single_source_shortest_paths:function(t,r,e){var n={},i={};i[r]=0;var s=Jo.PriorityQueue.make();s.push(r,0);for(var d,m,f,_,b,M,S,w,D;!s.empty();){d=s.pop(),m=d.value,_=d.cost,b=t[m]||{};for(f in b)b.hasOwnProperty(f)&&(M=b[f],S=_+M,w=i[f],D=typeof i[f]>"u",(D||w>S)&&(i[f]=S,s.push(f,S),n[f]=m))}if(typeof e<"u"&&typeof i[e]>"u"){var R=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(R)}return n},extract_shortest_path_from_predecessor_list:function(t,r){for(var e=[],n=r,i;n;)e.push(n),i=t[n],n=t[n];return e.reverse(),e},find_path:function(t,r,e){var n=Jo.single_source_shortest_paths(t,r,e);return Jo.extract_shortest_path_from_predecessor_list(n,e)},PriorityQueue:{make:function(t){var r=Jo.PriorityQueue,e={},n;t=t||{};for(n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return e.queue=[],e.sorter=t.sorter||r.default_sorter,e},default_sorter:function(t,r){return t.cost-r.cost},push:function(t,r){var e={value:t,cost:r};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof Pl<"u"&&(Pl.exports=Jo)});var bm=je(vo=>{var Ye=Ci(),hm=am(),_m=sm(),Cm=dm(),xm=mm(),Zo=bl(),sa=hi(),Wb=um();function gm(t){return unescape(encodeURIComponent(t)).length}function Xo(t,r,e){let n=[],i;for(;(i=t.exec(e))!==null;)n.push({data:i[0],index:i.index,mode:r,length:i[0].length});return n}function vm(t){let r=Xo(Zo.NUMERIC,Ye.NUMERIC,t),e=Xo(Zo.ALPHANUMERIC,Ye.ALPHANUMERIC,t),n,i;return sa.isKanjiModeEnabled()?(n=Xo(Zo.BYTE,Ye.BYTE,t),i=Xo(Zo.KANJI,Ye.KANJI,t)):(n=Xo(Zo.BYTE_KANJI,Ye.BYTE,t),i=[]),r.concat(e,n,i).sort(function(d,m){return d.index-m.index}).map(function(d){return{data:d.data,mode:d.mode,length:d.length}})}function El(t,r){switch(r){case Ye.NUMERIC:return hm.getBitsLength(t);case Ye.ALPHANUMERIC:return _m.getBitsLength(t);case Ye.KANJI:return xm.getBitsLength(t);case Ye.BYTE:return Cm.getBitsLength(t)}}function Gb(t){return t.reduce(function(r,e){let n=r.length-1>=0?r[r.length-1]:null;return n&&n.mode===e.mode?(r[r.length-1].data+=e.data,r):(r.push(e),r)},[])}function Yb(t){let r=[];for(let e=0;e<t.length;e++){let n=t[e];switch(n.mode){case Ye.NUMERIC:r.push([n,{data:n.data,mode:Ye.ALPHANUMERIC,length:n.length},{data:n.data,mode:Ye.BYTE,length:n.length}]);break;case Ye.ALPHANUMERIC:r.push([n,{data:n.data,mode:Ye.BYTE,length:n.length}]);break;case Ye.KANJI:r.push([n,{data:n.data,mode:Ye.BYTE,length:gm(n.data)}]);break;case Ye.BYTE:r.push([{data:n.data,mode:Ye.BYTE,length:gm(n.data)}])}}return r}function Kb(t,r){let e={},n={start:{}},i=["start"];for(let s=0;s<t.length;s++){let d=t[s],m=[];for(let f=0;f<d.length;f++){let _=d[f],b=""+s+f;
3m.push(b),e[b]={node:_,lastCount:0},n[b]={};for(let M=0;M<i.length;M++){let S=i[M];e[S]&&e[S].node.mode===_.mode?(n[S][b]=El(e[S].lastCount+_.length,_.mode)-El(e[S].lastCount,_.mode),e[S].lastCount+=_.length):(e[S]&&(e[S].lastCount=_.length),n[S][b]=El(_.length,_.mode)+4+Ye.getCharCountIndicator(_.mode,r))}}i=m}for(let s=0;s<i.length;s++)n[i[s]].end=0;return{map:n,table:e}}function fm(t,r){let e,n=Ye.getBestModeForData(t);if(e=Ye.from(r,n),e!==Ye.BYTE&&e.bit<n.bit)throw new Error('"'+t+'" cannot be encoded with mode '+Ye.toString(e)+`.
4 Suggested mode is: `+Ye.toString(n));switch(e===Ye.KANJI&&!sa.isKanjiModeEnabled()&&(e=Ye.BYTE),e){case Ye.NUMERIC:return new hm(t);case Ye.ALPHANUMERIC:return new _m(t);case Ye.KANJI:return new xm(t);case Ye.BYTE:return new Cm(t)}}vo.fromArray=function(r){return r.reduce(function(e,n){return typeof n=="string"?e.push(fm(n,null)):n.data&&e.push(fm(n.data,n.mode)),e},[])};vo.fromString=function(r,e){let n=vm(r,sa.isKanjiModeEnabled()),i=Yb(n),s=Kb(i,e),d=Wb.find_path(s.map,"start","end"),m=[];for(let f=1;f<d.length-1;f++)m.push(s.table[d[f]].node);return vo.fromArray(Gb(m))};vo.rawSplit=function(r){return vo.fromArray(vm(r,sa.isKanjiModeEnabled()))}});var Mm=je(ym=>{var da=hi(),wl=ta(),Qb=Np(),Jb=zp(),Zb=Lp(),Xb=Up(),Al=jp(),Dl=_l(),e2=Gp(),ca=em(),t2=om(),n2=Ci(),Il=bm();function i2(t,r){let e=t.size,n=Xb.getPositions(r);for(let i=0;i<n.length;i++){let s=n[i][0],d=n[i][1];for(let m=-1;m<=7;m++)if(!(s+m<=-1||e<=s+m))for(let f=-1;f<=7;f++)d+f<=-1||e<=d+f||(m>=0&&m<=6&&(f===0||f===6)||f>=0&&f<=6&&(m===0||m===6)||m>=2&&m<=4&&f>=2&&f<=4?t.set(s+m,d+f,!0,!0):t.set(s+m,d+f,!1,!0))}}function o2(t){let r=t.size;for(let e=8;e<r-8;e++){let n=e%2===0;t.set(e,6,n,!0),t.set(6,e,n,!0)}}function r2(t,r){let e=Zb.getPositions(r);for(let n=0;n<e.length;n++){let i=e[n][0],s=e[n][1];for(let d=-2;d<=2;d++)for(let m=-2;m<=2;m++)d===-2||d===2||m===-2||m===2||d===0&&m===0?t.set(i+d,s+m,!0,!0):t.set(i+d,s+m,!1,!0)}}function a2(t,r){let e=t.size,n=ca.getEncodedBits(r),i,s,d;for(let m=0;m<18;m++)i=Math.floor(m/3),s=m%3+e-8-3,d=(n>>m&1)===1,t.set(i,s,d,!0),t.set(s,i,d,!0)}function Tl(t,r,e){let n=t.size,i=t2.getEncodedBits(r,e),s,d;for(s=0;s<15;s++)d=(i>>s&1)===1,s<6?t.set(s,8,d,!0):s<8?t.set(s+1,8,d,!0):t.set(n-15+s,8,d,!0),s<8?t.set(8,n-s-1,d,!0):s<9?t.set(8,15-s-1+1,d,!0):t.set(8,15-s-1,d,!0);t.set(n-8,8,1,!0)}function l2(t,r){let e=t.size,n=-1,i=e-1,s=7,d=0;for(let m=e-1;m>0;m-=2)for(m===6&&m--;;){for(let f=0;f<2;f++)if(!t.isReserved(i,m-f)){let _=!1;d<r.length&&(_=(r[d]>>>s&1)===1),t.set(i,m-f,_),s--,s===-1&&(d++,s=7)}if(i+=n,i<0||e<=i){i-=n,n=-n;break}}}function s2(t,r,e){let n=new Qb;e.forEach(function(f){n.put(f.mode.bit,4),n.put(f.getLength(),n2.getCharCountIndicator(f.mode,t)),f.write(n)});let i=da.getSymbolTotalCodewords(t),s=Dl.getTotalCodewordsCount(t,r),d=(i-s)*8;for(n.getLengthInBits()+4<=d&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let m=(d-n.getLengthInBits())/8;for(let f=0;f<m;f++)n.put(f%2?17:236,8);return c2(n,t,r)}function c2(t,r,e){let n=da.getSymbolTotalCodewords(r),i=Dl.getTotalCodewordsCount(r,e),s=n-i,d=Dl.getBlocksCount(r,e),m=n%d,f=d-m,_=Math.floor(n/d),b=Math.floor(s/d),M=b+1,S=_-b,w=new e2(S),D=0,R=new Array(d),W=new Array(d),H=0,L=new Uint8Array(t.buffer);for(let de=0;de<d;de++){let Me=de<f?b:M;R[de]=L.slice(D,D+Me),W[de]=w.encode(R[de]),D+=Me,H=Math.max(H,Me)}let q=new Uint8Array(n),ne=0,_e,oe;for(_e=0;_e<H;_e++)for(oe=0;oe<d;oe++)_e<R[oe].length&&(q[ne++]=R[oe][_e]);for(_e=0;_e<S;_e++)for(oe=0;oe<d;oe++)q[ne++]=W[oe][_e];return q}function d2(t,r,e,n){let i;if(Array.isArray(t))i=Il.fromArray(t);else if(typeof t=="string"){let _=r;if(!_){let b=Il.rawSplit(t);_=ca.getBestVersionForData(b,e)}i=Il.fromString(t,_||40)}else throw new Error("Invalid data");let s=ca.getBestVersionForData(i,e);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!r)r=s;else if(r<s)throw new Error(`
5The chosen QR Code version cannot contain this amount of data.
6Minimum version required to store current data is: `+s+`.
7`);let d=s2(r,e,i),m=da.getSymbolSize(r),f=new Jb(m);return i2(f,r),o2(f),r2(f,r),Tl(f,e,0),r>=7&&a2(f,r),l2(f,d),isNaN(n)&&(n=Al.getBestMask(f,Tl.bind(null,f,e))),Al.applyMask(n,f),Tl(f,e,n),{modules:f,version:r,errorCorrectionLevel:e,maskPattern:n,segments:i}}ym.create=function(r,e){if(typeof r>"u"||r==="")throw new Error("No input text");let n=wl.M,i,s;return typeof e<"u"&&(n=wl.from(e.errorCorrectionLevel,wl.M),i=ca.from(e.version),s=Al.from(e.maskPattern),e.toSJISFunc&&da.setToSJISFunction(e.toSJISFunc)),d2(r,i,n,s)}});var Rl=je(Ui=>{function Sm(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let r=t.slice().replace("#","").split("");
7if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+t);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(n){return[n,n]}))),r.length===6&&r.push("F","F");let e=parseInt(r.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+r.slice(0,6).join("")}}Ui.getOptions=function(r){r||(r={}),r.color||(r.color={});let e=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,n=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:n,scale:n?4:i,margin:e,color:{dark:Sm(r.color.dark||"#000000ff"),light:Sm(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}};Ui.getScale=function(r,e){return e.width&&e.width>=r+e.margin*2?e.width/(r+e.margin*2):e.scale};Ui.getImageWidth=function(r,e){let n=Ui.getScale(r,e);return Math.floor((r+e.margin*2)*n)};Ui.qrToImageData=function(r,e,n){let i=e.modules.size,s=e.modules.data,d=Ui.getScale(i,n),m=Math.floor((i+n.margin*2)*d),f=n.margin*d,_=[n.color.light,n.color.dark];for(let b=0;b<m;b++)for(let M=0;M<m;M++){let S=(b*m+M)*4,w=n.color.light;if(b>=f&&M>=f&&b<m-f&&M<m-f){let D=Math.floor((b-f)/d),R=Math.floor((M-f)/d);w=_[s[D*i+R]?1:0]}r[S++]=w.r,r[S++]=w.g,r[S++]=w.b,r[S]=w.a}}});var Om=je(pa=>{var kl=Rl();function p2(t,r,e){t.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=e,r.width=e,r.style.height=e+"px",r.style.width=e+"px"}function m2(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}pa.render=function(r,e,n){let i=n,s=e;typeof i>"u"&&(!e||!e.getContext)&&(i=e,e=void 0),e||(s=m2()),i=kl.getOptions(i);let d=kl.getImageWidth(r.modules.size,i),m=s.getContext("2d"),f=m.createImageData(d,d);return kl.qrToImageData(f.data,r,i),p2(m,s,d),m.putImageData(f,0,0),s};pa.renderToDataURL=function(r,e,n){let i=n;typeof i>"u"&&(!e||!e.getContext)&&(i=e,e=void 0),i||(i={});let s=pa.render(r,e,i),d=i.type||"image/png",m=i.rendererOpts||{};return s.toDataURL(d,m.quality)}});var wm=je(Em=>{var u2=Rl();function Pm(t,r){let e=t.a/255,n=r+'="'+t.hex+'"';return e<1?n+" "+r+'-opacity="'+e.toFixed(2).slice(1)+'"':n}function Nl(t,r,e){let n=t+r;return typeof e<"u"&&(n+=" "+e),n}function g2(t,r,e){let n="",i=0,s=!1,d=0;for(let m=0;m<t.length;m++){let f=Math.floor(m%r),_=Math.floor(m/r);!f&&!s&&(s=!0),t[m]?(d++,m>0&&f>0&&t[m-1]||(n+=s?Nl("M",f+e,.5+_+e):Nl("m",i,0),i=0,s=!1),f+1<r&&t[m+1]||(n+=Nl("h",d),d=0)):i++}return n}Em.render=function(r,e,n){let i=u2.getOptions(e),s=r.modules.size,d=r.modules.data,m=s+i.margin*2,f=i.color.light.a?"<path "+Pm(i.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",_="<path "+Pm(i.color.dark,"stroke")+' d="'+g2(d,s,i.margin)+'"/>',b='viewBox="0 0 '+m+" "+m+'"',S='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+b+' shape-rendering="crispEdges">'+f+_+`</svg>
8`;return typeof n=="function"&&n(null,S),S}});var Tm=je(er=>{var f2=Dp(),Fl=Mm(),Im=Om(),h2=wm();function zl(t,r,e,n,i){let s=[].slice.call(arguments,1),d=s.length,m=typeof s[d-1]=="function";if(!m&&!f2())throw new Error("Callback required as last argument");if(m){if(d<2)throw new Error("Too few arguments provided");d===2?(i=e,e=r,r=n=void 0):d===3&&(r.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=e,e=r,r=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(e=r,r=n=void 0):d===2&&!r.getContext&&(n=e,e=r,r=void 0),new Promise(function(f,_){try{let b=Fl.create(e,n);f(t(b,r,n))}catch(b){_(b)}})}try{let f=Fl.create(e,n);i(null,t(f,r,n))}catch(f){i(f)}}er.create=Fl.create;er.toCanvas=zl.bind(null,Im.render);er.toDataURL=zl.bind(null,Im.renderToDataURL);er.toString=zl.bind(null,function(t,r,e){return h2.render(t,e)})});var ii=t=>({"active-sub":t});function bu(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleDashboard())}),h(1,"iconify-icon",14),o(2,"span"),l(3," Dashboards "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedDashboard?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isDashboardExpanded?"expand_less":"expand_more")}}function yu(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToDashboard(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedDashboard===e.route)),c(2),C(e.label)}}function Mu(t,r){if(t&1&&(o(0,"div",16),g(1,yu,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.dashboardSubMenus)}}function Su(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleReports())}),h(1,"iconify-icon",19),o(2,"span"),l(3," Reports "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedReports?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isReportsExpanded?"expand_less":"expand_more")}}function Ou(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToReports(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedReports===e.route)),c(2),C(e.label)}}function Pu(t,r){if(t&1&&(o(0,"div",16),g(1,Ou,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.reportsSubMenus)}}function Eu(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleGovernance())}),h(1,"iconify-icon",20),o(2,"span"),l(3," Governance "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedGovernance?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isGovernanceExpanded?"expand_less":"expand_more")}}function wu(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToGovernance(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedGovernance===e.route)),c(2),C(e.label)}}function Iu(t,r){if(t&1&&(o(0,"div",16),g(1,wu,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.governanceSubMenus)}}function Tu(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleAutoPilot())}),h(1,"iconify-icon",21),o(2,"span"),l(3," Auto-Pilot "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedAutoPilot?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isAutoPilotExpanded?"expand_less":"expand_more")}}function Au(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToAutoPilot(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedAutoPilot===e.route)),c(2),C(e.label)}}function Du(t,r){if(t&1&&(o(0,"div",16),g(1,Au,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.autoPilotSubMenus)}}function Ru(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.togglePerformance())}),h(1,"iconify-icon",22),o(2,"span"),l(3," Performance "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedPerformance?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isPerformanceExpanded?"expand_less":"expand_more")}}function ku(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToPerformance(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedPerformance===e.route)),c(2),C(e.label)}}function Nu(t,r){if(t&1&&(o(0,"div",16),g(1,ku,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.performanceSubMenus)}}function Fu(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleUsers())}),h(1,"iconify-icon",23),o(2,"span"),l(3," Users Config "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedUsers?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isUsersExpanded?"expand_less":"expand_more")}}function zu(t,r){if(t&1){let e=A();o(0,"button",18),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToUsers(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("disabled",!n.hasReadyAccount)("ngClass",zn(3,ii,n.selectedUsers===e.route)),c(2),C(e.label)}}function Lu(t,r){if(t&1&&(o(0,"div",16),g(1,zu,3,5,"button",17),a()),t&2){let e=u();c(),p("ngForOf",e.usersSubMenus)}}function Vu(t,r){if(t&1){let e=A();o(0,"button",24),v("click",function(){O(e);let i=u();return P(i.toggleConfig())}),h(1,"iconify-icon",21),o(2,"span"),l(3," Setup Config "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedConfig?"active":"icons"),c(5),C(e.isConfigExpanded?"expand_less":"expand_more")}}function Bu(t,r){if(t&1){let e=A();o(0,"button",26),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToConfig(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("ngClass",zn(2,ii,n.selectedConfig===e.route)),c(2),C(e.label)}}function Uu(t,r){if(t&1&&(o(0,"div",16),g(1,Bu,3,4,"button",25),a()),t&2){let e=u();c(),p("ngForOf",e.configSubMenus)}}function ju(t,r){if(t&1){let e=A();o(0,"button",13),v("click",function(){O(e);let i=u();return P(i.toggleCloud())}),h(1,"iconify-icon",27),o(2,"span"),l(3," Cloud Atler "),a(),o(4,"mat-icon",15),l(5),a()()}if(t&2){let e=u();p("ngClass",e.selectedCloud?"active":"icons")("disabled",!e.hasReadyAccount),c(5),C(e.isCloudExpanded?"expand_less":"expand_more")}}function $u(t,r){if(t&1){let e=A();o(0,"button",26),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.navigateToCloud(i))}),o(1,"span"),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2);p("ngClass",zn(2,ii,n.selectedCloud===e.route)),c(2),C(e.label)}}function qu(t,r){if(t&1&&(o(0,"div",16),g(1,$u,3,4,"button",25),a()),t&2){let e=u();c(),p("ngForOf",e.cloudSubMenus)}}var As=(()=>{class t{constructor(e,n){this.router=e,this.changeDetectorRef=n,this.bucket_url=`${ye.BUCKET_URL}`,this.integrationCompleted=!1,this.hasReadyAccount=!1,this.isSidebarExpanded=!1,this.isPerformanceExpanded=!1,this.isAutoPilotExpanded=!1,this.isDashboardExpanded=!1,this.isReportsExpanded=!1,this.isGovernanceExpanded=!1,this.isUsersExpanded=!1,this.isConfigExpanded=!1,this.isCloudExpanded=!1,this.isEmbeddedDashboardRoute=!1,this.selectedDashboard=null,this.selectedReports=null,this.selectedGovernance=null,this.selectedAutoPilot=null,this.selectedPerformance=null,this.selectedUsers=null,this.selectedConfig=null,this.selectedCloud=null,this.dashboardSubMenus=[{label:"Cost Explorer",route:"finops-dashboard"},{label:"CSPM",route:"cspm-dashboard"}],this.reportsSubMenus=[{label:"History",route:"reports"}],this.governanceSubMenus=[{label:"Budget",route:"budget"},{label:"Tag Allocations",route:"tag-allocations"}],this.autoPilotSubMenus=[{label:"Patch Management",route:"patch-management"}],this.performanceSubMenus=[{label:"Performance Analysis",route:"performance"}],this.usersSubMenus=[{label:"Users",route:"user-management"},{label:"Teams",route:"teams"},{label:"Cost Center",route:"cost-center"}],this.configSubMenus=[{label:"Cloud",route:"cloud-config"}],this.cloudSubMenus=[{label:"Cloud Saver",route:"cloud-atler"}],this.router.events.pipe($i(i=>i instanceof is)).subscribe(i=>{this.currentUrl=i.url,this.syncPerformanceState(i.url),this.syncAutoPilotState(i.url),this.syncDashboardState(i.url),this.syncReportsState(i.url),this.syncGovernanceState(i.url),this.syncUsersState(i.url),this.syncConfigState(i.url),this.syncCloudState(i.url),this.syncEmbeddedDashboardState(i.url)})}ngOnInit(){this.userInfo=JSON.parse(window.localStorage.getItem("userInfo")||"{}"),this.roleId=this.userInfo.roleId,this.clientName=window.localStorage.getItem("org_name"),this.imageURL=this.bucket_url+window.localStorage.getItem("org_logo"),this.updateReadyStatus(),window.addEventListener("storage",e=>{(e.key==="accountData"||e.key==="hasReadyAccount")&&this.updateReadyStatus()}),window.addEventListener("accountDataUpdated",()=>{this.updateReadyStatus()}),this.currentUrl=this.router.url,this.syncPerformanceState(this.currentUrl),this.syncAutoPilotState(this.currentUrl),this.syncDashboardState(this.currentUrl),this.syncReportsState(this.currentUrl),this.syncGovernanceState(this.currentUrl),this.syncUsersState(this.currentUrl),this.syncConfigState(this.currentUrl),this.syncCloudState(this.currentUrl),this.syncEmbeddedDashboardState(this.currentUrl)}ngAfterViewChecked(){window.localStorage.getItem("integrationCompleted")=="true"?this.integrationCompleted=!0:this.integrationCompleted=!1}updateReadyStatus(){try{let e=JSON.parse(localStorage.getItem("accountData")||"[]");this.hasReadyAccount=e.some(n=>n.DATA_READY===!0&&n.MASTER_ACCOUNT===!0),this.changeDetectorRef.detectChanges()}catch(e){console.error("Error updating ready status:",e),this.hasReadyAccount=!1}}changeComponent(e){e.action=="changePassword"&&this.router.navigateByUrl("admin-dashboard/change-password")}openTermsAndConditions(e){e&&e.preventDefault(),this.openAuthRouteInNewTab("legal/terms-service")}openPrivacyPolicy(e){e&&e.preventDefault(),this.openAuthRouteInNewTab("legal/privacy-policy")}openAuthRouteInNewTab(e){let n=`/${e.trim().replace(/^\/+/,"")}`,i=new URL(n,window.location.origin).toString();window.open(i,"_blank","noopener,noreferrer")}togglePerformance(){this.hasReadyAccount&&(this.isPerformanceExpanded=!this.isPerformanceExpanded)}toggleAutoPilot(){this.hasReadyAccount&&(this.isAutoPilotExpanded=!this.isAutoPilotExpanded)}toggleDashboard(){this.hasReadyAccount&&(this.isDashboardExpanded=!this.isDashboardExpanded)}toggleReports(){this.hasReadyAccount&&(this.isReportsExpanded=!this.isReportsExpanded)}toggleGovernance(){this.hasReadyAccount&&(this.isGovernanceExpanded=!this.isGovernanceExpanded)}toggleUsers(){this.hasReadyAccount&&(this.isUsersExpanded=!this.isUsersExpanded)}toggleConfig(){this.isConfigExpanded=!this.isConfigExpanded}toggleCloud(){this.hasReadyAccount&&(this.isCloudExpanded=!this.isCloudExpanded)}expandSidebar(){this.isSidebarExpanded=!0}collapseSidebar(){this.isSidebarExpanded=!1}navigateToPerformance(e){this.hasReadyAccount&&(this.selectedPerformance=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}navigateToAutoPilot(e){this.hasReadyAccount&&(this.selectedAutoPilot=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}navigateToDashboard(e){if(!this.hasReadyAccount)return;let n=e.route;this.selectedDashboard=n,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",n])}navigateToReports(e){this.hasReadyAccount&&(this.selectedReports=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}navigateToGovernance(e){this.hasReadyAccount&&(this.selectedGovernance=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}navigateToUsers(e){this.hasReadyAccount&&(this.selectedUsers=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}navigateToConfig(e){this.selectedConfig=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route])}navigateToCloud(e){this.hasReadyAccount&&(this.selectedCloud=e.route,this.collapseSidebar(),this.router.navigate(["/admin-dashboard",e.route]))}syncPerformanceState(e){let n=this.performanceSubMenus.find(i=>e.includes(i.route));this.selectedPerformance=n?n.route:null}syncAutoPilotState(e){let n=this.autoPilotSubMenus.find(i=>e.includes(i.route));this.selectedAutoPilot=n?n.route:null}syncDashboardState(e){let n=this.dashboardSubMenus.find(i=>e.includes(i.route));this.selectedDashboard=n?n.route:null}syncReportsState(e){let n=this.reportsSubMenus.find(i=>e.includes(i.route));this.selectedReports=n?n.route:null}syncGovernanceState(e){let n=this.governanceSubMenus.find(i=>e.includes(i.route));this.selectedGovernance=n?n.route:null}syncUsersState(e){let n=this.usersSubMenus.find(i=>e.includes(i.route));this.selectedUsers=n?n.route:null}syncConfigState(e){let n=this.configSubMenus.find(i=>e.includes(i.route));this.selectedConfig=n?n.route:null}syncCloudState(e){let n=this.cloudSubMenus.find(i=>e.includes(i.route));this.selectedCloud=n?n.route:null}syncEmbeddedDashboardState(e){this.isEmbeddedDashboardRoute=e.includes("finops-dashboard")}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-admin
8-management"]],decls:34,vars:24,consts:[[1,"main-container"],[3,"outfilter"],[1,"container"],[1,"left-container",3,"mouseenter","mouseleave"],[1,"icons-container"],["class","icons performance-toggle",3,"ngClass","disabled","click",4,"ngIf"],["class","performance-submenu",4,"ngIf"],["class","icons performance-toggle",3,"ngClass","click",4,"ngIf"],[1,"icons",3,"click"],["icon","material-symbols:policy-outline",1,"icon-symbol"],["icon","jam:document",1,"icon-symbol"],[1,"reve-cloud"],[1,"right-container"],[1,"icons","performance-toggle",3,"click","ngClass","disabled"],["icon","material-symbols:dashboard-outline",1,"icon-symbol"],[1,"chevron-icon"],[1,"performance-submenu"],["class","icons",3,"disabled","ngClass","click",4,"ngFor","ngForOf"],[1,"icons",3,"click","disabled","ngClass"],["icon","uis:graph-bar",1,"icon-symbol"],["icon","mdi:dollar",1,"icon-symbol"],["icon","mingcute:ai-line",1,"icon-symbol"],["icon","cil:graph",1,"icon-symbol"],["icon","carbon:group",1,"icon-symbol"],[1,"icons","performance-toggle",3,"click","ngClass"],["class","icons",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"icons",3,"click","ngClass"],["icon","material-symbols:cloud-outline",1,"icon-symbol"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"app-header",1),v("outfilter",function(d){return i.changeComponent(d)}),a(),o(2,"div",2)(3,"div",3),v("mouseenter",function(){return i.expandSidebar()})("mouseleave",function(){return i.collapseSidebar()}),o(4,"div",4),g(5,bu,6,3,"button",5)(6,Mu,2,1,"div",6)(7,Su,6,3,"button",5)(8,Pu,2,1,"div",6)(9,Eu,6,3,"button",5)(10,Iu,2,1,"div",6)(11,Tu,6,3,"button",5)(12,Du,2,1,"div",6)(13,Ru,6,3,"button",5)(14,Nu,2,1,"div",6)(15,Fu,6,3,"button",5)(16,Lu,2,1,"div",6)(17,Vu,6,2,"button",7)(18,Uu,2,1,"div",6)(19,ju,6,3,"button",5)(20,qu,2,1,"div",6),a(),o(21,"div",4)(22,"button",8),v("click",function(){return i.openPrivacyPolicy(),i.collapseSidebar()}),h(23,"iconify-icon",9),o(24,"span"),l(25," Privacy Policy "),a()(),o(26,"button",8),v("click",function(){return i.openTermsAndConditions(),i.collapseSidebar()}),h(27,"iconify-icon",10),o(28,"span"),l(29," Terms and Conditions "),a()(),o(30,"div",11),l(31," @ 2025 Cloud Atler "),a()()(),o(32,"div",12),h(33,"router-outlet"),a()()()),n&2&&(c(2),Y("embedded-dashboard-layout",i.isEmbeddedDashboardRoute),c(),Y("expanded",i.isSidebarExpanded)("collapsed",!i.isSidebarExpanded),c(2),p("ngIf",i.roleId==3),c(),p("ngIf",i.isDashboardExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isReportsExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isGovernanceExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isAutoPilotExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isPerformanceExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isUsersExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isConfigExpanded),c(),p("ngIf",i.roleId==3),c(),p("ngIf",i.isCloudExpanded),c(12),Y("collapsed",!i.isSidebarExpanded))},dependencies:[N,xe,$,B,z,Dn,Wi,os,Ps],styles:[".main-container[_ngcontent-%COMP%]{--admin-header-height: 72px;--admin-sidebar-clearance: 4px;--admin-sidebar-top: calc(var(--admin-header-height) + var(--admin-sidebar-clearance));height:100vh;width:100%;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#fbfdff,#f9f9f9);-ms-overflow-style:none;scrollbar-width:none}app-header[_ngcontent-%COMP%]{position:relative;z-index:1100;flex:0 0 auto}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;flex:1;min-height:0;height:auto;max-width:none;padding:0;--sidebar-expanded-width: min(280px, 22vw);--sidebar-collapsed-width: 72px}.company-logo-container[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;margin-bottom:20px;padding:0 15px}.logo[_ngcontent-%COMP%]{width:50px}.head-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#fff}.left-container[_ngcontent-%COMP%]{position:fixed;left:0;top:var(--admin-sidebar-top);width:var(--sidebar-expanded-width);height:calc(100vh - var(--admin-sidebar-top));transition:width .2s ease;background:#fff;border:1px solid #EDEDED;border-left:0;border-top:0;box-shadow:0 12px 28px #0f172a0f;display:flex;flex-direction:column;justify-content:space-between;gap:10px;box-sizing:border-box;z-index:1000;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none;padding:10px 8px}.left-container.expanded[_ngcontent-%COMP%]{width:var(--sidebar-expanded-width)}.left-container.collapsed[_ngcontent-%COMP%]{width:var(--sidebar-collapsed-width)}.right-container[_ngcontent-%COMP%]{margin-left:var(--sidebar-expanded-width);width:calc(100% - var(--sidebar-expanded-width));transition:margin-left .2s ease,width .2s ease;height:100%;min-width:0;overflow-y:auto;box-sizing:border-box;background:transparent;-ms-overflow-style:none;scrollbar-width:none;margin-top:0}.right-container.collapsed[_ngcontent-%COMP%]{margin-left:var(--sidebar-collapsed-width);width:calc(100% - var(--sidebar-collapsed-width))}.container.embedded-dashboard-layout[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%]{margin-left:var(--sidebar-collapsed-width);width:calc(100% - var(--sidebar-collapsed-width));transform:translate(calc(var(--sidebar-expanded-width) - var(--sidebar-collapsed-width)));transition:transform .2s ease;will-change:transform}.container.embedded-dashboard-layout[_ngcontent-%COMP%]   .right-container.collapsed[_ngcontent-%COMP%]{margin-left:var(--sidebar-collapsed-width);width:calc(100% - var(--sidebar-collapsed-width));transform:translate(0)}.right-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.icons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.icons[_ngcontent-%COMP%]{color:#101010;background:none;border:none;display:flex;flex-direction:row;gap:10px;font-size:14px;align-items:center;padding:10px 12px;width:100%;min-height:42px;
8cursor:pointer;border-radius:14px;transition:background-color .18s ease,color .18s ease,box-shadow .18s ease}.icons[_ngcontent-%COMP%]:hover{background:#f5f5f5;color:#101010;box-shadow:inset 0 0 0 1px #ededed}.active[_ngcontent-%COMP%]{background:#f5f5f5;color:#101010;border-radius:14px;box-shadow:inset 0 0 0 1px #ededed}button[disabled][_ngcontent-%COMP%]{cursor:not-allowed;opacity:.5;color:#6c757d!important}button[disabled][_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:inherit}.icon-symbol[_ngcontent-%COMP%]{color:#878787;font-size:23px}.reve-cloud[_ngcontent-%COMP%]{color:#101010;font-size:10px}.performance-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.chevron-icon[_ngcontent-%COMP%]{margin-left:auto;font-size:18px;position:relative;top:5px;color:#878787}.performance-submenu[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding-left:34px}.active-sub[_ngcontent-%COMP%]{background:#35a5db;color:#fff;border-radius:14px;padding:10px 12px;box-shadow:0 8px 18px #35a5db2e}.left-container.collapsed[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]{justify-content:center;padding:12px 0}.left-container.collapsed[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:none}.left-container.collapsed[_ngcontent-%COMP%]   .company-logo-container[_ngcontent-%COMP%]{justify-content:center;padding:0}.left-container.collapsed[_ngcontent-%COMP%]   .company-logo-container[_ngcontent-%COMP%]   .head-text[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]   .chevron-icon[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]   .performance-submenu[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]   .reve-cloud[_ngcontent-%COMP%]{display:none}@media(max-width:900px){.main-container[_ngcontent-%COMP%]{min-height:100vh;height:auto;overflow:visible}.container[_ngcontent-%COMP%]{flex-direction:column;height:auto;min-height:0}.left-container[_ngcontent-%COMP%], .left-container.expanded[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]{position:sticky;top:0;width:100%;height:auto;max-height:42vh;padding:10px;border-left:0;border-right:0;border-top:0;z-index:900;box-shadow:0 10px 22px #0f172a14}.icons-container[_ngcontent-%COMP%]{flex-direction:row;gap:8px;overflow-x:auto;padding-bottom:4px}.icons-container[_ngcontent-%COMP%]::-webkit-scrollbar, .performance-submenu[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.icons[_ngcontent-%COMP%]{width:auto;min-width:max-content;padding:10px 12px;justify-content:flex-start;white-space:nowrap}.left-container.collapsed[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]{justify-content:flex-start;padding:10px 12px}.left-container.collapsed[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]   .chevron-icon[_ngcontent-%COMP%]{display:inline-flex}.left-container.collapsed[_ngcontent-%COMP%]   .performance-submenu[_ngcontent-%COMP%], .performance-submenu[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding-left:0;overflow-x:auto}.performance-submenu[_ngcontent-%COMP%]   .icons[_ngcontent-%COMP%]{min-height:36px;font-size:13px;background:#f8fafc;border:1px solid #E5E7EB}.reve-cloud[_ngcontent-%COMP%]{display:none}.right-container[_ngcontent-%COMP%], .right-container.collapsed[_ngcontent-%COMP%], .container.embedded-dashboard-layout[_ngcontent-%COMP%]   .right-container[_ngcontent-%COMP%], .container.embedded-dashboard-layout[_ngcontent-%COMP%]   .right-container.collapsed[_ngcontent-%COMP%]{margin-left:0;width:100%;transform:none;height:auto;min-height:calc(100vh - 170px);overflow:visible}}@media(max-width:560px){.left-container[_ngcontent-%COMP%], .left-container.expanded[_ngcontent-%COMP%], .left-container.collapsed[_ngcontent-%COMP%]{max-height:48vh}.icons[_ngcontent-%COMP%]{font-size:13px;min-height:38px}.icon-symbol[_ngcontent-%COMP%]{font-size:20px}}"]})}}return t})();var Ds=(()=>{class t{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-about-us"]],decls:0,vars:0,template:function(n,i){},dependencies:[N],encapsulation:2})}}return t})();var Rs=(()=>{class t{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-support"]],decls:0,vars:0,template:function(n,i){},dependencies:[N],encapsulation:2})}}return t})();function kn(t){return Array.isArray(t)?t.filter(r=>String(r?.SCOPE??"").toLowerCase()==="single"):[]}function Hu(t,r){t&1&&(o(0,"div",6)(1,"div",7)(2,"div",8),h(3,"span",9),a()()())}function Wu(t,r){t&1&&(o(0,"span",16),l(1,"(Coming Soon)"),a())}function Gu(t,r){if(t&1){let e=A();o(0,"mat-card",10),v("click",function(){let i=O(e).$implicit,s=u();return P(s.selectProvider(i.ID,i.CODE))}),o(1,"div",11)(2,"div",12),h(3,"img",13),a(),o(4,"span",14),l(5),a(),g(6,Wu,2,0,"span",15),a()()}if(t&2){let e=r.$implicit,n=u();c(3),p("src",Zl(n.bucket_url+e.LOGO),Qe),c(2),C(e.NAME),c(),p("ngIf",e.NAME!="Amazon Web Services")}}var va=(()=>{class t{debugLog(e,n){console.log(`[DEBUG][${new Date().toISOString()}] ${e}`,n||"")}constructor(e,n,i,s,d){this.fb=e,this.dashboardService=n,this.notify=i,this.router=s,this.dialog=d,this.loading=!1,this.isCredentialScreen=!1,this.disabled=!1,this.bucket_url=`${ye.BUCKET_URL}
8`,this.authenticationForm=this.fb.group({account_id:["",U.required],account_name:["",U.required],region:["",U.required],access_key:["",U.required],secret_key:["",U.required]})}ngOnInit(){this.cloudProviders=kn(JSON.parse(window.localStorage.getItem("CLOUD_PROVIDER")||"[]")),window.localStorage.getItem("integrationCompleted")=="new_account"&&(this.isCredentialScreen=!0,this.serviceInfo=JSON.parse(window.localStorage.getItem("serviceProviderInfo")||"{}"),this.serviceInfo.serviceId==1&&(this.regions=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"))),this.selectProvider(1,1)}selectProvider(e,n){e==1&&(this.regions=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}")),this.loading=!0,this.providerID=e,this.dashboardService.getClientCredentials(e).subscribe({next:i=>{if(this.loading=!1,window.localStorage.setItem("serviceProviderInfo",JSON.stringify({serviceId:e,serviceCode:n})),window.dispatchEvent(new Event("serviceProviderInfoUpdated")),i.object&&Array.isArray(i.object)&&i.object.length>0){window.localStorage.setItem("accountData",JSON.stringify(i.object));let s=i.object.find(d=>d.DATA_READY===!0&&d.MASTER_ACCOUNT===!0);if(s)window.localStorage.setItem("currentAccountID",s.ACCOUNT_ID.toString()),window.localStorage.setItem("regionCode",s.REGION_CODE||""),window.localStorage.setItem("integrationCompleted","true"),window.localStorage.setItem("grfOrgId",s.GRF_ORG_ID),s.REGION?.length>0?window.localStorage.setItem("REGION",JSON.stringify(s.REGION)):window.localStorage.setItem("REGION",JSON.stringify(JSON.parse(window.localStorage.getItem("AWS_REGION")||"[]"))),window.localStorage.setItem("hasReadyAccount",s.DATA_READY.toString());else{let d=i.object.find(m=>m.MASTER_ACCOUNT===!0)?i.object.find(m=>m.MASTER_ACCOUNT===!0):i.object[0];window.localStorage.setItem("currentAccountID",d.ACCOUNT_ID.toString()),window.localStorage.setItem("regionCode",d.REGION_CODE||""),window.localStorage.setItem("integrationCompleted","false"),window.localStorage.setItem("grfOrgId",d.GRF_ORG_ID),d.REGION?.length>0?window.localStorage.setItem("REGION",JSON.stringify(d.REGION)):window.localStorage.setItem("REGION",JSON.stringify(JSON.parse(window.localStorage.getItem("AWS_REGION")||"[]"))),window.localStorage.setItem("hasReadyAccount",d.DATA_READY.toString())}window.dispatchEvent(new Event("accountDataUpdated")),this.router.navigateByUrl("admin-dashboard/finops-dashboard")}else this.router.navigate(["/admin-dashboard/cloud-config"])},error:i=>{this.loading=!1,this.notify.showNotification(i.error.message,"top",E[i.error.status]?E[i.error.status]:"error",i.error.status)}})}cleanupOverlays(){this.debugLog("Starting overlay cleanup"),setTimeout(()=>{let e=document.querySelectorAll(".cdk-overlay-container, .cdk-overlay-backdrop");this.debugLog(`Found ${e.length} overlays to clean up`),e.forEach((n,i)=>{n?.parentNode&&(n.parentNode.removeChild(n),this.debugLog(`Removed overlay ${i+1}`))}),document.body.style.pointerEvents="auto",this.debugLog("Reset body pointer-events")},0)}backToProviders(){window.localStorage.removeItem("serviceProviderInfo"),this.isCredentialScreen=!1,this.authenticationForm.reset(),this.regions=[]}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(re),y(V),y(G),y(Se))}}static{this.\u0275cmp=k({type:t,selectors:[["app-service-dashboard"]],decls:7,vars:2,consts:[["class","overlay",4,"ngIf"],[1,"dashboard-container"],[1,"service-header"],[1,"service-row"],["class","service-card",3,"click",4,"ngFor","ngForOf"],[1,"auth-container"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"service-card",3,"click"],[1,"card-content"],[1,"provider_logo"],["onerror","this.src='assets/images/company.png';",3,"src"],[1,"service-name"],["class","coming-soon",4,"ngIf"],[1,"coming-soon"]],template:function(n,i){n&1&&(g(0,Hu,4,0,"div",0),o(1,"div",1)(2,"div",2),l(3,"Select Your Cloud Service"),a(),o(4,"div",3),g(5,Gu,7,4,"mat-card",4),a()(),h(6,"div",5)),n&2&&(p("ngIf",i.loading),c(5),p("ngForOf",i.cloudProviders))},dependencies:[N,$,B,z,Pt,un,Yt],styles:[".dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:24px;box-sizing:border-box;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:36px;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.service-header[_ngcontent-%COMP%]{font-size:27px;font-weight:300;color:#000}.service-row[_ngcontent-%COMP%]{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,220px));justify-content:center;align-items:center;gap:20px}.service-card[_ngcontent-%COMP%]{height:180px;width:100%;padding:2%;background-color:#e3ecf7;border:1px solid rgb(224,224,224);box-shadow:0 10px 24px #0f172a14;border-radius:12px;cursor:pointer;display:flex;justify-content:center}.card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;text-align:center}.provider_logo[_ngcontent-%COMP%]{height:60%;display:flex;justify-content:center;align-items:center}
8.service-name[_ngcontent-%COMP%]{font-size:15px;font-weight:400;color:#000;text-align:center;line-height:30px;width:80%;height:25%}.coming-soon[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#666;text-align:center;margin-top:8px;width:100%;font-style:italic;height:5%}.auth-container[_ngcontent-%COMP%]{height:100%;padding:3%;box-sizing:border-box;position:relative;display:flex;flex-direction:column;gap:50px}.auth-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:20px;align-items:center}.back-arrow[_ngcontent-%COMP%]{font-size:23px;cursor:pointer}.auth-head[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:50px}.auth-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.container-row[_ngcontent-%COMP%]{display:flex;gap:40px;flex-wrap:wrap}.input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.label[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#4f575e}.text-box[_ngcontent-%COMP%]{width:min(320px,100%);height:50px;border-radius:4px;border:1px solid rgb(130,130,130);font-size:14px;padding:6px 10px;box-sizing:border-box;outline:none}.text-box1[_ngcontent-%COMP%]{width:min(320px,100%);height:50px;border-radius:4px;border:1px solid #828282;font-size:14px;padding:15px 10px 0;box-sizing:border-box;outline:none;background-color:#fff}.text-box[_ngcontent-%COMP%]:focus{border:1px solid rgb(130,130,130)!important}.text-box[_ngcontent-%COMP%]::placeholder{text-transform:none}.mat-error[_ngcontent-%COMP%]{color:red;font-size:12px;line-height:18px;letter-spacing:0px}.submit-btn[_ngcontent-%COMP%]{background-color:#1a73e9;width:180px;height:40px;border-radius:4px;color:#fff!important;border:none;font-size:14px}.submit-btn[disabled][_ngcontent-%COMP%]{opacity:.5}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:18px 14px;justify-content:flex-start;gap:24px}.service-header[_ngcontent-%COMP%]{font-size:24px;text-align:center}.service-row[_ngcontent-%COMP%]{grid-template-columns:1fr;max-width:360px}.service-card[_ngcontent-%COMP%]{min-height:150px;height:auto}.auth-container[_ngcontent-%COMP%]{padding:18px 14px}.container-row[_ngcontent-%COMP%]{flex-direction:column;gap:18px}.input-container[_ngcontent-%COMP%], .text-box[_ngcontent-%COMP%], .text-box1[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();var ks=(()=>{class t{constructor(e,n,i,s){this.fb=e,this.dashboardService=n,this.notify=i,this.router=s,this.disabled=!1,this.showModal=!0,this.authenticationForm=this.fb.group({account_id:["",U.required],account_name:["",U.required],region:["",U.required]})}ngOnInit(){this.providerID=JSON.parse(window.localStorage.getItem("serviceProviderInfo")||"{}").serviceId,this.providerID==1&&(this.regions=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"))}backToProviders(){window.localStorage.removeItem("serviceProviderInfo"),this.router.navigateByUrl("admin-dashboard/service-dashboard"),this.authenticationForm.reset()}saveCredentials(){this.disabled=!0;let e={CLOUD_PROVIDER:this.providerID,AWS_REGION:this.authenticationForm.value.region,ACCOUNT_ID:this.authenticationForm.value.account_id,ACCOUNT_NAME:this.authenticationForm.value.account_name};this.dashboardService.configureClientCredentials(e).subscribe({next:n=>{this.disabled=!1,window.localStorage.setItem("currentAccountID",n.object.ID),window.localStorage.setItem("regionCode",n.object.REGION_ID),window.localStorage.setItem("integrationCompleted","true"),this.router.navigateByUrl("admin-dashboard/finops-dashboard")},error:n=>{this.disabled=!1,this.notify.showNotification(n.error.message,"top","error",n.error.status),this.authenticationForm.reset()}})}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(re),y(V),y(G))}}static{this.\u0275cmp=k({type:t,selectors:[["app-credential-screen"]],decls:1,vars:0,consts:[[1,"credential-screen-container"]],template:function(n,i){n&1&&wn(0,"div",0)},dependencies:[N,z,un,Yt],styles:[".auth-container[_ngcontent-%COMP%]{height:100%;padding:3%;box-sizing:border-box;position:relative;display:flex;flex-direction:column;gap:50px}.auth-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:20px;align-items:center}.back-arrow[_ngcontent-%COMP%]{font-size:23px;cursor:pointer}.auth-head[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:50px}.auth-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.container-row[_ngcontent-%COMP%]{display:flex;gap:40px}.input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.label[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#4f575e}.text-box[_ngcontent-%COMP%]{width:320px;height:50px;border-radius:4px;border:1px solid rgb(130,130,130);font-size:14px;padding:6px 10px;box-sizing:border-box;outline:none}.text-box1[_ngcontent-%COMP%]{width:320px;height:50px;border-radius:4px;border:1px solid #828282;font-size:14px;padding:15px 10px 0;box-sizing:border-box;outline:none;background-color:#fff}.text-box[_ngcontent-%COMP%]:focus{border:1px solid rgb(130,130,130)!important}.text-box[_ngcontent-%COMP%]::placeholder{text-transform:none}.mat-error[_ngcontent-%COMP%]{color:red;font-size:12px;line-height:18px;letter-spacing:0px}.submit-btn[_ngcontent-%COMP%]{background-color:#1a73e9;width:180px;height:40px;border-radius:4px;color:#fff!important;border:none;font-size:14px}.submit-btn[disabled][_ngcontent-%COMP%]{opacity:.5}"]})}}return t})();var hn=So(xa());function Yu(t,r){t&1&&(o(0,"div",27)(1,"div",28)(2,"div",29),h(3,"span",30),a()()())}function Ku(t,r){if(t&1&&(o(0,"mat-option",31),l(1),a()),t&2){let e=r.$implicit;p("value",e.ACCOUNT_ID),c(),x(" ",e.NAME," ")}}function Qu(t,r){if(t&1&&(o(0,"th",35),l(1),a()),t&2){let e=u().$implicit,n=u(2);Y("sticky-col",e==="PRODUCT_CODE"),c(),x(" ",n.capitalize(e).replace("_"," ")," ")}}function Ju(t,r){if(t&1&&(o(0,"td",36),l(1),a()),t&2){let e=r.$implicit,n=u().$implicit;Y("sticky-col",n==="PRODUCT_CODE"),c(),x(" ",e[n]," ")}}function Zu(t,r){if(t&1&&(I(0,32),g(1,Qu,2,3,"th",33)(2,Ju,2,3,"td",34),T()),t&2){let e=r.$implicit;p("matColumnDef",e)("sticky",e==="PRODUCT_CODE")}}function Xu(t,r){t&1&&h(0,"tr",37)}function e0(t,r){t&1&&h(0,"tr",38)}function t0(t,r){if(t&1){let e=A();o(0,"div",8),g(1,Yu,4,0,"div",9),o(2,"div",10),l(3," Reports "),a(),o(4,"div",11)(5,"div",12)(6,"mat-select",13),se("ngModelChange",function(i){O(e);let s=u();return le(s.selectedAccount,i)||(s.selectedAccount=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onAccountChange(i.value))}),g(7,Ku,2,2,"mat-option",14),a()(),o(8,"div",15)(9,"mat-date-range-input",16),h(10,"input",17)(11,"input",18),a(),h(12,"mat-datepicker-toggle",19)(13,"mat-date-range-picker",null,0),a(),o(15,"button",20),v("click",function(){O(e);let i=u();return P(i.getDaysCostSummary())}),l(16,"Get Data"),a(),o(17,"iconify-icon",21),v("click",function(){O(e);let i=u();return P(!i.dateRange.valid||i.onDateChange()?null:i.downloadReport())}),a()(),o(18,"div",22)(19,"table",23),g(20,Zu,3,2,"ng-container",24)(21,Xu,1,0,"tr",25)(22,e0,1,0,"tr",26),a()()()}if(t&2){let e=Ce(14),n=u();c(),p("ngIf",n.loading),c(5),ae("ngModel",n.selectedAccount),c(),p("ngForOf",n.accounts),c(),Y("error",n.dateRange.invali
8d),c(),p("rangePicker",e)("formGroup",n.dateRange),c(3),p("for",e),c(3),p("disabled",!n.dateRange.valid||n.onDateChange()),c(2),Y("disabled",!n.dateRange.valid||n.onDateChange()),c(2),p("dataSource",n.dataSource),c(),p("ngForOf",n.displayedColumns),c(),p("matHeaderRowDef",n.displayedColumns)("matHeaderRowDefSticky",!0),c(),p("matRowDefColumns",n.displayedColumns)}}function n0(t,r){t&1&&(o(0,"div",39)(1,"mat-card",40)(2,"div",41),l(3,"(Coming Soon)"),a()()())}function i0(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function o0(t,r){t&1&&(o(0,"span",49),l(1,"Requesting... "),h(2,"iconify-icon",50),a())}function r0(t,r){if(t&1){let e=A();o(0,"section",42)(1,"div",43)(2,"div",44),h(3,"iconify-icon",45),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",46),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,i0,2,0,"span",47)(10,o0,3,0,"span",48),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var Ns=(()=>{class t{constructor(e,n,i,s,d,m){this.dashboardService=e,this.notify=n,this.fb=i,this.dialog=s,this.ngZone=d,this.cdr=m,this.accounts=[],this.selectedAccount="",this.loading=!1,this.isAccessLoading=!1,this.options=[{value:2,label:"Last 2 days Cost"},{value:7,label:"Last 7 days Cost"},{value:0,label:"Last 6 Months Cost"}],this.selectedOption=2,this.costSummaryData=[],this.dataSource=new fn,this.displayedColumns=[],this.cloudProviders=[],this.selectedTab=0,this.selectedProvider="AWS",this.isReportsEnabled=!0,this.months=[],this.years=[],this.dateRange=this.fb.group({start:[null,U.required],end:[null,U.required]})}ngOnInit(){if(this.isReportsEnabled=this.isFeatureEnabled(4),!this.isReportsEnabled)return;this.cloudProviders=kn(JSON.parse(window.localStorage.getItem("CLOUD_PROVIDER")||"[]"));let e=new Date;e.setDate(e.getDate()-1);let n=new Date(e);n.setDate(n.getDate()-6),this.dateRange=this.fb.group({start:[n,U.required],end:[e,U.required]}),this.getAccountDetails()}onDateChange(){if(!this.dateRange.valid)return!0;let e=this.dateRange.get("start")?.value,n=this.dateRange.get("end")?.value;if(!e||!n)return!0;let i=(0,hn.default)().startOf("day"),s=(0,hn.default)(e).startOf("day"),d=(0,hn.default)(n).startOf("day");return this.startDate=(0,hn.default)(e).format("YYYY-MM-DD"),this.endDate=(0,hn.default)(n).format("YYYY-MM-DD"),s.isAfter(d)||d.isAfter(i)}getAccountDetails(){let e=this.cloudProviders.find(n=>n.CODE===this.selectedProvider?.toLowerCase());this.dashboardService.getClientCredentials(e.ID).subscribe({next:n=>{this.accounts=n.object||[];let i=this.accounts.find(d=>d?.MASTER_ACCOUNT===!0)||this.accounts[0];if(!i?.ACCOUNT_ID)return;let s=i?.ACCOUNT_ID;this.selectedAccount=s,this.accountID=s,this.grfOrgId=i?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",s),window.localStorage.setItem("grfOrgId",this.grfOrgId||""),this.refreshReportData(),this.refreshView()},error:n=>{n.error.status==401&&this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status),this.refreshView()}})}switchAccount(e){this.accountID=e?.ACCOUNT_ID,this.selectedAccount=e?.ACCOUNT_ID;let n=e?.DATA_READY&&e?.MASTER_ACCOUNT;this.grfOrgId=e?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",this.accountID),window.localStorage.setItem("hasReadyAccount",n),window.localStorage.setItem("grfOrgId",this.grfOrgId||""),this.refreshReportData()}onAccountChange(e){let n=this.accounts.find(i=>i?.ACCOUNT_ID===e);n&&this.switchAccount(n)}refreshReportData(){this.selectedOption===0?this.getMonthCostSummary():this.getDaysCostSummary()}selectOption(e){this.selectedOption=e,e==0?this.getMonthCostSummary():this.getDaysCostSummary()}getDaysCostSummary(){if(!this.dateRange.valid||!this.accountID)return;let{start:e,end:n}=this.dateRange.value;if(!e||!n)return;let i=(0,hn.default)(e).format("YYYY-MM-DD"),s=(0,hn.default)(n).format("YYYY-MM-DD");this.loading=!0,this.dashboardService.getCostSummaryByDays(this.accountID,i,s).subscribe({next:d=>{if(this.loading=!1,!d.object?.length){this.dataSource.data=[],this.refreshView();return}this.costSummaryData=d.object.map(_=>{let b={PRODUCT_CODE:_.PRODUCT_CODE,DIFFERENCE_COST:_.DIFFERENCE_COST};
8return _.DAYS.forEach(M=>{b[M.DAY]=M.COST}),b});let m=new Set;d.object.forEach(_=>{_.DAYS.forEach(b=>{m.add(b.DAY)})});let f=Array.from(m).sort((_,b)=>(0,hn.default)(b,"DD-MM-YYYY").valueOf()-(0,hn.default)(_,"DD-MM-YYYY").valueOf());this.dataSource.data=this.costSummaryData,this.displayedColumns=["PRODUCT_CODE",...f,"DIFFERENCE_COST"],this.refreshView()},error:d=>{this.loading=!1,this.notify.showNotification(d.error.message,"top",E[d.error.status]?E[d.error.status]:"error",d.error.status),this.refreshView()}})}getMonthCostSummary(){if(this.loading=!0,!this.accountID){this.loading=!1,this.refreshView();return}this.dashboardService.getCostSummaryByMonth(this.accountID).subscribe({next:e=>{if(this.costSummaryData=[],this.loading=!1,e.object.length!=0)for(let n of e.object){let i={};for(let s of n.MONTHS)Object.assign(i,{[s.MONTH_YEAR]:s.COST});this.costSummaryData.push(Kn(Ke({[Object.keys(n)[0]]:Object.values(n)[0]},i),{[Object.keys(n)[1]]:Object.values(n)[1]}))}this.dataSource.data=this.costSummaryData,this.displayedColumns=this.dataSource.data.length?Object.keys(this.dataSource.data[0]):[],this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}downloadReport(){if(!this.dateRange.valid||this.onDateChange())return;this.loading=!0;let e=(0,hn.default)(this.dateRange.get("start")?.value).format("YYYY-MM-DD"),n=(0,hn.default)(this.dateRange.get("end")?.value).format("YYYY-MM-DD");this.dashboardService.downloadCostSummaryByDays(this.accountID,e,n).subscribe({next:i=>{this.loading=!1;let s=new Blob([i],{type:"application/octet-stream"});var d=window.URL.createObjectURL(s),m=document.createElement("a");m.href=d,m.download="Cost summary report.xlsx",m.click(),this.notify.showNotification("Report downloaded","top",E[200]?E[200]:"success",200),this.refreshView()},error:i=>{this.loading=!1,this.notify.showNotification(i.error.message,"top",E[i.error.status]?E[i.error.status]:"error",i.error.status),this.refreshView()}})}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:4}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onTabChange(e){this.selectedTab=e.index,this.selectedTab===0?this.selectedProvider="AWS":this.selectedTab===1&&(this.selectedProvider="Azure"),this.getAccountDetails()}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V),y(ze),y(Se),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-reports"]],decls:10,vars:9,consts:[["picker",""],[1,"report-container"],[1,"main-content"],[1,"tab-buttons"],[1,"tab-button",3,"click"],["class","container",4,"ngIf"],["class","azure-container",4,"ngIf"],["class","feature-lock-overlay",4,"ngIf"],[1,"container"],["class","overlay",4,"ngIf"],[1,"header-container"],[1,"contentPart"],[1,"filter-select"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date"],["matEndDate","","formControlName","end","placeholder","End date"],["matSuffix","",3,"for"],[1,"get-btn",3,"click","disabled"],["icon","lucide:download",1,"url-link",3,"click"],[1,"table-container"],["mat-table","",3,"dataSource"],[3,"matColumnDef","sticky",4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],[3,"matColumnDef","sticky"],["mat-header-cell","","class","table-header",3,"sticky-col",4,"matHeaderCellDef"],["mat-cell","",3,"sticky-col",4,"matCellDef"],["mat-header-cell","",1,"table-header"],["mat-cell",""],["mat-header-row",""],["mat-row",""],[1,"azure-container"],[1,"azure-card"],[1,"coming-soon"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],[4,"ngIf"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),v("click",function(){return i.onTabChange({index:0})}),l(4," AWS "),a(),o(5,"button",4),v("click",function(){return i.onTabChange({index:1})}),l(6," Azure "),a()(),g(7,t0,23,16,"div",5)(8,n0,4,0,"div",6),a(),g(9,r0,11,3,"section",7),a()),n&2&&(Y("is-locked",!i.isReportsEnabled),c(3),Y("active",i.selectedTab===0),c(2),Y("active",i.selectedTab===1),c(2),p("ngIf",i.selectedTab===0),c(),p("ngIf",i.selectedTab===1),c(),p("ngIf",!i.isReportsEnabled))},dependencies:[N,$,B,z,Pt,Nt,fe,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,ve,me,$e,Ge,We,mt,Zt,Xt,en,tn,nn,un,Cr],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.report-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;position:relative;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.report-container.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}
8.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;min-height:0;margin-left:0;padding:24px;gap:22px;background:#fff;border:1px solid #E6EDF6;border-radius:16px;box-shadow:0 10px 24px #0f172a0f;box-sizing:border-box}.date-picker-field[_ngcontent-%COMP%]{border-radius:12px;width:min(100%,270px);height:38px;display:flex;border:1px solid #D1D5DB;padding:0 15px;align-items:center}.get-btn[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.get-btn[_ngcontent-%COMP%]:hover{background:#2563eb}.get-btn[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.header-container[_ngcontent-%COMP%]{font-weight:600;color:#052960;font-size:18px}.contentPart[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:15px;gap:12px;flex-wrap:wrap}.filter-select[_ngcontent-%COMP%]{width:min(100%,220px);border-radius:12px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center}.select-btn[_ngcontent-%COMP%]{width:200px;height:45px;border-radius:4px;font-size:16px;transition:all .3s ease-in-out;text-align:center;cursor:pointer}.default-btn[_ngcontent-%COMP%]{width:200px;height:45px;background:#fff;border:1px solid #1A73E9;border-radius:4px;color:#1a73e9!important;font-size:14px;font-weight:600;cursor:pointer}.selected-btn[_ngcontent-%COMP%]{width:200px;height:45px;border:1px solid #FFFFFF;background-color:#1a73e9;color:#fff!important;border-radius:4px;font-size:14px;font-weight:600;cursor:pointer}.text-content[_ngcontent-%COMP%]{font-size:14px;font-weight:600;margin:5px 2px 15px 4px}table[_ngcontent-%COMP%]{width:100%;min-width:820px;border:1px solid #BDBDBD;border-radius:4px;box-shadow:none}table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:center!important}.table-header[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#000;background-color:#f2f2f2}td[_ngcontent-%COMP%]{font-size:13px}.table-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.table-container[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none;overflow-y:auto;overflow-x:auto;max-height:calc(100vh - 310px);min-height:320px;border:1px solid #E5E7EB;border-radius:12px}.sticky-col[_ngcontent-%COMP%]{position:sticky;left:0;background:#fff;z-index:1;border-right:1px solid #e0e0e0}.mat-header-cell[_ngcontent-%COMP%]{background:#f5f5f5;z-index:2}.mat-header-row[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;background:#f5f5f5}table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{padding:8px 16px;white-space:nowrap}.mat-row[_ngcontent-%COMP%]:hover   .sticky-col[_ngcontent-%COMP%]{background-color:#f5f5f5}.url-link[_ngcontent-%COMP%]{font-size:25px;color:#1a73e9;font-weight:500;text-decoration:none;cursor:pointer}.url-link.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.5}.tab-buttons[_ngcontent-%COMP%]{display:flex;gap:12px;padding:0 4px 10px;border-bottom:1px solid #EDEDED;overflow-x:auto}.tab-button[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:8px;background-color:#f3f4f6;color:#374151;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;outline:none;min-width:80px}.tab-button[_ngcontent-%COMP%]:hover{background-color:#dfe9eb}.tab-button.active[_ngcontent-%COMP%]{background-color:#dbeafe;color:#374151;border-bottom:2px solid #1A1F3D}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}.azure-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;padding:24px;background-color:#f9f9f9}.azure-card[_ngcontent-%COMP%]{width:100%;height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;box-shadow:2px 2px 10px #0000001a}.coming-soon[_ngcontent-%COMP%]{font-size:14px;color:#6f6f6f;font-style:italic}@media(max-width:760px){.report-container[_ngcontent-%COMP%]{padding:14px}.container[_ngcontent-%COMP%]{padding:16px}.contentPart[_ngcontent-%COMP%]{align-items:stretch}.filter-select[_ngcontent-%COMP%], .date-picker-field[_ngcontent-%COMP%], .get-btn[_ngcontent-%COMP%]{width:100%}.url-link[_ngcontent-%COMP%]{align-self:center}.table-container[_ngcontent-%COMP%]{min-height:300px;max-height:60vh}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}"]})}}return t})();function a0(t,r){t&1&&(o(0,"div",17)(1,"div",18)(2,"div",19),h(3,"span",20),a()()())}function l0(t,r){if(t&1){let e=A();o(0,"div",21),v("click",function(){let i=O(e).$implicit,s=u();return P(s.navigateTo(i.route))}),o(1,"div",22),h(2,"iconify-icon",23),a(),o(3,"div",24)(4,"div",25),l(5),a(),o(6,"div",26),l(7),a()()()}if(t&2){let e=r.$implicit;c(),p("ngClass",e.iconClass),c(),p("icon",e.icon),c(2),p("ngClass",e.className),c(),C(e.value),c(2),C(e.label)}}function s0(t,r){t&1&&(o(0,"th",52),l(1,"Instance Details"),a())}function c0(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function d0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54)(2,"span",55),h(3,"iconify-icon",56),a(),o(4,"div",57),l(5),o(6,"div",58),l(7),g(8,c0,2,0,"span",59),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function p0(t,r){t&1&&(o(0,"th",52),l(1,"Account"),a())}function m0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function u0(t,r){t&1&&(o(0,"th",52),l(1,"Region"),a())}function g0(t,r){if(t&1&&(o(0,"td",53),l(1),o(2,"div",58),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function f0(t,r){t&1&&(o(0,"th",52),l(1,"Application"),a())}function h0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function _0(t,r){t&1&&(o(0,"th",52),l(1,"Environment"),a())}function C0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function x0(t,r){t&1&&(o(0,"th",52),l(1,"Patch Baseline"),a())}function v0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54),l(2),a(),o(3,"div",54),l(4),a(),o(5,"div",58),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function b0(t,r){t&1&&(o(0,"th",52),l(1,"Patch Group"),a())}function y0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function M0(t,r){t&1&&(o(0,"th",52),l(1,"Last Scanned"),a())}function S0(t,r){if(t&1&&(o(0,"td",53),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;
8c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function O0(t,r){t&1&&(o(0,"th",52),l(1,"Running Status"),a())}function P0(t,r){if(t&1&&(o(0,"td",53)(1,"div",60),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function E0(t,r){t&1&&(o(0,"th",52),l(1,"Compliance Status"),a())}function w0(t,r){if(t&1&&(o(0,"td",53)(1,"div",61),h(2,"span",62),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function I0(t,r){t&1&&(o(0,"th",52),l(1,"Actions"),a())}function T0(t,r){if(t&1){let e=A();o(0,"td",53)(1,"button",63),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function A0(t,r){t&1&&h(0,"tr",64)}function D0(t,r){t&1&&h(0,"tr",65)}function R0(t,r){if(t&1&&(o(0,"div",35)(1,"table",36),I(2,37),g(3,s0,2,0,"th",38)(4,d0,10,4,"td",39),T(),I(5,40),g(6,p0,2,0,"th",38)(7,m0,2,1,"td",39),T(),I(8,41),g(9,u0,2,0,"th",38)(10,g0,4,2,"td",39),T(),I(11,42),g(12,f0,2,0,"th",38)(13,h0,2,1,"td",39),T(),I(14,43),g(15,_0,2,0,"th",38)(16,C0,2,1,"td",39),T(),I(17,44),g(18,x0,2,0,"th",38)(19,v0,7,3,"td",39),T(),I(20,45),g(21,b0,2,0,"th",38)(22,y0,3,1,"td",39),T(),I(23,46),g(24,M0,2,0,"th",38)(25,S0,3,4,"td",39),T(),I(26,47),g(27,O0,2,0,"th",38)(28,P0,4,4,"td",39),T(),I(29,48),g(30,E0,2,0,"th",38)(31,w0,5,4,"td",39),T(),I(32,49),g(33,I0,2,0,"th",38)(34,T0,3,0,"td",39),T(),g(35,A0,1,0,"tr",50)(36,D0,1,0,"tr",51),a()()),t&2){let e=u().$implicit,n=u();c(),p("dataSource",e==null?null:e.DATA),c(34),p("matHeaderRowDef",n.displayedColumns),c(),p("matRowDefColumns",n.displayedColumns)}}function k0(t,r){if(t&1&&(o(0,"div",27)(1,"div",28)(2,"div",29)(3,"div",30),h(4,"iconify-icon",31),a(),o(5,"div",32)(6,"div",33),l(7),a()()()(),g(8,R0,37,3,"div",34),a()),t&2){let e=r.$implicit;c(7),C(e==null?null:e.NAME),c(),p("ngIf",e==null||e.DATA==null?null:e.DATA.length)}}function N0(t,r){t&1&&(o(0,"th",52),l(1,"Instance Details"),a())}function F0(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function z0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54)(2,"span",55),h(3,"iconify-icon",56),a(),o(4,"div",57),l(5),o(6,"div",58),l(7),g(8,F0,2,0,"span",59),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function L0(t,r){t&1&&(o(0,"th",52),l(1,"Account"),a())}function V0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function B0(t,r){t&1&&(o(0,"th",52),l(1,"Region"),a())}function U0(t,r){if(t&1&&(o(0,"td",53),l(1),o(2,"div",58),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function j0(t,r){t&1&&(o(0,"th",52),l(1,"Application"),a())}function $0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function q0(t,r){t&1&&(o(0,"th",52),l(1,"Environment"),a())}function H0(t,r){if(t&1&&(o(0,"td",53),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function W0(t,r){t&1&&(o(0,"th",52),l(1,"Patch Baseline"),a())}function G0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54),l(2),a(),o(3,"div",54),l(4),a(),o(5,"div",58),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function Y0(t,r){t&1&&(o(0,"th",52),l(1,"Patch Group"),a())}function K0(t,r){if(t&1&&(o(0,"td",53)(1,"div",54),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function Q0(t,r){t&1&&(o(0,"th",52),l(1,"Last Scanned"),a())}function J0(t,r){if(t&1&&(o(0,"td",53),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;
8c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function Z0(t,r){t&1&&(o(0,"th",52),l(1,"Running Status"),a())}function X0(t,r){if(t&1&&(o(0,"td",53)(1,"div",60),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function eg(t,r){t&1&&(o(0,"th",52),l(1,"Compliance Status"),a())}function tg(t,r){if(t&1&&(o(0,"td",53)(1,"div",61),h(2,"span",62),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function ng(t,r){t&1&&(o(0,"th",52),l(1,"Actions"),a())}function ig(t,r){if(t&1){let e=A();o(0,"td",53)(1,"button",63),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function og(t,r){t&1&&h(0,"tr",64)}function rg(t,r){t&1&&h(0,"tr",65)}function ag(t,r){if(t&1&&(o(0,"div",35)(1,"table",36),I(2,37),g(3,N0,2,0,"th",38)(4,z0,10,4,"td",39),T(),I(5,40),g(6,L0,2,0,"th",38)(7,V0,2,1,"td",39),T(),I(8,41),g(9,B0,2,0,"th",38)(10,U0,4,2,"td",39),T(),I(11,42),g(12,j0,2,0,"th",38)(13,$0,2,1,"td",39),T(),I(14,43),g(15,q0,2,0,"th",38)(16,H0,2,1,"td",39),T(),I(17,44),g(18,W0,2,0,"th",38)(19,G0,7,3,"td",39),T(),I(20,45),g(21,Y0,2,0,"th",38)(22,K0,3,1,"td",39),T(),I(23,46),g(24,Q0,2,0,"th",38)(25,J0,3,4,"td",39),T(),I(26,47),g(27,Z0,2,0,"th",38)(28,X0,4,4,"td",39),T(),I(29,48),g(30,eg,2,0,"th",38)(31,tg,5,4,"td",39),T(),I(32,49),g(33,ng,2,0,"th",38)(34,ig,3,0,"td",39),T(),g(35,og,1,0,"tr",50)(36,rg,1,0,"tr",51),a()()),t&2){let e=u().$implicit,n=u();c(),p("dataSource",e==null?null:e.DATA),c(34),p("matHeaderRowDef",n.displayedColumns),c(),p("matRowDefColumns",n.displayedColumns)}}function lg(t,r){if(t&1&&(o(0,"div",27)(1,"div",28)(2,"div",29)(3,"div",30),h(4,"iconify-icon",66),a(),o(5,"div",32)(6,"div",33),l(7),a()()()(),g(8,ag,37,3,"div",34),a()),t&2){let e=r.$implicit;c(7),C(e==null?null:e.NAME),c(),p("ngIf",e==null||e.DATA==null?null:e.DATA.length)}}var Fs=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dashboardService=n,this.notify=i,this.ngZone=s,this.cdr=d,this.account_Id=null,this.loading=!1,this.selectedView="application",this.applicationGroups=[],this.environmentGroups=[],this.displayedColumns=["instance","account","region","application","environment","baseline","group","lastScanned","runningStatus","complianceStatus","actions"],this.inventoryTitle="EC2 Workload Inventory",this.accountOptions=["All Accounts"],this.regionOptions=["All Regions"],this.selectedAccount=this.accountOptions[0],this.selectedRegion=this.regionOptions[0],this.stats=[{icon:"ri:server-line",iconClass:"stat-blue",value:0,label:"Total EC2 Instances",className:"total-value",route:"/admin-dashboard/patch-management/total-instances-details"},{icon:"octicon:play-16",iconClass:"stat-green",value:0,label:"Running Instances",className:"running-value",route:"/admin-dashboard/patch-management/running-instances-details"},{icon:"ri:shield-check-line",iconClass:"stat-orange",value:0,label:"Patch Compliant",className:"patch-value",route:"/admin-dashboard/patch-management/patch-complaint-details"},{icon:"fe:warning",iconClass:"stat-red",value:0,label:"Needs Patching",className:"needs-patch-value",route:"/admin-dashboard/patch-management/non-compliance-details"}]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getInventoryStats(),this.getInstancesByApplication(),this.getInstancesByEnvironment()}getInventoryStats(){this.dashboardService.getInventoryStats().subscribe({next:e=>{let n=e?.object;if(!n)return;let i={"Total EC2 Instances":n.TOTAL_INSTANCE_COUNT,"Running Instances":n.RUNNING_INSTANCE_COUNT,"Patch Compliant":n.PATCH_COMPLIANT_COUNT,"Needs Patching":n.PATCH_NEEDED_COUNT};this.stats=this.stats.map(s=>Kn(Ke({},s),{value:i[s.label]})),this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getInstancesByApplication(){this.loading=!0,this.dashboardService.getInventoryInstancesByApplication().subscribe({next:e=>{this.applicationGroups=e?.object,this.applicationGroups.forEach(n=>
8{n.DATA.forEach(i=>{this.awsRegion.forEach(s=>{s.CODE==i.REGION&&(i.REGION_NAME=s.NAME)}),i.RISK_SCORE=Math.floor(Math.random()*100),i.CONFIDENCE_SCORE=Math.floor(Math.random()*100)})}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getInstancesByEnvironment(){this.loading=!0,this.dashboardService.getInventoryInstancesByEnvironment().subscribe({next:e=>{this.environmentGroups=e?.object,this.environmentGroups.forEach(n=>{n.DATA.forEach(i=>{this.awsRegion.forEach(s=>{s.CODE==i.REGION&&(i.REGION_NAME=s.NAME)}),i.RISK_SCORE=Math.floor(Math.random()*100),i.CONFIDENCE_SCORE=Math.floor(Math.random()*100)})}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}refresh(){this.getInventoryStats(),this.selectedView=="application"?this.getInstancesByApplication():this.getInstancesByEnvironment()}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"inventory",instanceID:e?.INSTANCE_ID},state:{row:e}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"inventory"}})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-patch-inventory"]],decls:22,vars:5,consts:[[1,"inventory"],["class","overlay",4,"ngIf"],[1,"inventory-header"],[1,"inventory-title"],[1,"inventory-actions"],["type","button",1,"refresh-btn",3,"click"],["icon","ri:refresh-line"],[1,"stats-row"],["class","stat-card",3,"click",4,"ngFor","ngForOf"],["id","view-application","name","view-toggle","type","radio","checked","",1,"view-toggle-input",3,"change"],["id","view-environment","name","view-toggle","type","radio",1,"view-toggle-input",3,"change"],[1,"view-toggle"],["for","view-application"],["for","view-environment"],[1,"view-content","application-view"],["class","group-card",4,"ngFor","ngForOf"],[1,"view-content","environment-view"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"stat-card",3,"click"],[1,"stat-icon",3,"ngClass"],[3,"icon"],[1,"stat-body"],[1,"stat-value",3,"ngClass"],[1,"stat-label"],[1,"group-card"],[1,"group-header"],[1,"group-title"],[1,"group-icon"],["icon","eos-icons:application-outlined"],[1,"group-details"],[1,"group-name"],["class","table-responsive",4,"ngIf"],[1,"table-responsive"],["mat-table","",1,"inventory-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","account"],["matColumnDef","region"],["matColumnDef","application"],["matColumnDef","environment"],["matColumnDef","baseline"],["matColumnDef","group"],["matColumnDef","lastScanned"],["matColumnDef","runningStatus"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],["icon","ri:server-line"],[1,"instance-details"],[1,"cell-sub"],[4,"ngIf"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"action",3,"click"],["mat-header-row",""],["mat-row",""],["icon","tabler:settings-code"]],template:function(n,i){n&1&&(o(0,"div",0),g(1,a0,4,0,"div",1),o(2,"div",2)(3,"div",3),l(4),a(),o(5,"div",4)(6,"button",5),v("click",function(){return i.refresh()}),h(7,"iconify-icon",6),l(8," Refresh "),a()()(),o(9,"div",7),g(10,l0,8,5,"div",8),a(),o(11,"input",9),v("change",function(){return i.selectedView="application"}),a(),o(12,"input",10),v("change",function(){return i.selectedView="environment"}),a(),o(13,"div",11)(14,"label",12),l(15,"Application View"),a(),o(16,"label",13),l(17,"Environment View"),a()(),o(18,"div",14),g(19,k0,9,2,"div",15),a(),o(20,"div",16),g(21,lg,9,2,"div",15),a()()),n&2&&(c(),p("ngIf",i.loading),c(3),x(" ",i.inventoryTitle," "),c(6),p("ngForOf",i.stats),c(9),p("ngForOf",i.applicationGroups),c(2),p("ngForOf",i.environmentGroups))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht,pt],styles:[".inventory[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-top:20px}.inventory-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.inventory-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.inventory-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;justify-content:center}.filter[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.refresh-btn[_ngcontent-%COMP%]{border:1px solid #D1D5DB;border-radius:8px;padding:8px 14px;background:#fff;color:#374151;font-size:14px;display:flex;align-items:center;gap:6px;cursor:pointer;height:40px}.stats-row[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.stat-card[_ngcontent-%COMP%]{flex:1 1 190px;min-width:190px;background:#fff;border:1px solid #E5E7EB;border-radius:20px;padding:20px;
8display:flex;align-items:center;gap:15px;box-shadow:0 1px 2px #0000000d;cursor:pointer}.stat-icon[_ngcontent-%COMP%]{height:40px;width:40px;font-size:18px;border-radius:16px;display:flex;align-items:center;justify-content:center}.stat-blue[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.stat-green[_ngcontent-%COMP%]{color:#16a34a;background:#dcfce7}.stat-orange[_ngcontent-%COMP%]{color:#ea580c;background:#ffedd5}.stat-red[_ngcontent-%COMP%]{color:#dc2626;background:#fee2e2}.stat-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.stat-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700}.total-value[_ngcontent-%COMP%]{color:#111827}.running-value[_ngcontent-%COMP%]{color:#16a34a}.patch-value[_ngcontent-%COMP%]{color:#ea580c}.needs-patch-value[_ngcontent-%COMP%]{color:#dc2626}.stat-label[_ngcontent-%COMP%]{font-size:13px;color:#4b5563}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0;background:#f3f4f6;border-radius:16px;padding:5px;width:99%}.view-toggle-input[_ngcontent-%COMP%]{display:none}.view-toggle[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{flex:1 1 100%;text-align:center;padding:8px 12px;font-size:14px;color:#6b7280;font-weight:500;cursor:pointer;border-radius:12px;transition:background .2s ease,color .2s ease,box-shadow .2s ease}#view-application[_ngcontent-%COMP%]:checked ~ .view-toggle[_ngcontent-%COMP%]   label[for=view-application][_ngcontent-%COMP%], #view-environment[_ngcontent-%COMP%]:checked ~ .view-toggle[_ngcontent-%COMP%]   label[for=view-environment][_ngcontent-%COMP%]{background:#fff;color:#374151;box-shadow:0 1px 2px #0000000d}.view-content[_ngcontent-%COMP%]{display:none;flex-direction:column;gap:20px}#view-application[_ngcontent-%COMP%]:checked ~ .application-view[_ngcontent-%COMP%]{display:flex}#view-environment[_ngcontent-%COMP%]:checked ~ .environment-view[_ngcontent-%COMP%]{display:flex}.group-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:20px;display:flex;flex-direction:column}.group-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:15px;border-bottom:1px solid #E5E7EB}.group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.group-icon[_ngcontent-%COMP%]{width:40px;height:40px;font-size:18px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#dbeafe;color:#2563eb}.group-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.group-name[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#111827}.group-sub[_ngcontent-%COMP%]{font-size:13px;color:#4b5563}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600}.cell-sub[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;line-height:20px;font-weight:400}.cell-desc[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;line-height:20px}.instance-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#dcfce7;color:#16a34a}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.action[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}.env-stats[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap;padding:25px 0}.env-stat[_ngcontent-%COMP%]{flex:1 1 140px;min-width:120px;border-radius:16px;padding:15px;display:flex;flex-direction:column;align-items:center;gap:5px}.env-stat-value[_ngcontent-%COMP%]{font-size:24px;font-weight:700}.env-stat-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;text-align:center;color:#4b5563}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.inventory-table[_ngcontent-%COMP%]{width:100%;min-width:100%}.inventory-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px}.inventory-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:13px;color:#111827;vertical-align:center}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}[_nghost-%COMP%]     .inventory-table .mat-column-instance{min-width:200
8px}[_nghost-%COMP%]     .inventory-table .mat-column-account{min-width:130px}[_nghost-%COMP%]     .inventory-table .mat-column-region{min-width:120px}[_nghost-%COMP%]     .inventory-table .mat-column-application{min-width:130px}[_nghost-%COMP%]     .inventory-table .mat-column-environment{min-width:100px}[_nghost-%COMP%]     .inventory-table .mat-column-baseline{min-width:150px}[_nghost-%COMP%]     .inventory-table .mat-column-group{min-width:120px}[_nghost-%COMP%]     .inventory-table .mat-column-lastScanned{min-width:100px}[_nghost-%COMP%]     .inventory-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .inventory-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .inventory-table .mat-column-actions{min-width:100px}"]})}}return t})();function sg(t,r){t&1&&(o(0,"div",34)(1,"div",35)(2,"div",36),h(3,"span",37),a()()())}function cg(t,r){if(t&1&&(o(0,"div",38)(1,"div",39),h(2,"iconify-icon",40),a(),o(3,"div",41)(4,"div",42),l(5),a(),o(6,"div",43),l(7),a()()()),t&2){let e=r.$implicit;p("ngClass",e.className),c(2),p("icon",e.icon),c(2),p("ngClass",e.className),c(),C(e.value),c(2),C(e.label)}}function dg(t,r){t&1&&(o(0,"th",44),l(1,"Instance Details"),a())}function pg(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function mg(t,r){if(t&1&&(o(0,"div",50),l(1),a()),t&2){let e=u().$implicit;c(),x("\u2022 ",e==null?null:e.PLATFORM_DETAILS)}}function ug(t,r){if(t&1&&(o(0,"td",45)(1,"div",46)(2,"span",47),h(3,"iconify-icon",48),a(),o(4,"div",49),l(5),o(6,"div",50),l(7),g(8,pg,2,0,"span",51),l(9),a(),g(10,mg,2,1,"div",52),a()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME),c(),p("ngIf",e==null?null:e.PLATFORM_DETAILS)}}function gg(t,r){t&1&&(o(0,"th",44),l(1,"Risk Score"),a())}function fg(t,r){if(t&1&&(o(0,"td",45)(1,"div",53),l(2),o(3,"span",54),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.RISK_SCORE)>70?"score-high":(e==null?null:e.RISK_SCORE)>30?"score-medium":"score-low"),c(),x(" ",e==null?null:e.RISK_SCORE,"% "),c(),p("ngClass",(e==null?null:e.RISK_SCORE)>70?"score-high":(e==null?null:e.RISK_SCORE)>30?"score-medium":"score-low"),c(),x(" ",e==null?null:e.RISK_LEVEL)}}function hg(t,r){t&1&&(o(0,"th",44),l(1,"Region"),a())}function _g(t,r){if(t&1&&(o(0,"td",45),l(1),o(2,"div",50),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function Cg(t,r){t&1&&(o(0,"th",44),l(1,"Running Status"),a())}function xg(t,r){if(t&1&&(o(0,"td",45)(1,"div",55),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e!=null&&e.INSTANCE_STATUS?e.INSTANCE_STATUS.toLowerCase():"unknown"),c(),x(" ",X(3,2,(e==null?null:e.INSTANCE_STATUS)||"Unknown")," ")}}function vg(t,r){t&1&&(o(0,"th",44),l(1,"Confidence Score"),a())}function bg(t,r){if(t&1&&(o(0,"td",45)(1,"div",53),l(2),o(3,"span",54),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.CONFIDENCE_SCORE)>=90?"score-low":(e==null?null:e.CONFIDENCE_SCORE)>=70?"score-medium":"score-high"),c(),x(" ",e==null?null:e.CONFIDENCE_SCORE,"% "),c(),p("ngClass",(e==null?null:e.CONFIDENCE_SCORE)>=90?"score-low":(e==null?null:e.CONFIDENCE_SCORE)>=70?"score-medium":"score-high"),c(),x(" ",e==null?null:e.CONFIDENCE_LEVEL)}}function yg(t,r){t&1&&(o(0,"th",44),l(1,"Compliance Status"),a())}function Mg(t,r){if(t&1&&(o(0,"td",45)(1,"div",56),h(2,"span",57),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function Sg(t,r){t&1&&(o(0,"th",44),l(1,"Actions"),a())}function Og(t,r){if(t&1){let e=A();o(0,"td",45)(1,"button",58),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function Pg(t,r){t&1&&h(0,"tr",59)}function Eg(t,r){t&1&&h(0,"tr",60)}var Ls=(()=>{class t{constructor(e,n,i){this.router=e,this.dashboardService=n,this.notify=i,this.loading=!1,this.account_Id=null,this.ec2Instances=[],this.riskStats=[{value:0,label:"All Instances",icon:"mdi:alert-circle-outline",className:"risk-default"},{value:0,label:"High Risk (> 70)",icon:"mdi:alert-circle-outline",className:"risk-critical"},{value:0,label:"Medium Risk (31-70)",icon:"mdi:alert-circle-outline",className:"risk-medium"},{value:0,label:"Low Risk (0-30)",icon:"ri:check-line",className:"risk-low"}],this.ec2DisplayedColumns=["instance","risk","region","runningStatus","confidence","complianceStatus","actions"],this.applicationCards=[{name:"E-Commerce Platform",sub:"234 instances across 3 environments - Critical business application",meta:"Revenue Impact: $2.3M/hour downtime",icon:"mdi:web",iconClass:"app-icon-critical",score:"76",scoreLabel:"High Risk Score",className:"app-critical",tags:[{title:"High Risk Instances",value:"67 instances - Production tier"},{title:"Service Dependencies",value:"8 microservices"},{title:"Regional Impact",value:"us-east-1, eu-west-1"}],recommendation:{title:"AI Recommendation: Human Approval Required",summary:"High-risk critical application with significant business impact. Manual review recommended before patching production systems.",leftTitle:"Critical Services",leftItems:["Payment processing: 23 instances","Order management: 34 instances"],rightTitle:"Potential Impact",rightItems:["Payment processing delays","Search performance degradation"]}},{name:"Data Analytics Platform",sub:"156 instances - Big data processing workload",meta:"Business impact: Reporting delays, no revenue loss",icon:"ri:database-line",iconClass:"app-icon-medium",score:"42",scoreLabel:"Medium Risk Score",className:"app-medium",tags:[{title:"Processing Capacity",value:"2.3TB/day - Batch jobs"},{title:"Service Dependencies",value:"78 data pipelines"},{title:"SLA Buffer",value:"4-hour processing window"},{title:"Recovery Time",value:"2-6 hours (acceptable)"}
8],plan:{title:"Standard Patching Approach",detail:"Batch processing workload with built-in redundancy - proceed with standard maintenance window approach.",note:"Weekend maintenance window recommended"}}],this.distributions=[{title:"Regional Distribution",items:[{label:"us-east-1",sub:"North Virginia",value:"387",icon:"lucide:globe",className:"dist-blue"},{label:"us-west-2",sub:"Oregon",value:"234",icon:"lucide:globe",className:"dist-green"},{label:"eu-west-1",sub:"Ireland",value:"189",icon:"lucide:globe",className:"dist-purple"},{label:"ap-south-1",sub:"Mumbai",value:"156",icon:"lucide:globe",className:"dist-amber"}],footer:"34 additional workloads"},{title:"Account Categories",items:[{label:"Production",sub:"23 accounts",value:"456",icon:"ri:shield-keyhole-line",className:"dist-red"},{label:"Staging",sub:"34 accounts",value:"267",icon:"ri:test-tube-line",className:"dist-amber"},{label:"Development",sub:"43 accounts",value:"277",icon:"uil:arrow",className:"dist-blue"}],footer:"Total: 100 AWS Accounts - 1,000 Workloads"},{title:"Application Distribution",items:[{label:"Web Applications",sub:"E-commerce, CMS, Portals",value:"345",icon:"lucide:globe",className:"dist-blue"},{label:"Data Platform",sub:"Analytics, ETL, ML",value:"234",icon:"ri:database-line",className:"dist-purple"},{label:"Microservices",sub:"APIs, Backend Services",value:"189",icon:"ri:circle-line",className:"dist-green"},{label:"Infrastructure",sub:"Monitoring, CI/CD, Tools",value:"232",icon:"ri:server-line",className:"dist-amber"}]}]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getRiskStats(),this.getInventoryList()}getRiskStats(){this.dashboardService.getInventoryStats().subscribe({next:e=>{let n=e?.object;if(!n)return;let i={"All Instances":n.TOTAL_INSTANCE_COUNT,"High Risk (> 70)":"-","Medium Risk (31-70)":"-","Low Risk (0-30)":"-"};this.riskStats=this.riskStats.map(s=>Kn(Ke({},s),{value:i[s.label]}))},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getInventoryList(){this.loading=!0,this.dashboardService.getInventoryInstancesList("all").subscribe({next:e=>{this.ec2Instances=e?.object?.DATA||[],this.ec2Instances.forEach(n=>{this.awsRegion.forEach(i=>{i.CODE==n.REGION&&(n.REGION_NAME=i.NAME)}),n.RISK_SCORE=Math.floor(Math.random()*100),n.CONFIDENCE_SCORE=Math.floor(Math.random()*100),n?.RISK_SCORE>70?n.RISK_LEVEL="High":n?.RISK_SCORE>30?n.RISK_LEVEL="Medium":n.RISK_LEVEL="Low",n?.CONFIDENCE_SCORE>=90?n.CONFIDENCE_LEVEL="High":n?.CONFIDENCE_SCORE>=70?n.CONFIDENCE_LEVEL="Medium":n.CONFIDENCE_LEVEL="Low"}),this.loading=!1},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"ai-risk-analytics",instanceID:e?.INSTANCE_ID},state:{row:e}})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-patch-ai-risk-analytics"]],decls:54,vars:5,consts:[[1,"risk-analytics"],["class","overlay",4,"ngIf"],[1,"risk-header"],[1,"risk-title"],[1,"risk-mainhead"],[1,"risk-subhead"],[1,"risk-stats"],["class","risk-stat",3,"ngClass",4,"ngFor","ngForOf"],["id","view-ec2","name","risk-view","type","radio","checked","",1,"view-toggle-input"],["id","view-app","name","risk-view","type","radio",1,"view-toggle-input"],[1,"view-toggle"],["for","view-ec2"],["for","view-app"],[1,"view-content","ec2-view"],[1,"table-card"],[1,"card-head"],[1,"card-title"],[1,"table-responsive"],["mat-table","",1,"ec2-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","risk"],["matColumnDef","region"],["matColumnDef","runningStatus"],["matColumnDef","confidence"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"view-content","app-view"],[1,"app-view-header"],[1,"app-view-title"],[1,"no-data"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"risk-stat",3,"ngClass"],[1,"stat-icon"],[3,"icon"],[1,"stat-body"],[1,"stat-value",3,"ngClass"],[1,"stat-label"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],["icon","ri:server-line"],[1,"instance-details"],[1,"cell-sub"],[4,"ngIf"],["class","cell-sub",4,"ngIf"],[1,"risk-score",3,"ngClass"],[1,"status-sub",3,"ngClass"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"pill-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",0),g(1,sg,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"div",4),l(5,"Per-Workload Risk Assessment & Patching Recommendations"),a(),o(6,"div",5),l(7,"Individual risk scoring, blast radius analysis, and remediation plans for each EC2 instance and application workload"),a()()(),o(8,"div",6),g(9,cg,8,5,"div",7),a(),h(10,"input",8)(11,"input",9),o(12,"div",10)(13,"label",11),l(14,"EC2 Instance View"),a(),o(15,"label",12),l(16,"Application Workload View"),a()(),o(17,"div",13)(18,"div",14)(19,"div",15)(20,"div",16),l(21,"All EC2 Instances"),a()(),o(22,"div",17)(23,"table",18),I(24,19),g(25,dg,2,0,"th",20)(26,ug,11,5,"td",21),T(
8),I(27,22),g(28,gg,2,0,"th",20)(29,fg,5,4,"td",21),T(),I(30,23),g(31,hg,2,0,"th",20)(32,_g,4,2,"td",21),T(),I(33,24),g(34,Cg,2,0,"th",20)(35,xg,4,4,"td",21),T(),I(36,25),g(37,vg,2,0,"th",20)(38,bg,5,4,"td",21),T(),I(39,26),g(40,yg,2,0,"th",20)(41,Mg,5,4,"td",21),T(),I(42,27),g(43,Sg,2,0,"th",20)(44,Og,3,0,"td",21),T(),g(45,Pg,1,0,"tr",28)(46,Eg,1,0,"tr",29),a()()()(),o(47,"div",30)(48,"div",31)(49,"div",32),l(50,"Application Workload Risk Analysis"),a()(),h(51,"mat-divider"),o(52,"div",33),l(53,"Coming Soon..."),a()()()),n&2&&(c(),p("ngIf",i.loading),c(8),p("ngForOf",i.riskStats),c(14),p("dataSource",i.ec2Instances),c(22),p("matHeaderRowDef",i.ec2DisplayedColumns),c(),p("matRowDefColumns",i.ec2DisplayedColumns))},dependencies:[N,xe,$,B,z,Ji,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht],styles:[".risk-analytics[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-top:20px}.risk-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px}.risk-title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;flex:1 1 60%}
8.risk-mainhead[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.risk-subhead[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:24px}.risk-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;justify-content:flex-end;flex:1 1 45%}.action-btn[_ngcontent-%COMP%]{background:#57b5e7;color:#fff;border:none;padding:8px 16px;border-radius:8px;font-size:16px;display:flex;align-items:center;gap:6px;cursor:pointer;height:40px}.risk-stats[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.risk-stat[_ngcontent-%COMP%]{flex:1 1 190px;min-width:190px;background:#fff;border:1px solid #E5E7EB;border-radius:20px;padding:25px 20px;display:flex;align-items:center;gap:15px;box-shadow:0 1px 2px #0000000d}.stat-icon[_ngcontent-%COMP%]{height:40px;width:40px;font-size:18px;border-radius:50%;display:flex;align-items:center;justify-content:center}.risk-default[_ngcontent-%COMP%]   .stat-icon[_ngcontent-%COMP%]{background:#57b5e717;color:#57b5e7}.risk-default[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#57b5e7}.risk-critical[_ngcontent-%COMP%]   .stat-icon[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.risk-critical[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#dc2626}.risk-high[_ngcontent-%COMP%]   .stat-icon[_ngcontent-%COMP%]{background:#ffedd5;color:#ea580c}.risk-high[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#ea580c}
8.risk-medium[_ngcontent-%COMP%]   .stat-icon[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.risk-medium[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#ca8a04}.risk-low[_ngcontent-%COMP%]   .stat-icon[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.risk-low[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#16a34a}.stat-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.stat-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#111827}.stat-label[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0;background:#f3f4f6;border-radius:16px;padding:5px;width:99%}.view-toggle-input[_ngcontent-%COMP%]{display:none}.view-toggle[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{flex:1 1 100%;text-align:center;padding:8px 12px;font-size:14px;color:#6b7280;font-weight:500;cursor:pointer;border-radius:12px;transition:background .2s ease,color .2s ease,box-shadow .2s ease}#view-ec2[_ngcontent-%COMP%]:checked ~ .view-toggle[_ngcontent-%COMP%]   label[for=view-ec2][_ngcontent-%COMP%], #view-app[_ngcontent-%COMP%]:checked ~ .view-toggle[_ngcontent-%COMP%]   label[for=view-app][_ngcontent-%COMP%]{background:#fff;color:#374151;box-shadow:0 1px 2px #0000000d}.view-content[_ngcontent-%COMP%]{display:none;flex-direction:column;gap:20px}#view-ec2[_ngcontent-%COMP%]:checked ~ .ec2-view[_ngcontent-%COMP%]{display:flex}#view-app[_ngcontent-%COMP%]:checked ~ .app-view[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:20px;padding:20px 15px;background:#fff;display:flex;box-shadow:0 1px 2px #0000000d}.table-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:20px 0;display:flex;flex-direction:column;gap:20px}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 20px}.card-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#111827}.risk-score[_ngcontent-%COMP%]{font-size:20px;font-weight:700}.status-sub[_ngcontent-%COMP%]{font-size:12px;font-weight:400}.score-high[_ngcontent-%COMP%]{color:#dc2626}.score-medium[_ngcontent-%COMP%]{color:#ca8a04}.score-low[_ngcontent-%COMP%]{color:#16a34a}.risk-pill[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.rec-head[_ngcontent-%COMP%]{font-size:12px;font-weight:600}.distribution-row[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.distribution-card[_ngcontent-%COMP%]{flex:1 1 240px;background:#fff;border:1px solid #E5E7EB;border-radius:20px;padding:20px 15px;display:flex;flex-direction:column;gap:15px;min-width:240px;box-shadow:0 1px 2px #0000000d}.dist-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.dist-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.dist-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;border-radius:16px}.dist-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.dist-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.dist-right[_ngcontent-%COMP%]{text-align:right}.dist-value[_ngcontent-%COMP%]{font-size:18px;font-weight:700}.dist-unit[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.dist-label[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#111827}.dist-sub[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.dist-footer[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#111827;text-align:center}.dist-blue[_ngcontent-%COMP%]{background:#eff6ff}.dist-blue[_ngcontent-%COMP%]   .dist-icon[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.dist-blue[_ngcontent-%COMP%]   .dist-value[_ngcontent-%COMP%]{color:#2563eb}.dist-green[_ngcontent-%COMP%]{background:#f0fdf4}.dist-green[_ngcontent-%COMP%]   .dist-icon[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.dist-green[_ngcontent-%COMP%]   .dist-value[_ngcontent-%COMP%]{color:#16a34a}.dist-purple[_ngcontent-%COMP%]{background:#faf5ff}.dist-purple[_ngcontent-%COMP%]   .dist-icon[_ngcontent-%COMP%]{background:#f3e8ff;color:#9333ea}.dist-purple[_ngcontent-%COMP%]   .dist-value[_ngcontent-%COMP%]{color:#9333ea}.dist-amber[_ngcontent-%COMP%]{background:#fefce8}.dist-amber[_ngcontent-%COMP%]   .dist-icon[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.dist-amber[_ngcontent-%COMP%]   .dist-value[_ngcontent-%COMP%]{color:#ca8a04}.dist-red[_ngcontent-%COMP%]{background:#fef2f2}.dist-red[_ngcontent-%COMP%]   .dist-icon[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.dist-red[_ngcontent-%COMP%]   .dist-value[_ngcontent-%COMP%]{color:#dc2626}.app-view-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:15px}.app-view-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#111827}.app-card[_ngcontent-%COMP%]{border-radius:16px;padding:25px;display:flex;flex-direction:column;gap:15px}.app-card.app-critical[_ngcontent-%COMP%]{background:#fef2f2;border:1px solid #FECACA}
8.app-card.app-medium[_ngcontent-%COMP%]{background:#eff6ff;border:1px solid #BFDBFE}.app-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:15px}.app-head-left[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.app-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}.app-icon-critical[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.app-icon-medium[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.app-head-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.app-name[_ngcontent-%COMP%]{font-size:16px;font-weight:600}.app-card.app-critical[_ngcontent-%COMP%]   .app-name[_ngcontent-%COMP%]{color:#7f1d1d}.app-card.app-medium[_ngcontent-%COMP%]   .app-name[_ngcontent-%COMP%]{color:#1e3a8a}.app-sub[_ngcontent-%COMP%]{font-size:13px}.app-card.app-critical[_ngcontent-%COMP%]   .app-sub[_ngcontent-%COMP%]{color:#b91c1c}.app-card.app-medium[_ngcontent-%COMP%]   .app-sub[_ngcontent-%COMP%]{color:#1d4ed8}.app-meta[_ngcontent-%COMP%]{font-size:11px;color:#4b5563}.app-score[_ngcontent-%COMP%]{text-align:right;display:flex;flex-direction:column;gap:8px}.app-card.app-critical[_ngcontent-%COMP%]   .app-score[_ngcontent-%COMP%]{color:#dc2626}.app-card.app-medium[_ngcontent-%COMP%]   .app-score[_ngcontent-%COMP%]{color:#2563eb}.score-value[_ngcontent-%COMP%]{font-size:24px;font-weight:700}.score-label[_ngcontent-%COMP%]{font-size:12px}.app-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.app-tag[_ngcontent-%COMP%]{flex:1 1 160px;border-radius:16px;background:#ffffffb2;padding:12px}.tag-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#111827}.tag-value[_ngcontent-%COMP%]{font-size:12px}.app-card.app-critical[_ngcontent-%COMP%]   .tag-value[_ngcontent-%COMP%]{color:#dc2626}.app-card.app-medium[_ngcontent-%COMP%]   .tag-value[_ngcontent-%COMP%]{color:#2563eb}.app-recommendation[_ngcontent-%COMP%]{background:#ffffffb2;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.rec-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-weight:600;font-size:14px;color:#7f1d1d}.rec-columns[_ngcontent-%COMP%]{display:flex;gap:15px}.rec-col[_ngcontent-%COMP%]{flex:1 1 50%}.rec-col-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#111827}.rec-col[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:15px;display:flex;flex-direction:column;gap:5px;font-size:12px;color:#4b5563}.app-phases[_ngcontent-%COMP%]{border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.app-card.app-critical[_ngcontent-%COMP%]   .app-phases[_ngcontent-%COMP%]{background:#fee2e280}.app-card.app-medium[_ngcontent-%COMP%]   .app-phases[_ngcontent-%COMP%]{background:#dbeafe80}.phase-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600}.app-card.app-critical[_ngcontent-%COMP%]   .phase-title[_ngcontent-%COMP%]{color:#7f1d1d}.app-card.app-medium[_ngcontent-%COMP%]   .phase-title[_ngcontent-%COMP%]{color:#1e3a8a}.phase-grid[_ngcontent-%COMP%]{display:flex;gap:15px;flex-wrap:wrap}.phase-card[_ngcontent-%COMP%]{flex:1 1 180px;background:#ffffffb2;border-radius:8px;padding:15px;font-size:12px;color:#4b5563}.phase-card[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:14px;display:flex;flex-direction:column;gap:5px}.phase-note[_ngcontent-%COMP%]{font-weight:600}.note-low[_ngcontent-%COMP%]{color:#16a34a}.note-medium[_ngcontent-%COMP%]{color:#ca8a04}.note-high[_ngcontent-%COMP%]{color:#dc2626}.phase-footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.phase-summary[_ngcontent-%COMP%]{text-align:right;font-size:12px;line-height:16px;color:#4b5563}.app-plan[_ngcontent-%COMP%]{border-radius:8px;padding:15px;font-size:12px;display:flex;flex-direction:column;gap:7px}.app-card.app-critical[_ngcontent-%COMP%]   .app-plan[_ngcontent-%COMP%]{background:#fee2e280;color:#b91c1c}.app-card.app-medium[_ngcontent-%COMP%]   .app-plan[_ngcontent-%COMP%]{background:#dbeafe80;color:#1d4ed8}.plan-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;
8gap:10px}.app-actions[_ngcontent-%COMP%]{display:flex;gap:10px;flex-wrap:wrap}.secondary-btn[_ngcontent-%COMP%]{border:none;color:#fff;padding:8px 16px;border-radius:8px;font-size:14px;cursor:pointer}.app-card.app-critical[_ngcontent-%COMP%]   .secondary-btn[_ngcontent-%COMP%]{background:#dc2626}.app-card.app-medium[_ngcontent-%COMP%]   .secondary-btn[_ngcontent-%COMP%]{background:#2563eb}.ghost-btn[_ngcontent-%COMP%]{background:transparent;padding:8px 16px;border-radius:8px;font-size:14px;cursor:pointer}.app-card.app-critical[_ngcontent-%COMP%]   .ghost-btn[_ngcontent-%COMP%]{border:1px solid #DC2626;color:#dc2626}.app-card.app-medium[_ngcontent-%COMP%]   .ghost-btn[_ngcontent-%COMP%]{border:1px solid #2563EB;color:#2563eb}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.ec2-table[_ngcontent-%COMP%]{width:100%;min-width:100%;border-collapse:collapse;border-top:1px solid #E5E7EB;overflow:hidden}.ec2-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px;padding:10px 16px}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}.instance-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;color:#111827}.cell-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:400}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#dbeafe;color:#2563eb}.rec-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:#2563eb;font-size:10px;font-weight:600}.pill-btn[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}[_nghost-%COMP%]     .ec2-table .mat-column-instance{min-width:220px}[_nghost-%COMP%]     .ec2-table .mat-column-risk{min-width:100px}[_nghost-%COMP%]     .ec2-table .mat-column-region{min-width:150px}[_nghost-%COMP%]     .ec2-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .ec2-table .mat-column-confidence{min-width:120px}[_nghost-%COMP%]     .ec2-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .ec2-table .mat-column-actions{min-width:140px}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%]     .ec2-table .mat-mdc-row:last-child .mat-mdc-cell:first-child{border-bottom-left-radius:20px}[_nghost-%COMP%]     .ec2-table .mat-mdc-row:last-child .mat-mdc-cell:last-child{border-bottom-right-radius:20px}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.no-data[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#6b7280;text-align:center;padding:40px 0;font-style:italic}"]})}}return t})();var Vs=(t,r)=>({background:t,color:r});function wg(t,r){t&1&&h(0,"span",24)}function Ig(t,r){if(t&1&&(o(0,"div",25)(1,"div",26),l(2),a(),o(3,"div",27),l(4),a()()),t&2){let e=r.$implicit,n=u().$implicit;c(2),C(e.label),c(),pe("color",n.primaryLink.color),Y("baseline-info",e.label==="Patch Groups"||e.label==="Last Execution"),c(),C(e.value)}}function Tg(t,r){if(t&1){let e=A();o(0,"div",28),h(1,"iconify-icon",29),o(2,"span",30),v("click",function(){O(e);let i=u().$implicit,s=u();return P(s.configuration(i))}),l(3,"Config"),a()()}}function Ag(t,r){if(t&1&&(o(0,"div",9)(1,"div",10)(2,"div",11),h(3,"iconify-icon",12),a(),o(4,"div",13)(5,"div",14),l(6),a(),o(7,"div",15),l(8),a()(),o(9,"div",16),g(10,wg,1,0,"span",17),l(11),a()(),o(12,"div",18),g(13,Ig,5,6,"div",19),a(),o(14,"div",20)(15,"a",21),h(16,"iconify-icon",22),l(17),a(),g(18,Tg,4,0,"div",23),a()()),t&2){let e=r.$implicit;c(2),p("ngStyle",Ei(15,Vs,e.accentBg,e.accentColor)),c(),p("icon",e.icon),c(3),C(e.name),c(2),C(e.subtitle),c(2),p("ngIf",e.status==="Connected"),c(),x(" ",e.status," "),c(2),p("ngForOf",e.stats),c(2),pe("color",e.primaryLink.color),p("href",e.primaryLink.url,Qe),c(),pe("color",e.primaryLink.color),p("icon",e.primaryLink.icon),c(),x(" ",e.primaryLink.label," "),c(),p("ngIf",e.isEdit)}}function Dg(t,r){if(t&1&&(o(0,"li"),h(1,"iconify-icon",40),o(2,"span"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function Rg(t,r){if(t&1){let e=A();o(0,"div",33)(1,"div",10)(2,"div",11),h(3,"iconify-icon",12),a(),o(4,"div",13)(5,"div",14),l(6),a(),o(7,"div",15),l(8),a()(),o(9,"div",34),l(10),a()(),o(11,"div",35)(12,"ul",36),g(13,Dg,4,1,"li",37),a()(),o(14,"div",38)(15,"button",39),v("click",function(){O(e);let i=u(2);return P(i.configureNewIntegration())}),l(16),a()()()}if(t&2){let e=r.$implicit;c(2),p("ngStyle",Ei(7,Vs,e.accentBg,e.accentColor)),c(),p("icon",e.icon),c(3),C(e.name),c(2),C(e.subtitle),c(2),x(" ",e.status," "),c(3),p("ngForOf",e.features),c(3),x(" ",e.cta," ")}}function kg(t,r){if(t&1&&(o(0,"div",31),g(1,Rg,17,10,"div",32),a()),t&2){let e=u();c(),p("ngForOf",e.availableIntegrations)}}var Bs=(()=>{class t{constructor(e,n,i){this.dashboardService=e,this.notify=n,this.router=i,this.title="Integration Hub",this.subtitle="Connect with external security and patch management platforms",this.account_Id=null,this.loading=!1,this.managedInstancesCount="",this.inventoryStatsLoaded=!1,this.showAvailableIntegrations=!1,this.integrationStyles={"AWS Systems Manager":{icon:"dashicons:amazon",accentColor:"#EA580C",accentBg:"#FFEDD5",primaryLinkColor:"#EA580C",isEdit:!1},n8n:{icon:"material-symbols:circle-outline",accentColor:"#DB2777",accentBg:"#FCE7F3",primaryLinkColor:"#DB2777",isEdit:!0}},this.connectedIntegrations=[],this.availableIntegrations=[]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.getInventoryStats(),this.addDefaultAWS(),this.getIntegrations()}configuration(e){let n=e.TOOL||e.name,i=e.ID;this.router.navigate(["/admin-dashboard/patch-management/integrations"],{queryParams:{tool:n,id:i}})}configureNewIntegration(){this.router.navigate(["/admin-dashboard/patch-management/integrations"])}addDefaultAWS(){let e=this.integrationStyles["AWS Systems Manager"];this.connectedIntegrations.push({name:"AWS Systems Manager",subtitle:"Patch Baseline Management",status:"Connected",isEdit:e.isEdit,icon:e.icon,accentColor:e.accentColor,accentBg:e.accentBg,stats:[{label:"Managed Instances",value:this.managedInstancesCount}
8,{label:"Patch Groups",value:"0 baselines active"}],primaryLink:{label:"AWS Console",url:"https://console.aws.amazon.com/console/home",color:e.primaryLinkColor,icon:"icon-park-outline:share"}})}getInventoryStats(){this.dashboardService.getInventoryStats().subscribe({next:e=>{let n=e?.object;if(n?.TOTAL_INSTANCE_COUNT){this.managedInstancesCount=n.TOTAL_INSTANCE_COUNT.toString();let i=this.connectedIntegrations.find(s=>s.name==="AWS Systems Manager");i&&(i.stats[0].value=this.managedInstancesCount)}},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getIntegrations(){this.dashboardService.getIntegrations().subscribe({next:e=>{if(e.status===200&&e.object){let n=Array.isArray(e.object)?e.object:[e.object],i=n.filter(s=>s.TOOL==="n8n");if(i.length>0)i.forEach(s=>{let d=this.integrationStyles[s.TOOL];d&&this.connectedIntegrations.push({ID:s.ID,TOOL:s.TOOL,name:`${s.TOOL} - ${s.NAME}`,subtitle:"Workflow Automation Platform",status:"Connected",isEdit:d.isEdit,icon:d.icon,accentColor:d.accentColor,accentBg:d.accentBg,primaryLink:{label:`${s.TOOL} Dashboard`,url:s.ENDPOINT,color:d.primaryLinkColor,icon:"icon-park-outline:share"}})});else{this.showAvailableIntegrations=!0;let s=n.filter(d=>d.TOOL!=="n8n");s.length>0?this.availableIntegrations=s.map(d=>({name:d.TOOL,subtitle:d.NAME||"Integration Platform",status:"Not Connected",icon:"material-symbols:circle-outline",accentColor:"#DB2777",accentBg:"#FCE7F3",features:["Setup takes ~10 minutes"],cta:"Configure Integration"})):this.availableIntegrations=[{name:"n8n",subtitle:"Workflow Automation Platform",status:"Not Connected",icon:"material-symbols:circle-outline",accentColor:"#DB2777",accentBg:"#FCE7F3",features:["Setup takes ~10 minutes"],cta:"Configure Integration"}]}}else this.showAvailableIntegrations=!0,this.availableIntegrations=[{name:"n8n",subtitle:"Workflow Automation Platform",status:"Not Connected",icon:"material-symbols:circle-outline",accentColor:"#DB2777",accentBg:"#FCE7F3",features:["Setup takes ~10 minutes"],cta:"Configure Integration"}];this.loading=!1},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V),y(G))}}static{this.\u0275cmp=k({type:t,selectors:[["app-patch-integrations"]],decls:11,vars:4,consts:[[1,"integration-page"],[1,"integration-header"],[1,"integration-title"],[1,"integration-mainhead"],[1,"integration-subhead"],[1,"contant-container"],[1,"connected-grid"],["class","integration-card connected",4,"ngFor","ngForOf"],["class","available-grid",4,"ngIf"],[1,"integration-card","connected"],[1,"card-header"],[1,"avatar",3,"ngStyle"],["width","24","height","24",3,"icon"],[1,"card-title"],[1,"name"],[1,"role"],[1,"status-pill","success"],["class","status-dot",4,"ngIf"],[1,"card-body"],["class","stat",4,"ngFor","ngForOf"],[1,"card-footer-first"],["target","_blank","rel","noopener",1,"primary-link",3,"href"],["width","18","height","18",2,"position","relative","top","4px",3,"icon"],["class","footer-actions",4,"ngIf"],[1,"status-dot"],[1,"stat"],[1,"stat-label"],[1,"stat-value"],[1,"footer-actions"],["icon","iconamoon:settings","width","18","height","18",1,"settings-btn"],[1,"config-btn",3,"click"],[1,"available-grid"],["class","integration-card available",4,"ngFor","ngForOf"],[1,"integration-card","available"],[1,"status-pill","muted"],[1,"card-body","column"],[1,"feature-list"],[4,"ngFor","ngForOf"],[1,"card-footer"],["type","button",1,"secondary-btn",3,"click"],["icon","ri:time-line","width","20","height","20"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),l(4),a(),o(5,"div",4),l(6),a()()(),o(7,"div",5)(8,"div",6),g(9,Ag,19,18,"div",7),a(),g(10,kg,2,1,"div",8),a()()),n&2&&(c(4),C(i.title),c(2),C(i.subtitle),c(3),p("ngForOf",i.connectedIntegrations),c(),p("ngIf",i.showAvailableIntegrations))},dependencies:[N,$,B,pr,z],styles:[".integration-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;padding-top:20px}.integration-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px}.integration-title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;flex:1 1 60%}.integration-mainhead[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.integration-subhead[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:24px}.integration-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;justify-content:flex-end;flex:1 1 45%}.action-btn[_ngcontent-%COMP%]{background:#57b5e7;color:#fff;border:none;padding:8px 16px;border-radius:8px;font-size:16px;display:flex;align-items:center;gap:6px;cursor:pointer;height:40px}.contant-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.connected-grid[_ngcontent-%COMP%]{gap:16px;margin-bottom:8px;display:flex;flex-wrap:wrap}.available-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:8px}.integration-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:25px 18px;box-shadow:0 4px 12px #1118270f;display:flex;flex-direction:column;gap:12px;position:relative}.integration-card.connected[_ngcontent-%COMP%]{border:1px solid #10B981;background:#f0fdf4;box-shadow:0 1px 2px #0000000d;width:548px}.integration-card.available[_ngcontent-%COMP%]{box-shadow:0 4px 14px #1118270a;width:400px}.card-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}
8.avatar[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px}.card-title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.card-title[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{color:#111827;font-weight:600;font-size:16px;line-height:28px}.card-title[_ngcontent-%COMP%]   .role[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:20px}.status-pill[_ngcontent-%COMP%]{margin-left:auto;border-radius:999px;border:1px solid #d1d5db;color:#6b7280;padding:6px 10px;font-size:12px;line-height:1;display:flex;align-items:center;gap:6px;background:#f9fafb;white-space:nowrap}.status-pill.success[_ngcontent-%COMP%]{color:#16a34a;background:#ecfdf3;border:none}.status-pill.muted[_ngcontent-%COMP%]{border-color:#e5e7eb}.status-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:#22c55e;display:inline-block}.card-body[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.card-body.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;flex:1 1 auto}.stat-value[_ngcontent-%COMP%]{font-size:24px;line-height:20px;font-weight:700;color:#111827}.stat-value.baseline-info[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#4b5563;display:inline-block;line-height:20px}.stat-label[_ngcontent-%COMP%]{color:#111827;font-weight:600;font-size:14px;line-height:20px;margin-bottom:5px}.description[_ngcontent-%COMP%]{color:#374151;line-height:20px;font-size:14px}.feature-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.feature-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;color:#6b7280;font-size:13px;line-height:20px}.bullet[_ngcontent-%COMP%]{color:#6b7280;margin-top:-2px;display:inline-block}.card-footer-first[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-top:auto;justify-content:space-between}.card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-top:auto}.primary-link[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:20px;text-decoration:none;color:#2563eb}.secondary-btn[_ngcontent-%COMP%]{border:none;background:#f3f4f6;padding:10px 14px;border-radius:10px;font-weight:400;font-size:16px;line-height:24px;width:100%;color:#374151;cursor:pointer;transition:all .2s ease}.secondary-btn[_ngcontent-%COMP%]:hover{border-color:#a5b4fc;box-shadow:0 2px 8px #4f46e524}.settings-btn[_ngcontent-%COMP%]{padding:8px 4px;color:#4b5563;cursor:pointer}.config-btn[_ngcontent-%COMP%]{padding:8px 0;color:#4b5563;cursor:pointer;font-size:14px;font-weight:400}.refresh-btn[_ngcontent-%COMP%]{color:#16a34a;padding:8px 10px;cursor:pointer}.footer-actions[_ngcontent-%COMP%]{display:flex;gap:4px}"]})}}return t})();var Us=(()=>{class t{constructor(e,n,i,s){this.dialogRef=e,this.dashboardService=n,this.notify=i,this.data=s,this.loading=!1}ngOnInit(){}onNoClick(){this.dialogRef.close(!1)}cancelSchedule(){if(!this.data?.jobId){this.dialogRef.close(!1);return}this.loading=!0,this.dashboardService.deleteScheduledJob(this.data.jobId).subscribe({next:e=>{this.loading=!1,this.dialogRef.close(!0)},error:e=>{this.loading=!1,this.notify.showNotification(e.error?.message||"Failed to cancel schedule","top",E[e.error?.status]?E[e.error.status]:"error",e.error?.status||500),this.dialogRef.close(!1)}})}static{this.\u0275fac=function(n){return new(n||t)(y(Et),y(re),y(V),y(Qt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cancel-schedule"]],decls:11,vars:2,consts:[[1,"confirmation-dialog"],["mat-dialog-title",""],["align","end"],["mat-button","",1,"cancel-btn",3,"click","mat-dialog-close"],["mat-button","","color","warn",1,"confirm-btn",3,"click","mat-dialog-close"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"h2",1),l(2,"Cancel Schedule"),a(),o(3,"mat-dialog-content")(4,"p"),l(5,"Are you sure you want to cancel this job schedule?"),a()(),o(6,"mat-dialog-actions",2)(7,"button",3),v("click",function(){return i.onNoClick()}),l(8,"No"),a(),o(9,"button",4),v("click",function(){return i.cancelSchedule()}),l(10,"Yes, Cancel"),a()()()),n&2&&(c(7),p("mat-dialog-close",!1),c(2),p("mat-dialog-close",!0))},dependencies:[N,z,ut,ss,Yi,Qi,Ki],styles:[".confirmation-dialog[_ngcontent-%COMP%]{padding:20px;min-width:300px}.mat-dialog-actions[_ngcontent-%COMP%]{padding:8px 0;margin-top:16px}.cancel-btn[_ngcontent-%COMP%]{margin-right:8px}.confirm-btn[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.confirm-btn[_ngcontent-%COMP%]:hover{background-color:#d32f2f}"]})}}return t})();function Ng(t,r){t&1&&(o(0,"div",34)(1,"div",35)(2,"div",36),h(3,"span",37),a()()())}function Fg(t,r){if(t&1&&(o(0,"div",46),h(1,"div",47),a()),t&2){let e=u().$implicit;c(),pe("width",e.progress,"%"),Y("high",e.progress>=90)("medium",e.progress>70&&e.progress<90)("low",e.progress<70)}}function zg(t,r){if(t&1&&(o(0,"div",38)(1,"div",39)(2,"div",40)(3,"div",41),l(4),a(),o(5,"div",42),l(6),a()(),o(7,"div",43),h(8,"iconify-icon",44),a()(),g(9,Fg,2,8,"div",45),a()),t&2){let e=r.$implicit;c(4),C(e.label),c(2),C(e.value),c(),p("ngClass",e.iconClass),c(),p("icon",e.icon),c(),p("ngIf",e.showProgress)}}function Lg(t,r){t&1&&(o(0,"div",48),h(1,"iconify-icon",49),o(2,"span"),l(3,"Workflow Templates"),a()())}function Vg(t,r){t&1&&(o(0,"th",50),l(1,"Workflow"),a())}function Bg(t,r){if(t&1&&(o(0,"td",51)(1,"div",52)(2,"div",53),h(3,"img",54),l(4),a()()()),t&2){let e=r.$implicit,n=u();c(3),p("src",n.getWorkflowImage(e.NAME),Qe)("alt",e.NAME+" icon"),c(),x(" ",e.NAME," ")}}function Ug(t,r){t&1&&(o(0,"th",50),l(1,"Started Date / Time"),a())}function jg(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),F(3,"date"),a()()),t&2){let e=r.$implicit;c(2),C(ie(3,1,e.CREATED_AT,"MMM d, y HH:mm"))}}function $g(t,r){t&1&&(o(0,"th",50),l(1,"Status"),a())}function qg(t,r){if(t&1&&(o(0,"td",51)(1,"span",56),l(2),a()()),t&2){let e=r.$implicit;c(),Y("active",e.ACTIVE)("inactive",!e.ACTIVE),c(),x(" ",e.ACTIVE?"Active":"Inactive"," ")}}
8function Hg(t,r){t&1&&(o(0,"th",50),l(1,"Updated Date / Time"),a())}function Wg(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),F(3,"date"),a()()),t&2){let e=r.$implicit;c(2),C(ie(3,1,e.UPDATED_AT,"MMM d, y HH:mm"))}}function Gg(t,r){t&1&&(o(0,"th",50),l(1,"Success Rate"),a())}function Yg(t,r){if(t&1&&(o(0,"td",51)(1,"div",57)(2,"span",58),l(3),F(4,"number"),a(),o(5,"div",59),h(6,"div",47),a()()()),t&2){let e=r.$implicit;c(2),Y("high",e.SUCCESS_RATE>=90)("medium",e.SUCCESS_RATE>70&&e.SUCCESS_RATE<90)("low",e.SUCCESS_RATE<70),c(),x(" ",ie(4,15,e.SUCCESS_RATE,"1.0-1"),"% "),c(3),pe("width",e.SUCCESS_RATE,"%"),Y("high",e.SUCCESS_RATE>=90)("medium",e.SUCCESS_RATE>=70&&e.SUCCESS_RATE<90)("low",e.SUCCESS_RATE<70)}}function Kg(t,r){t&1&&(o(0,"th",50),l(1,"Actions"),a())}function Qg(t,r){if(t&1){let e=A();o(0,"td",60)(1,"div",61)(2,"button",62),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(3,"View"),a(),o(4,"iconify-icon",63),v("click",function(){let i=O(e).$implicit,s=u();return P(s.scheduleWorkflow(i))}),a()()()}t&2&&(c(4),p("matTooltip","Edit Job Schedule"))}function Jg(t,r){t&1&&h(0,"tr",64)}function Zg(t,r){t&1&&h(0,"tr",65)}function Xg(t,r){t&1&&(o(0,"div",48),h(1,"iconify-icon",66),o(2,"span"),l(3,"Execution Status"),a()())}function ef(t,r){t&1&&(o(0,"th",50),l(1,"Execution ID"),a())}function tf(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.id)}}function nf(t,r){t&1&&(o(0,"th",50),l(1,"Workflow"),a())}function of(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.name)}}function rf(t,r){t&1&&(o(0,"th",50),l(1,"Started Date / Time"),a())}function af(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),F(3,"date"),a()()),t&2){let e=r.$implicit;c(2),C(ie(3,1,e.startedAt,"MMM d, y HH:mm"))}}function lf(t,r){t&1&&(o(0,"th",50),l(1,"Status"),a())}function sf(t,r){if(t&1&&(o(0,"td",51)(1,"span",67),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e.status?e.status.toLowerCase():"unknown"),c(),x(" ",X(3,2,e.status||"Unknown")," ")}}function cf(t,r){t&1&&(o(0,"th",50),l(1,"Runtime"),a())}function df(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit,n=u();c(2),C(n.formatRuntime(e.startedAt,e.stoppedAt))}}function pf(t,r){t&1&&(o(0,"th",50),l(1,"Actions"),a())}function mf(t,r){if(t&1){let e=A();o(0,"td",60)(1,"div",61)(2,"button",62),v("click",function(){let i=O(e).$implicit,s=u();
8return P(s.viewExecutionDetails(i))}),l(3,"View"),a()()()}}function uf(t,r){t&1&&h(0,"tr",64)}function gf(t,r){t&1&&h(0,"tr",65)}function ff(t,r){t&1&&(o(0,"div",48),h(1,"iconify-icon",68),o(2,"span"),l(3,"Scheduled Jobs"),a()())}function hf(t,r){t&1&&(o(0,"th",50),l(1,"Scheduled Job Name"),a())}function _f(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.SCHEDULED_JOB_NAME)}}function Cf(t,r){t&1&&(o(0,"th",50),l(1,"Workflow Name"),a())}function xf(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.WORKFLOW_NAME)}}function vf(t,r){t&1&&(o(0,"th",50),l(1,"Execution Date"),a())}function bf(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),F(3,"date"),a()()),t&2){let e=r.$implicit;c(2),C(ie(3,1,e.EXECUTION_DATE,"MMM d, y HH:mm"))}}function yf(t,r){t&1&&(o(0,"th",50),l(1,"Timezone"),a())}function Mf(t,r){if(t&1&&(o(0,"td",51)(1,"div",55),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.TIMEZONE.NAME)}}function Sf(t,r){t&1&&(o(0,"th",50),l(1,"Actions"),a())}function Of(t,r){if(t&1){let e=A();o(0,"td",60)(1,"div",61)(2,"button",62),v("click",function(){let i=O(e).$implicit,s=u();return P(s.scheduleJobs(i))}),l(3,"Edit"),a(),o(4,"button",69),v("click",function(){let i=O(e).$implicit,s=u();return P(s.schedulecancel(i))}),l(5,"Cancel"),a()()()}}function Pf(t,r){t&1&&h(0,"tr",64)}function Ef(t,r){t&1&&h(0,"tr",65)}var $s=(()=>{class t{constructor(e,n,i,s,d,m,f){this.dashboardService=e,this.notify=n,this.router=i,this.route=s,this.dialog=d,this.ngZone=m,this.cdr=f,this.selectedCategory="all",this.displayedColumns=["workflow","createdAt","status","updatedAt","successRate","actions"],this.displayedColumnsExecutions=["executionId","workflow","startedAt","status","runtime","actions"],this.displayedColumnsScheduledJobs=["jobName","workflowName","executionDate","timezone","actions"],this.totalWorkflows=0,this.activeJobs=0,this.completedToday=0,this.successRate=0,this.loading=!1,this.loadingExecutions=!1,this.loadingScheduledJobs=!1,this.selectedIndex=0,this.displayErrorMessage="",this.workflows=[],this.executions=[],this.scheduledJobs=[],this.statusFilter="all",this.statusFilters=[{value:"all",label:"All"},{value:"true",label:"Active"},{value:"false",label:"Inactive"}],this.searchQuery="",this.stats=[{value:this.totalWorkflows,label:"Total Workflows",status:"+12% from last month",icon:"ri:flow-chart",iconClass:"total-workflows"},{value:this.activeJobs,label:"Executions",status:"Running smoothly",icon:"octicon:play-16",iconClass:"running-instances"},{value:this.completedToday,label:"Completed Today",status:"+8% from yesterday",icon:"tdesign:check-double",iconClass:"today-completed"},{value:`${this.successRate}%`,label:"Success Rate",icon:"ri:trophy-line",iconClass:"success-rate",showProgress:!0,progress:this.successRate}]}ngOnInit(){this.getTotalWorkflows(),this.getActiveJobs(),this.getCompletedToday(),this.get
8SuccessRate(),this.route.queryParams.subscribe(e=>{let n=e.workflowTab;this.selectedIndex=n==="executions"?1:n==="scheduled"?2:0,this.selectedIndex===0?this.getWorkflows():this.selectedIndex===1?this.getExecutions():this.selectedIndex===2&&this.getScheduledJobs()})}viewDetails(e){(e?.ID||e?.id)&&this.router.navigate(["/admin-dashboard/patch-management/workflow",e.ID||e.id],{state:{meta:{createdAt:e.CREATED_AT,updatedAt:e.UPDATED_AT,active:e.ACTIVE,successRate:e.SUCCESS_RATE}}})}viewExecutionDetails(e){e?.workflowId&&e?.id&&this.router.navigate(["/admin-dashboard/patch-management/workflow",e.workflowId],{state:{executionId:e.id,isExecutionView:!0,metaExecutions:{progress:e.progress}}})}getTotalWorkflows(){this.dashboardService.getTotalWorkflows().subscribe({next:e=>{e?.object?.TOTAL_WORKFLOWS!==void 0&&(this.totalWorkflows=e.object.TOTAL_WORKFLOWS,this.stats[0].value=this.totalWorkflows),this.refreshView()},error:e=>{this.loading=!1,this.displayErrorMessage="Error fetching Total Workflows.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getActiveJobs(){this.dashboardService.getActiveJobs().subscribe({next:e=>{e?.object?.EXECUTIONS!==void 0&&(this.activeJobs=e.object.EXECUTIONS,this.stats[1].value=this.activeJobs),this.refreshView()},error:e=>{this.loading=!1,this.displayErrorMessage="Error fetching Active Jobs.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getCompletedToday(){this.dashboardService.getCompletedToday().subscribe({next:e=>{e?.object?.COMPLETED_TODAY!==void 0&&(this.completedToday=e.object.COMPLETED_TODAY,this.stats[2].value=this.completedToday),this.refreshView()},error:e=>{this.loading=!1,this.displayErrorMessage="Error fetching Completed Today.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getSuccessRate(){this.dashboardService.getSuccessRate().subscribe({next:e=>{e?.object?.SUCCESS_RATE!==void 0&&(this.successRate=e.object.SUCCESS_RATE,this.successRate=this.successRate.toFixed(2),this.stats[3].value=`${this.successRate}%`,this.stats[3].progress=this.successRate),this.refreshView()},error:e=>{this.loading=!1,this.displayErrorMessage="Error fetching Success Rate.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}onTabChange(e){this.selectedIndex=e;let n=e===1?"executions":e===2?"scheduled":"templates";this.router.navigate([],{queryParams:{workflowTab:n},queryParamsHandling:"merge"})}getWorkflows(e="true",n=""){this.loading=!0;let i;e==="true"?i=!0:e==="false"&&(i=!1);let s=n?.trim()||void 0;this.dashboardService.getWorkflows(i,s).subscribe({next:d=>{d?.object?.WORKFLOWS&&(this.workflows=d.object.WORKFLOWS.filter(m=>m.ACTIVE===!0)),this.loading=!1,this.refreshView()},error:d=>{this.loading=!1,this.displayErrorMessage="Error fetching Workflows.",d.error.status==401&&this.notify.showNotification(d.error.message,"top",E[d.error.status]?E[d.error.status]:"error",d.error.status),this.refreshView()}})}onStatusFilterChange(e){this.statusFilter=e,this.getWorkflows(e,this.searchQuery)}onSearch(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.getWorkflows(this.statusFilter,this.searchQuery)},300)}getWorkflowImage(e){if(!e)return"/assets/default.png";let n=e.toLowerCase();return["critical","urgent","important"].some(i=>n.includes(i))?"/assets/urgent.png":["monthly","quarterly","yearly"].some(i=>n.includes(i))?"/assets/schedule.png":["vulnerability","security"].some(i=>n.includes(i))?"/assets/security.png":["linux","windows","machine"].some(i=>n.includes(i))?"/assets/os.png":["system","backup"].some(i=>n.includes(i))?"/assets/backup.png":["patch","monitoring"].some(i=>n.includes(i))?"/assets/patch.png":"/assets/default.png"}getExecutions(){this.loadingExecutions=!0,this.dashboardService.getExecutions().subscribe({next:e=>{e?.object?.EXECUTIONS&&(this.executions=e.object.EXECUTIONS),this.loadingExecutions=!1,this.loading=!1,this.refreshView()},error:e=>{this.loadingExecutions=!1,this.loading=!1,this.displayErrorMessage="Error fetching Executions.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}formatRuntime(e,n){if(!e||!n)return"N/A";try{let i=new Date(e).getTime(),s=new Date(n).getTime();if(isNaN(i)||isNaN(s))return"N/A";let d=s-i,m=Math.floor(d/1e3),f=Math.floor(m/3600),_=Math.floor(m%3600/60),b=m%60;return[f,_,b].map(M=>M<10?"0"+M:M).filter((M,S)=>M!=="00"||S>0).join(":")||"00:00"}catch(i){return"N/A"}}scheduleWorkflow(e){let n=e?.ID;this.router.navigate(["/admin-dashboard","patch-management","job-schedule"],{queryParams:{source:"workflow-blueprints",workflowId:n}})}getScheduledJobs(){this.loadingScheduledJobs=!0,this.dashboardService.getScheduledJobs().subscribe({next:e=>{e?.object&&Array.isArray(e.object)&&(this.scheduledJobs=e.object),this.loadingScheduledJobs=!1,this.loading=!1,this.refreshView()},error:e=>{this.loadingScheduledJobs=!1,this.loading=!1,this.displayErrorMessage="Error fetching Scheduled Jobs.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}scheduleJobs(e){let n=e?.ID,i={source:"workflow-blueprints"};n&&(i.jobId=n),this.router.navigate(["/admin-dashboard","patch-management","job-schedule"],{queryParams:i}
8)}schedulecancel(e){this.dialog.open(Us,{panelClass:"cancel-schedule-popup-dialog",disableClose:!0,data:{jobId:e}}).afterClosed().subscribe(i=>{i===!0&&(this.notify.showNotification("Schedule cancelled successfully","top",E[i.status]?E[i.status]:"success",i.status),this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"workflow-blueprints",workflowTab:"schedules"}}))})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V),y(G),y(Le),y(Se),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-patch-workflow-blueprints"]],decls:94,vars:13,consts:[[1,"workflow"],["class","overlay",4,"ngIf"],[1,"stats-row"],["class","stat-card",4,"ngFor","ngForOf"],["animationDuration","0ms","mat-stretch-tabs","false",1,"workflow-tabs",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"workflow-table"],[1,"table-controls"],[1,"filters"],[1,"filter-label"],[1,"search-container"],[1,"search-field"],["matSuffix",""],["matInput","","placeholder","Search workflows...",3,"ngModelChange","input","keyup.enter","ngModel"],[1,"table-responsive"],["mat-table","",1,"workflow-list",3,"dataSource"],["matColumnDef","workflow"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","createdAt"],["matColumnDef","status"],["matColumnDef","updatedAt"],["matColumnDef","successRate"],["matColumnDef","actions"],["mat-cell","","class","actions",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","executionId"],["matColumnDef","startedAt"],["matColumnDef","runtime"],["matColumnDef","jobName"],["matColumnDef","workflowName"],["matColumnDef","executionDate"],["matColumnDef","timezone"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"stat-card"],[1,"stat-container"],[1,"stat-text"],[1,"stat-label"],[1,"stat-value"],[1,"stat-icon",3,"ngClass"],[3,"icon"],["class","progress-container",4,"ngIf"],[1,"progress-container"],[1,"progress-bar"],[1,"tab-label"],["icon","mingcute:file-code-line","width","18","height","18",1,"tab-icon"],["mat-header-cell",""],["mat-cell",""],[1,"workflow-info"],[1,"workflow-name"],[1,"workflow-icon",3,"src","alt"],[1,"workflow-desc"],[1,"status-badge"],[1,"success-amount"],[1,"percentage"],[1,"progress-line"],["mat-cell","",1,"actions"],[1,"actions-content"],["mat-button","",1,"view-details-btn",3,"click"],["icon","uil:calender",1,"calendar-icon",3,"click","matTooltip"],["mat-header-row",""],["mat-row",""],["icon","ri:bar-chart-line","width","18","height","18"],[1,"status-badge",3,"ngClass"],["icon","akar-icons:schedule","
8width","18","height","18"],["mat-button","",1,"cancel-btn",3,"click"]],template:function(n,i){n&1&&(o(0,"div",0),g(1,Ng,4,0,"div",1),o(2,"div",2),g(3,zg,10,5,"div",3),a(),o(4,"mat-tab-group",4),se("selectedIndexChange",function(d){return le(i.selectedIndex,d)||(i.selectedIndex=d),d}),v("selectedIndexChange",function(d){return i.onTabChange(d)}),o(5,"mat-tab"),g(6,Lg,4,0,"ng-template",5),o(7,"div",6)(8,"div",7)(9,"div",8)(10,"span",9),l(11,"Workflows"),a()(),o(12,"div",10)(13,"div",11)(14,"mat-icon",12),l(15,"search"),a(),o(16,"input",13),se("ngModelChange",function(d){return le(i.searchQuery,d)||(i.searchQuery=d),d}),v("input",function(){return i.onSearch()})("keyup.enter",function(){return i.onSearch()}),a()()()(),o(17,"div",14)(18,"table",15),I(19,16),g(20,Vg,2,0,"th",17)(21,Bg,5,3,"td",18),T(),I(22,19),g(23,Ug,2,0,"th",17)(24,jg,4,4,"td",18),T(),I(25,20),g(26,$g,2,0,"th",17)(27,qg,3,5,"td",18),T(),I(28,21),g(29,Hg,2,0,"th",17)(30,Wg,4,4,"td",18),T(),I(31,22),g(32,Gg,2,0,"th",17)(33,Yg,7,18,"td",18),T(),I(34,23),g(35,Kg,2,0,"th",17)(36,Qg,5,1,"td",24),T(),g(37,Jg,1,0,"tr",25)(38,Zg,1,0,"tr",26),a()()()(),o(39,"mat-tab"),g(40,Xg,4,0,"ng-template",5),o(41,"div",6)(42,"div",7)(43,"div",8)(44,"span",9),l(45,"Executions"),a()()(),o(46,"div",14)(47,"table",15),I(48,27),g(49,ef,2,0,"th",17)(50,tf,3,1,"td",18),T(),I(51,16),g(52,nf,2,0,"th",17)(53,of,3,1,"td",18),T(),I(54,28),g(55,rf,2,0,"th",17)(56,af,4,4,"td",18),T(),I(57,20),g(58,lf,2,0,"th",17)(59,sf,4,4,"td",18),T(),I(60,29),g(61,cf,2,0,"th",17)(62,df,3,1,"td",18),T(),I(63,23),g(64,pf,2,0,"th",17)(65,mf,4,0,"td",24),T(),g(66,uf,1,0,"tr",25)(67,gf,1,0,"tr",26),a()()()(),o(68,"mat-tab"),g(69,ff,4,0,"ng-template",5),o(70,"div",6)(71,"div",7)(72,"div",8)(73,"span",9),l(74,"Scheduled Jobs"),a()()(),o(75,"div",14)(76,"table",15),I(77,30),g(78,hf,2,0,"th",17)(79,_f,3,1,"td",18),T(),I(80,31),g(81,Cf,2,0,"th",17)(82,xf,3,1,"td",18),T(),I(83,32),g(84,vf,2,0,"th",17)(85,bf,4,4,"td",18),T(),I(86,33),g(87,yf,2,0,"th",17)(88,Mf,3,1,"td",18),T(),I(89,23),g(90,Sf,2,0,"th",17)(91,Of,6,0,"td",24),T(),g(92,Pf,1,0,"tr",25)(93,Ef,1,0,"tr",26),a()()()()()()),n&2&&(c(),p("ngIf",i.loading||i.loadingExecutions||i.loadingScheduledJobs),c(2),p("ngForOf",i.stats),c(),ae("selectedIndex",i.selectedIndex),c(12),ae("ngModel",i.searchQuery),c(2),p("dataSource",i.workflows),c(19),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns),c(9),p("dataSource",i.executions),c(19),p("matHeaderRowDef",i.displayedColumnsExecutions),c(),p("matRowDefColumns",i.displayedColumnsExecutions),c(9),p("dataSource",i.scheduledJobs),c(16),p("matHeaderRowDef",i.displayedColumnsScheduledJobs),c(),p("matRowDefColumns",i.displayedColumnsScheduledJobs))},dependencies:[N,xe,$,B,z,An,Nt,ut,Dn,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Zi,Xi,ti,ni,ve,me,mt,Wt,Ht,pt],styles:[".workflow[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-top:20px}.workflow[_ngcontent-%COMP%]   .tab-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0 4px}.workflow[_ngcontent-%COMP%]   .tab-label[_ngcontent-%COMP%]   .tab-icon[_ngcontent-%COMP%]{display:flex;align-items:center}.stats-row[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.stat-card[_ngcontent-%COMP%]{position:relative;flex:1 1 200px;
8min-width:200px;background:#fff;border:1px solid #E5E7EB;border-radius:20px;padding:20px 24px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 1px 2px #0000000d}.progress-container[_ngcontent-%COMP%]{margin-top:15px;width:100%;height:6px;background-color:#e8edf3;border-radius:3px;overflow:hidden}.progress-container[_ngcontent-%COMP%]   .progress-bar[_ngcontent-%COMP%]{height:100%;background-color:#ea580c;border-radius:3px;transition:width .6s ease}.progress-container[_ngcontent-%COMP%]   .progress-bar.high[_ngcontent-%COMP%]{background:#16a34a}.progress-container[_ngcontent-%COMP%]   .progress-bar.medium[_ngcontent-%COMP%]{background:#ca8a04}.progress-container[_ngcontent-%COMP%]   .progress-bar.low[_ngcontent-%COMP%]{background:#dc2626}.today-completed[_ngcontent-%COMP%]{background:#f3e8ff;color:#9333ea}.success-rate[_ngcontent-%COMP%]{background:#ffedd5;color:#ea580c}.stat-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.stat-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.stat-label[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;font-weight:500;line-height:20px}.stat-value[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#111827;line-height:36px}.stat-status[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#16a34a;margin-top:30px}.stat-status.warning[_ngcontent-%COMP%]{color:#d97706}.stat-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:16px;font-size:20px;display:flex;align-items:center;justify-content:center}.stat-icon.total-workflows[_ngcontent-%COMP%]{background:#dbeafe;color:#3b82f6}.stat-icon.running-instances[_ngcontent-%COMP%]{background:#e7f8ee;color:#22c55e}.workflow-table[_ngcontent-%COMP%]{padding:20px}.table-controls[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;flex-wrap:wrap;gap:16px}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.filter-label[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:20px;color:#111827;margin-right:8px}.filter-btn[_ngcontent-%COMP%]{padding:6px 10px;font-size:12px;line-height:16px;font-weight:500;color:#374151;background:#f3f4f6;border-radius:8px}.filter-btn.active[_ngcontent-%COMP%]{background:#3b82f6;color:#fff}.search-container[_ngcontent-%COMP%]{display:flex;gap:12px;flex-wrap:wrap}.search-field[_ngcontent-%COMP%]{width:280px;border:1px solid #D1D5DB;border-radius:8px;background:#fff;padding:0 10px;display:flex;align-items:center;height:40px}.search-field[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#6b7280;margin-right:8px;font-size:20px;width:20px;height:20px}.search-field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border:none;outline:none;flex:1;font-size:14px;color:#111827;background:transparent}.search-field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.category-select[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.workflow-list[_ngcontent-%COMP%]   .mat-column-workflow[_ngcontent-%COMP%]{width:30%}.workflow-list[_ngcontent-%COMP%]   .mat-column-successRate[_ngcontent-%COMP%]{width:15%}.workflow-list[_ngcontent-%COMP%]{width:100%;border:1px solid #E5E7EB;border-radius:14px}.workflow-list[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f3f4f6;letter-spacing:.05em;padding:0 16px}.workflow-list[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-child{border-top-left-radius:14px}.workflow-list[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:last-child{border-top-right-radius:14px}.workflow-list[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px;vertical-align:middle}.workflow-list[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:none;border-bottom-left-radius:14px;border-bottom-right-radius:14px}.workflow-info[_ngcontent-%COMP%]   .workflow-name[_ngcontent-%COMP%]{font-weight:600;font-size:13px;line-height:20px;color:#111827;margin-bottom:4px;display:flex;align-items:center;gap:15px}
8.workflow-info[_ngcontent-%COMP%]   .workflow-name[_ngcontent-%COMP%]   .workflow-icon[_ngcontent-%COMP%]{object-fit:contain;width:23px}.workflow-desc[_ngcontent-%COMP%]{font-size:13px;font-weight:400;color:#4b5563;line-height:20px}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500}.status-badge.active[_ngcontent-%COMP%], .status-badge.success[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.status-badge.error[_ngcontent-%COMP%], .status-badge.failed[_ngcontent-%COMP%], .status-badge.canceled[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.status-badge.running[_ngcontent-%COMP%], .status-badge.waiting[_ngcontent-%COMP%]{background:#fefce8;color:#ca8a04}.success-amount[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.success-amount[_ngcontent-%COMP%]   .progress-line[_ngcontent-%COMP%]{flex:1;height:6px;background:#e5e7eb;border-radius:3px;overflow:hidden}.success-amount[_ngcontent-%COMP%]   .progress-bar[_ngcontent-%COMP%]{height:100%;border-radius:3px}.success-amount[_ngcontent-%COMP%]   .progress-bar.high[_ngcontent-%COMP%]{background:#16a34a}.success-amount[_ngcontent-%COMP%]   .progress-bar.medium[_ngcontent-%COMP%]{background:#ca8a04}.success-amount[_ngcontent-%COMP%]   .progress-bar.low[_ngcontent-%COMP%]{background:#dc2626}.success-amount[_ngcontent-%COMP%]   .percentage[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;font-weight:500;min-width:50px;text-align:right}.success-amount[_ngcontent-%COMP%]   .percentage.high[_ngcontent-%COMP%]{color:#16a34a}.success-amount[_ngcontent-%COMP%]   .percentage.medium[_ngcontent-%COMP%]{color:#ca8a04}.success-amount[_ngcontent-%COMP%]   .percentage.low[_ngcontent-%COMP%]{color:#dc2626}.step-icons[_ngcontent-%COMP%]{display:flex;gap:8px}.step-icons[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;color:#4b5563;font-size:16px}.actions-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.view-details-btn[_ngcontent-%COMP%]{color:#3b82f6;font-weight:500;font-size:12px;line-height:16px;text-transform:none;padding:5px 10px;border-radius:8px;background:#eff6ff}.view-details-btn[_ngcontent-%COMP%]:hover{background:#3b82f61a}.cancel-btn[_ngcontent-%COMP%]{color:#ef4444;font-weight:500;font-size:12px;line-height:16px;text-transform:none;padding:5px 10px;border-radius:8px;background:#ffefef}.calendar-icon[_ngcontent-%COMP%]{color:#3b82f6;font-size:18px;cursor:pointer}.timer-icon[_ngcontent-%COMP%]{color:#dc2626}"]})}}return t})();function wf(t,r){t&1&&(h(0,"iconify-icon",14),o(1,"span"),l(2,"Inventory"),a())}function If(t,r){t&1&&h(0,"app-patch-inventory")}function Tf(t,r){t&1&&(h(0,"iconify-icon",15),o(1,"span"),l(2,"AI Risk Analytics"),a())}function Af(t,r){t&1&&h(0,"app-patch-ai-risk-analytics")}function Df(t,r){t&1&&(h(0,"iconify-icon",16),o(1,"span"),l(2,"Integrations"),a())}function Rf(t,r){t&1&&h(0,"app-patch-integrations")}function kf(t,r){t&1&&(h(0,"iconify-icon",17),o(1,"span"),l(2,"Workflow Blueprints"),a())}function Nf(t,r){t&1&&h(0,"app-patch-workflow-blueprints")}function Ff(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function zf(t,r){t&1&&(o(0,"span",24),l(1,"Requesting... "),h(2,"iconify-icon",25),a())}function Lf(t,r){if(t&1){let e=A();o(0,"section",18)(1,"div",19)(2,"div",20),h(3,"iconify-icon",21),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",22),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,Ff,2,0,"span",12)(10,zf,3,0,"span",23),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var qs=(()=>{class t{constructor(e,n,i,s,d){this.route=e,this.router=n,this.dialog=i,this.dashboardService=s,this.notify=d,this.loading=!1,this.tabs=[{key:"inventory",label:"Inventory"},{key:"ai-risk-analytics",label:"AI Risk Analytics"},{key:"integrations",label:"Integrations"},{key:"workflow-blueprints",label:"Workflow Blueprints"}],this.selectedIndex=0,this.activeTabLabel=this.tabs[0].label,this.isPatchManagementEnabled=!0,this.isAccessLoading=!1}ngOnInit(){this.isPatchManagementEnabled=this.isFeatureEnabled(5),this.isPatchManagementEnabled&&this.route.queryParams.subscribe(e=>{let n=e.tab,i=this.tabs.findIndex(s=>s.key==n);this.selectedIndex=i>=0?i:0,this.activeTabLabel=this.tabs[this.selectedIndex].label})}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:5}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onTabChange(e){let n=this.tabs[e];
8n&&(this.activeTabLabel=n.label,this.router.navigate([],{relativeTo:this.route,queryParams:{tab:n.key},queryParamsHandling:"merge"}))}static{this.\u0275fac=function(n){return new(n||t)(y(Le),y(G),y(Se),y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-auto-shift"]],decls:33,vars:9,consts:[[1,"auto-shift"],[1,"main-content"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-content"],[1,"title"],[1,"subtitle"],[1,"patch-tabs",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[4,"ngIf"],["class","feature-lock-overlay",4,"ngIf"],["icon","ri:database-line",1,"tab-icon"],["icon","ri:brain-line",1,"tab-icon"],["icon","ri:plug-line",1,"tab-icon"],["icon","ri:flow-chart",1,"tab-icon"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),l(13),a()(),o(14,"div",7)(15,"div",8),l(16,"Patch Management"),a(),o(17,"div",9),l(18," Intelligent patch deployment with AI risk scoring, automated vulnerability analysis, and predictive compliance recommendations "),a()()(),o(19,"mat-tab-group",10),v("selectedIndexChange",function(d){return i.onTabChange(d)}),o(20,"mat-tab"),g(21,wf,3,0,"ng-template",11)(22,If,1,0,"app-patch-inventory",12),a(),o(23,"mat-tab"),g(24,Tf,3,0,"ng-template",11)(25,Af,1,0,"app-patch-ai-risk-analytics",12),a(),o(26,"mat-tab"),g(27,Df,3,0,"ng-template",11)(28,Rf,1,0,"app-patch-integrations",12),a(),o(29,"mat-tab"),g(30,kf,3,0,"ng-template",11)(31,Nf,1,0,"app-patch-workflow-blueprints",12),a()()(),g(32,Lf,11,3,"section",13),a()),n&2&&(Y("is-locked",!i.isPatchManagementEnabled),c(13),C(i.activeTabLabel),c(6),p("selectedIndex",i.selectedIndex),c(3),p("ngIf",i.isPatchManagementEnabled),c(3),p("ngIf",i.isPatchManagementEnabled),c(3),p("ngIf",i.isPatchManagementEnabled),c(3),p("ngIf",i.isPatchManagementEnabled),c(),p("ngIf",!i.isPatchManagementEnabled))},dependencies:[N,B,z,Xi,ti,ni,Fs,Ls,Bs,$s],styles:[".auto-shift[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f8fb);min-height:100%;position:relative}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.auto-shift.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.header-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.title[_ngcontent-%COMP%]{font-size:30px;font-weight:700;color:#111827}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px}.patch-tabs[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:18px;padding:5px 25px 25px;box-shadow:0 1px 2px #0000000d}.tab-icon[_ngcontent-%COMP%]{font-size:18px;margin-right:8px}[_nghost-%COMP%]     .mat-mdc-tab{border-bottom:1px solid #E5E7EB}[_nghost-%COMP%]     .mat-mdc-tab .mdc-tab__text-label{color:#374151!important;font-weight:500!important;font-size:14px}[_nghost-%COMP%]     .mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:#57b5e7!important;opacity:1!important}[_nghost-%COMP%]     .mat-mdc-tab-group.mat-primary .mdc-tab-indicator__content--underline{border-color:#57b5e7!important;border-top-width:2px}[_nghost-%COMP%]     .mat-mdc-tab-header{overflow-x:auto}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}@media(max-width:760px){.auto-shift[_ngcontent-%COMP%]{padding:14px}.page-header[_ngcontent-%COMP%]{gap:16px}.title[_ngcontent-%COMP%]{font-size:24px}.subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:22px}.patch-tabs[_ngcontent-%COMP%]{padding:4px 14px 18px;border-radius:14px}[_nghost-%COMP%]     .mat-mdc-tab{min-width:max-content;padding:0 16px}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}"]})}}return t})();function wi(t,r){return t==null||r==null?NaN:t<r?-1:t>r?1:t>=r?0:NaN}function ya(t,r){return t==null||r==null?NaN:r<t?-1:r>t?1:r>=t?0:NaN}function Sr(t){let r,e,n;t.length!==2?(r=wi,e=(m,f)=>wi(t(m),f),n=(m,f)=>t(m)-f):(r=t===wi||t===ya?t:Vf,e=t,n=t);function i(m,f,_=0,b=m.length){if(_<b){if(r(f,f)!==0)return b;do{let M=_+b>>>1;e(m[M],f)<0?_=M+1:b=M}while(_<b)}return _}function s(m,f,_=0,b=m.length){if(_<b){if(r(f,f)!==0)return b;do{let M=_+b>>>1;e(m[M],f)<=0?_=M+1:b=M}while(_<b)}return _}function d(m,f,_=0,b=m.length){let M=i(m,f,_,b-1);return M>_&&n(m[M-1],f)>-n(m[M],f)?M-1:M}return{left:i,center:d,right:s}}function Vf(){return 0}function Ma(t){return t===null?NaN:+t}
vendor: 7,130 bytes, line 8
8var Hs=Sr(wi),Ws=Hs.right,Bf=Hs.left,Uf=Sr(Ma).center,Sa=Ws;var to=class extends Map{constructor(r,e=qf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[n,i]of r)this.set(n,i)}get(r){return super.get(Gs(this,r))}has(r){return super.has(Gs(this,r))}set(r,e){return super.set(jf(this,r),e)}delete(r){return super.delete($f(this,r))}};function Gs({_intern:t,_key:r},e){let n=r(e);return t.has(n)?t.get(n):e}function jf({_intern:t,_key:r},e){let n=r(e);return t.has(n)?t.get(n):(t.set(n,e),e)}function $f({_intern:t,_key:r},e){let n=r(e);return t.has(n)&&(e=t.get(n),t.delete(n)),e}function qf(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Hf=Math.sqrt(50),Wf=Math.sqrt(10),Gf=Math.sqrt(2);function Or(t,r,e){let n=(r-t)/Math.max(0,e),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),d=s>=Hf?10:s>=Wf?5:s>=Gf?2:1,m,f,_;return i<0?(_=Math.pow(10,-i)/d,m=Math.round(t*_),f=Math.round(r*_),m/_<t&&++m,f/_>r&&--f,_=-_):(_=Math.pow(10,i)*d,m=Math.round(t/_),f=Math.round(r/_),m*_<t&&++m,f*_>r&&--f),f<m&&.5<=e&&e<2?Or(t,r,e*2):[m,f,_]}function Pr(t,r,e){if(r=+r,t=+t,e=+e,!(e>0))return[];if(t===r)return[t];let n=r<t,[i,s,d]=n?Or(r,t,e):Or(t,r,e);if(!(s>=i))return[];let m=s-i+1,f=new Array(m);if(n)if(d<0)for(let _=0;_<m;++_)f[_]=(s-_)/-d;else for(let _=0;_<m;++_)f[_]=(s-_)*d;else if(d<0)for(let _=0;_<m;++_)f[_]=(i+_)/-d;else for(let _=0;_<m;++_)f[_]=(i+_)*d;return f}function Po(t,r,e){return r=+r,t=+t,e=+e,Or(t,r,e)[2]}function Oa(t,r,e){r=+r,t=+t,e=+e;let n=r<t,i=n?Po(r,t,e):Po(t,r,e);return(n?-1:1)*(i<0?1/-i:i)}function Eo(t,r){let e;if(r===void 0)for(let n of t)n!=null&&(e<n||e===void 0&&n>=n)&&(e=n);else{let n=-1;for(let i of t)(i=r(i,++n,t))!=null&&(e<i||e===void 0&&i>=i)&&(e=i)}return e}function Er(t,r,e){t=+t,r=+r,e=(i=arguments.length)<2?(r=t,t=0,1):i<3?1:+e;for(var n=-1,i=Math.max(0,Math.ceil((r-t)/e))|0,s=new Array(i);++n<i;)s[n]=t+n*e;return s}function Ys(t){return t}var Pa=1,Ea=2,wa=3,wo=4,Ks=1e-6;function Yf(t){return"translate("+t+",0)"}function Kf(t){return"translate(0,"+t+")"}function Qf(t){return r=>+t(r)}function Jf(t,r){return r=Math.max(0,t.bandwidth()-r*2)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function Zf(){return!this.__axis}function Qs(t,r){var e=[],n=null,i=null,s=6,d=6,m=3,f=typeof window<"u"&&window.devicePixelRatio>1?0:.5,_=t===Pa||t===wo?-1:1,b=t===wo||t===Ea?"x":"y",M=t===Pa||t===wa?Yf:Kf;function S(w){var D=n??(r.ticks?r.ticks.apply(r,e):r.domain()),R=i??(r.tickFormat?r.tickFormat.apply(r,e):Ys),W=Math.max(s,0)+m,H=r.range(),L=+H[0]+f,q=+H[H.length-1]+f,ne=(r.bandwidth?Jf:Qf)(r.copy(),f),_e=w.selection?w.selection():w,oe=_e.selectAll(".domain").data([null]),de=_e.selectAll(".tick").data(D,r).order(),Me=de.exit(),dt=de.enter().append("g").attr("class","tick"),ct=de.select("line"),Ze=de.select("text");oe=oe.merge(oe.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),de=de.merge(dt),ct=ct.merge(dt.append("line").attr("stroke","currentColor").attr(b+"2",_*s)),Ze=Ze.merge(dt.append("text").attr("fill","currentColor").attr(b,_*W).attr("dy",t===Pa?"0em":t===wa?"0.71em":"0.32em")),w!==_e&&(oe=oe.transition(w),de=de.transition(w),ct=ct.transition(w),Ze=Ze.transition(w),Me=Me.transition(w).attr("opacity",Ks).attr("transform",function(K){return isFinite(K=ne(K))?M(K+f):this.getAttribute("transform")}),dt.attr("opacity",Ks).attr("transform",function(K){var ee=this.parentNode.__axis;return M((ee&&isFinite(ee=ee(K))?ee:ne(K))+f)})),Me.remove(),oe.attr("d",t===wo||t===Ea?d?"M"+_*d+","+L+"H"+f+"V"+q+"H"+_*d:"M"+f+","+L+"V"+q:d?"M"+L+","+_*d+"V"+f+"H"+q+"V"+_*d:"M"+L+","+f+"H"+q),de.attr("opacity",1).attr("transform",function(K){return M(ne(K)+f)}),ct.attr(b+"2",_*s),Ze.attr(b,_*W).text(R),_e.filter(Zf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ea?"start":t===wo?"end":"middle"),_e.each(function(){this.__axis=ne})}return S.scale=function(w){return arguments.length?(r=w,S):r},S.ticks=function(){return e=Array.from(arguments),S},S.tickArguments=function(w){return arguments.length?(e=w==null?[]:Array.from(w),S):e.slice()},S.tickValues=function(w){return arguments.length?(n=w==null?null:Array.from(w),S):n&&n.slice()},S.tickFormat=function(w){return arguments.length?(i=w,S):i},S.tickSize=function(w){return arguments.length?(s=d=+w,S):s},S.tickSizeInner=function(w){return arguments.length?(s=+w,S):s},S.tickSizeOuter=function(w){return arguments.length?(d=+w,S):d},S.tickPadding=function(w){return arguments.length?(m=+w,S):m},S.offset=function(w){return arguments.length?(f=+w,S):f},S}function Io(t){return Qs(wa,t)}function Ii(t){return Qs(wo,t)}var Xf={value:()=>{}};function Zs(){for(var t=0,r=arguments.length,e={},n;t<r;++t){if(!(n=arguments[t]+"")||n in e||/[\s.]/.test(n))throw new Error("illegal type: "+n);e[n]=[]}return new wr(e)}function wr(t){this._=t}function eh(t,r){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");if(i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}wr.prototype=Zs.prototype={constructor:wr,on:function(t,r){var e=this._,n=eh(t+"",e),i,s=-1,d=n.length;if(arguments.length<2){for(;++s<d;)if((i=(t=n[s]).type)&&(i=th(e[i],t.name)))return i;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++s<d;)if(i=(t=n[s]).type)e[i]=Js(e[i],t.name,r);else if(r==null)for(i in e)e[i]=Js(e[i],t.name,null);return this},copy:function(){var t={},r=this._;for(var e in r)t[e]=r[e].slice();return new wr(t)},call:function(t,r){if((i=arguments.length-2)>0)for(var e=new Array(i),n=0,i,s;n<i;++n)e[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],n=0,i=s.length;n<i;++n)s[n].value.apply(r,e)},apply:function(t,r,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,s=n.length;i<s;++i)n[i].value.apply(r,e)}};function th(t,r){for(var e=0,n=t.length,i;e<n;++e)if((i=t[e]).name===r)return i.value}function Js(t,r,e){for(var n=0,i=t.length;n<i;++n)if(t[n].name===r){t[n]=Xf,t=t.slice(0,n).concat(t.slice(n+1));break}return e!=null&&t.push({name:r,value:e}),t}var Ia=Zs;var Ir="http://www.w3.org/1999/xhtml",Ta={svg:"http://www.w3.org/2000/svg",xhtml:Ir,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ln(t){var r=t+="",e=r.indexOf(":");return e>=0&&(r=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),Ta.hasOwnProperty(r)?{space:Ta[r],local:t}:t}function nh(t){return function(){var r=this.ownerDocument,e=this.namespaceURI;return e===Ir&&r.documentElement.namespaceURI===Ir?r.createElement(t):r.createElementNS(e,t)}}function ih(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Tr(t){var r=Ln(t);return(r.local?ih:nh)(r)}function oh(){}function Ti(t){return t==null?oh:function(){return this.querySelector(t)}}function Xs(t){typeof t!="function"&&(t=Ti(t));for(var r=this._groups,e=r.length,n=new Array(e),i=0;i<e;++i)for(var s=r[i],d=s.length,m=n[i]=new Array(d),f,_,b=0;b<d;
vendor: 7,187 bytes, line 8
8++b)(f=s[b])&&(_=t.call(f,f.__data__,b,s))&&("__data__"in f&&(_.__data__=f.__data__),m[b]=_);return new xt(n,this._parents)}function Aa(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function rh(){return[]}function To(t){return t==null?rh:function(){return this.querySelectorAll(t)}}function ah(t){return function(){return Aa(t.apply(this,arguments))}}function ec(t){typeof t=="function"?t=ah(t):t=To(t);for(var r=this._groups,e=r.length,n=[],i=[],s=0;s<e;++s)for(var d=r[s],m=d.length,f,_=0;_<m;++_)(f=d[_])&&(n.push(t.call(f,f.__data__,_,d)),i.push(f));return new xt(n,i)}function Ao(t){return function(){return this.matches(t)}}function Ar(t){return function(r){return r.matches(t)}}var lh=Array.prototype.find;function sh(t){return function(){return lh.call(this.children,t)}}function ch(){return this.firstElementChild}function tc(t){return this.select(t==null?ch:sh(typeof t=="function"?t:Ar(t)))}var dh=Array.prototype.filter;function ph(){return Array.from(this.children)}function mh(t){return function(){return dh.call(this.children,t)}}function nc(t){return this.selectAll(t==null?ph:mh(typeof t=="function"?t:Ar(t)))}function ic(t){typeof t!="function"&&(t=Ao(t));for(var r=this._groups,e=r.length,n=new Array(e),i=0;i<e;++i)for(var s=r[i],d=s.length,m=n[i]=[],f,_=0;_<d;++_)(f=s[_])&&t.call(f,f.__data__,_,s)&&m.push(f);return new xt(n,this._parents)}function Dr(t){return new Array(t.length)}function oc(){return new xt(this._enter||this._groups.map(Dr),this._parents)}function Do(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}Do.prototype={constructor:Do,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,r){return this._parent.insertBefore(t,r)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function rc(t){return function(){return t}}function uh(t,r,e,n,i,s){for(var d=0,m,f=r.length,_=s.length;d<_;++d)(m=r[d])?(m.__data__=s[d],n[d]=m):e[d]=new Do(t,s[d]);for(;d<f;++d)(m=r[d])&&(i[d]=m)}function gh(t,r,e,n,i,s,d){var m,f,_=new Map,b=r.length,M=s.length,S=new Array(b),w;for(m=0;m<b;++m)(f=r[m])&&(S[m]=w=d.call(f,f.__data__,m,r)+"",_.has(w)?i[m]=f:_.set(w,f));for(m=0;m<M;++m)w=d.call(t,s[m],m,s)+"",(f=_.get(w))?(n[m]=f,f.__data__=s[m],_.delete(w)):e[m]=new Do(t,s[m]);for(m=0;m<b;++m)(f=r[m])&&_.get(S[m])===f&&(i[m]=f)}function fh(t){return t.__data__}function ac(t,r){if(!arguments.length)return Array.from(this,fh);var e=r?gh:uh,n=this._parents,i=this._groups;typeof t!="function"&&(t=rc(t));for(var s=i.length,d=new Array(s),m=new Array(s),f=new Array(s),_=0;_<s;++_){var b=n[_],M=i[_],S=M.length,w=hh(t.call(b,b&&b.__data__,_,n)),D=w.length,R=m[_]=new Array(D),W=d[_]=new Array(D),H=f[_]=new Array(S);e(b,M,R,W,H,w,r);for(var L=0,q=0,ne,_e;L<D;++L)if(ne=R[L]){for(L>=q&&(q=L+1);!(_e=W[q])&&++q<D;);ne._next=_e||null}}return d=new xt(d,n),d._enter=m,d._exit=f,d}function hh(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lc(){return new xt(this._exit||this._groups.map(Dr),this._parents)}function sc(t,r,e){var n=this.enter(),i=this,s=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),r!=null&&(i=r(i),i&&(i=i.selection())),e==null?s.remove():e(s),n&&i?n.merge(i).order():i}function cc(t){for(var r=t.selection?t.selection():t,e=this._groups,n=r._groups,i=e.length,s=n.length,d=Math.min(i,s),m=new Array(i),f=0;f<d;++f)for(var _=e[f],b=n[f],M=_.length,S=m[f]=new Array(M),w,D=0;D<M;++D)(w=_[D]||b[D])&&(S[D]=w);for(;f<i;++f)m[f]=e[f];return new xt(m,this._parents)}function dc(){for(var t=this._groups,r=-1,e=t.length;++r<e;)for(var n=t[r],i=n.length-1,s=n[i],d;--i>=0;)(d=n[i])&&(s&&d.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(d,s),s=d);return this}function pc(t){t||(t=_h);function r(M,S){return M&&S?t(M.__data__,S.__data__):!M-!S}for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s){for(var d=e[s],m=d.length,f=i[s]=new Array(m),_,b=0;b<m;++b)(_=d[b])&&(f[b]=_);f.sort(r)}return new xt(i,this._parents).order()}function _h(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function mc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function uc(){return Array.from(this)}function gc(){for(var t=this._groups,r=0,e=t.length;r<e;++r)for(var n=t[r],i=0,s=n.length;i<s;++i){var d=n[i];if(d)return d}return null}function fc(){let t=0;for(let r of this)++t;return t}function hc(){return!this.node()}function _c(t){for(var r=this._groups,e=0,n=r.length;e<n;++e)for(var i=r[e],s=0,d=i.length,m;s<d;++s)(m=i[s])&&t.call(m,m.__data__,s,i);return this}function Ch(t){return function(){this.removeAttribute(t)}}function xh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vh(t,r){return function(){this.setAttribute(t,r)}}function bh(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function yh(t,r){return function(){var e=r.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Mh(t,r){return function(){var e=r.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Cc(t,r){var e=Ln(t);if(arguments.length<2){var n=this.node();return e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}return this.each((r==null?e.local?xh:Ch:typeof r=="function"?e.local?Mh:yh:e.local?bh:vh)(e,r))}function Rr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Sh(t){return function(){this.style.removeProperty(t)}}function Oh(t,r,e){return function(){this.style.setProperty(t,r,e)}}function Ph(t,r,e){return function(){var n=r.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,e)}}function xc(t,r,e){return arguments.length>1?this.each((r==null?Sh:typeof r=="function"?Ph:Oh)(t,r,e??"")):ai(this.node(),t)}function ai(t,r){return t.style.getPropertyValue(r)||Rr(t).getComputedStyle(t,null).getPropertyValue(r)}function Eh(t){return function(){delete this[t]}}function wh(t,r){return function(){this[t]=r}}function Ih(t,r){return function(){var e=r.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function vc(t,r){return arguments.length>1?this.each((r==null?Eh:typeof r=="function"?Ih:wh)(t,r)):this.node()[t]}function bc(t){return t.trim().split(/^|\s+/)}function Da(t){return t.classList||new yc(t)}function yc(t){this._node=t,this._names=bc(t.getAttribute("class")||"")}yc.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Mc(t,r){for(var e=Da(t),n=-1,i=r.length;++n<i;)e.add(r[n])}function Sc(t,r){for(var e=Da(t),n=-1,i=r.length;++n<i;)e.remove(r[n])}function Th(t){return function(){Mc(this,t)}}function Ah(t){return function(){Sc(this,t)}}function Dh(t,r){return function(){(r.apply(this,arguments)?Mc:Sc)(this,t)}}function Oc(t,r){var e=bc(t+"");
vendor: 15,622 bytes, line 8
8if(arguments.length<2){for(var n=Da(this.node()),i=-1,s=e.length;++i<s;)if(!n.contains(e[i]))return!1;return!0}return this.each((typeof r=="function"?Dh:r?Th:Ah)(e,r))}function Rh(){this.textContent=""}function kh(t){return function(){this.textContent=t}}function Nh(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function Pc(t){return arguments.length?this.each(t==null?Rh:(typeof t=="function"?Nh:kh)(t)):this.node().textContent}function Fh(){this.innerHTML=""}function zh(t){return function(){this.innerHTML=t}}function Lh(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function Ec(t){return arguments.length?this.each(t==null?Fh:(typeof t=="function"?Lh:zh)(t)):this.node().innerHTML}function Vh(){this.nextSibling&&this.parentNode.appendChild(this)}function wc(){return this.each(Vh)}function Bh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ic(){return this.each(Bh)}function Tc(t){var r=typeof t=="function"?t:Tr(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function Uh(){return null}function Ac(t,r){var e=typeof t=="function"?t:Tr(t),n=r==null?Uh:typeof r=="function"?r:Ti(r);return this.select(function(){return this.insertBefore(e.apply(this,arguments),n.apply(this,arguments)||null)})}function jh(){var t=this.parentNode;t&&t.removeChild(this)}function Dc(){return this.each(jh)}function $h(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function qh(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Rc(t){return this.select(t?qh:$h)}function kc(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Hh(t){return function(r){t.call(this,r,this.__data__)}}function Wh(t){return t.trim().split(/^|\s+/).map(function(r){var e="",n=r.indexOf(".");return n>=0&&(e=r.slice(n+1),r=r.slice(0,n)),{type:r,name:e}})}function Gh(t){return function(){var r=this.__on;if(r){for(var e=0,n=-1,i=r.length,s;e<i;++e)s=r[e],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):r[++n]=s;++n?r.length=n:delete this.__on}}}function Yh(t,r,e){return function(){var n=this.__on,i,s=Hh(r);if(n){for(var d=0,m=n.length;d<m;++d)if((i=n[d]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=e),i.value=r;return}}this.addEventListener(t.type,s,e),i={type:t.type,name:t.name,value:r,listener:s,options:e},n?n.push(i):this.__on=[i]}}function Nc(t,r,e){var n=Wh(t+""),i,s=n.length,d;if(arguments.length<2){var m=this.node().__on;if(m){for(var f=0,_=m.length,b;f<_;++f)for(i=0,b=m[f];i<s;++i)if((d=n[i]).type===b.type&&d.name===b.name)return b.value}return}for(m=r?Yh:Gh,i=0;i<s;++i)this.each(m(n[i],r,e));return this}function Fc(t,r,e){var n=Rr(t),i=n.CustomEvent;typeof i=="function"?i=new i(r,e):(i=n.document.createEvent("Event"),e?(i.initEvent(r,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(r,!1,!1)),t.dispatchEvent(i)}function Kh(t,r){return function(){return Fc(this,t,r)}}function Qh(t,r){return function(){return Fc(this,t,r.apply(this,arguments))}}function zc(t,r){return this.each((typeof r=="function"?Qh:Kh)(t,r))}function*Lc(){for(var t=this._groups,r=0,e=t.length;r<e;++r)for(var n=t[r],i=0,s=n.length,d;i<s;++i)(d=n[i])&&(yield d)}var Ra=[null];function xt(t,r){this._groups=t,this._parents=r}function Vc(){return new xt([[document.documentElement]],Ra)}function Jh(){return this}xt.prototype=Vc.prototype={constructor:xt,select:Xs,selectAll:ec,selectChild:tc,selectChildren:nc,filter:ic,data:ac,enter:oc,exit:lc,join:sc,merge:cc,selection:Jh,order:dc,sort:pc,call:mc,nodes:uc,node:gc,size:fc,empty:hc,each:_c,attr:Cc,style:xc,property:vc,classed:Oc,text:Pc,html:Ec,raise:wc,lower:Ic,append:Tc,insert:Ac,remove:Dc,clone:Rc,datum:kc,on:Nc,dispatch:zc,[Symbol.iterator]:Lc};var Vn=Vc;function Sn(t){return typeof t=="string"?new xt([[document.querySelector(t)]],[document.documentElement]):new xt([[t]],Ra)}function Bc(t){let r;for(;r=t.sourceEvent;)t=r;return t}function ka(t,r){if(t=Bc(t),r===void 0&&(r=t.currentTarget),r){var e=r.ownerSVGElement||r;if(e.createSVGPoint){var n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(r.getScreenCTM().inverse()),[n.x,n.y]}if(r.getBoundingClientRect){var i=r.getBoundingClientRect();return[t.clientX-i.left-r.clientLeft,t.clientY-i.top-r.clientTop]}}return[t.pageX,t.pageY]}var Zh=Ia("start","end","cancel","interrupt"),Xh=[],$c=0,Uc=1,Nr=2,kr=3,jc=4,Fr=5,Ro=6;function li(t,r,e,n,i,s){var d=t.__transition;if(!d)t.__transition={};else if(e in d)return;e_(t,e,{name:r,index:n,group:i,on:Zh,tween:Xh,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:$c})}function ko(t,r){var e=Ot(t,r);if(e.state>$c)throw new Error("too late; already scheduled");return e}function At(t,r){var e=Ot(t,r);if(e.state>kr)throw new Error("too late; already running");return e}function Ot(t,r){var e=t.__transition;if(!e||!(e=e[r]))throw new Error("transition not found");return e}function e_(t,r,e){var n=t.__transition,i;n[r]=e,e.timer=xs(s,0,e.time);function s(_){e.state=Uc,e.timer.restart(d,e.delay,e.time),e.delay<=_&&d(_-e.delay)}function d(_){var b,M,S,w;if(e.state!==Uc)return f();for(b in n)if(w=n[b],w.name===e.name){if(w.state===kr)return ha(d);w.state===jc?(w.state=Ro,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete n[b]):+b<r&&(w.state=Ro,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete n[b])}if(ha(function(){e.state===kr&&(e.state=jc,e.timer.restart(m,e.delay,e.time),m(_))}),e.state=Nr,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Nr){for(e.state=kr,i=new Array(S=e.tween.length),b=0,M=-1;b<S;++b)(w=e.tween[b].value.call(t,t.__data__,e.index,e.group))&&(i[++M]=w);i.length=M+1}}function m(_){for(var b=_<e.duration?e.ease.call(null,_/e.duration):(e.timer.restart(f),e.state=Fr,1),M=-1,S=i.length;++M<S;)i[M].call(t,b);e.state===Fr&&(e.on.call("end",t,t.__data__,e.index,e.group),f())}function f(){e.state=Ro,e.timer.stop(),delete n[r];for(var _ in n)return;delete t.__transition}}function zr(t,r){var e=t.__transition,n,i,s=!0,d;if(e){r=r==null?null:r+"";for(d in e){if((n=e[d]).name!==r){s=!1;continue}i=n.state>Nr&&n.state<Fr,n.state=Ro,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete e[d]}s&&delete t.__transition}}function qc(t){return this.each(function(){zr(this,t)})}function t_(t,r){var e,n;return function(){var i=At(this,t),s=i.tween;if(s!==e){n=e=s;for(var d=0,m=n.length;d<m;++d)if(n[d].name===r){n=n.slice(),n.splice(d,1);break}}i.tween=n}}function n_(t,r,e){var n,i;if(typeof e!="function")throw new Error;return function(){var s=At(this,t),d=s.tween;if(d!==n){i=(n=d).slice();for(var m={name:r,value:e},f=0,_=i.length;f<_;++f)if(i[f].name===r){i[f]=m;break}f===_&&i.push(m)}s.tween=i}}function Hc(t,r){var e=this._id;if(t+="",arguments.length<2){for(var n=Ot(this.node(),e).tween,i=0,s=n.length,d;i<s;++i)if((d=n[i]).name===t)return d.value;return null}return this.each((r==null?t_:n_)(e,t,r))}function no(t,r,e){var n=t._id;return t.each(function(){var i=At(this,n);(i.value||(i.value={}))[r]=e.apply(this,arguments)}),function(i){return Ot(i,n).value[r]}}function Lr(t,r){var e;return(typeof r=="number"?yr:r instanceof _a?Ca:(e=_a(r))?(r=e,Ca):vs)(t,r)}function i_(t){return function(){this.removeAttribute(t)}}function o_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r_(t,r,e){var n,i=e+"",s;return function(){var d=this.getAttribute(t);return d===i?null:d===n?s:s=r(n=d,e)}}function a_(t,r,e){var n,i=e+"",s;return function(){var d=this.getAttributeNS(t.space,t.local);return d===i?null:d===n?s:s=r(n=d,e)}}function l_(t,r,e){var n,i,s;return function(){var d,m=e(this),f;return m==null?void this.removeAttribute(t):(d=this.getAttribute(t),f=m+"",d===f?null:d===n&&f===i?s:(i=f,s=r(n=d,m)))}}function s_(t,r,e){var n,i,s;return function(){var d,m=e(this),f;return m==null?void this.removeAttributeNS(t.space,t.local):(d=this.getAttributeNS(t.space,t.local),f=m+"",d===f?null:d===n&&f===i?s:(i=f,s=r(n=d,m)))}}function Wc(t,r){var e=Ln(t),n=e==="transform"?Ss:Lr;return this.attrTween(t,typeof r=="function"?(e.local?s_:l_)(e,n,no(this,"attr."+t,r)):r==null?(e.local?o_:i_)(e):(e.local?a_:r_)(e,n,r))}function c_(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function d_(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function p_(t,r){var e,n;function i(){var s=r.apply(this,arguments);return s!==n&&(e=(n=s)&&d_(t,s)),e}return i._value=r,i}function m_(t,r){var e,n;function i(){var s=r.apply(this,arguments);return s!==n&&(e=(n=s)&&c_(t,s)),e}return i._value=r,i}function Gc(t,r){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!="function")throw new Error;var n=Ln(t);return this.tween(e,(n.local?p_:m_)(n,r))}function u_(t,r){return function(){ko(this,t).delay=+r.apply(this,arguments)}}function g_(t,r){return r=+r,function(){ko(this,t).delay=r}}function Yc(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?u_:g_)(r,t)):Ot(this.node(),r).delay}function f_(t,r){return function(){At(this,t).duration=+r.apply(this,arguments)}}function h_(t,r){return r=+r,function(){At(this,t).duration=r}}function Kc(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?f_:h_)(r,t)):Ot(this.node(),r).duration}function __(t,r){if(typeof r!="function")throw new Error;return function(){At(this,t).ease=r}}function Qc(t){var r=this._id;return arguments.length?this.each(__(r,t)):Ot(this.node(),r).ease}function C_(t,r){return function(){var e=r.apply(this,arguments);if(typeof e!="function")throw new Error;At(this,t).ease=e}}function Jc(t){if(typeof t!="function")throw new Error;return this.each(C_(this._id,t))}function Zc(t){typeof t!="function"&&(t=Ao(t));for(var r=this._groups,e=r.length,n=new Array(e),i=0;i<e;++i)for(var s=r[i],d=s.length,m=n[i]=[],f,_=0;_<d;++_)(f=s[_])&&t.call(f,f.__data__,_,s)&&m.push(f);return new Ut(n,this._parents,this._name,this._id)}function Xc(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,e=t._groups,n=r.length,i=e.length,s=Math.min(n,i),d=new Array(n),m=0;m<s;++m)for(var f=r[m],_=e[m],b=f.length,M=d[m]=new Array(b),S,w=0;w<b;++w)(S=f[w]||_[w])&&(M[w]=S);for(;m<n;++m)d[m]=r[m];return new Ut(d,this._parents,this._name,this._id)}function x_(t){return(t+"").trim().split(/^|\s+/).every(function(r){var e=r.indexOf(".");return e>=0&&(r=r.slice(0,e)),!r||r==="start"})}function v_(t,r,e){var n,i,s=x_(r)?ko:At;return function(){var d=s(this,t),m=d.on;m!==n&&(i=(n=m).copy()).on(r,e),d.on=i}}function ed(t,r){var e=this._id;return arguments.length<2?Ot(this.node(),e).on.on(t):this.each(v_(e,t,r))}function b_(t){return function(){var r=this.parentNode;for(var e in this.__transition)if(+e!==t)return;r&&r.removeChild(this)}}function td(){return this.on("end.remove",b_(this._id))}function nd(t){var r=this._name,e=this._id;typeof t!="function"&&(t=Ti(t));for(var n=this._groups,i=n.length,s=new Array(i),d=0;d<i;++d)for(var m=n[d],f=m.length,_=s[d]=new Array(f),b,M,S=0;S<f;++S)(b=m[S])&&(M=t.call(b,b.__data__,S,m))&&("__data__"in b&&(M.__data__=b.__data__),_[S]=M,li(_[S],r,e,S,_,Ot(b,e)));return new Ut(s,this._parents,r,e)}function id(t){var r=this._name,e=this._id;typeof t!="function"&&(t=To(t));for(var n=this._groups,i=n.length,s=[],d=[],m=0;m<i;++m)for(var f=n[m],_=f.length,b,M=0;M<_;++M)if(b=f[M]){for(var S=t.call(b,b.__data__,M,f),w,D=Ot(b,e),R=0,W=S.length;R<W;++R)(w=S[R])&&li(w,r,e,R,S,D);s.push(S),d.push(b)}return new Ut(s,d,r,e)}var y_=Vn.prototype.constructor;function od(){return new y_(this._groups,this._parents)}function M_(t,r){var e,n,i;return function(){var s=ai(this,t),d=(this.style.removeProperty(t),ai(this,t));return s===d?null:s===e&&d===n?i:i=r(e=s,n=d)}}function rd(t){return function(){this.style.removeProperty(t)}}function S_(t,r,e){var n,i=e+"",s;return function(){var d=ai(this,t);return d===i?null:d===n?s:s=r(n=d,e)}}function O_(t,r,e){var n,i,s;return function(){var d=ai(this,t),m=e(this),f=m+"";return m==null&&(f=m=(this.style.removeProperty(t),ai(this,t))),d===f?null:d===n&&f===i?s:(i=f,s=r(n=d,m))}}function P_(t,r){var e,n,i,s="style."+r,d="end."+s,m;return function(){var f=At(this,t),_=f.on,b=f.value[s]==null?m||(m=rd(r)):void 0;(_!==e||i!==b)&&(n=(e=_).copy()).on(d,i=b),f.on=n}}function ad(t,r,e){var n=(t+="")=="transform"?Ms:Lr;return r==null?this.styleTween(t,M_(t,n)).on("end.style."+t,rd(t)):typeof r=="function"?this.styleTween(t,O_(t,n,no(this,"style."+t,r))).each(P_(this._id,t)):this.styleTween(t,S_(t,n,r),e).on("end.style."+t,null)}function E_(t,r,e){return function(n){this.style.setProperty(t,r.call(this,n),e)}}function w_(t,r,e){var n,i;function s(){var d=r.apply(this,arguments);return d!==i&&(n=(i=d)&&E_(t,d,e)),n}return s._value=r,s}function ld(t,r,e){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(r==null)return this.tween(n,null);if(typeof r!="function")throw new Error;return this.tween(n,w_(t,r,e??""))}function I_(t){return function(){this.textContent=t}}function T_(t){return function(){var r=t(this);this.textContent=r??""}}function sd(t){return this.tween("text",typeof t=="function"?T_(no(this,"text",t)):I_(t==null?"":t+""))}function A_(t){return function(r){this.textContent=t.call(this,r)}}function D_(t){var r,e;function n(){var i=t.apply(this,arguments);return i!==e&&(r=(e=i)&&A_(i)),r}return n._value=t,n}function cd(t){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,D_(t))}function dd(){for(var t=this._name,r=this._id,e=Vr(),n=this._groups,i=n.length,s=0;s<i;++s)for(var d=n[s],m=d.length,f,_=0;_<m;++_)if(f=d[_]){var b=Ot(f,r);li(f,t,e,_,d,{time:b.time+b.delay+b.duration,delay:0,duration:b.duration,ease:b.ease})}return new Ut(n,this._parents,t,e)}function pd(){var t,r,e=this,n=e._id,i=e.size();return new Promise(function(s,d){var m={value:d},f={value:function(){--i===0&&s()}};e.each(function(){var _=At(this,n),b=_.on;b!==t&&(r=(t=b).copy(),r._.cancel.push(m),r._.interrupt.push(m),r._.end.push(f)),_.on=r}),i===0&&s()})}var R_=0;function Ut(t,r,e,n){this._groups=t,this._parents=r,this._name=e,this._id=n}function md(t){return Vn().transition(t)}function Vr(){return++R_}var Bn=Vn.prototype;Ut.prototype=md.prototype={constructor:Ut,select:nd,selectAll:id,selectChild:Bn.selectChild,selectChildren:Bn.selectChildren,filter:Zc,merge:Xc,selection:od,transition:dd,call:Bn.call,nodes:Bn.nodes,node:Bn.node,size:Bn.size,empty:Bn.empty,each:Bn.each,on:ed,attr:Wc,attrTween:Gc,style:ad,styleTween:ld,text:sd,textTween:cd,remove:td,tween:Hc,delay:Yc,duration:Kc,ease:Qc,easeVarying:Jc,end:pd,[Symbol.iterator]:Bn[Symbol.iterator]};var k_={time:null,delay:0,duration:250,ease:Os};function N_(t,r){for(var e;!(e=t.__transition)||!(e=e[r]);)if(!(t=t.parentNode))throw new Error(`transition ${r} not found`);return e}function ud(t){var r,e;t instanceof Ut?(r=t._id,t=t._name):(r=Vr(),(e=k_).time=Cs(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,s=0;s<i;++s)for(var d=n[s],m=d.length,f,_=0;_<m;++_)(f=d[_])&&li(f,t,r,_,d,e||N_(f,r));return new Ut(n,this._parents,t,r)}Vn.prototype.interrupt=qc;Vn.prototype.transition=ud;var{abs:Yk,max:Kk,min:Qk}=Math;function gd(t){return[+t[0],+t[1]]}function F_(t){return[gd(t[0]),gd(t[1])]}
vendor: 6,532 bytes, line 8
8var Jk={name:"x",handles:["w","e"].map(Na),input:function(t,r){return t==null?null:[[+t[0],r[0][1]],[+t[1],r[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Zk={name:"y",handles:["n","s"].map(Na),input:function(t,r){return t==null?null:[[r[0][0],+t[0]],[r[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Xk={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Na),input:function(t){return t==null?null:F_(t)},output:function(t){return t}};function Na(t){return{type:t}}var Fa=Math.PI,za=2*Fa,Ai=1e-6,z_=za-Ai;function fd(t){this._+=t[0];for(let r=1,e=t.length;r<e;++r)this._+=arguments[r]+t[r]}function L_(t){let r=Math.floor(t);if(!(r>=0))throw new Error(`invalid digits: ${t}`);if(r>15)return fd;let e=10**r;return function(n){this._+=n[0];for(let i=1,s=n.length;i<s;++i)this._+=Math.round(arguments[i]*e)/e+n[i]}}var Di=class{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?fd:L_(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,n,i){this._append`Q${+r},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(r,e,n,i,s,d){this._append`C${+r},${+e},${+n},${+i},${this._x1=+s},${this._y1=+d}`}arcTo(r,e,n,i,s){if(r=+r,e=+e,n=+n,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let d=this._x1,m=this._y1,f=n-r,_=i-e,b=d-r,M=m-e,S=b*b+M*M;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(S>Ai)if(!(Math.abs(M*f-_*b)>Ai)||!s)this._append`L${this._x1=r},${this._y1=e}`;else{let w=n-d,D=i-m,R=f*f+_*_,W=w*w+D*D,H=Math.sqrt(R),L=Math.sqrt(S),q=s*Math.tan((Fa-Math.acos((R+S-W)/(2*H*L)))/2),ne=q/L,_e=q/H;Math.abs(ne-1)>Ai&&this._append`L${r+ne*b},${e+ne*M}`,this._append`A${s},${s},0,0,${+(M*w>b*D)},${this._x1=r+_e*f},${this._y1=e+_e*_}`}}arc(r,e,n,i,s,d){if(r=+r,e=+e,n=+n,d=!!d,n<0)throw new Error(`negative radius: ${n}`);let m=n*Math.cos(i),f=n*Math.sin(i),_=r+m,b=e+f,M=1^d,S=d?i-s:s-i;this._x1===null?this._append`M${_},${b}`:(Math.abs(this._x1-_)>Ai||Math.abs(this._y1-b)>Ai)&&this._append`L${_},${b}`,n&&(S<0&&(S=S%za+za),S>z_?this._append`A${n},${n},0,1,${M},${r-m},${e-f}A${n},${n},0,1,${M},${this._x1=_},${this._y1=b}`:S>Ai&&this._append`A${n},${n},0,${+(S>=Fa)},${M},${this._x1=r+n*Math.cos(s)},${this._y1=e+n*Math.sin(s)}`)}rect(r,e,n,i){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function hd(){return new Di}hd.prototype=Di.prototype;function _d(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ri(t,r){if(!isFinite(t)||t===0)return null;var e=(t=r?t.toExponential(r-1):t.toExponential()).indexOf("e"),n=t.slice(0,e);return[n.length>1?n[0]+n.slice(2):n,+t.slice(e+1)]}function Nn(t){return t=Ri(Math.abs(t)),t?t[1]:NaN}function Cd(t,r){return function(e,n){for(var i=e.length,s=[],d=0,m=t[0],f=0;i>0&&m>0&&(f+m+1>n&&(m=Math.max(1,n-f)),s.push(e.substring(i-=m,i+m)),!((f+=m+1)>n));)m=t[d=(d+1)%t.length];return s.reverse().join(r)}}function xd(t){return function(r){return r.replace(/[0-9]/g,function(e){return t[+e]})}}var V_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function si(t){if(!(r=V_.exec(t)))throw new Error("invalid format: "+t);var r;return new Br({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}si.prototype=Br.prototype;function Br(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Br.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function vd(t){e:for(var r=t.length,e=1,n=-1,i;e<r;++e)switch(t[e]){case".":n=i=e;break;case"0":n===0&&(n=e),i=e;break;default:if(!+t[e])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var No;function bd(t,r){var e=Ri(t,r);if(!e)return No=void 0,t.toPrecision(r);var n=e[0],i=e[1],s=i-(No=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,d=n.length;return s===d?n:s>d?n+new Array(s-d+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+Ri(t,Math.max(0,r+s-1))[0]}function La(t,r){var e=Ri(t,r);if(!e)return t+"";var n=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var Va={"%":(t,r)=>(t*100).toFixed(r),b:t=>Math.round(t).toString(2),c:t=>t+"",d:_d,e:(t,r)=>t.toExponential(r),f:(t,r)=>t.toFixed(r),g:(t,r)=>t.toPrecision(r),o:t=>Math.round(t).toString(8),p:(t,r)=>La(t*100,r),r:La,s:bd,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ba(t){return t}var yd=Array.prototype.map,Md=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Sd(t){var r=t.grouping===void 0||t.thousands===void 0?Ba:Cd(yd.call(t.grouping,Number),t.thousands+""),e=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?Ba:xd(yd.call(t.numerals,String)),d=t.percent===void 0?"%":t.percent+"",m=t.minus===void 0?"\u2212":t.minus+"",f=t.nan===void 0?"NaN":t.nan+"";function _(M,S){M=si(M);var w=M.fill,D=M.align,R=M.sign,W=M.symbol,H=M.zero,L=M.width,q=M.comma,ne=M.precision,_e=M.trim,oe=M.type;oe==="n"?(q=!0,oe="g"):Va[oe]||(ne===void 0&&(ne=12),_e=!0,oe="g"),(H||w==="0"&&D==="=")&&(H=!0,w="0",D="=");var de=(S&&S.prefix!==void 0?S.prefix:"")+(W==="$"?e:W==="#"&&/[boxX]/.test(oe)?"0"+oe.toLowerCase():""),Me=(W==="$"?n:/[%p]/.test(oe)?d:"")+(S&&S.suffix!==void 0?S.suffix:""),dt=Va[oe],ct=/[defgprs%]/.test(oe);ne=ne===void 0?6:/[gprs]/.test(oe)?Math.max(1,Math.min(21,ne)):Math.max(0,Math.min(20,ne));function Ze(K){var ee=de,ge=Me,it,$t,Be;if(oe==="c")ge=dt(K)+ge,K="";else{K=+K;var zt=K<0||1/K<0;if(K=isNaN(K)?f:dt(Math.abs(K),ne),_e&&(K=vd(K)),zt&&+K==0&&R!=="+"&&(zt=!1),ee=(zt?R==="("?R:m:R==="-"||R==="("?"":R)+ee,ge=(oe==="s"&&!isNaN(K)&&No!==void 0?Md[8
vendor: 6,112 bytes, line 8
8+No/3]:"")+ge+(zt&&R==="("?")":""),ct){for(it=-1,$t=K.length;++it<$t;)if(Be=K.charCodeAt(it),48>Be||Be>57){ge=(Be===46?i+K.slice(it+1):K.slice(it))+ge,K=K.slice(0,it);break}}}q&&!H&&(K=r(K,1/0));var Lt=ee.length+K.length+ge.length,Mt=Lt<L?new Array(L-Lt+1).join(w):"";switch(q&&H&&(K=r(Mt+K,Mt.length?L-ge.length:1/0),Mt=""),D){case"<":K=ee+K+ge+Mt;break;case"=":K=ee+Mt+K+ge;break;case"^":K=Mt.slice(0,Lt=Mt.length>>1)+ee+K+ge+Mt.slice(Lt);break;default:K=Mt+ee+K+ge;break}return s(K)}return Ze.toString=function(){return M+""},Ze}function b(M,S){var w=Math.max(-8,Math.min(8,Math.floor(Nn(S)/3)))*3,D=Math.pow(10,-w),R=_((M=si(M),M.type="f",M),{suffix:Md[8+w/3]});return function(W){return R(D*W)}}return{format:_,formatPrefix:b}}var Ur,Un,jr;Ua({thousands:",",grouping:[3],currency:["$",""]});function Ua(t){return Ur=Sd(t),Un=Ur.format,jr=Ur.formatPrefix,Ur}function ja(t){return Math.max(0,-Nn(Math.abs(t)))}function $a(t,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nn(r)/3)))*3-Nn(Math.abs(t)))}function qa(t,r){return t=Math.abs(t),r=Math.abs(r)-t,Math.max(0,Nn(r)-Nn(t))+1}function io(t,r){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(r).domain(t);break}return this}var Od=Symbol("implicit");function $r(){var t=new to,r=[],e=[],n=Od;function i(s){let d=t.get(s);if(d===void 0){if(n!==Od)return n;t.set(s,d=r.push(s)-1)}return e[d%e.length]}return i.domain=function(s){if(!arguments.length)return r.slice();r=[],t=new to;for(let d of s)t.has(d)||t.set(d,r.push(d)-1);return i},i.range=function(s){return arguments.length?(e=Array.from(s),i):e.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return $r(r,e).unknown(n)},io.apply(i,arguments),i}function qr(){var t=$r().unknown(void 0),r=t.domain,e=t.range,n=0,i=1,s,d,m=!1,f=0,_=0,b=.5;delete t.unknown;function M(){var S=r().length,w=i<n,D=w?i:n,R=w?n:i;s=(R-D)/Math.max(1,S-f+_*2),m&&(s=Math.floor(s)),D+=(R-D-s*(S-f))*b,d=s*(1-f),m&&(D=Math.round(D),d=Math.round(d));var W=Er(S).map(function(H){return D+s*H});return e(w?W.reverse():W)}return t.domain=function(S){return arguments.length?(r(S),M()):r()},t.range=function(S){return arguments.length?([n,i]=S,n=+n,i=+i,M()):[n,i]},t.rangeRound=function(S){return[n,i]=S,n=+n,i=+i,m=!0,M()},t.bandwidth=function(){return d},t.step=function(){return s},t.round=function(S){return arguments.length?(m=!!S,M()):m},t.padding=function(S){return arguments.length?(f=Math.min(1,_=+S),M()):f},t.paddingInner=function(S){return arguments.length?(f=Math.min(1,S),M()):f},t.paddingOuter=function(S){return arguments.length?(_=+S,M()):_},t.align=function(S){return arguments.length?(b=Math.max(0,Math.min(1,S)),M()):b},t.copy=function(){return qr(r(),[n,i]).round(m).paddingInner(f).paddingOuter(_).align(b)},io.apply(M(),arguments)}function Pd(t){var r=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Pd(r())},t}function Fo(){return Pd(qr.apply(null,arguments).paddingInner(1))}function Ha(t){return function(){return t}}function Wa(t){return+t}var Ed=[0,1];function oo(t){return t}function Ga(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Ha(isNaN(r)?NaN:.5)}function B_(t,r){var e;return t>r&&(e=t,t=r,r=e),function(n){return Math.max(t,Math.min(r,n))}}function U_(t,r,e){var n=t[0],i=t[1],s=r[0],d=r[1];return i<n?(n=Ga(i,n),s=e(d,s)):(n=Ga(n,i),s=e(s,d)),function(m){return s(n(m))}}function j_(t,r,e){var n=Math.min(t.length,r.length)-1,i=new Array(n),s=new Array(n),d=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),r=r.slice().reverse());++d<n;)i[d]=Ga(t[d],t[d+1]),s[d]=e(r[d],r[d+1]);return function(m){var f=Sa(t,m,1,n)-1;return s[f](i[f](m))}}function wd(t,r){return r.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $_(){var t=Ed,r=Ed,e=bs,n,i,s,d=oo,m,f,_;function b(){var S=Math.min(t.length,r.length);return d!==oo&&(d=B_(t[0],t[S-1])),m=S>2?j_:U_,f=_=null,M}function M(S){return S==null||isNaN(S=+S)?s:(f||(f=m(t.map(n),r,e)))(n(d(S)))}return M.invert=function(S){return d(i((_||(_=m(r,t.map(n),yr)))(S)))},M.domain=function(S){return arguments.length?(t=Array.from(S,Wa),b()):t.slice()},M.range=function(S){return arguments.length?(r=Array.from(S),b()):r.slice()},M.rangeRound=function(S){return r=Array.from(S),e=ys,b()},M.clamp=function(S){return arguments.length?(d=S?!0:oo,b()):d!==oo},M.interpolate=function(S){return arguments.length?(e=S,b()):e},M.unknown=function(S){return arguments.length?(s=S,M):s},function(S,w){return n=S,i=w,b()}}function Ya(){return $_()(oo,oo)}function Ka(t,r,e,n){var i=Oa(t,r,e),s;switch(n=si(n??",f"),n.type){case"s":{var d=Math.max(Math.abs(t),Math.abs(r));return n.precision==null&&!isNaN(s=$a(i,d))&&(n.precision=s),jr(n,d)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=qa(i,Math.max(Math.abs(t),Math.abs(r))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=ja(i))&&(n.precision=s-(n.type==="%")*2);break}}return Un(n)}function q_(t){var r=t.domain;return t.ticks=function(e){var n=r();return Pr(n[0],n[n.length-1],e??10)},t.tickFormat=function(e,n){var i=r();return Ka(i[0],i[i.length-1],e??10,n)},t.nice=function(e){e==null&&(e=10);var n=r(),i=0,s=n.length-1,d=n[i],m=n[s],f,_,b=10;for(m<d&&(_=d,d=m,m=_,_=i,i=s,s=_);b-- >0;){if(_=Po(d,m,e),_===f)return n[i]=d,n[s]=m,r(n);if(_>0)d=Math.floor(d/_)*_,m=Math.ceil(m/_)*_;else if(_<0)d=Math.ceil(d*_)/_,m=Math.floor(m*_)/_;else break;f=_}return t},t}function ki(){var t=Ya();return t.copy=function(){return wd(t,ki())},io.apply(t,arguments),q_(t)}var Qa=new Date,Ja=new Date;function sn(t,r,e,n){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),r(s,1),t(s),s),i.round=s=>{let d=i(s),m=i.ceil(s);return s-d<m-s?d:m},i.offset=(s,d)=>(r(s=new Date(+s),d==null?1:Math.floor(d)),s),i.range=(s,d,m)=>{let f=[];if(s=i.ceil(s),m=m==null?1:Math.floor(m),!(s<d)||!(m>0))return f;let _;do f.push(_=new Date(+s)),r(s,m),t(s);while(_<s&&s<d);return f},i.filter=s=>sn(d=>
vendor: 22,838 bytes, line 8
8{if(d>=d)for(;t(d),!s(d);)d.setTime(d-1)},(d,m)=>{if(d>=d)if(m<0)for(;++m<=0;)for(;r(d,-1),!s(d););else for(;--m>=0;)for(;r(d,1),!s(d););}),e&&(i.count=(s,d)=>(Qa.setTime(+s),Ja.setTime(+d),t(Qa),t(Ja),Math.floor(e(Qa,Ja))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?d=>n(d)%s===0:d=>i.count(0,d)%s===0):i)),i}var zo=sn(t=>t.setHours(0,0,0,0),(t,r)=>t.setDate(t.getDate()+r),(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),W_=zo.range,Lo=sn(t=>{t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r)},(t,r)=>(r-t)/864e5,t=>t.getUTCDate()-1),G_=Lo.range,Id=sn(t=>{t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r)},(t,r)=>(r-t)/864e5,t=>Math.floor(t/864e5)),Y_=Id.range;function Ni(t){return sn(r=>{r.setDate(r.getDate()-(r.getDay()+7-t)%7),r.setHours(0,0,0,0)},(r,e)=>{r.setDate(r.getDate()+e*7)},(r,e)=>(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*6e4)/6048e5)}var Vo=Ni(0),ro=Ni(1),Td=Ni(2),Ad=Ni(3),ci=Ni(4),Dd=Ni(5),Rd=Ni(6),kd=Vo.range,Q_=ro.range,J_=Td.range,Z_=Ad.range,X_=ci.range,e1=Dd.range,t1=Rd.range;function Fi(t){return sn(r=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-t)%7),r.setUTCHours(0,0,0,0)},(r,e)=>{r.setUTCDate(r.getUTCDate()+e*7)},(r,e)=>(e-r)/6048e5)}var Bo=Fi(0),ao=Fi(1),Nd=Fi(2),Fd=Fi(3),di=Fi(4),zd=Fi(5),Ld=Fi(6),Vd=Bo.range,n1=ao.range,i1=Nd.range,o1=Fd.range,r1=di.range,a1=zd.range,l1=Ld.range;var jn=sn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r)},(t,r)=>r.getFullYear()-t.getFullYear(),t=>t.getFullYear());jn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(r=>{r.setFullYear(Math.floor(r.getFullYear()/t)*t),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,e)=>{r.setFullYear(r.getFullYear()+e*t)});var s1=jn.range,$n=sn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r)},(t,r)=>r.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());$n.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(r=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/t)*t),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,e)=>{r.setUTCFullYear(r.getUTCFullYear()+e*t)});var c1=$n.range;function Xa(t){if(0<=t.y&&t.y<100){var r=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return r.setFullYear(t.y),r}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function el(t){if(0<=t.y&&t.y<100){var r=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return r.setUTCFullYear(t.y),r}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Uo(t,r,e){return{y:t,m:r,d:e,H:0,M:0,S:0,L:0}}function tl(t){var r=t.dateTime,e=t.date,n=t.time,i=t.periods,s=t.days,d=t.shortDays,m=t.months,f=t.shortMonths,_=jo(i),b=$o(i),M=jo(s),S=$o(s),w=jo(d),D=$o(d),R=jo(m),W=$o(m),H=jo(f),L=$o(f),q={a:Be,A:zt,b:Lt,B:Mt,c:null,d:Hd,e:Hd,f:D1,g:j1,G:q1,H:I1,I:T1,j:A1,L:Qd,m:R1,M:k1,p:Pn,q:xn,Q:Yd,s:Kd,S:N1,u:F1,U:z1,V:L1,w:V1,W:B1,x:null,X:null,y:U1,Y:$1,Z:H1,"%":Gd},ne={a:Gn,A:bi,b:rn,B:yi,c:null,d:Wd,e:Wd,f:K1,g:rC,G:lC,H:W1,I:G1,j:Y1,L:Zd,m:Q1,M:J1,p:Mi,q:Yn,Q:Yd,s:Kd,S:Z1,u:X1,U:eC,V:tC,w:nC,W:iC,x:null,X:null,y:oC,Y:aC,Z:sC,"%":Gd},_e={a:ct,A:Ze,b:K,B:ee,c:ge,d:$d,e:$d,f:O1,g:jd,G:Ud,H:qd,I:qd,j:b1,L:S1,m:v1,M:y1,p:dt,q:x1,Q:E1,s:w1,S:M1,u:g1,U:f1,V:h1,w:u1,W:_1,x:it,X:$t,y:jd,Y:Ud,Z:C1,"%":P1};q.x=oe(e,q),q.X=oe(n,q),q.c=oe(r,q),ne.x=oe(e,ne),ne.X=oe(n,ne),ne.c=oe(r,ne);function oe(Q,Oe){return function(Ue){var j=[],qt=-1,ot=0,an=Q.length,ln,Si,ql;for(Ue instanceof Date||(Ue=new Date(+Ue));++qt<an;)Q.charCodeAt(qt)===37&&(j.push(Q.slice(ot,qt)),(Si=Bd[ln=Q.charAt(++qt)])!=null?ln=Q.charAt(++qt):Si=ln==="e"?" ":"0",(ql=Oe[ln])&&(ln=ql(Ue,Si)),j.push(ln),ot=qt+1);return j.push(Q.slice(ot,qt)),j.join("")}}function de(Q,Oe){return function(Ue){var j=Uo(1900,void 0,1),qt=Me(j,Q,Ue+="",0),ot,an;if(qt!=Ue.length)return null;if("Q"in j)return new Date(j.Q);if("s"in j)return new Date(j.s*1e3+("L"in j?j.L:0));if(Oe&&!("Z"in j)&&(j.Z=0),"p"in j&&(j.H=j.H%12+j.p*12),j.m===void 0&&(j.m="q"in j?j.q:0),"V"in j){if(j.V<1||j.V>53)return null;"w"in j||(j.w=1),"Z"in j?(ot=el(Uo(j.y,0,1)),an=ot.getUTCDay(),ot=an>4||an===0?ao.ceil(ot):ao(ot),ot=Lo.offset(ot,(j.V-1)*7),j.y=ot.getUTCFullYear(),j.m=ot.getUTCMonth(),j.d=ot.getUTCDate()+(j.w+6)%7):(ot=Xa(Uo(j.y,0,1)),an=ot.getDay(),ot=an>4||an===0?ro.ceil(ot):ro(ot),ot=zo.offset(ot,(j.V-1)*7),j.y=ot.getFullYear(),j.m=ot.getMonth(),j.d=ot.getDate()+(j.w+6)%7)}else("W"in j||"U"in j)&&("w"in j||(j.w="u"in j?j.u%7:"W"in j?1:0),an="Z"in j?el(Uo(j.y,0,1)).getUTCDay():Xa(Uo(j.y,0,1)).getDay(),j.m=0,j.d="W"in j?(j.w+6)%7+j.W*7-(an+5)%7:j.w+j.U*7-(an+6)%7);return"Z"in j?(j.H+=j.Z/100|0,j.M+=j.Z%100,el(j)):Xa(j)}}function Me(Q,Oe,Ue,j){for(var qt=0,ot=Oe.length,an=Ue.length,ln,Si;qt<ot;){if(j>=an)return-1;if(ln=Oe.charCodeAt(qt++),ln===37){if(ln=Oe.charAt(qt++),Si=_e[ln in Bd?Oe.charAt(qt++):ln],!Si||(j=Si(Q,Ue,j))<0)return-1}else if(ln!=Ue.charCodeAt(j++))return-1}return j}function dt(Q,Oe,Ue){var j=_.exec(Oe.slice(Ue));return j?(Q.p=b.get(j[0].toLowerCase()),Ue+j[0].length):-1}function ct(Q,Oe,Ue){var j=w.exec(Oe.slice(Ue));return j?(Q.w=D.get(j[0].toLowerCase()),Ue+j[0].length):-1}function Ze(Q,Oe,Ue){var j=M.exec(Oe.slice(Ue));return j?(Q.w=S.get(j[0].toLowerCase()),Ue+j[0].length):-1}function K(Q,Oe,Ue){var j=H.exec(Oe.slice(Ue));return j?(Q.m=L.get(j[0].toLowerCase()),Ue+j[0].length):-1}function ee(Q,Oe,Ue){var j=R.exec(Oe.slice(Ue));return j?(Q.m=W.get(j[0].toLowerCase()),Ue+j[0].length):-1}function ge(Q,Oe,Ue){return Me(Q,r,Oe,Ue)}function it(Q,Oe,Ue){return Me(Q,e,Oe,Ue)}function $t(Q,Oe,Ue){return Me(Q,n,Oe,Ue)}function Be(Q){return d[Q.getDay()]}function zt(Q){return s[Q.getDay()]}function Lt(Q){return f[Q.getMonth()]}function Mt(Q){return m[Q.getMonth()]}function Pn(Q){return i[+(Q.getHours()>=12)]}function xn(Q){return 1+~~(Q.getMonth()/3)}function Gn(Q){return d[Q.getUTCDay()]}function bi(Q){return s[Q.getUTCDay()]}function rn(Q){return f[Q.getUTCMonth()]}function yi(Q){return m[Q.getUTCMonth()]}function Mi(Q){return i[+(Q.getUTCHours()>=12)]}function Yn(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var Oe=oe(Q+="",q);return Oe.toString=function(){return Q},Oe},parse:function(Q){var Oe=de(Q+="",!1);return Oe.toString=function(){return Q},Oe},utcFormat:function(Q){var Oe=oe(Q+="",ne);return Oe.toString=function(){return Q},Oe},utcParse:function(Q){var Oe=de(Q+="",!0);return Oe.toString=function(){return Q},Oe}}}var Bd={"-":"",_:" ",0:"0"},It=/^\s*\d+/,d1=/^%/,p1=/[\\^$*+?|[\]().{}]/g;function qe(t,r,e){var n=t<0?"-":"",i=(n?-t:t)+"",s=i.length;return n+(s<e?new Array(e-s+1).join(r)+i:i)}function m1(t){return t.replace(p1,"\\$&")}function jo(t){return new RegExp("^(?:"+t.map(m1).join("|")+")","i")}function $o(t){return new Map(t.map((r,e)=>[r.toLowerCase(),e]))}function u1(t,r,e){var n=It.exec(r.slice(e,e+1));return n?(t.w=+n[0],e+n[0].length):-1}function g1(t,r,e){var n=It.exec(r.slice(e,e+1));return n?(t.u=+n[0],e+n[0].length):-1}function f1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.U=+n[0],e+n[0].length):-1}function h1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.V=+n[0],e+n[0].length):-1}function _1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.W=+n[0],e+n[0].length):-1}function Ud(t,r,e){var n=It.exec(r.slice(e,e+4));return n?(t.y=+n[0],e+n[0].length):-1}function jd(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),e+n[0].length):-1}function C1(t,r,e){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(e,e+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),e+n[0].length):-1}function x1(t,r,e){var n=It.exec(r.slice(e,e+1));return n?(t.q=n[0]*3-3,e+n[0].length):-1}function v1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.m=n[0]-1,e+n[0].length):-1}function $d(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.d=+n[0],e+n[0].length):-1}function b1(t,r,e){var n=It.exec(r.slice(e,e+3));return n?(t.m=0,t.d=+n[0],e+n[0].length):-1}function qd(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.H=+n[0],e+n[0].length):-1}function y1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.M=+n[0],e+n[0].length):-1}function M1(t,r,e){var n=It.exec(r.slice(e,e+2));return n?(t.S=+n[0],e+n[0].length):-1}function S1(t,r,e){var n=It.exec(r.slice(e,e+3));return n?(t.L=+n[0],e+n[0].length):-1}function O1(t,r,e){var n=It.exec(r.slice(e,e+6));return n?(t.L=Math.floor(n[0]/1e3),e+n[0].length):-1}function P1(t,r,e){var n=d1.exec(r.slice(e,e+1));return n?e+n[0].length:-1}function E1(t,r,e){var n=It.exec(r.slice(e));return n?(t.Q=+n[0],e+n[0].length):-1}function w1(t,r,e){var n=It.exec(r.slice(e));return n?(t.s=+n[0],e+n[0].length):-1}function Hd(t,r){return qe(t.getDate(),r,2)}function I1(t,r){return qe(t.getHours(),r,2)}function T1(t,r){return qe(t.getHours()%12||12,r,2)}function A1(t,r){return qe(1+zo.count(jn(t),t),r,3)}function Qd(t,r){return qe(t.getMilliseconds(),r,3)}function D1(t,r){return Qd(t,r)+"000"}function R1(t,r){return qe(t.getMonth()+1,r,2)}function k1(t,r){return qe(t.getMinutes(),r,2)}function N1(t,r){return qe(t.getSeconds(),r,2)}function F1(t){var r=t.getDay();return r===0?7:r}function z1(t,r){return qe(Vo.count(jn(t)-1,t),r,2)}function Jd(t){var r=t.getDay();return r>=4||r===0?ci(t):ci.ceil(t)}function L1(t,r){return t=Jd(t),qe(ci.count(jn(t),t)+(jn(t).getDay()===4),r,2)}function V1(t){return t.getDay()}function B1(t,r){return qe(ro.count(jn(t)-1,t),r,2)}function U1(t,r){return qe(t.getFullYear()%100,r,2)}function j1(t,r){return t=Jd(t),qe(t.getFullYear()%100,r,2)}function $1(t,r){return qe(t.getFullYear()%1e4,r,4)}function q1(t,r){var e=t.getDay();return t=e>=4||e===0?ci(t):ci.ceil(t),qe(t.getFullYear()%1e4,r,4)}function H1(t){var r=t.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+qe(r/60|0,"0",2)+qe(r%60,"0",2)}function Wd(t,r){return qe(t.getUTCDate(),r,2)}function W1(t,r){return qe(t.getUTCHours(),r,2)}function G1(t,r){return qe(t.getUTCHours()%12||12,r,2)}function Y1(t,r){return qe(1+Lo.count($n(t),t),r,3)}function Zd(t,r){return qe(t.getUTCMilliseconds(),r,3)}function K1(t,r){return Zd(t,r)+"000"}function Q1(t,r){return qe(t.getUTCMonth()+1,r,2)}function J1(t,r){return qe(t.getUTCMinutes(),r,2)}function Z1(t,r){return qe(t.getUTCSeconds(),r,2)}function X1(t){var r=t.getUTCDay();return r===0?7:r}function eC(t,r){return qe(Bo.count($n(t)-1,t),r,2)}function Xd(t){var r=t.getUTCDay();return r>=4||r===0?di(t):di.ceil(t)}function tC(t,r){return t=Xd(t),qe(di.count($n(t),t)+($n(t).getUTCDay()===4),r,2)}function nC(t){return t.getUTCDay()}function iC(t,r){return qe(ao.count($n(t)-1,t),r,2)}function oC(t,r){return qe(t.getUTCFullYear()%100,r,2)}function rC(t,r){return t=Xd(t),qe(t.getUTCFullYear()%100,r,2)}function aC(t,r){return qe(t.getUTCFullYear()%1e4,r,4)}function lC(t,r){var e=t.getUTCDay();return t=e>=4||e===0?di(t):di.ceil(t),qe(t.getUTCFullYear()%1e4,r,4)}function sC(){return"+0000"}function Gd(){return"%"}function Yd(t){return+t}function Kd(t){return Math.floor(+t/1e3)}var lo,pi,ep,tp,np;nl({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function nl(t){return lo=tl(t),pi=lo.format,ep=lo.parse,tp=lo.utcFormat,np=lo.utcParse,lo}function Fe(t){return function(){return t}}var il=Math.abs,Dt=Math.atan2,mi=Math.cos,ip=Math.max,Hr=Math.min,On=Math.sin,zi=Math.sqrt,jt=1e-12,so=Math.PI,qo=so/2,co=2*so;function op(t){return t>1?0:t<-1?so:Math.acos(t)}function ol(t){return t>=1?qo:t<=-1?-qo:Math.asin(t)}function po(t){let r=3;return t.digits=function(e){if(!arguments.length)return r;if(e==null)r=null;else{let n=Math.floor(e);if(!(n>=0))throw new RangeError(`invalid digits: ${e}`);r=n}return t},()=>new Di(r)}function cC(t){return t.innerRadius}function dC(t){return t.outerRadius}function pC(t){return t.startAngle}function mC(t){return t.endAngle}function uC(t){return t&&t.padAngle}function gC(t,r,e,n,i,s,d,m){var f=e-t,_=n-r,b=d-i,M=m-s,S=M*f-b*_;if(!(S*S<jt))return S=(b*(r-s)-M*(t-i))/S,[t+S*f,r+S*_]}function Wr(t,r,e,n,i,s,d){var m=t-e,f=r-n,_=(d?s:-s)/zi(m*m+f*f),b=_*f,M=-_*m,S=t+b,w=r+M,D=e+b,R=n+M,W=(S+D)/2,H=(w+R)/2,L=D-S,q=R-w,ne=L*L+q*q,_e=i-s,oe=S*R-D*w,de=(q<0?-1:1)*zi(ip(0,_e*_e*ne-oe*oe)),Me=(oe*q-L*de)/ne,dt=(-oe*L-q*de)/ne,ct=(oe*q+L*de)/ne,Ze=(-oe*L+q*de)/ne,K=Me-W,ee=dt-H,ge=ct-W,it=Ze-H;return K*K+ee*ee>ge*ge+it*it&&(Me=ct,dt=Ze),{cx:Me,cy:dt,x01:-b,y01:-M,x11:Me*(i/_e-1),y11:dt*(i/_e-1)}}function Gr(){var t=cC,r=dC,e=Fe(0),n=null,i=pC,s=mC,d=uC,m=null,f=po(_);function _(){var b,M,S=+t.apply(this,arguments),w=+r.apply(this,arguments),D=i.apply(this,arguments)-qo,R=s.apply(this,arguments)-qo,W=il(R-D),H=R>D;if(m||(m=b=f()),w<S&&(M=w,w=S,S=M),!(w>jt))m.moveTo(0,0);else if(W>co-jt)m.moveTo(w*mi(D),w*On(D)),m.arc(0,0,w,D,R,!H),S>jt&&(m.moveTo(S*mi(R),S*On(R)),m.arc(0,0,S,R,D,H));else{var L=D,q=R,ne=D,_e=R,oe=W,de=W,Me=d.apply(this,arguments)/2,dt=Me>jt&&(n?+n.apply(this,arguments):zi(S*S+w*w)),ct=Hr(il(w-S)/2,+e.apply(this,arguments)),Ze=ct,K=ct,ee,ge;if(dt>jt){var it=ol(dt/S*On(Me)),$t=ol(dt/w*On(Me));(oe-=it*2)>jt?(it*=H?1:-1,ne+=it,_e-=it):(oe=0,ne=_e=(D+R)/2),(de-=$t*2)>jt?($t*=H?1:-1,L+=$t,q-=$t):(de=0,L=q=(D+R)/2)}var Be=w*mi(L),zt=w*On(L),Lt=S*mi(_e),Mt=S*On(_e);if(ct>jt){var Pn=w*mi(q),xn=w*On(q),Gn=S*mi(ne),bi=S*On(ne),rn;if(W<so)if(rn=gC(Be,zt,Gn,bi,Pn,xn,Lt,Mt)){var yi=Be-rn[0],Mi=zt-rn[1],Yn=Pn-rn[0],Q=xn-rn[1],Oe=1/On(op((yi*Yn+Mi*Q)/(zi(yi*yi+Mi*Mi)*zi(Yn*Yn+Q*Q)))/2),Ue=zi(rn[0]*rn[0]+rn[1]*rn[1]);Ze=Hr(ct,(S-Ue)/(Oe-1)),K=Hr(ct,(w-Ue)/(Oe+1))}else Ze=K=0}de>jt?K>jt?(ee=Wr(Gn,bi,Be,zt,w,K,H),ge=Wr(Pn,xn,Lt,Mt,w,K,H),m.moveTo(ee.cx+ee.x01,ee.cy+ee.y01),K<ct?m.arc(ee.cx,ee.cy,K,Dt(ee.y01,ee.x01),Dt(ge.y01,ge.x01),!H):(m.arc(ee.cx,ee.cy,K,Dt(ee.y01,ee.x01),Dt(ee.y11,ee.x11),!H),m.arc(0,0,w,Dt(ee.cy+ee.y11,ee.cx+ee.x11),Dt(ge.cy+ge.y11,ge.cx+ge.x11),!H),m.arc(ge.cx,ge.cy,K,Dt(ge.y11,ge.x11),Dt(ge.y01,ge.x01),!H))):(m.moveTo(Be,zt),m.arc(0,0,w,L,q,!H)):m.moveTo(Be,zt),!(S>jt)||!(oe>jt)?m.lineTo(Lt,Mt):Ze>jt?(ee=Wr(Lt,Mt,Pn,xn,S,-Ze,H),ge=Wr(Be,zt,Gn,bi,S,-Ze,H),m.lineTo(ee.cx+ee.x01,ee.cy+ee.y01),Ze<ct?m.arc(ee.cx,ee.cy,Ze,Dt(ee.y01,ee.x01),Dt(ge.y01,ge.x01),!H):(m.arc(ee.cx,ee.cy,Ze,Dt(ee.y01,ee.x01),Dt(ee.y11,ee.x11),!H),m.arc(0,0,S,Dt(ee.cy+ee.y11,ee.cx+ee.x11),Dt(ge.cy+ge.y11,ge.cx+ge.x11),H),m.arc(ge.cx,ge.cy,Ze,Dt(ge.y11,ge.x11),Dt(ge.y01,ge.x01),!H))):m.arc(0,0,S,_e,ne,H)}if(m.closePath(),b)return m=null,b+""||null}return _.centroid=function(){var b=(+t.apply(this,arguments)+ +r.apply(this,arguments))/2,M=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-so/2;return[mi(M)*b,On(M)*b]},_.innerRadius=function(b){return arguments.length?(t=typeof b=="function"?b:Fe(+b),_):t},_.outerRadius=function(b){return arguments.length?(r=typeof b=="function"?b:Fe(+b),_):r},_.cornerRadius=function(b){return arguments.length?(e=typeof b=="function"?b:Fe(+b),_):e},_.padRadius=function(b){return arguments.length?(n=b==null?null:typeof b=="function"?b:Fe(+b),_):n},_.startAngle=function(b){return arguments.length?(i=typeof b=="function"?b:Fe(+b),_):i},_.endAngle=function(b){return arguments.length?(s=typeof b=="function"?b:Fe(+b),_):s},_.padAngle=function(b){return arguments.length?(d=typeof b=="function"?b:Fe(+b),_):d},_.context=function(b){return arguments.length?(m=b??null,_):m},_}var G7=Array.prototype.slice;function mo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function rp(t){this._context=t}rp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,r){switch(t=+t,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break;case 1:this._point=2;default:this._context.lineTo(t,r);break}}};function Yr(t){return new rp(t)}function Kr(t){return t[0]}function Qr(t){return t[1]}function Ho(t,r){var e=Fe(!0),n=null,i=Yr,s=null,d=po(m);t=typeof t=="function"?t:t===void 0?Kr:Fe(t),r=typeof r=="function"?r:r===void 0?Qr:Fe(r);function m(f){var _,b=(f=mo(f)).length,M,S=!1,w;for(n==null&&(s=i(w=d())),_=0;_<=b;++_)!(_<b&&e(M=f[_],_,f))===S&&((S=!S)?s.lineStart():s.lineEnd()),S&&s.point(+t(M,_,f),+r(M,_,f));if(w)return s=null,w+""||null}return m.x=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),m):t},m.y=function(f){return arguments.length?(r=typeof f=="function"?f:Fe(+f),m):r},m.defined=function(f){return arguments.length?(e=typeof f=="function"?f:Fe(!!f),m):e},m.curve=function(f){return arguments.length?(i=f,n!=null&&(s=i(n)),m):i},m.context=function(f){return arguments.length?(f==null?n=s=null:s=i(n=f),m):n},m}function rl(t,r,e){var n=null,i=Fe(!0),s=null,d=Yr,m=null,f=po(_);t=typeof t=="function"?t:t===void 0?Kr:Fe(+t),r=typeof r=="function"?r:r===void 0?Fe(0):Fe(+r),e=typeof e=="function"?e:e===void 0?Qr:Fe(+e);function _(M){var S,w,D,R=(M=mo(M)).length,W,H=!1,L,q=new Array(R),ne=new Array(R);for(s==null&&(m=d(L=f())),S=0;S<=R;++S){if(!(S<R&&i(W=M[S],S,M))===H)if(H=!H)w=S,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),D=S-1;D>=w;--D)m.point(q[D],ne[D]);m.lineEnd(),m.areaEnd()}H&&(q[S]=+t(W,S,M),ne[S]=+r(W,S,M),m.point(n?+n(W,S,M):q[S],e?+e(W,S,M):ne[S]))}if(L)return m=null,L+""||null}function b(){return Ho().defined(i).curve(d).context(s)}return _.x=function(M){return arguments.length?(t=typeof M=="function"?M:Fe(+M),n=null,_):t},_.x0=function(M){return arguments.length?(t=typeof M=="function"?M:Fe(+M),_):t},_.x1=function(M){return arguments.length?(n=M==null?null:typeof M=="function"?M:Fe(+M),_):n},_.y=function(M){return arguments.length?(r=typeof M=="function"?M:Fe(+M),e=null,_):r},_.y0=function(M){return arguments.length?(r=typeof M=="function"?M:Fe(+M),_):r},_.y1=function(M){return arguments.length?(e=M==null?null:typeof M=="function"?M:Fe(+M),_):e},_.lineX0=_.lineY0=function(){return b().x(t).y(r)},_.lineY1=function(){return b().x(t).y(e)},_.lineX1=function(){return b().x(n).y(r)},_.defined=function(M){return arguments.length?(i=typeof M=="function"?M:Fe(!!M),_):i},_.curve=function(M){return arguments.length?(d=M,s!=null&&(m=d(s)),_):d},_.context=function(M){return arguments.length?(M==null?s=m=null:m=d(s=M),_):s},_}function ap(t,r){return r<t?-1:r>t?1:r>=t?0:NaN}function lp(t){return t}function al(){var t=lp,r=ap,e=null,n=Fe(0),i=Fe(co),s=Fe(0);function d(m){var f,_=(m=mo(m)).length,b,M,S=0,w=new Array(_),D=new Array(_),R=+n.apply(this,arguments),W=Math.min(co,Math.max(-co,i.apply(this,arguments)-R)),H,L=Math.min(Math.abs(W)/_,s.apply(this,arguments)),q=L*(W<0?-1:1),ne;for(f=0;f<_;++f)(ne=D[w[f]=f]=+t(m[f],f,m))>0&&(S+=ne);for(r!=null?w.sort(function(_e,oe){return r(D[_e],D[oe])}):e!=null&&w.sort(function(_e,oe){return e(m[_e],m[oe])}),f=0,M=S?(W-_*q)/S:0;f<_;++f,R=H)b=w[f],ne=D[b],H=R+(ne>0?ne*M:0)+q,D[b]={data:m[b],index:f,value:ne,startAngle:R,endAngle:H,padAngle:L};return D}return d.value=function(m){return arguments.length?(t=typeof m=="function"?m:Fe(+m),d):t},d.sortValues=function(m){return arguments.length?(r=m,e=null,d):r},d.sort=function(m){return arguments.length?(e=m,r=null,d):e},d.startAngle=function(m){return arguments.length?(n=typeof m=="function"?m:Fe(+m),d):n},d.endAngle=function(m){return arguments.length?(i=typeof m=="function"?m:Fe(+m),d):i},d.padAngle=function(m){return arguments.length?(s=typeof m=="function"?m:Fe(+m),d):s},d}function sp(t){return t<0?-1:1}function cp(t,r,e){var n=t._x1-t._x0,i=r-t._x1,s=(t._y1-t._y0)/(n||i<0&&-0),d=(e-t._y1)/(i||n<0&&-0),m=(s*i+d*n)/(n+i);return(sp(s)+sp(d))*Math.min(Math.abs(s),Math.abs(d),.5*Math.abs(m))||0}function dp(t,r){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-r)/2:r}function ll(t,r,e){var n=t._x0,i=t._y0,s=t._x1,d=t._y1,m=(s-n)/3;t._context.bezierCurveTo(n+m,i+m*r,s-m,d-m*e,s,d)}function Jr(t){this._context=t}Jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ll(this,this._t0,dp(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,r){var e=NaN;if(t=+t,r=+r,!(t===this._x1&&r===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break;case 1:this._point=2;break;case 2:this._point=3,ll(this,dp(this,e=cp(this,t,r)),e);break;default:ll(this,this._t0,e=cp(this,t,r));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=r,this._t0=e}}};function fC(t){this._context=new pp(t)}(fC.prototype=Object.create(Jr.prototype)).point=function(t,r){Jr.prototype.point.call(this,r,t)};function pp(t){this._context=t}pp.prototype={moveTo:function(t,r){this._context.moveTo(r,t)},closePath:function(){this._context.closePath()},lineTo:function(t,r){this._context.lineTo(r,t)},bezierCurveTo:function(t,r,e,n,i,s){this._context.bezierCurveTo(r,t,n,e,s,i)}};function Zr(t){return new Jr(t)}function ui(t,r,e){this.k=t,this.x=r,this.y=e}ui.prototype={constructor:ui,scale:function(t){return t===1?this:new ui(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new ui(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var sl=new ui(1,0,0);cl.prototype=ui.prototype;function cl(t){for(;!t.__zoom;)if(!(t=t.parentNode))return sl;return t.__zoom}var hC=["historyChart"],_C=["performanceChart"];function CC(t,r){t&1&&(o(0,"div",78)(1,"div",79)(2,"div",80),h(3,"span",81),a()()())}function xC(t,r){if(t&1&&(o(0,"div",82)(1,"div",83)(2,"span",84),l(3),a()(),o(4,"div",85)(5,"div",86),l(6),a(),o(7,"div",87),l(8),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",e.className),c(2),C(e.value),c(3),C(e.label),c(),p("ngClass",e.className),c(),C(e.sublabel)}}function vC(t,r){if(t&1&&(o(0,"div",88)(1,"div",89)(2,"div",90),l(3),a(),o(4,"div",91),l(5),a()(),o(6,"div",92),l(7),a(),o(8,"div",93)(9,"div",94)(10,"div",95)(11,"span"),l(12,"Compliance Status:"),a(),o(13,"span"),l(14),a()(),o(15,"div",95)(16,"span"),l(1
87,"Workflow Status:"),a(),o(18,"span"),l(19),a()(),o(20,"div",95)(21,"span"),l(22,"Last Observed At:"),a(),o(23,"span"),l(24),F(25,"date"),a()()()()()),t&2){let e=r.$implicit;p("ngClass",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.toLowerCase()),c(2),p("ngClass",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.toLowerCase()),c(),C(e==null?null:e.TITLE),c(),p("ngClass",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.toLowerCase()),c(),x(" ",e==null?null:e.SEVERITY_LABEL),c(2),C(e==null?null:e.DESCRIPTION),c(7),C(e==null?null:e.COMPLIANCE_STATUS),c(5),C(e==null?null:e.WORKFLOW_STATUS),c(5),C(ie(25,9,e==null?null:e.LAST_OBSERVED_AT,"dd-MM-yyyy HH:mm"))}}function bC(t,r){t&1&&(o(0,"div",96),l(1,"Infrastructure Dependencies"),a())}function yC(t,r){if(t&1&&(o(0,"div",97)(1,"span",98),h(2,"iconify-icon",99),a(),o(3,"div",100),l(4),F(5,"uppercase"),a(),o(6,"div",101),l(7),a()()),t&2){let e=r.$implicit;c(4),C(X(5,2,e.DEPENDENCY_TYPE)),c(3),C(e.DEPENDENCY_ID)}}var mp=(()=>{class t{constructor(e,n,i,s){this.router=e,this.route=n,this.dashboardService=i,this.notify=s,this.loading=!1,this.selectedRowStorageKey="riskAnalysisSelectedRow",this.account_Id=null,this.sourceTab="",this.breadcrumb="",this.dependentServices=[],this.vulnerabilityDetails=[],this.patchDetails={},this.title="EC2 Instance Critical Risk Analysis",this.performanceStats=[{label:"CPU Usage",value:"-",sublabel:"",className:"metric-amber"},{label:"Memory Usage",value:"-",sublabel:"",className:"metric-amber"},{label:"Disk I/O",value:"-",sublabel:"",className:"metric-amber"},{label:"Network I/O",value:"-",sublabel:"",className:"metric-amber"}],this.baselineCompliance={title:"Baseline Compliance Status",status:"Non-Compliant",items:[{label:"23 critical patches",value:"missing from baseline",valueClass:"text-critical"},{label:"Last baseline sync:",value:"October 15, 2024"},{label:"Enterprise Security Standard:",value:"v2.1",valueClass:"text-info"},{label:"Maximum deviation allowed:",value:"7 days",valueClass:"text-success"}]},this.groupMembers=[{id:"i-0a1b2c3d4e5f6g7h8",status:"Current",className:"status-current"},{id:"i-0b2c3d4e5f6g7h9",status:"Compliant",className:"status-compliant"},{id:"i-0c3d4e5f6g7h8j0",status:"Pending",className:"status-pending"},{id:"i-0d4e5f6g7h8j9k1",status:"Critical",className:"status-critical"}],this.complianceTimeline=[{label:"Critical patches (7 day SLA)",status:"40 days overdue",className:"timeline-critical"},{label:"High severity patches (30 day SLA)",status:"4 days overdue",className:"timeline-warning"},{label:"Medium/Low patches (90 day SLA)",status:"Within SLA",className:"timeline-success"}],this.historySummary=[{title:"Nov 2024 - Security Update",duration:"47 minutes",lastRun:"05/11/2023 12:44",status:"Success",className:"history-summary-success"},{title:"Oct 2024 - Kernel Update",duration:"89 minutes",lastRun:"05/11/2023 12:44",status:"Paused",className:"history-summary-warning"}],this.performanceSeries=[{name:"CPU Usage",className:"series-cpu",values:[{time:"12:00",value:72},{time:"13:00",value:76},{time:"14:00",value:82},{time:"15:00",value:90},{time:"16:00",value:86},{time:"17:00",value:80},{time:"18:00",value:74}]},{name:"Memory Usage",className:"series-memory",values:[{time:"12:00",value:68},{time:"13:00",value:72},{time:"14:00",value:78},{time:"15:00",value:88},{time:"16:00",value:84},{time:"17:00",value:78},{time:"18:00",value:72}]},{name:"Network I/O",className:"series-network",values:[{time:"12:00",value:44},{time:"13:00",value:50},{time:"14:00",value:56},{time:"15:00",value:64},{time:"16:00",value:68},{time:"17:00",value:62},{time:"18:00",value:56}]},{name:"Disk I/O",className:"series-disk",values:[{time:"12:00",value:34},{time:"13:00",value:36},{time:"14:00",value:40},{time:"15:00",value:42},{time:"16:00",value:58},{time:"17:00",value:54},{time:"18:00",value:48}]}],this.criticalDependencies=[{label:"Payment Gateway",value:"3 instances",className:"text-critical"},{label:"Session Management",value:"4 instances",className:"text-critical"},{label:"Order Processing",value:"5 instances",className:"text-critical"},{label:"Analytics Pipeline",value:"4 instances",className:"text-critical"},{label:"Inventory System",value:"2 instances",className:"text-critical"}],this.cascadeRiskSummary="Moderate probability of triggering downstream failures in dependent microservices due to session state synchronization dependencies",this.cascadeRiskItems=["Payment processing queue backlog expected within 15 minutes","User authentication services may degrade within 30 minutes","Database connection pool exhaustion risk in connected RDS instances"],this.remediationSteps=[{step:"1",title:"Pre-Patch Infrastru
8cture Scaling",desc:"Scale instances from t3.large to t3.xlarge to handle increased resource requirements during patching.",duration:"Duration: 15-20 minutes",detail:"Cost Impact: +$127/month",detailClass:"detail-danger",risk:"Low",riskClass:"risk-low",phase:"Phase 1",className:"step-blue"},{step:"2",title:"Load Balancer Configuration",desc:"Configure failover mechanisms and health checks to redirect traffic during maintenance window.",duration:"Duration: 10-15 minutes",detail:"Window: 2:00-4:00 AM EST",detailClass:"detail-info",risk:"Medium",riskClass:"risk-medium",phase:"Phase 2",className:"step-yellow"},{step:"3",title:"Patch Deployment Execution",desc:"Deploy kernel patches with automated rollback triggers and continuous monitoring.",duration:"Duration: 45-90 minutes",detail:"Rollback Time: 5-10 minutes",detailClass:"detail-success",risk:"High",riskClass:"risk-high",phase:"Phase 3",className:"step-orange"},{step:"4",title:"Post-Patch Validation",desc:"Comprehensive system validation, performance monitoring, and gradual traffic restoration.",duration:"Duration: 30-45 minutes",detail:"Monitoring: 24-hour enhanced",detailClass:"detail-info",risk:"Low",riskClass:"risk-low",phase:"Phase 4",className:"step-green"},{step:"5",title:"Infrastructure Optimization",desc:"Right-size instances based on post patch performance metrics and cost optimization.",duration:"Timeline: Week 2-3",detail:"Savings: -$45/month potential",detailClass:"detail-success",risk:"Minimal",riskClass:"risk-minimal",phase:"Phase 5",className:"step-purple"}]}ngOnInit(){let n=this.router.getCurrentNavigation()?.extras.state?.row??history.state?.row??this.loadPersistedRow();n&&typeof n=="object"&&(n.INSTANCE_ID||n.ACCOUNT_ID)&&(this.selectedRow=n,this.persistSelectedRow(n)),this.route.queryParams.subscribe(i=>{let s=i.tab;s==="inventory"?(this.sourceTab="inventory",this.breadcrumb="Inventory"):s==="ai-risk-analytics"&&(this.sourceTab="ai-risk-analytics",this.breadcrumb="AI Risk Analytics");let d=i.instanceID;d&&(this.instanceId=d)}),this.account_Id=window.localStorage.getItem("currentAccountID"),this.getDependentService(),this.getVulnerabilityDetails(),this.getPatchDetails()}ngAfterViewInit(){this.scrollToTop(),this.renderPerformanceChart()}scrollToTop(){setTimeout(()=>{let e=document.querySelector(".right-container");e?.scrollTo&&e.scrollTo({top:0,left:0,behavior:"smooth"}),window.scrollTo({top:0,left:0,behavior:"smooth"}),document.documentElement.scrollTop=0,document.body.scrollTop=0},0)}renderPerformanceChart(){let e=this.performanceChartRef.nativeElement,n=e.clientWidth||520,i=235,s={top:18,right:16,bottom:25,left:40};Sn(e).selectAll("*").remove();let d=Sn(e).append("svg").attr("width",n).attr("height",i),m=n-s.left-s.right,f=i-s.top-s.bottom,_=d.append("g").attr("transform",`translate(${s.left},${s.top})`),b=this.performanceSeries[0]?.values.map(R=>R.time)??[],M=Fo().domain(b).range([0,m]),S=ki().domain([0,100]).nice().range([f,0]),w=[0,20,40,60,80,100];_.append("g").attr("class","performance-gridlines").call(Ii(S).tickValues(w).tickSize(-m).tickFormat(()=>"")).call(R=>R.select(".domain").remove()),_.append("g").attr("class","performance-axis").call(Ii(S).tickValues(w).tickFormat(R=>`${R}%`)).call(R=>R.select(".domain").remove()),_.append("g").attr("class","performance-x-axis").attr("transform",`translate(0,${f})`).call(Io(M).tickSize(0)).select(".domain").attr("class","performance-axis-line"),_.append("text").attr("class","performance-axis-title").attr("x",-35).attr("y",-10).attr("text-anchor","start").text("Usage %")}persistSelectedRow(e){try{window.localStorage.setItem(this.selectedRowStorageKey,JSON.stringify(e))}catch(n){}}loadPersistedRow(){try{let e=window.localStorage.getItem(this.selectedRowStorageKey);return e?JSON.parse(e):null}catch(e){return null}}getDependentService(){this.loading=!0,this.dashboardService.getDependentServices(this.instanceId).subscribe({next:e=>{this.loading=!1,this.dependentServices=e?.object?.DATA||[]},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getVulnerabilityDetails(){this.loading=!0,this.dashboardService.getVulnerabilityDetails(this.instanceId).subscribe({next:e=>{this.loading=!1,this.vulnerabilityDetails=e?.object?.DATA||[]},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getPatchDetails(){this.loading=!0,this.dashboardService.getPatchDetails(this.instanceId).subscribe({next:e=>{this.loading=!1,this.patchDetails=e?.object?.DATA||{}},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:this.sourceTab}})}editJobSchedule(){this.router.navigate(["/admin-dashboard","patch-management","job-schedule"],{queryParams:{source:this.sourceTab}})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-risk-analysis-detail
8s"]],viewQuery:function(n,i){if(n&1&&bt(hC,7)(_C,7),n&2){let s;ht(s=_t())&&(i.historyChartRef=s.first),ht(s=_t())&&(i.performanceChartRef=s.first)}},decls:156,vars:20,consts:[["performanceChart",""],[1,"risk-details"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-row"],[1,"title-block"],[1,"page-title"],[1,"page-subtitle"],[1,"header-actions"],["type","button",1,"btn","ghost",3,"click"],["icon","ri:shield-keyhole-line"],["type","button",1,"btn","primary",3,"click"],["icon","line-md:play"],[1,"content"],[1,"content-row","top-row"],[1,"content-col","top-left"],[1,"card","instance-card"],[1,"instance-top"],[1,"instance-info"],[1,"instance-avatar"],["icon","ri:server-line"],[1,"instance-text"],[1,"instance-id"],[1,"instance-meta"],[1,"instance-tags"],[1,"dot"],[1,"risk-pill"],[1,"risk-dot"],[1,"instance-grid"],[1,"stat"],[1,"stat-value"],[1,"stat-name"],[1,"stat-value","stat-orange"],[1,"stat-meta","stat-orange"],[1,"stat-meta",3,"ngClass"],[1,"card","performance-card"],[1,"card-head"],[1,"card-title"],[1,"performance-metrics"],["class","metric-pill",4,"ngFor","ngForOf"],[1,"performance-chart-area"],[1,"content-col","top-right"],[1,"card","compliance-card"],[1,"risk-banner"],[1,"risk-badge"],["icon","ri:alert-line"],[1,"risk-banner-text"],[1,"risk-banner-title"],[1,"risk-text"],[1,"risk-rows"],[1,"risk-row"],[1,"risk-value","critical-text"],[1,"workflow-blueprint"],[1,"workflow-title"],[1,"workflow-sub"],[1,"content-row","split-row"],[1,"card","wide","compliance-card","vuln-section"],[1,"vuln-list"],["class","vuln",3,"ngClass",4,"ngFor","ngForOf"],[1,"card","compliance-card","dependencies-card"],[1,"dependency-top"],[1,"dependency-core"],[1,"core-icon"],[1,"core-id"],[1,"core-desc"],[1,"dependency-summary"],[1,"summary-value"],[1,"summary-label"],[1,"dependency-grid"],[1,"dependency-col"],["class","list-title",4,"ngIf"],[1,"infra-grid"],["class","infra-card",4,"ngFor","ngForOf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"metric-pill"],[1,"metric-pill-ring",3,"ngClass"],[1,"metric-pill-value"],[1,"metric-pill-text"],[1,"metric-pill-label"],[1,"metric-pill-sub",3,"ngClass"],[1,"vuln",3,"ngClass"],[1,"vuln-head"],[1,"vuln-id",3,"ngClass"],[1,"vuln-pill",3,"ngClass"],[1,"vuln-title"],[1,"vuln-meta-grid"],[1,"vuln-meta-col"],[1,"vuln-meta"],[1,"list-title"],[1,"infra-card"],[1,"infra-icon"],["icon","eos-icons:service-plan-outlined"],[1,"infra-title"],[1,"infra-sub"]],template:function(n,i){n&1&&(o(0,"div",1),g(1,CC,4,0,"div",2),o(2,"div",3)(3,"div",4)(4,"span",5),l(5,"Auto Pilot"),a(),o(6,"span",6),l(7,">"),a(),o(8,"span",5),l(9,"Patch Management"),a(),o(10,"span",6),l(11,">"),a(),o(12,"span",7),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13),a(),o(14,"span",6),l(15,">"),a(),o(16,"span",8),l(17),a()(),o(18,"div",9)(19,"div",10)(20,"div",11),l(21),a(),o(22,"div",12),l(23),a()(),o(24,"div",13)(25,"button",14),v("click",function(){return i.editJobSchedule()}),h(26,"iconify-icon",15),l(27," Execute Now "),a(),o(28,"button",16),v("click",function(){return i.editJobSchedule()}),h(29,"iconify-icon",17),l(30," Schedule Maintenance "),a()()()(),o(31,"div",18)(32,"div",19)(33,"div",20)(34,"section",21)(35,"div",22)(36,"div",23)(37,"div",24),h(38,"iconify-icon",25),a(),o(39,"div",26)(40,"div",27),l(41),a(),o(42,"div",28),l(43),a(),o(44,"div",29)(45,"span"),l(46),a(),h(47,"span",30),o(48,"span"),l(49),a(),h(50,"span",30),o(51,"span"),l(52),a()()()(),o(53,"div",31),h(54,"span",32),l(55," Critical Risk "),a()(),o(56,"div",33)(57,"div",34)(58,"div",35),l(59,"-"),a(),o(60,"div",36),l(61,"Risk Score"),a()(),o(62,"div",34)(63,"div",37),l(64),a(),o(65,"div",36),l(66,"Dependent Services"),a(),o(67,"div",38),l(68,"Moderate blast radius"),a()(),o(69,"div",34)(70,"div",35),l(71,"-"),a(),o(72,"div",36),l(73,"Confidence Score"),a(),o(74,"div",39),l(75," AI Assessment Accuracy "),a()()()(),o(76,"section",40)(77,"div",41)(78,"div",42),l(79,"Real-Time Performance Metrics"),a()(),o(80,"div",43),g(81,xC,9,5,"div",44),a(),h(82,"div",45,0),a()(),o(84,"div",46)(85,"section",47)(86,"div",42),l(87,"Patching Workflow Recommendation"),a(),o(88,"div",48)(89,"div",49),h(90,"iconify-icon",50),a(),o(91,"div",51)(92,"div",52),l(93,"Critical Recommendation: Guided Patching"),a(),o(94,"div",53),l(95," Kernel jump from 5.4 to 6.1 with current high utilization poses significant service interruption risk. "),a()()(),o(96,"div",54)(97,"div",55)(98,"span"),l(99,"Vulnerability Severity"),a(),o(100,"span",56),l(101,"Critical (CVSS 9.1)"),a()(),o(102,"div",55)(103,"span"),l(104,"Business Impact"),a(),o(105,"span",56),l(106,"$2.3M/hour downtime"),a()(),o(107,"div",57)(108,"div",58),l(109,"Recommended Workflow with 
8n8n Blueprint"),a(),o(110,"div",59),l(111,"n8n Workflow: Standalone Ubuntu AWS SSM Patch"),a(),o(112,"ul")(113,"li"),l(114,"Provision instance from golden image for stateless workload for canary deployment approach"),a(),o(115,"li"),l(116,"Scale to t3.xlarge 30 minutes before patch deployment for stateful workload"),a(),o(117,"li"),l(118,"Pre-patch instance health check and performance baseline capture"),a(),o(119,"li"),l(120,"Automated SSM patch group assignment and maintenance window creation"),a(),o(121,"li"),l(122,"Real-time patch deployment monitoring with Slack notifications"),a(),o(123,"li"),l(124,"Post-patch validation including service connectivity and performance regression testing"),a(),o(125,"li"),l(126,"Automated rollback trigger on failure detection with complete state restoration"),a(),o(127,"li"),l(128,"Coordinate with payment processing team for traffic redirection"),a()()()()()()(),o(129,"div",60)(130,"section",61)(131,"div",42),l(132,"Vulnerability & Patch Details"),a(),o(133,"div",62),g(134,vC,26,12,"div",63),a()()(),o(135,"section",64)(136,"div",42),l(137,"Dependencies Mapping & Blast Radius Analysis"),a(),o(138,"div",65)(139,"div",66)(140,"div",67),h(141,"iconify-icon",25),a(),o(142,"div",68),l(143),a(),o(144,"div",69),l(145,"Primary Web Server"),a()(),o(146,"div",70)(147,"div",71),l(148),a(),o(149,"div",72),l(150,"Dependent Services"),a()()(),o(151,"div",73)(152,"div",74),g(153,bC,2,0,"div",75),o(154,"div",76),g(155,yC,8,4,"div",77),a()()()()()()),n&2&&(c(),p("ngIf",i.loading),c(12),x(" ",i.breadcrumb),c(4),C(i.title),c(4),C(i.title),c(2),x("Comprehensive vulnerability assessment and remediation planning for ",i.instanceId),c(18),C(i.instanceId),c(2),In(" ",i.selectedRow==null?null:i.selectedRow.INSTANCE_TYPE," \u2022 ",i.selectedRow==null?null:i.selectedRow.PLATFORM_DETAILS," \u2022 ",i.selectedRow==null?null:i.selectedRow.INSTANCE_NAME," "),c(3),C(i.selectedRow==null?null:i.selectedRow.REGION),c(3),C(i.selectedRow==null?null:i.selectedRow.ENVIRONMENT),c(3),x("Account: ",i.selectedRow==null?null:i.selectedRow.ACCOUNT_ID),c(12),C(i.dependentServices.length),c(10),p("ngClass",(i.selectedRow==null?null:i.selectedRow.CONFIDENCE_SCORE)>=90?"stat-low":(i.selectedRow==null?null:i.selectedRow.CONFIDENCE_SCORE)>=70?"stat-medium":"stat-high"),c(7),p("ngForOf",i.performanceStats),c(53),p("ngForOf",i.vulnerabilityDetails),c(9),C(i.instanceId),c(5),C(i.dependentServices.length),c(5),p("ngIf",i.dependentServices.length>0),c(2),p("ngForOf",i.dependentServices))},dependencies:[N,xe,$,B,z,Xn,pt],styles:['.risk-details[_ngcontent-%COMP%]{padding:24px;background:#f7f8fb;color:#111827;display:flex;flex-direction:column;gap:25px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.header-row[_ngcontent-%COMP%]{display:flex;gap:20px;align-items:center;justify-content:space-between;flex-wrap:wrap}.title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.page-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700}.page-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:24px}.header-actions[_ngcontent-%COMP%]{display:flex;gap:10px}.btn[_ngcontent-%COMP%]{border-radius:8px;padding:10px 20px;font-size:14px;border:1px solid transparent;cursor:pointer;display:flex;align-items:center;gap:10px}.btn.ghost[_ngcontent-%COMP%]{background:transparent;border-color:#fca5a5;color:#dc2626}.btn.primary[_ngcontent-%COMP%]{background:#dc2626;color:#fff}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.content-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:stretch;flex-wrap:wrap}.content-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.top-left[_ngcontent-%COMP%]{flex:1 1 60%;min-width:320px;height:100%}.top-right[_ngcontent-%COMP%]{flex:0 0 40%;max-width:400px;height:100%}.split-row[_ngcontent-%COMP%]   .wide[_ngcontent-%COMP%]{flex:1 1 0;min-width:300px}.bottom-row[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{flex:1 1 320px}.card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:20px;padding:20px;box-shadow:0 1px 2px #0000000d}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:12px}.card-title[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.instance-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:20px}.instance-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}.instance-info[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}
8.instance-avatar[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:20px;background:#fee2e2;color:#dc2626;display:flex;align-items:center;justify-content:center;font-size:24px}.instance-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.instance-id[_ngcontent-%COMP%]{font-weight:700;font-size:20px}.instance-meta[_ngcontent-%COMP%]{color:#4b5563;font-size:14px}.instance-tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;color:#6b7280;font-size:13px;flex-wrap:wrap}.instance-tags[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{width:3px;height:3px;border-radius:50%;background:#6b7280}.risk-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;color:#dc2626;font-size:13px;font-weight:600}.risk-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background:#ef4444}.instance-grid[_ngcontent-%COMP%]{display:flex;gap:15px;justify-content:space-between}.stat[_ngcontent-%COMP%]{flex:1 1 0;text-align:center;padding:6px 8px;border:none;background:transparent;display:flex;flex-direction:column;gap:10px}.stat-value[_ngcontent-%COMP%]{font-size:24px;font-weight:700}
8.stat-name[_ngcontent-%COMP%]{font-size:13px;color:#4b5563}.stat-meta[_ngcontent-%COMP%]{font-size:12px}.stat-high[_ngcontent-%COMP%]{color:#dc2626}.stat-medium[_ngcontent-%COMP%]{color:#ca8a04}.stat-low[_ngcontent-%COMP%]{color:#16a34a}.stat-orange[_ngcontent-%COMP%]{color:#ea580c}.vuln-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.vuln[_ngcontent-%COMP%]{border-radius:16px;padding:18px;border:1px solid;display:flex;flex-direction:column;gap:8px}.vuln.critical[_ngcontent-%COMP%]{border-color:#fecaca;background:#fef2f2}.vuln.high[_ngcontent-%COMP%]{border-color:#fed7aa;background:#fff7ed}.vuln.medium[_ngcontent-%COMP%]{border-color:#fef08a;background:#fefce8}.vuln.low[_ngcontent-%COMP%]{border-color:#a7f3d0;background:#ecfdf3}.vuln.informational[_ngcontent-%COMP%]{background:#eff6ff;border-color:#bfdbfe}.vuln-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.vuln-id[_ngcontent-%COMP%]{font-weight:600;font-size:14px}.vuln-id.critical[_ngcontent-%COMP%]{color:#7f1d1d}.vuln-id.high[_ngcontent-%COMP%]{color:#7c2d12}.vuln-id.medium[_ngcontent-%COMP%]{color:#713f12}.vuln-id.low[_ngcontent-%COMP%]{color:#10883c}.vuln-id.informational[_ngcontent-%COMP%]{color:#1e3a8a}.vuln-pill[_ngcontent-%COMP%]{padding:4px 10px;border-radius:999px;font-size:12px;font-weight:500}.vuln-pill.critical[_ngcontent-%COMP%]{background:#dc2626;color:#fff}.vuln-pill.high[_ngcontent-%COMP%]{background:#ea580c;color:#fff}.vuln-pill.medium[_ngcontent-%COMP%]{background:#ca8a04;color:#fff}.vuln-pill.low[_ngcontent-%COMP%]{background:#16a34a;color:#fff}.vuln-pill.informational[_ngcontent-%COMP%]{background:#2563eb;color:#fff}.vuln-title[_ngcontent-%COMP%]{font-size:12px;color:#4b5563;line-height:20px}.vuln-meta-grid[_ngcontent-%COMP%]{display:flex;gap:24px;flex-wrap:wrap}.vuln-meta-col[_ngcontent-%COMP%]{flex:1 1 220px;display:flex;flex-direction:column;gap:6px}.vuln-meta[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;line-height:16px;display:flex;gap:4px;flex-wrap:wrap}.vuln-meta[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{font-weight:500}.vuln-meta[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{color:#374151;font-weight:500}.baseline-card[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #FECACA;background:#fef2f2;padding:18px;display:flex;flex-direction:column}.baseline-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.baseline-title[_ngcontent-%COMP%]{font-weight:600;color:#7f1d1d}.baseline-pill[_ngcontent-%COMP%]{background:#dc2626;color:#fff;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:500}.baseline-list[_ngcontent-%COMP%]{padding-left:16px;display:flex;flex-direction:column;gap:8px;font-size:13px;color:#374151}.baseline-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;gap:4px}.text-critical[_ngcontent-%COMP%]{color:#dc2626;font-weight:600}.text-warning[_ngcontent-%COMP%]{color:#ea580c;font-weight:600}.text-amber[_ngcontent-%COMP%]{color:#ca8a04;font-weight:600}.text-info[_ngcontent-%COMP%]{color:#2563eb;font-weight:600}.text-success[_ngcontent-%COMP%]{color:#16a34a;font-weight:600}.dependencies-card[_ngcontent-%COMP%]{gap:24px}.dependency-top[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.dependency-core[_ngcontent-%COMP%]{border:1px solid #EF4444;border-radius:16px;padding:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;background:#fff}.dependency-core[_ngcontent-%COMP%]   .core-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:10px;background:#fee2e2;color:#dc2626;display:inline-flex;align-items:center;justify-content:center;font-size:18px}.dependency-core[_ngcontent-%COMP%]   .core-id[_ngcontent-%COMP%]{font-weight:600;color:#111827}.dependency-core[_ngcontent-%COMP%]   .core-desc[_ngcontent-%COMP%]{font-size:13px;color:#6b7280}.dependency-summary[_ngcontent-%COMP%]{border-radius:18px;background:#fef2f2;padding:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center}.summary-value[_ngcontent-%COMP%]{font-size:28px;font-weight:700;color:#dc2626}.summary-label[_ngcontent-%COMP%]{font-weight:600;color:#111827}.dependency-grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:20px}.dependency-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.dependency-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:12px;background:#fef2f2;color:#111827;font-size:14px}.dependency-count[_ngcontent-%COMP%]{font-weight:600;color:#dc2626}.infra-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.infra-card[_ngcontent-%COMP%]{border-radius:16px;padding:16px;text-align:center;display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;font-size:13px;background:#fef2f2;color:#dc2626}.infra-card[_ngcontent-%COMP%]:nth-child(6n+1){background:#fef2f2;color:#dc2626}.infra-card[_ngcontent-%COMP%]:nth-child(6n+2){background:#eff6ff;color:#2563eb}.infra-card[_ngcontent-%COMP%]:nth-child(6n+3){background:#ecfdf3;color:#16a34a}.infra-card[_ngcontent-%COMP%]:nth-child(6n+4){background:#fefce8;color:#ca8a04}.infra-card[_ngcontent-%COMP%]:nth-child(6n+5){background:#faf5ff;color:#9333ea}.infra-card[_ngcontent-%COMP%]:nth-child(6n+6){background:#fff7ed;color:#ea580c}.infra-icon[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:18px;background:#fee2e2;color:#dc2626}.infra-card[_ngcontent-%COMP%]:nth-child(6n+1)   .infra-icon[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.infra-card[_ngcontent-%COMP%]:nth-child(6n+2)   .infra-icon[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.infra-card[_ngcontent-%COMP%]:nth-child(6n+3)   .infra-icon[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.infra-card[_ngcontent-%COMP%]:nth-child(6n+4)   .infra-icon[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.infra-card[_ngcontent-%COMP%]:nth-child(6n+5)   .infra-icon[_ngcontent-%COMP%]{background:#f3e8ff;color:#9333ea}.infra-card[_ngcontent-%COMP%]:nth-child(6n+6)   .infra-icon[_ngcontent-%COMP%]{background:#ffedd5;color:#ea580c}.infra-title[_ngcontent-%COMP%]{font-weight:600;color:#111827}.infra-sub[_ngcontent-%COMP%]{color:#6b7280}.cascade-risk[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #FECACA;background:#fef2f2;padding:16px;display:flex;flex-direction:column;gap:10px}.cascade-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.cascade-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:8px;background:#fee2e2;color:#dc2626;
8display:inline-flex;align-items:center;justify-content:center;font-size:16px}.cascade-title[_ngcontent-%COMP%]{font-weight:600;color:#7f1d1d}.cascade-text[_ngcontent-%COMP%]{font-size:14px;color:#374151}.cascade-risk[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:18px;color:#dc2626;display:flex;flex-direction:column;gap:6px;font-size:14px}@media(max-width:1024px){.dependency-top[_ngcontent-%COMP%], .dependency-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.step[_ngcontent-%COMP%]{display:flex;gap:15px;padding:12px 0;position:relative}.step[_ngcontent-%COMP%]:before{content:"";position:absolute;left:13px;top:52px;bottom:-20px;width:2px;background:#e5e7eb}.step[_ngcontent-%COMP%]:nth-of-type(n+6):before{display:none}.step-index[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;margin-top:2px;background:#e5e7eb;color:#111827;flex:0 0 auto}.step-blue[_ngcontent-%COMP%]   .step-index[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.step-yellow[_ngcontent-%COMP%]   .step-index[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.step-orange[_ngcontent-%COMP%]   .step-index[_ngcontent-%COMP%]{background:#ffedd5;color:#ea580c}.step-green[_ngcontent-%COMP%]   .step-index[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.step-purple[_ngcontent-%COMP%]   .step-index[_ngcontent-%COMP%]{background:#f3e8ff;color:#9333ea}.step-body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px}.step-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px}.step-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;color:#111827}.phase[_ngcontent-%COMP%]{font-size:12px;padding:4px 8px;border-radius:999px}.step-blue[_ngcontent-%COMP%]   .phase[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af}.step-yellow[_ngcontent-%COMP%]   .phase[_ngcontent-%COMP%]{background:#fef9c3;color:#854d0e}.step-orange[_ngcontent-%COMP%]   .phase[_ngcontent-%COMP%]{background:#ffedd5;color:#9a3412}.step-green[_ngcontent-%COMP%]   .phase[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.step-purple[_ngcontent-%COMP%]   .phase[_ngcontent-%COMP%]{background:#f3e8ff;color:#6b21a8}.step-desc[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:20px}.step-meta[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;font-size:12px;font-weight:500;color:#6b7280}.step-meta[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:nowrap}.step-detail.detail-danger[_ngcontent-%COMP%]{color:#dc2626}.step-detail.detail-info[_ngcontent-%COMP%]{color:#2563eb}.step-detail.detail-success[_ngcontent-%COMP%]{color:#16a34a}.step-risk[_ngcontent-%COMP%]{justify-self:end;font-weight:600}.step-risk.risk-low[_ngcontent-%COMP%], .step-risk.risk-minimal[_ngcontent-%COMP%]{color:#16a34a}
8.step-risk.risk-medium[_ngcontent-%COMP%]{color:#ca8a04}.step-risk.risk-high[_ngcontent-%COMP%]{color:#dc2626}.alert[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #FECACA;background:#fef2f2;padding:15px;font-size:14px;display:flex;flex-direction:column;gap:10px}.alert-title[_ngcontent-%COMP%]{font-weight:600;color:#7f1d1d}.alert[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:16px}.alert[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{line-height:20px;color:#374151}.history-item[_ngcontent-%COMP%]{padding:14px;border-radius:16px;display:flex;justify-content:space-between;align-items:center;font-size:14px}.history-left[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.history-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.history-title[_ngcontent-%COMP%]{font-weight:600;color:#111827}.history-status[_ngcontent-%COMP%]{font-weight:600;font-size:12px}.history-note[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.history-success[_ngcontent-%COMP%]{background:#f0fdf4;color:#16a34a}.history-success[_ngcontent-%COMP%]   .history-icon[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.history-warning[_ngcontent-%COMP%]{background:#fefce8;color:#ca8a04}.history-warning[_ngcontent-%COMP%]   .history-icon[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.history-critical[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.history-critical[_ngcontent-%COMP%]   .history-icon[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.risk-banner[_ngcontent-%COMP%]{display:flex;gap:10px;padding:15px;border-radius:16px;background:#fef2f2}.risk-badge[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:8px;background:#fee2e2;color:#dc2626;display:flex;align-items:center;justify-content:center;font-size:16px;flex:0 0 auto}.risk-banner-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.risk-banner-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;line-height:20px;color:#7f1d1d}.risk-text[_ngcontent-%COMP%]{font-size:12px;color:#4b5563;line-height:16px}.risk-highlight[_ngcontent-%COMP%]{font-size:12px;color:#dc2626;font-weight:500;line-height:16px}.risk-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.risk-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:8px;font-size:14px;color:#4b5563}.risk-value[_ngcontent-%COMP%]{font-weight:500}.critical-text[_ngcontent-%COMP%]{color:#dc2626}.warning-text[_ngcontent-%COMP%]{color:#ca8a04}.compliance-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}@media(max-width:1200px){.content-row[_ngcontent-%COMP%]{flex-direction:column}.top-right[_ngcontent-%COMP%]{flex:1 1 auto;max-width:none}}[_nghost-%COMP%]     .history-chart-area{position:relative;height:220px}[_nghost-%COMP%]     .history-chart-area svg{width:100%;height:100%}[_nghost-%COMP%]     .history-gridlines line{stroke:#edf2fb}[_nghost-%COMP%]     .history-axis text{fill:#cbd5e1;font-size:10px}[_nghost-%COMP%]     .history-x-axis text{fill:#94a3b8;font-size:10px}[_nghost-%COMP%]     .history-axis-line{stroke:#e5e7eb}[_nghost-%COMP%]     .history-area{fill:#60a5fa1a}[_nghost-%COMP%]     .history-line{fill:none;stroke:#5bb4f0;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}[_nghost-%COMP%]     .history-dot{fill:#5bb4f0;stroke:#fff;stroke-width:2}[_nghost-%COMP%]     .history-axis-title{fill:#cbd5e1;font-size:11px;font-weight:500}[_nghost-%COMP%]     .history-chart-area .history-tooltip{position:absolute;background:#0f172a;color:#fff;padding:6px 10px;border-radius:8px;font-size:11px;line-height:1.2;transform:translate(-50%,-120%);z-index:2;white-space:nowrap;pointer-events:none;box-shadow:0 6px 16px #0f172a33}[_nghost-%COMP%]     .history-chart-area .history-tooltip:after{content:"";position:absolute;left:50%;bottom:-4px;width:8px;height:8px;background:#0f172a;transform:translate(-50%) rotate(45deg)}[_nghost-%COMP%]     .history-chart-area .history-tooltip .tooltip-title{font-weight:600}[_nghost-%COMP%]     .history-chart-area .history-tooltip .tooltip-value{color:#93c5fd}.performance-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.performance-metrics[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;text-align:center}.metric-pill[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.metric-pill-value[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:currentColor}.metric-pill-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.metric-pill-label[_ngcontent-%COMP%]{font-size:14px;color:#111827;font-weight:600}.metric-pill-sub[_ngcontent-%COMP%]{font-size:12px;color:currentColor}.performance-legend[_ngcontent-%COMP%]{display:flex;gap:20px;font-size:14px;color:#6b7280;align-items:center;justify-content:center}.legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.legend-item[_ngcontent-%COMP%]:before{content:"";width:8px;height:8px;border-radius:50%;display:inline-block}.legend-item.cpu[_ngcontent-%COMP%]:before{background:#fb923c}.legend-item.memory[_ngcontent-%COMP%]:before{background:#60a5fa}.legend-item.network[_ngcontent-%COMP%]:before{background:#fbbf24}.legend-item.disk[_ngcontent-%COMP%]:before{background:#34d399}.performance-chart-area[_ngcontent-%COMP%]{position:relative;height:235px}[_nghost-%COMP%]     .performance-chart-area svg{width:100%;height:100%}[_nghost-%COMP%]     .performance-gridlines line{stroke:#edf2fb}[_nghost-%COMP%]     .performance-axis text{fill:#9ca3af;font-size:10px}[_nghost-%COMP%]     .performance-x-axis text{fill:#9ca3af;font-size:10px}[_nghost-%COMP%]     .performance-axis-line{stroke:#e5e7eb}[_nghost-%COMP%]     .performance-axis-title{fill:#cbd5e1;font-size:11px;font-weight:500}[_nghost-%COMP%]     .performance-line{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}[_nghost-%COMP%]     .performance-line.series-cpu{stroke:#fb923c}[_nghost-%COMP%]     .performance-line.series-memory{stroke:#60a5fa}[_nghost-%COMP%]     .performance-line.series-network{stroke:#fbbf24}[_nghost-%COMP%]     .performance-line.series-disk{stroke:#34d399}[_nghost-%COMP%]     .performance-dot{fill:#fff;stroke-width:2}[_nghost-%COMP%]     .performance-dot.series-cpu{stroke:#fb923c}[_nghost-%COMP%]     .performance-dot.series-memory{stroke:#60a5fa}[_nghost-%COMP%]     .performance-dot.series-network{stroke:#fbbf24}[_nghost-%COMP%]     .performance-dot.series-disk{stroke:#34d399}[_nghost-%COMP%]     .performance-tooltip{position:absolute;background:#111827;color:#fff;padding:6px 10px;border-radius:8px;font-size:11px;line-height:1.2;transform:translate(-50%,-120%);z-index:2;white-space:nowrap;pointer-events:none;box-shadow:0 6px 16px #0f172a33}[_nghost-%COMP%]     .performance-tooltip:after{content:"";position:absolute;
8left:50%;bottom:-4px;width:8px;height:8px;background:#111827;transform:translate(-50%) rotate(45deg)}[_nghost-%COMP%]     .performance-tooltip .tooltip-title{font-weight:600}[_nghost-%COMP%]     .performance-tooltip .tooltip-value{color:#93c5fd}.top-right[_ngcontent-%COMP%]{display:flex}.top-right[_ngcontent-%COMP%]   .compliance-card[_ngcontent-%COMP%]{flex:1 1 auto}.metric-pill-ring[_ngcontent-%COMP%]{width:55px;height:55px;margin:0 auto;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative}.metric-pill-ring[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px dashed currentColor;opacity:.6}.metric-red[_ngcontent-%COMP%]{color:#dc2626}.metric-green[_ngcontent-%COMP%]{color:#16a34a}.metric-amber[_ngcontent-%COMP%]{color:#ca8a04}.workflow-blueprint[_ngcontent-%COMP%]{background:#fefce8;border:1px solid #FEF08A;border-radius:16px;padding:15px;display:flex;flex-direction:column;gap:8px}.workflow-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#713f12}.workflow-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;line-height:16px}.workflow-blueprint[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:16px;font-size:11px;color:#374151;display:flex;flex-direction:column;gap:6px}.ai-box[_ngcontent-%COMP%]{background:#eff6ff;border:1px solid #BFDBFE;border-radius:16px;padding:15px;display:flex;gap:10px;align-items:flex-start}.ai-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:10px;background:#dbeafe;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:14px;flex:0 0 auto}.ai-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.ai-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#1e3a8a}.ai-text[_ngcontent-%COMP%]{font-size:13px;color:#374151;line-height:20px}.dependency-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.list-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;color:#111827}.bottom-summary[_ngcontent-%COMP%]{flex-wrap:wrap}.summary-card[_ngcontent-%COMP%]{flex:1 1 300px}.group-panel[_ngcontent-%COMP%]{background:#eff6ff;border:1px solid #BFDBFE;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px}.group-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:13px}.group-label[_ngcontent-%COMP%]{color:#374151}.group-pill[_ngcontent-%COMP%]{background:#2563eb;color:#fff;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:600}.group-value[_ngcontent-%COMP%]{font-weight:600}.group-members[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.group-subtitle[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827}.member-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:11px;padding:8px;border-radius:8px;background:#f9fafb}.member-status[_ngcontent-%COMP%]{font-weight:600}.status-current[_ngcontent-%COMP%]{color:#2563eb}.status-compliant[_ngcontent-%COMP%]{color:#16a34a}.status-pending[_ngcontent-%COMP%]{color:#f59e0b}.status-critical[_ngcontent-%COMP%]{color:#dc2626}.link-button[_ngcontent-%COMP%]{align-self:center;border:none;background:transparent;color:#2563eb;font-size:12px;cursor:pointer}.requirements-panel[_ngcontent-%COMP%]{background:#eff6ff;border:1px solid #BFDBFE;border-radius:16px;padding:15px;display:flex;flex-direction:column;gap:7px;font-size:13px;color:#374151}.requirements-title[_ngcontent-%COMP%]{font-weight:600;color:#1e3a8a}.requirements-link[_ngcontent-%COMP%]{font-size:12px;color:#2563eb}.requirements-panel[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:16px;display:flex;flex-direction:column;gap:6px}.requirements-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stat-card[_ngcontent-%COMP%]{border-radius:16px;padding:20px;text-align:center;display:flex;flex-direction:column;gap:4px}.stat-number[_ngcontent-%COMP%]{font-size:20px;font-weight:700}.stat-label[_ngcontent-%COMP%]{font-weight:600;font-size:12px;color:#111827}.stat-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280}.stat-critical[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626;border:1px solid #FECACA}.stat-warning[_ngcontent-%COMP%]{background:#fff7ed;color:#ea580c;border:1px solid #FED7AA}.requirements-timeline[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.timeline-title[_ngcontent-%COMP%]{font-weight:600;font-size:13px}.timeline-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-radius:8px;font-size:11px}.timeline-label[_ngcontent-%COMP%]{color:#111827}.timeline-critical[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.timeline-warning[_ngcontent-%COMP%]{background:#fff7ed;color:#ea580c}.timeline-success[_ngcontent-%COMP%]{background:#ecfdf3;color:#16a34a}.history-summary[_ngcontent-%COMP%]{border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:6px;font-size:12px}.history-summary-title[_ngcontent-%COMP%]{font-weight:600;color:#111827}.history-summary-row[_ngcontent-%COMP%]{color:#374151}.history-summary-status[_ngcontent-%COMP%]{font-weight:600}.history-summary-success[_ngcontent-%COMP%]{background:#f0fdf4;color:#16a34a;border:1px solid #A5FFC0}.history-summary-warning[_ngcontent-%COMP%]{background:#fefce8;color:#ca8a04;border:1px solid rgba(202,138,4,.5294117647)}']})}}return t})();var Wo=So(xa());var MC=["trendChart"],SC=(t,r)=>({untagged:t,"missing-value":r});function OC(t,r){t&1&&(o(0,"div",71),h(1,"mat-progress-spinner",72),a())}function PC(t,r){if(t&1&&(o(0,"div",34),l(1),F(2,"number"),a()),t&2){let e=u();c(),x(" $",ie(2,1,e.totalCost,"1.2-2")," ")}}function EC(t,r){t&1&&(o(0,"div",71),h(1,"mat-progress-spinner",72),a())}function wC(t,r){if(t&1&&(o(0,"div",34),l(1),F(2,"number"),a()),t&2){let e=u();c(),x(" $",ie(2,1,e.averageDailyCost,"1.2-2")," ")}}function IC(t,r){t&1&&(o(0,"div",71),h(1,"mat-progress-spinner",72),a())}function TC(t,r){if(t&1&&(o(0,"div",34),l(1),a()),t&2){let e=u();c(),x(" ",e.costVariance==="N/A"?"N/A":"$"+e.costVariance," ")}}function AC(t,r){t&1&&(o(0,"div",73),h(1,"mat-progress-spinner",74),a())}function DC(t,r){if(t&1&&(o(0,"div",75),l(1),a()),t&2){let e=u();c(),C(e.trendError)}}function RC(t,r){t&1&&(o(0,"div",73),h(1,"mat-progress-spinner",74),a())}function kC(t,r){if(t&1&&(o(0,"div",75),l(1),a()),t&2){let e=u();c(),x("",e.costAllocationError," ")}}function NC(t,r){t&1&&h(0,"iconify-icon",91)}function FC(t,r){t&1&&h(0,"iconify-icon",92)}function zC(t,r){t&1&&(o(0,"span"),l(1,":"),a())}function LC(t,r){if(t&1&&(o(0,"div",78)(1,"div",79)(2,"div",80)(3,"div",81),g(4,NC,1,0,"iconify-icon",82)(5,FC,1,0,"iconify-icon",83),a(),o(6,"div",84)(7,"div",85),l(8),g(9,zC,2,0,"span",86),l(10),a(),o(11,"div",87),l(12),a()()(),o(13,"div",88)(14,"div",89)(15,"span",90),l(16),a()()()()()),t&2){let e=r.$implicit;c(),p("ngClass",Ei(8,SC,e.KEY=="Untagged Resources",e.KEY!=="Untagged Resources"&&!e.VALUE)),c(3),p("ngIf",e.KEY=="Untagged Resources"),c(),p("ngIf",e.KEY!=="Untagged Resources"),c(3),x(" ",e.KEY," "),c(),p("ngIf",e.KEY!=="Untagged Resources"&&e.VALUE),c(),x(" ",e.VALUE," "),c(2),x(" ",e.COUNT," resources tagged "),c(4),x("$",e.COST.toFixed(2))}}function VC(t,r){if(t&1&&(o(0,"div",76),g(1,LC,17,11,"div",77),a()),t&2){let e=u();c(),p("ngForOf",e.costAllocation)}}var up=(()=>{class t{constructor(e,n,i){this.fb=e,this.dashboardService=n,this.notify=i,this.maxDate=new Date,this.totalCostLoading=!1,this.averageDailyLoading=!1,this.costVarianceLoading=!1,this.anomaliesLoading=!1,this.totalCost=0,this.averageDailyCost=0,this.costVariance="",this.noOfDays=0,this.errorMessage="",this.granularity="daily",this.chartCurrency="USD",this.trendLoading=!1,this.trendError="",this.costAllocationLoading=!1,this.costAllocationError="",this.anomalyText="No anomalies detected",this.series=[],this.hasCustomDailyRange=!1}ngOnInit(){this.accountID=window.localStorage.getItem("currentAccountID");let e=new Date,n=new Date;n.setDate(e.getDate()-29),this.dateRange=this.fb.group({start:[n,U.required],end:[e,U.required]}),this.controlDateRange=this.fb.group({start:[null,U.required],end:[null,U.required]}),this.applyDefaultControlRange(this.granularity),this.onDateRangeChange(),this.getCostAllocation()}ngAfterViewInit(){setTimeout(()=>{this.renderTrendChart(),this.fetchInteractiveCostAnalysis()},0),"ResizeObserver"in window&&(this.resizeObserver=new ResizeObserver(()=>this.renderTrendChart()),this.trendChartRef?.nativeElement&&this.resizeObserver.observe(this.trendChartRef.nativeElement))}formatDate(e){return(0,Wo.default)(e).format("MMM D, YYYY")}onDateRangeChange(){let{start:e,end:n}=this.dateRange.value;e&&n&&(this.startDate=(0,Wo.default)(e).format("YYYY-MM-DD"),this.endDate=(0,Wo.default)(n).format("YYYY-MM-DD"),this.totalCostLoading=!0,this.averageDailyLoading=!0,this.getCostData(this.startDate,this.endDate),this.getCostVarianceData(this.startDate,this.endDate),this.granularity==="daily"&&!this.hasCustomDailyRange&&(this.applyDefaultControlRange("daily"),this.trendChartRef&&this.fetchInteractiveCostAnalysis()))}onChartControlSubmit(){this.applyChartDateRange(!1),this.fetchInteractiveCostAnalysis()}onGranularityChange(e){this.granularity=e,this.applyDefaultControlRange(e),this.fetchInteractiveCostAnalysis()}getCostData(e,n){this.accountID&&(this.totalCostLoading=!0,this.averageDailyLoading=!0,this.dashboardService.getTotalCost(this.accountID,e,n).subscribe({next:i=>{i?.object&&(this.totalCost=i.object.TOTAL_COST||0,this.averageDailyCost=i.object.AVERAGE,this.noOfDays=i.object.NO_OF_DAYS||0)},error:i=>{i.error.status==401&&this.notify.showNotification(i.error.message,"top",E[i.error.status]?E[i.error.status]:"error",i.error.status)},complete:()=>{this.totalCostLoading=!1,this.averageDailyLoading=!1}}))}getCostVarianceData(e,n){this.accountID&&(this.costVarianceLoading=!0,this.dashboardService.getCostVariance(this.accountID,e,n).subscribe({next:i=>{i?.object&&(this.costVariance=i.object.COST_VARIANCE||0)},error:i=>{i.error.status==401&&this.notify.showNotification(i.error.message,"top",E[i.error.status]?E[i.error.status]:"error",i.error.status)},complete:()=>{this.costVarianceLoading=!1}}))}
8applyChartDateRange(e=!0){if(this.controlDateRange.invalid)return;let{start:n,end:i}=this.controlDateRange.value;!n||!i||(n=new Date(n),i=new Date(i),n.getTime()>i.getTime()&&([n,i]=[i,n]),this.granularity==="weekly"?(n=this.startOfWeek(n),i=this.endOfWeek(i)):this.granularity==="monthly"?(n=this.startOfMonth(n),i=this.endOfMonth(i)):this.hasCustomDailyRange=!0,this.assignChartRange(n,i),e&&this.fetchInteractiveCostAnalysis())}assignChartRange(e,n){this.controlDateRange&&(this.controlDateRange.patchValue({start:e,end:n},{emitEvent:!1}),this.chartFromDate=this.toYMD(e),this.chartToDate=this.toYMD(n))}applyDefaultControlRange(e){let{start:n,end:i}=this.getDefaultControlRange(e);this.assignChartRange(n,i),this.hasCustomDailyRange=!1}getDefaultControlRange(e){let n=new Date;if(n.setHours(0,0,0,0),e==="daily"){let m=new Date(n);m.setDate(m.getDate()-1);let f=new Date(m);return f.setDate(f.getDate()-5),{start:f,end:m}}if(e==="weekly"){let m=new Date(n);m.setDate(m.getDate()-7);let f=this.endOfWeek(m),_=this.startOfWeek(m);return _.setDate(_.getDate()-35),{start:_,end:f}}let i=new Date(n.getFullYear(),n.getMonth(),0);i.setHours(0,0,0,0);let s=this.endOfMonth(i),d=this.startOfMonth(i);return d.setMonth(d.getMonth()-5),{start:d,end:s}}toYMD(e){return(0,Wo.default)(e).format("YYYY-MM-DD")}startOfWeek(e){let n=new Date(e),i=n.getDay();return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}endOfWeek(e){let n=this.startOfWeek(e),i=new Date(n);return i.setDate(n.getDate()+6),i.setHours(23,59,59,999),i}startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}formatPeriodLabel(e){let n=/^\d{4}-\d{2}-\d{2}$/,i=/^\d{4}-\d{2}$/,s=/(\d{4}-\d{2}-\d{2})\s*-\s*(\d{4}-\d{2}-\d{2})/;if(n.test(e))return pi("%b %-d")(new Date(e));if(i.test(e)){let[m,f]=e.split("-").map(Number);return pi("%b")(new Date(m,f-1,1))}let d=e.match(s);if(d){let m=new Date(d[1]),f=new Date(d[2]),_=m.getMonth()===f.getMonth()&&m.getFullYear()===f.getFullYear(),b=pi("%-d"),M=pi("%b %-d");return _?`${pi("%b")(m)} ${b(m)}-${b(f)}`:`${M(m)}-${M(f)}`}return e}periodAnchorDate(e,n){let i=/^\d{4}-\d{2}-\d{2}$/,s=/^\d{4}-\d{2}$/,d=/(\d{4}-\d{2}-\d{2})\s*-\s*(\d{4}-\d{2}-\d{2})/;if(i.test(e))return new Date(`${e}T00:00:00`);if(s.test(e)){let[f,_]=e.split("-").map(Number);return new Date(f,_-1,1)}let m=e.match(d);return m?new Date(`${m[1]}T00:00:00`):new Date(2e3,0,1+n)}normalizeInteractiveRows(e){return e.map((n,i)=>{let s=(n.PERIOD_LEVEL||"").trim();return{label:this.formatPeriodLabel(s),rawPeriod:s||`Period ${i+1}`,anchorDate:this.periodAnchorDate(s,i),value:+n.TOTAL_COST||0}}).sort((n,i)=>n.anchorDate.getTime()-i.anchorDate.getTime())}fetchInteractiveCostAnalysis(){!this.accountID||!this.chartFromDate||!this.chartToDate||(this.trendLoading=!0,this.trendError="",this.dashboardService.getInteractiveCostAnalysis(this.accountID,this.chartFromDate,this.chartToDate,this.granularity).subscribe({next:e=>{let n=Array.isArray(e?.object)?e.object:[];n.length?(this.chartCurrency=n[0]?.CURRENCY||"USD",this.series=this.normalizeInteractiveRows(n)):(this.series=[],this.trendError="No cost data for the selected filters."),this.renderTrendChart(),this.trendLoading=!1},error:e=>{this.series=[],this.trendLoading=!1,this.trendError="Unable to load chart data.",this.renderTrendChart(),e?.error?.status===401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}}))}renderTrendChart(){if(!this.trendChartRef)return;let e=this.trendChartRef.nativeElement;if(Sn(e).selectAll("*").remove(),!this.series.length)return;let n=400,i={top:40,right:40,bottom:60,left:80},s=7,d=70,m=Eo(this.series,Be=>Be.label.length*s)??d,f=Math.max(d,m+12),_=e.clientWidth||600,b=this.series.length>1?f*(this.series.length-1):f*2,M=Math.max(_-i.left-i.right,b),S=M+i.left+i.right,w=n-i.top-i.bottom,D=Fo().domain(this.series.map(Be=>Be.label)).range([0,M]),R=Eo(this.series,Be=>Be.value)||0,W=ki().domain([0,R<=0?10:R*1.15]).range([w,0]).nice(),H=Sn(e).append("svg").attr("width",S).attr("height",n),L=H.append("g").attr("transform",`translate(${i.left},${i.top})`),q=this.series,ne=L.append("g").attr("class","grid").call(Ii(W).ticks(7).tickSize(-M).tickFormat(()=>""));L.selectAll("line").style("stroke","#E5E7EB").attr("stroke-width",1).attr("stroke-opacity",.4).style("shape-rendering","crispEdges"),ne.select(".domain").remove();let _e=Io(D).tickSize(0).tickPadding(8),oe=Un(",.0f"),de=Ii(W).ticks(7).tickSize(0).tickPadding(12).tickFormat(Be=>oe(Be));
8L.append("g").attr("class","x-axis").attr("transform",`translate(0,${w})`).call(_e).selectAll("text").attr("fill","#9CA3AF").attr("font-size","12px"),L.append("g").attr("class","y-axis").call(de).selectAll("text").attr("fill","#9CA3AF").attr("font-size","12px"),L.selectAll(".y-axis .domain, .x-axis .domain").remove(),H.append("text").attr("x",0).attr("y",12).attr("fill","#9CA3AF").attr("font-size",12).attr("font-weight",500).text("Cost ($)");let dt=H.append("defs").append("linearGradient").attr("id","trendArea").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");dt.append("stop").attr("offset","0%").attr("stop-color","rgba(59,130,246,0.25)"),dt.append("stop").attr("offset","60%").attr("stop-color","rgba(59,130,246,0.08)"),dt.append("stop").attr("offset","100%").attr("stop-color","rgba(59,130,246,0.02)");let ct=rl().x(Be=>D(Be.label)??0).y0(w).y1(Be=>W(Be.value)).curve(Zr);L.append("path").datum(q).attr("fill","url(#trendArea)").attr("d",ct);let Ze=Ho().x(Be=>D(Be.label)??0).y(Be=>W(Be.value)).curve(Zr);L.append("path").datum(q).attr("fill","none").attr("stroke","#3B82F6").attr("stroke-width",2.5).attr("stroke-linecap","round").attr("d",Ze);let K=L.append("g").style("display","none");K.append("line").attr("class","hover-line").attr("y1",0).attr("y2",w),K.append("circle").attr("class","focus-dot").attr("r",5);let ee=Sn(e).append("div").attr("class","chart-tooltip").style("opacity",0).style("background-color","black").style("color","white").style("border","1px solid white").style("border-width","1px").style("border-radius","5px").style("padding","10px").style("position","absolute"),ge=Un(",.2f"),it=this.chartCurrency==="USD"?"$":`${this.chartCurrency} `,$t=q.map(Be=>D(Be.label)??0);L.append("rect").attr("class","chart-overlay").attr("width",M).attr("height",w).style("fill","none").style("pointer-events","all").on("mouseover",()=>{K.style("display",null),ee.style("opacity",1)}).on("mouseout",()=>{K.style("display","none"),ee.style("opacity",0)}).on("mousemove",Be=>{let[zt]=ka(Be,L.node()),Lt=0,Mt=Number.POSITIVE_INFINITY;$t.forEach((yi,Mi)=>{let Yn=Math.abs(zt-yi);Yn<Mt&&(Mt=Yn,Lt=Mi)});let Pn=q[Lt],xn=$t[Lt],Gn=W(Pn.value);K.select(".hover-line").attr("x1",xn).attr("x2",xn),K.select(".focus-dot").attr("cx",xn).attr("cy",Gn);let bi=i.left+xn,rn=i.top+Gn;ee.style("left",`${bi}px`).style("top",`${rn}px`).html(`<div>${Pn.rawPeriod}</div><div>${it}${ge(Pn.value)}</div>`)})}getCostAllocation(){this.accountID&&(this.costAllocationLoading=!0,this.costAllocationError="",this.dashboardService.getCostAllocationData(this.accountID).subscribe({next:e=>{this.costAllocationLoading=!1,e?.object&&e.object.length>0?(this.costAllocation=e.object,this.costAllocationError=""):(this.costAllocation=[],this.costAllocationError="No cost allocation data available.")},error:e=>{this.costAllocationLoading=!1,this.costAllocationError="Unable to load cost allocation data.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}}))}ngOnDestroy(){this.resizeObserver?.disconnect()}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cost-analysis"]],viewQuery:function(n,i){if(n&1&&bt(MC,5),n&2){let s;ht(s=_t())&&(i.trendChartRef=s.first)}},decls:126,vars:23,consts:[["picker",""],["controlRangePicker",""],["trendChart",""],[1,"dashboard-container"],[1,"acc-header"],[1,"header"],[1,"sub-content"],[1,"analysis-period"],[1,"days-container"],[1,"period-label"],[1,"days-label"],[1,"date-range-picker"],[1,"period-type"],[1,"date-picker-container"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[1,"update-button",3,"click","disabled"],[1,"card-container"],[1,"main-container"],[1,"right-top-section"],[1,"grid-container"],[1,"grid-item"],[1,"custom-card"],[1,"bill-header"],["src","../../../assets/previousMonth.png","alt","Previous Month"],["class","spinner-container",4,"ngIf"],["class","card-value",4,"ngIf"],["src","../../../assets/currentMonth.png","alt","Current Month"],["src","../../../assets/forecast.png","alt","Forecast"],["src","../../../assets/previous-current-month.png","alt","Previous to Current Month"],[1,"anomalies-content"],[1,"card-value"],[1,"cost-analysis-content"],[1,"controls-card"],[1,"controls-title"],[1,"controls-div"],[1,"controls-section"],[1,"control-group"],[1,"label"],[1,"granularity-group",3,"ngModelChange","change","ngModel"],["value","daily"],["value","weekly"],["value","monthly"],[1,"date-range-control
8s"],["matStartDate","","formControlName","start",3,"max"],["matEndDate","","formControlName","end",3,"max"],[3,"closed"],["mat-button","",1,"update-chart",3,"click"],["icon","ri:refresh-line"],[1,"chart-card"],[1,"chart-header"],[1,"chart-tabs"],["mat-button","",1,"tab","active"],[1,"chart-area"],[1,"chart-scroll"],[1,"chart-host"],["class","chart-loading",4,"ngIf"],["class","chart-empty",4,"ngIf"],[1,"cost-allocation"],["class","controls-content",4,"ngIf"],[1,"cost-anomaly"],[1,"controls-anomaly-content"],[1,"controls-anomaly"],[1,"tick-icon"],["icon","mdi:tick-circle-outline","width","24","height","24"],[1,"anomaly-content"],[1,"anomaly-text"],[1,"anomaly-sub-text"],[1,"spinner-container"],["diameter","20","mode","indeterminate","color","primary"],[1,"chart-loading"],["diameter","40","mode","indeterminate","color","primary"],[1,"chart-empty"],[1,"controls-content"],["class","allocation-wrapper",4,"ngFor","ngForOf"],[1,"allocation-wrapper"],[1,"allocation-card",3,"ngClass"],[1,"card-details"],[1,"allocation-icon"],["icon","mdi:question-mark-circle-outline","width","20","height","20",4,"ngIf"],["icon","codicon:tag","width","20","height","20",4,"ngIf"],[1,"allocation-right"],[1,"allocation-title"],[4,"ngIf"],[1,"allocation-subtitle"],[1,"allocation-details"],[1,"allocation-amount"],[1,"amount"],["icon","mdi:question-mark-circle-outline","width","20","height","20"],["icon","codicon:tag","width","20","height","20"]],template:function(n,i){if(n&1){let s=A();o(0,"div",3)(1,"div",4)(2,"div",5),l(3,"Cost Analysis"),a(),o(4,"div",6),l(5,"Detailed cost breakdown and analysis across services, regions, and time periods"),a()(),o(6,"div",7)(7,"div",8)(8,"div",9),l(9,"Analysis Period"),a(),o(10,"div",10),l(11),a()(),o(12,"div",11)(13,"div",12),l(14,"Primary Period"),a(),o(15,"div",13)(16,"div",14)(17,"mat-date-range-input",15),h(18,"input",16)(19,"input",17),a(),h(20,"mat-datepicker-toggle",18)(21,"mat-date-range-picker",null,0),a(),o(23,"button",19),v("click",function(){return i.onDateRangeChange()}),l(24," Update "),a()()()(),o(25,"div",20)(26,"div",21)(27,"div",22)(28,"div",23)(29,"div",24)(30,"mat-card",25)(31,"div",26)(32,"span"),l(33,"Total Cost"),a(),h(34,"img",27),a(),g(35,OC,2,0,"div",28)(36,PC,3,4,"div",29),a()(),o(37,"div",24)(38,"mat-card",25)(39,"div",26)(40,"span"),l(41,"Average Daily"),a(),h(42,"img",30),a(),g(43,EC,2,0,"div",28)(44,wC,3,4,"div",29),a()(),o(45,"div",24)(46,"mat-card",25)(47,"div",26)(48,"span"),l(49,"Cost Variance"),a(),h(50,"img",31),a(),g(51,IC,2,0,"div",28)(52,TC,2,1,"div",29),a()(),o(53,"div",24)(54,"mat-card",25)(55,"div",26)(56,"span"),l(57,"Anomalies"),a(),h(58,"img",32),a(),o(59,"div",33)(60,"div",34),l(61,"0"),a()()()()()()()(),o(62,"div",35)(63,"mat-card",36)(64,"div",37),l(65,"Chart Controls"),a(),o(66,"div",38)(67,"div",39)(68,"div",40)(69,"div",41),l(70,"Granularity"),a(),o(71,"mat-radio-group",42),se("ngModelChange",function(m){return O(s),le(i.granularity,m)||(i.granularity=m),P(m)}),v("change",function(m){return i.onGranularityChange(m.value)}),o(72,"mat-radio-button",43),l(73,"Daily"),a(),o(74,"mat-radio-button",44),l(75,"Weekly"),a(),o(76,"mat-radio-button",45),l(77,"Monthly"),a()()(),o(78,"div",40)(79,"div",41),l(80,"Date Range"),a(),o(81,"div",46)(82,"div",14)(83,"mat-date-range-input",15),h(84,"input",47)(85,"input",48),a(),h(86,"mat-datepicker-toggle",18),o(87,"mat-date-range-picker",49,1),v("closed",function(){return i.applyChartDateRange()}),a()()()()(),o(89,"div")(90,"button",50),v("click",function(){return i.onChartControlSubmit()}),h(91,"iconify-icon",51),l(92," Update Chart "),a()()()(),o(93,"mat-card",52)(94,"div",53)(95,"div",37),l(96,"Interactive Cost Analysis"),a(),o(97,"div",54)(98,"button",55),l(99,"Trend Analysis"),a()()(),o(100,"div",56)(101,"div",57),h(102,"div",58,2),a(),g(104,AC,2,0,"div",59)(105,DC,2,1,"div",60),a()()(),o(106,"div",35)(107,"mat-card",61)(108,"div",37),l(109,"Cost Allocation by Tags"),a(),g(110,RC,2,0,"div",59)(111,kC,2,1,"div",60)(112,VC,2,1,"div",62),a(),o(113,"mat-card",63)(114,"div",37),l(115,"Cost Anomaly Detection"),a(),o(116,"div",64)(117,"div",65)(118,"div",66),h(119,"iconify-icon",67),a(),o(120,"div",68),l(121),a(),o(122,"div",69),l(123,"Your cost patterns are within normal thresholds for the selected period. "),a(),o(124,"div",70),l(125,"Anomaly detection monitors your spending patterns and alerts you to unusual cost spikes or drops that deviate significantly from historical baselines."),a()()()()()()}if(n&2){let s=Ce(22),d=Ce(88);c(11),x("",i.noOfDays," days"),c(6),p("rangePicker",s)("formGroup",i.dateRange),c(3),p("for",s),c(3),p("disabled",!i.dateRange.valid),c(12),p("ngIf",i.totalCostLoading),c(),p("ngIf",!i.totalCostLoading),c(7),p("ngIf",i.averageDailyLoading),c(),p("ngIf",!i.averageDailyLoading),c(7),p("ngIf",i.costVarianceLoading),c(),p("ngIf",!i.costVarianceLoading),c(19),ae("ngModel",i.granularity),c(12),p("rangePicker",d)("formGroup",i.controlDateRange),c(),p("max",i.maxDate),c(),p("max",i.maxDate),c(),p("for",d),c(18),p("ngIf",i.trendLoading),c(),p("ngIf",!i.trendLoading&&i.trendError),c(5),p("ngIf",i.costAllocationLoading),c(),p("ngIf",!i.costAllocationLoading&&i.costAllocationError),c(),p("ngIf",!i.costAllocationLoading&&!i.costAllocationError),c(9),C(i.anomalyText)}},dependencies:[N,xe,$,B,z,Pt,Nt,ut,Jt,ve,me,$e,Gt,Ge,We,mt,Zt,Xt,en,tn,nn,gs,fs,Yt,Cr,un,Wt],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;position:relative;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.sub-content[_ngcontent-%COMP%]{font-size:16px!important;line-height:24px;font-weight:400;color:#4b5563}.analysis-period[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:20px 0;padding:16px;background:#fff;border-radius:14px;border:1px solid #E6EDF6;box-shadow:0 10px 24px #0f172a0f}.period-label[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.days-label[_ngcontent-%COMP%]{font-size:14px;line-height:28px;color:#374151;font-weight:500}.days-container[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.date-range-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.date-range-picker[_ngcontent-%COMP%]   .period-type[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.date-range-picker[_ngcontent-%COMP%]   .update-button[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.date-range-picker[_ngcontent-%COMP%]   .update-button[_ngcontent-%COMP%]:hover{background:#2563eb}.date-range-picker[_ngcontent-%COMP%]   .update-button[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.date-picker-container[_ngcontent-%COMP%]{display:flex;gap:15px;flex-wrap:wrap}.date-picker-field[_ngcontent-%COMP%]{border-radius:12px;width:min(100%,270px);height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;font-size:12px}.right-top-section[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;width:100%;justify-content:center;flex-direction:column;min-height:150px;min-width:300px}.grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;width:100%}.grid-item[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.card-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;width:100%}.custom-card[_ngcontent-%COMP%]{width:100%;min-width:0;min-height:108px;height:auto;display:flex;flex-direction:column;justify-content:center;font-size:13px;font-weight:300;box-shadow:0 10px 24px #0f172a14;margin:0;border-radius:14px;border:1px solid #E6EDF6;padding:16px;box-sizing:border-box}.bill-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:500}.bill-header[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:auto;width:30px}.card-value[_ngcontent-%COMP%]{font-size:17px;font-weight:600;margin-left:5px;padding:5px 0;color:#000}.main-container[_ngcontent-%COMP%]{display:flex;width:100%;max-width:100%;margin:0 auto;padding:0;flex-wrap:wrap}.positive[_ngcontent-%COMP%]{color:#00ac46}.negative[_ngcontent-%COMP%]{color:#dc0000}.cost-analysis-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(240px,.34fr) minmax(0,1fr);gap:25px;padding-bottom:20px;margin:20px 0}.controls-card[_ngcontent-%COMP%]{min-width:0;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px}.controls-div[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;margin-left:4px;gap:10px}.controls-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.controls-title[_ngcontent-%COMP%]{font-size:18px!important;font-weight:600;margin:0;color:#111827}.control-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.label[_ngcontent-%COMP%]{font-weight:600;font-size:15px;color:#374151}
8.date-range-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.granularity-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;font-size:12px;margin-left:8px}[_nghost-%COMP%]     .granularity-group .mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#57b5e7}[_nghost-%COMP%]     .granularity-group .mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__inner-circle{background-color:#57b5e7}[_nghost-%COMP%]     .granularity-group .mat-mdc-radio-button .mdc-radio__ripple:before, [_nghost-%COMP%]     .granularity-group .mat-mdc-radio-button .mdc-radio__ripple:after{background-color:#57b5e74d}.update-chart[_ngcontent-%COMP%]{width:100%;border-radius:8px;font-size:16px;display:flex;align-items:center;justify-content:center;gap:10px;background-color:#57b5e7;color:#fff}.chart-card[_ngcontent-%COMP%]{min-width:0;border-radius:12px;padding:30px;box-shadow:0 1px 3px #0000001a;border:none;background:#fff;display:flex;flex-direction:column;gap:25px}.chart-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.chart-tabs[_ngcontent-%COMP%]{display:flex;gap:10px}.chart-tabs[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{height:32px;border-radius:8px;padding:0 16px;border:none;background:#f3f4f6;color:#6b7280;font-weight:500;font-size:14px;cursor:pointer;transition:all .2s ease;line-height:5px}.chart-tabs[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]:hover{background:#e5e7eb}.chart-tabs[_ngcontent-%COMP%]   .tab.active[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.chart-area[_ngcontent-%COMP%]{position:relative;margin-top:0;padding-left:0;min-height:400px}.chart-scroll[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden;padding-bottom:8px}.y-label[_ngcontent-%COMP%]{position:absolute;left:0;top:-20px;color:#9ca3af;font-size:13px;font-weight:500}.chart-host[_ngcontent-%COMP%]{height:400px;min-height:400px;background:#fff;position:relative;width:max-content;min-width:100%}.chart-loading[_ngcontent-%COMP%], .chart-empty[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center}.chart-loading[_ngcontent-%COMP%]{pointer-events:none}.chart-empty[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;font-weight:500}.chart-tooltip[_ngcontent-%COMP%]{position:absolute;pointer-events:none;background:#000c;color:#fff;font-weight:600;border-radius:6px;padding:8px 12px;font-size:11px;line-height:16px;transform:translate(-50%,-110%);box-shadow:0 4px 6px #0000001a}.hover-line[_ngcontent-%COMP%]{stroke:#d1d5db;stroke-width:1px;stroke-dasharray:4 4}.focus-dot[_ngcontent-%COMP%]{fill:#3b82f6;stroke:#fff;stroke-width:2px}.chart-overlay[_ngcontent-%COMP%]{cursor:crosshair}.cost-allocation[_ngcontent-%COMP%], .cost-anomaly[_ngcontent-%COMP%]{min-width:0px;min-height:420px;height:auto;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px;overflow:hidden}.controls-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;gap:10px;overflow-y:auto;scrollbar-width:none}.allocation-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.allocation-card[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-radius:18px;border:1px solid #BFDBFE;background:#eff6ff;transition:transform .15s ease,box-shadow .15s ease;gap:16px}.allocation-card[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#dbeafe}.allocation-card[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#2563eb}.allocation-card.untagged[_ngcontent-%COMP%]{background:#f9fafb;border:1px solid #E5E7EB}.allocation-card.untagged[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]{background:#f3f4f6}.allocation-card.untagged[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#4b5563}.allocation-card.missing-value[_ngcontent-%COMP%]{background:#fff7ed;border:1px solid #FED7AA}.allocation-card.missing-value[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]{background:#ffedd5}.allocation-card.missing-value[_ngcontent-%COMP%]   .allocation-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#ea580c}
8.allocation-card[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:18px;line-height:28px;font-weight:600;margin-left:auto;padding-left:16px;white-space:nowrap;color:#2563eb}.allocation-card[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]{margin-right:2px}.allocation-card[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]   .per-month[_ngcontent-%COMP%]{font-size:13px;font-weight:500;opacity:.9}.allocation-card.untagged[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]{color:#4b5563}.allocation-card.missing-value[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]{color:#ea580c}.allocation-card[_ngcontent-%COMP%]:hover{box-shadow:0 12px 22px #0f172a1f}.card-details[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1}.allocation-details[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:10px}.allocation-right[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:baseline;margin-left:16px}.allocation-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:600;color:#111827}.allocation-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;margin-top:4px;font-weight:500}.controls-anomaly-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;flex-grow:1;overflow-y:auto;scrollbar-width:none}.controls-anomaly[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px}.tick-icon[_ngcontent-%COMP%]{background:#dcfce7;padding:15px;border-radius:50%;display:flex;align-items:center;justify-content:center}.tick-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#16a34a}.anomaly-content[_ngcontent-%COMP%]{font-size:18px;line-height:24px;font-weight:600;color:#111827;text-align:center}.anomaly-text[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:400;color:#4b5563;text-align:center}.anomaly-sub-text[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#6b7280;margin-top:4px;font-weight:500;text-align:center}@media(max-width:1200px){.cost-analysis-content[_ngcontent-%COMP%]{grid-template-columns:1fr}.chart-area[_ngcontent-%COMP%]{padding-left:20px}.y-label[_ngcontent-%COMP%]{display:none}}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:14px}.acc-header[_ngcontent-%COMP%]{padding:0}.header[_ngcontent-%COMP%]{font-size:22px!important}.sub-content[_ngcontent-%COMP%]{font-size:14px!important}.analysis-period[_ngcontent-%COMP%], .controls-card[_ngcontent-%COMP%], .chart-card[_ngcontent-%COMP%], .cost-allocation[_ngcontent-%COMP%], .cost-anomaly[_ngcontent-%COMP%]{padding:18px;border-radius:14px}.date-picker-field[_ngcontent-%COMP%], .date-range-controls[_ngcontent-%COMP%], .update-chart[_ngcontent-%COMP%], .date-range-picker[_ngcontent-%COMP%]   .update-button[_ngcontent-%COMP%]{width:100%}.date-range-controls[_ngcontent-%COMP%]{display:block}.grid-container[_ngcontent-%COMP%]{grid-template-columns:1fr}.custom-card[_ngcontent-%COMP%]{min-height:96px}.chart-host[_ngcontent-%COMP%]{height:340px;min-height:340px}.allocation-card[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column}.allocation-card[_ngcontent-%COMP%]   .allocation-amount[_ngcontent-%COMP%]{margin-left:0;padding-left:0}}"]})}}return t})();function BC(t,r){if(t&1&&(o(0,"mat-option",12),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function UC(t,r){if(t&1&&(o(0,"mat-option",12),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function jC(t,r){if(t&1&&(o(0,"mat-option",12),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function $C(t,r){t&1&&(o(0,"div",20),h(1,"mat-progress-spinner",21),a())}function qC(t,r){if(t&1&&(o(0,"div",22),l(1),a()),t&2){let e=u();c(),x(" ",e.errorMessage," ")}}function HC(t,r){t&1&&(o(0,"th",38),l(1,"Resource ID"),a())}function WC(t,r){if(t&1&&(o(0,"td",39)(1,"div",40),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.RESOURCE_ID)}}function GC(t,r){t&1&&(o(0,"th",38),l(1,"Title"),a())}function YC(t,r){if(t&1&&(o(0,"td",39)(1,"div",41),l(2),a(),o(3,"p",42),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.TITLE),c(2),C(e==null?null:e.DESCRIPTION)}}function KC(t,r){t&1&&(o(0,"th",38),l(1,"ID"),a())}function QC(t,r){if(t&1&&(o(0,"td",39)(1,"div",40),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.ID)}}function JC(t,r){t&1&&(o(0,"th",38),l(1,"Compliance Status"),a())}function ZC(t,r){if(t&1&&(o(0,"td",39)(1,"span",43),l(2),a()()),t&2){let e=r.$implicit;c(),Y("pill-danger",(e==null?null:e.COMPLIANCE_STATUS)==="FAILED")("pill-success",(e==null?null:e.COMPLIANCE_STATUS)==="PASSED"),c(),x(" ",(e==null?null:e.COMPLIANCE_STATUS)||"N/A"," ")}}function XC(t,r){t&1&&(o(0,"th",38),l(1,"Workflow Status"),a())}function ex(t,r){if(t&1&&(o(0,"td",39)(1,"span",44),l(2),a()()),t&2){let e=r.$implicit;c(2),C((e==null?null:e.WORKFLOW_STATUS)||"N/A")}}function tx(t,r){t&1&&(o(0,"th",38),l(1,"Severity"),a())}function nx(t,r){if(t&1&&(o(0,"td",39)(1,"span",43),l(2),a()()),t&2){let e=r.$implicit;c(),Y("pill-danger",(e==null?null:e.SEVERITY_LABEL)==="CRITICAL")("pill-warning",(e==null?null:e.SEVERITY_LABEL)==="HIGH"||(e==null?null:e.SEVERITY_LABEL)==="MEDIUM")("pill-success",(e==null?null:e.SEVERITY_LABEL)==="LOW"||(e==null?null:e.SEVERITY_LABEL)==="INFORMATIONAL"),c(),x(" ",(e==null?null:e.SEVERITY_LABEL)||"N/A"," ")}}function ix(t,r){t&1&&(o(0,"th",38),l(1,"Remediation Recommendation"),a())}function ox(t,r){if(t&1){let e=A();o(0,"td",39)(1,"a",45),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.openRemediationLink(i==null?null:i.REMEDIATION_URL))}),l(2),a()()}if(t&2){let e=r.$implicit;c(2),x(" ",e==null?null:e.REMEDIATION_RECOMMENDATION," ")}}function rx(t,r){t&1&&h(0,"tr",46)}function ax(t,r){t&1&&h(0,"tr",47)}function lx(t,r){if(t&1&&(o(0,"div",25)(1,"table",26),I(2,27),g(3,HC,2,0,"th",28)(4,WC,3,1,"td",29),T(),I(5,30),g(6,GC,2,0,"th",28)(7,YC,5,2,"td",29),T(),I(8,31),g(9,KC,2,0,"th",28)(10,QC,3,1,"td",29),T(),I(11,32),g(12,JC,2,0,"th",28)(13,ZC,3,5,"td",29),T(),I(14,33),g(15,XC,2,0,"th",28)(16,ex,3,1,"td",29),T(),I(17,34),g(18,tx,2,0,"th",28)(19,nx,3,7,"td",29),T(),I(20,35),g(21,ix,2,0,"th",28)(22,ox,3,1,"td",29),T(),g(23,rx,1,0,"tr",36)(24,ax,1,0,"tr",37),a()()),t&2){let e=u(2);c(),p("dataSource",e.visibleReports),c(22),p("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",!0),c(),p("matRowDefColumns",e.displayedColumns)}}function sx(t,r){t&1&&(o(0,"div",20),l(1,"No control findings for the selected filters."),a())}function cx(t,r){if(t&1){let e=A();I(0),g(1,lx,25,4,"div",23)(2,sx,2,0,"ng-template",null,0,at),o(4,"mat-paginator",24),v("page",function(i){O(e);let s=u();return P(s.onPageChange(i))}),a(),T()}if(t&2){let e=Ce(3),n=u();c(),p("ngIf",n.visibleReports.length)("ngIfElse",e),c(3),p("length",n.totalRecords)("pageIndex",n.pageIndex)("pageSize",n.pageSize)}}var gp=(()=>{class t{constructor(e,n){this.dashboardService=e,this.notify=n,this.complianceData=null,this.closed=new kt,this.displayedColumns=["resource_id","title","id","complianceStatus","workflowStatus","severity","remediation"],this.complianceReports=[],this.visibleReports=[],this.loading=!1,this.errorMessage="",this.totalRecords=0,this.pageIndex=0,this.pageSize=5,this.apiLimit=10,this.pagesCache=new Map,this.currentServerPage=1,this.statusOptions=[],this.workflowOptions=[],this.severityOptions=[],this.selectedStatus="",this.selectedWorkflow="",this.selectedSeverity=""}
8ngOnChanges(e){this.accountID=window.localStorage.getItem("currentAccountID"),this.statusOptions=JSON.parse(window.localStorage.getItem("COMPLIANCE_STATUS")||"[]"),this.workflowOptions=JSON.parse(window.localStorage.getItem("WORKFLOW_STATUS")||"[]"),this.severityOptions=JSON.parse(window.localStorage.getItem("SEVERITY_LABEL")||"[]"),(e.complianceData||e.dateRange)&&(this.resetState(),this.fetchComplianceReport(1,!0))}close(){this.closed.emit()}onFilterChange(){this.resetState(),this.fetchComplianceReport(1,!0)}onPageChange(e){if(e.pageIndex===this.pageIndex)return;this.pageIndex=e.pageIndex;let n=this.calculateServerPage(this.pageIndex);if(this.pagesCache.has(n))this.currentServerPage=n,this.updateVisibleReports();else{this.fetchComplianceReport(n);return}let i=Math.ceil(this.complianceReports.length/this.pageSize),s=Math.max(i-1,0);if(this.pageIndex===s&&!this.loading){let d=this.getMaxCachedServerPage()+1;this.pagesCache.has(d)||this.fetchComplianceReport(d)}}getMaxCachedServerPage(){return this.pagesCache.size?Math.max(...Array.from(this.pagesCache.keys())):0}openRemediationLink(e){e&&window.open(e,"_blank")}fetchComplianceReport(e,n=!1){let i=(this.dateRange?.from||"").trim(),s=(this.dateRange?.to||"").trim(),d=(this.complianceData?.metric||"").trim(),m=(this.accountID||"").trim();!m||!i||!s||!d||(n&&this.resetState(),this.loading=!0,this.errorMessage="",this.dashboardService.getComplianceStatusReport(m,i,s,d,this.selectedStatus.trim(),this.selectedWorkflow.trim(),this.selectedSeverity.trim(),e,this.apiLimit).subscribe({next:f=>{let _=Array.isArray(f?.object)?f.object:[];this.pagesCache.set(e,_),this.currentServerPage=e,this.rebuildReports();let b=f?.pagination?.totalRecords??f?.totalRecords;this.totalRecords=b!==void 0?Number(b):Math.max(this.totalRecords,this.complianceReports.length),this.updateVisibleReports(),this.loading=!1},error:f=>{n&&(this.complianceReports=[],this.visibleReports=[],this.totalRecords=0),this.loading=!1,this.errorMessage="Unable to load compliance report.",f.error.status==401&&this.notify.showNotification(f.error.message,"top",E[f.error.status]?E[f.error.status]:"error",f.error.status)}}))}resetState(){this.pageIndex=0,this.currentServerPage=1,this.pagesCache.clear(),this.complianceReports=[],this.visibleReports=[],this.totalRecords=0}calculateServerPage(e){let n=e*this.pageSize;return Math.floor(n/this.apiLimit)+1}rebuildReports(){let e=[];Array.from(this.pagesCache.keys()).sort((n,i)=>n-i).forEach(n=>{e.push(...this.pagesCache.get(n)??[])}),this.complianceReports=e}updateVisibleReports(){let e=this.pageIndex*this.pageSize;if(e>=this.complianceReports.length){this.visibleReports=[];return}this.visibleReports=this.complianceReports.slice(e,e+this.pageSize)}onStatusChange(e){this.selectedStatus=e,this.onFilterChange()}onWorkflowChange(e){this.selectedWorkflow=e,this.onFilterChange()}onSeverityChange(e){this.selectedSeverity=e,this.onFilterChange()}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-view-compliance-report"]],inputs:{complianceData:"complianceData",dateRange:"dateRange"},outputs:{closed:"closed"},features:[En],decls:43,vars:12,consts:[["noRows",""],[1,"report-overlay"],["role","dialog","aria-modal","true","aria-label","Compliance Report",1,"report-panel"],[1,"report-header"],["type","button","aria-label","Close compliance report",1,"close-btn",3,"click"],[1,"report-section"],[1,"section-header"],[1,"filters"],[1,"filter-section"],[1,"filter-label"],[1,"filter-select"],["placeholder","Compliance Status",3,"selectionChange","value"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["placeholder","Workflow Status",3,"selectionChange","value"],["placeholder","Severity Label",3,"selectionChange","value"],[1,"report-table-container"],["class","table-placeholder",4,"ngIf"],["class","table-placeholder error",4,"ngIf"],[4,"ngIf"],[1,"table-placeholder"],["diameter","46","mode","indeterminate","color","primary"],[1,"table-placeholder","error"],["class","table-wrapper",4,"ngIf","ngIfElse"],[1,"report-paginator",3,"page","length","pageIndex","pageSize"],[1,"table-wrapper"],["mat-table","",1,"report-table",3,"dataSource"],["matColumnDef","resource_id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","id"],["matColumnDef","complianceStatus"],["matColumnDef","workflowStatus"],["matColumnDef","severity"],["matColumnDef","remediation"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"resource-id"],[1,"title-text"],[1,"description"],[1,"pill"],[1,"pill","neutral"],[1,"remediation-link",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",1)(1,"aside",2)(2,"header",3)(3,"div")(4,"h2"),l(5,"Compliance Report"),a(),o(6,"p"),l(7,"Detailed compliance status and control findings"),a()(),o(8,"button",4),v("click",function(){return i.close()}),l(9,"\xD7"),a()(),o(10,"section",5)(11,"div",6)(12,"h3"),l(13,"Control Details"),a(),o(14,"div",7)(1
85,"div",8)(16,"div",9),l(17," Compliance Status "),a(),o(18,"div",10)(19,"mat-select",11),v("selectionChange",function(d){return i.onStatusChange(d.value)}),o(20,"mat-option",12),l(21,"ALL"),a(),g(22,BC,2,2,"mat-option",13),a()()(),o(23,"div",8)(24,"div",9),l(25," Workflow Status "),a(),o(26,"div",10)(27,"mat-select",14),v("selectionChange",function(d){return i.onWorkflowChange(d.value)}),o(28,"mat-option",12),l(29,"ALL"),a(),g(30,UC,2,2,"mat-option",13),a()()(),o(31,"div",8)(32,"div",9),l(33," Severity "),a(),o(34,"div",10)(35,"mat-select",15),v("selectionChange",function(d){return i.onSeverityChange(d.value)}),o(36,"mat-option",12),l(37,"ALL"),a(),g(38,jC,2,2,"mat-option",13),a()()()()(),o(39,"div",16),g(40,$C,2,0,"div",17)(41,qC,2,1,"div",18)(42,cx,5,5,"ng-container",19),a()()()()),n&2&&(c(19),p("value",i.selectedStatus),c(),p("value",""),c(2),p("ngForOf",i.statusOptions),c(5),p("value",i.selectedWorkflow),c(),p("value",""),c(2),p("ngForOf",i.workflowOptions),c(5),p("value",i.selectedSeverity),c(),p("value",""),c(2),p("ngForOf",i.severityOptions),c(2),p("ngIf",i.loading),c(),p("ngIf",!i.loading&&i.errorMessage),c(),p("ngIf",!i.loading&&!i.errorMessage))},dependencies:[N,$,B,z,fe,ue,Jt,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gt],styles:["[_nghost-%COMP%]{position:fixed;inset:0;z-index:1000}.report-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;justify-content:flex-end;background:#0f172a40}.report-panel[_ngcontent-%COMP%]{width:75%;height:90%;background:#fff;border-radius:24px 0 0 24px;padding:32px;box-shadow:-12px 0 30px #0f172a26;display:flex;flex-direction:column}.report-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}.report-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-size:24px;color:#0f172a}.report-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:6px 0 0;color:#64748b}.close-btn[_ngcontent-%COMP%]{border:none;background:#eef2ff;width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:18px;line-height:1;color:#475569}.report-section[_ngcontent-%COMP%]{margin-top:28px;flex:1;display:flex;flex-direction:column;max-height:80%}.section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.section-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px;color:#0f172a}.filters[_ngcontent-%COMP%]{display:flex;gap:15px;flex-wrap:wrap}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.filter-label[_ngcontent-%COMP%]{font-size:13px;color:#6f7d94;font-weight:600}.filter-select[_ngcontent-%COMP%]{width:150px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center}.filter-chip[_ngcontent-%COMP%]{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:6px 16px;color:#0f172a;cursor:pointer}.report-table-container[_ngcontent-%COMP%]{margin-top:18px;flex:1;display:flex;flex-direction:column;max-height:95%}.table-placeholder[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:14px;text-align:center}.table-placeholder.error[_ngcontent-%COMP%]{color:#dc2626}.table-wrapper[_ngcontent-%COMP%]{flex:1;max-height:100%;overflow-y:auto;overflow-x:auto;border:1px solid #edf0f7;border-radius:16px;position:relative}.table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.report-table[_ngcontent-%COMP%]{width:100%;min-width:1200px}.resource-id[_ngcontent-%COMP%]{font-size:13px;color:#000}.title-text[_ngcontent-%COMP%]{font-weight:600;margin-bottom:4px}.description[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#64748b;white-space:normal}[_nghost-%COMP%]     .report-table .mat-mdc-header-row, [_nghost-%COMP%]     .report-table .mdc-data-table__header-row{background:#f9fafb;color:#94a3b8;font-weight:600;font-size:12px;position:sticky;top:0;z-index:2;white-space:nowrap}.report-table[_ngcontent-%COMP%]{width:100%;border-spacing:0}.report-table[_ngcontent-%COMP%]   .mat-header-row[_ngcontent-%COMP%], .report-table[_ngcontent-%COMP%]   .mat-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:240px 280px 220px 130px 130px 130px 260px;column-gap:20px;align-items:center;padding:0 20px;font-size:14px}.report-table[_ngcontent-%COMP%]   .mat-header-row[_ngcontent-%COMP%]{min-height:52px;background:#f9fafb;color:#64748b;font-weight:600;font-size:13px}.report-table[_ngcontent-%COMP%]   .mat-row[_ngcontent-%COMP%]{height:auto;font-size:14px;color:#000;min-height:70px;border-bottom:1px solid #eef2f7}.report-table[_ngcontent-%COMP%]   .mat-header-cell[_ngcontent-%COMP%], .report-table[_ngcontent-%COMP%]   .mat-cell[_ngcontent-%COMP%]{border:none!important;padding:14px 0;color:#0f172a}.report-table[_ngcontent-%COMP%]   .mat-header-cell[_ngcontent-%COMP%]{font-size:12px;line-height:1.4;text-transform:none;font-weight:600}.muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.small[_ngcontent-%COMP%]{word-break:break-all}.pill[_ngcontent-%COMP%]{display:inline-flex;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:500;background:#e2e8f0;color:#475569;text-transform:capitalize}.pill-success[_ngcontent-%COMP%]{background:#e6f6ed;color:#16a34a}.pill-danger[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.pill-warning[_ngcontent-%COMP%]{background:#fef3c7;color:#b45309}.remediation-link[_ngcontent-%COMP%]{color:#0b79f7;text-decoration:underline;cursor:pointer;font-size:12px}.report-paginator[_ngcontent-%COMP%]{align-self:flex-end}@media(max-width:1024px){[_nghost-%COMP%]     .report-table .mat-mdc-row, [_nghost-%COMP%]     .report-table .mat-mdc-header-row{grid-template-columns:20% 34% 20% 13% 13%}[_nghost-%COMP%]     .report-table .mat-mdc-header-cell:nth-child(n+6), [_nghost-%COMP%]     .report-table .mat-mdc-cell:nth-child(n+6){display:none}}"]})}}return t})();function dx(t,r){if(t&1){let e=A();I(0),o(1,"header",5)(2,"div")(3,"h2"),l(4),a()(),o(5,"button",6),v("click",function(){O(e);let i=u(2);return P(i.close())}),l(6,"\xD7"),a()(),o(7,"section",7)(8,"div",8),h(9,"iconify-icon",9),a(),o(10,"div",10)(11,"div",11)(12,"h3"),l(13),a(),o(14,"span",12),l(15),a()(),o(16,"p",13),l(17),F(18,"date"),a(),o(19,"p",14),l(20),a()()(),o(21,"section",15)(22,"div",16)(23,"div",17)(24,"span",18),l(25,"CVE ID"),a(),o(26,"p"),l(27),a()(),o(28,"div",17)(29,"span",18),l(30,"Service Type"),a(),o(31,"p",19),l(32),a()(),o(33,"div",17)(34,"span",18),l(35,"Compliance Standard"),a(),o(36,"p"),l(37),a()(),o(38,"div",17)(39,"span",18),l(40,"Compliance Control"),a(),o(41,"p"),l(42),a()(),o(43,"div",17)(44,"span",18),l(45,"Compliance Status"),a(),o(4
86,"p"),l(47),a()(),o(48,"div",17)(49,"span",18),l(50,"Workflow Status"),a(),o(51,"p"),l(52),a()(),o(53,"div",17)(54,"span",18),l(55,"Region"),a(),o(56,"p"),l(57),a()(),o(58,"div",17)(59,"span",18),l(60,"Remediation Recommendation"),a(),o(61,"p")(62,"a",20),v("click",function(){let i=O(e).ngIf,s=u(2);return P(s.openRemediationLink(i==null?null:i.REMEDIATION_URL))}),l(63),a()()()()(),T()}if(t&2){let e=r.ngIf,n=u(2);c(4),x("Finding Details - ",e==null?null:e.SERVICE),c(9),C((e==null?null:e.TITLE)||"No title available"),c(),Y("critical",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.includes("CRITICAL"))("high",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.includes("HIGH"))("medium",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.includes("MEDIUM"))("low",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.includes("LOW"))("neutral",e==null||e.SEVERITY_LABEL==null?null:e.SEVERITY_LABEL.includes("INFORMATIONAL")),c(),x(" ",(e==null?null:e.SEVERITY_LABEL)||"Unknown"," "),c(2),x("Detected on ",ie(18,23,e==null?null:e.FIRST_OBSERVED_AT,"MMMM dd, yyyy HH:mm:ss")," "),c(3),C(e==null?null:e.DESCRIPTION),c(7),C((e==null?null:e.CVE_ID)||"--"),c(5),C(e==null?null:e.SERVICE_TYPE),c(5),C(n.formatName(e==null?null:e.COMPLIANCE_STANDARD)),c(5),C(e==null?null:e.COMPLIANCE_CONTROL_ID),c(5),C(e==null?null:e.COMPLIANCE_STATUS),c(5),C(e==null?null:e.WORKFLOW_STATUS),c(5),C(e==null?null:e.REGION),c(6),x(" ",e==null?null:e.REMEDIATION_RECOMMENDATION," ")}}function px(t,r){t&1&&(o(0,"div",22),l(1,"Loading finding details..."),a())}function mx(t,r){if(t&1&&(o(0,"div",22),l(1),a()),t&2){let e=u(3);c(),C(e.errorMessage)}}function ux(t,r){if(t&1&&g(0,px,2,0,"div",21)(1,mx,2,1,"div",21),t&2){let e=u(2);p("ngIf",e.loading),c(),p("ngIf",!e.loading&&e.errorMessage)}}function gx(t,r){if(t&1&&(o(0,"div",2)(1,"aside",3),g(2,dx,64,26,"ng-container",4)(3,ux,2,2,"ng-template",null,0,at),a()()),t&2){let e=Ce(4),n=u();c(2),p("ngIf",n.findingDetails)("ngIfElse",e)}}var fp=(()=>{class t{constructor(e,n,i,s){this.dashboardService=e,this.notify=n,this.ngZone=i,this.cdr=s,this.open=!1,this.finding=null,this.closed=new kt,this.loading=!1,this.errorMessage="",this.findingDetails=null}ngOnChanges(e){this.accountID=window.localStorage.getItem("currentAccountID"),(e.open||e.finding)&&this.open&&this.finding?.ID&&this.fetchFindingDetails(this.finding.ID)}fetchFindingDetails(e){if(!this.accountID||!e){this.findingDetails=null,this.loading=!1,this.errorMessage="No finding details available.",this.refreshView();return}this.loading=!0,this.errorMessage="",this.findingDetails=null,this.refreshView(),this.dashboardService.getVulnerabilityFindingDetails(this.accountID,e).subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object[0]:n?.object??null,s=i&&typeof i=="object"?Ke({},i):null;this.ngZone.run(()=>{this.findingDetails=s,this.loading=!1,this.errorMessage=s?"":"No finding details available.",this.refreshView()})},error:n=>{this.ngZone.run(()=>{this.loading=!1,this.findingDetails=null,this.errorMessage="Unable to load finding details.",n?.error?.status===401&&this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status),this.refreshView()})}})}openRemediationLink(e){e&&window.open(e,"_blank")}formatName(e){return e?.replace(/-/g," ").toUpperCase()}close(){this.closed.emit()}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-view-finding-details"]],inputs:{open:"open",finding:"finding"},outputs:{closed:"closed"},features:[En],decls:1,vars:1,consts:[["findingState",""],["class","finding-overlay",4,"ngIf"],[1,"finding-overlay"],["role","dialog","aria-modal","true","aria-label","Finding Details",1,"finding-panel"],[4,"ngIf","ngIfElse"],[1,"finding-header"],["type","button","aria-label","Close finding details",1,"close-btn",3,"click"],[1,"finding-summary"],[1,"finding-icon"],["icon","tabler:exclamation-circle","width","24","height","24"],[1,"finding-content"],[1,"finding-meta"],[1,"severity-pill"],[1,"detected"],[1,"summary"],[1,"finding-info"],[1,"vuln-info"],[1,"description"],[1,"label"],[1,"service-type"],[1,"remediation-link",3,"click"],["class","finding-empty-state",4,"ngIf"],[1,"finding-empty-state"]],template:function(n,i){n&1&&g(0,gx,5,2,"div",1),n&2&&p("ngIf",i.open)},dependencies:[N,B,z,pt],styles:["[_nghost-%COMP%]{position:fixed;inset:0;z-index:1200}.finding-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;justify-content:flex-end}.finding-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:#0f172a73}.finding-panel[_ngcontent-%COMP%]{position:relative;width:min(720px,100%);height:90%;background:#fff;border-radius:24px 0 0 24px;padding:32px;overflow-y:auto;
8box-shadow:-12px 0 35px #0f172a2e;display:flex;flex-direction:column;gap:24px}.finding-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.finding-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-size:22px;color:#0f172a}.close-btn[_ngcontent-%COMP%]{border:none;background:#f1f5f9;width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:18px;color:#475569}.finding-summary[_ngcontent-%COMP%]{display:flex;align-items:start;gap:20px}.finding-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:16px;background:#ffe4e6;color:#dc2626;display:flex;align-items:center;justify-content:center;font-weight:700}.finding-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;width:100%}.finding-meta[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}.finding-meta[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;max-width:80%;line-height:1.2}.severity-pill[_ngcontent-%COMP%]{padding:4px 12px;border-radius:16px;font-size:12px;font-weight:600;text-transform:capitalize;display:inline-flex;align-items:center;justify-content:center;height:24px;min-width:70px;box-sizing:border-box}.severity-pill.critical[_ngcontent-%COMP%]{background-color:#fee2e2;color:#dc2626}.severity-pill.high[_ngcontent-%COMP%]{background-color:#fef3c7;color:#ea580c}.severity-pill.medium[_ngcontent-%COMP%]{background-color:#fef6d9;color:#d97706}.severity-pill.low[_ngcontent-%COMP%]{background-color:#dcfce7;color:#16a34a}.severity-pill.neutral[_ngcontent-%COMP%]{background-color:#e2e8f0;color:#475569}.detected[_ngcontent-%COMP%]{margin:4px 0 0;color:#94a3b8}.summary[_ngcontent-%COMP%]{margin:12px 0 0;color:#475569}.finding-info[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:0 0 12px;color:#0f172a}.vuln-info[_ngcontent-%COMP%]{padding:20px;border:1px solid #f1f5f9;border-radius:20px;background:#fbfcff}.info-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.info-block[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{display:block;font-size:12px;text-transform:uppercase;color:#94a3b8}.info-block[_ngcontent-%COMP%]   .value[_ngcontent-%COMP%]{display:block;margin-top:4px;font-weight:600}.info-block[_ngcontent-%COMP%]   .value.danger[_ngcontent-%COMP%]{color:#dc2626}.description[_ngcontent-%COMP%]{margin-top:16px}.service-type[_ngcontent-%COMP%]{text-transform:uppercase}.remediation-link[_ngcontent-%COMP%]{color:#0b79f7;text-decoration:underline;cursor:pointer;font-size:13px}.description[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%], .finding-components[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:12px;text-transform:uppercase;color:#94a3b8}.finding-components[_ngcontent-%COMP%]{margin-top:16px}.description[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:6px 0 0;color:#475569}.component-list[_ngcontent-%COMP%]{margin-top:12px;display:flex;flex-wrap:wrap;gap:10px}.chip[_ngcontent-%COMP%]{border-radius:999px;background:#eef2ff;color:#475569;padding:6px 12px;font-size:13px}@media(max-width:768px){.finding-panel[_ngcontent-%COMP%]{width:100%;border-radius:0}.finding-summary[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return t})();var pl=So(xa());function fx(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e.ACCOUNT_ID),c(),x(" ",e.NAME," ")}}function hx(t,r){t&1&&(o(0,"div",30),h(1,"mat-progress-spinner",31),a())}function _x(t,r){if(t&1&&(o(0,"div",32)(1,"div",33),l(2),a()()),t&2){let e=u(2);c(2),C(e.errorMessage)}}function Cx(t,r){t&1&&h(0,"iconify-icon",51)}function xx(t,r){t&1&&h(0,"iconify-icon",52)}function vx(t,r){t&1&&h(0,"iconify-icon",53)}function bx(t,r){if(t&1&&(o(0,"div",34)(1,"div",35)(2,"div",36),Qn(),o(3,"svg",37)(4,"defs")(5,"linearGradient",38),h(6,"stop",39)(7,"stop",40),a()(),h(8,"circle",41)(9,"circle",42),a(),ar(),o(10,"div",43)(11,"strong"),l(12),F(13,"number"),a(),o(14,"span"),l(15,"Security Score"),a()()()(),o(16,"div",44)(17,"span",45),l(18,"Security Posture"),a(),o(19,"div",46)(20,"span",47),g(21,Cx,1,0,"iconify-icon",48)(22,xx,1,0,"iconify-icon",49)(23,vx,
81,0,"iconify-icon",50),a(),l(24),a()()()),t&2){let e=u(2);c(9),He("stroke-dasharray",e.ringCircumference)("stroke-dashoffset",e.getStrokeOffset()),c(3),x("",ie(13,10,(e.overallSecurityData==null?null:e.overallSecurityData.SCORE_PERCENTAGE)||0,"1.2-2"),"%"),c(7),yn(e.scoreStatusClass),c(),p("ngSwitch",e.scoreStatus),c(),p("ngSwitchCase","Bad"),c(),p("ngSwitchCase","Needs Improvement"),c(),p("ngSwitchCase","Good"),c(),x(" ",e.scoreStatus," ")}}function yx(t,r){if(t&1&&(Qn(),I(0),h(1,"circle",58),T()),t&2){let e=r.$implicit;c(),He("stroke",e.color)("stroke-dasharray",e.dashArray)("stroke-dashoffset",e.dashOffset)}}function Mx(t,r){if(t&1&&(o(0,"div",54),Qn(),o(1,"svg",55),h(2,"circle",56),g(3,yx,2,3,"ng-container",57),a()()),t&2){let e=u(2);c(3),p("ngForOf",e.severitySegments)}}function Sx(t,r){t&1&&(o(0,"div",59),l(1,"No data found"),a())}function Ox(t,r){if(t&1&&(o(0,"div",60),h(1,"span",61),l(2),a()),t&2){let e=r.$implicit;c(),pe("background",e.color),c(),rt(" ",e.label,": ",e.count," ")}}function Px(t,r){t&1&&(o(0,"div",30),h(1,"mat-progress-spinner",31),a())}function Ex(t,r){if(t&1&&(o(0,"div",32)(1,"div",33),l(2),a()()),t&2){let e=u(2);c(2),C(e.servicesError)}}function wx(t,r){t&1&&h(0,"span",71),t&2&&pe("width",100,"%")}function Ix(t,r){if(t&1&&(o(0,"div",63)(1,"div",64)(2,"span",65),l(3),a(),o(4,"div",66)(5,"span",67),l(6),a()()(),o(7,"div",68)(8,"div",69),g(9,wx,1,2,"span",70),a()()()),t&2){let e=r.$implicit;c(3),C(e.SERVICE),c(3),x("Total: ",e.COUNT),c(3),p("ngIf",e.COUNT>0)}}function Tx(t,r){if(t&1&&(I(0),g(1,Ix,10,3,"div",62),T()),t&2){let e=u(2);c(),p("ngForOf",e.servicesOverview)}}function Ax(t,r){if(t&1){let e=A();o(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8),l(4,"Cloud Security Posture Management & Compliance Monitoring"),a()(),o(5,"div",9)(6,"div",10),l(7," Accounts "),a(),o(8,"div",11)(9,"mat-select",12),se("ngModelChange",function(i){O(e);let s=u();return le(s.selectedAccount,i)||(s.selectedAccount=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onAccountChange(i.value))}),g(10,fx,2,2,"mat-option",13),a()()()(),o(11,"section",14)(12,"mat-card",15)(13,"div",16)(14,"h3"),l(15,"Overall Security Score"),a()(),g(16,hx,2,0,"div",17)(17,_x,3,1,"div",18)(18,bx,25,13,"div",19),a(),o(19,"mat-card",20)(20,"div",21)(21,"h3"),l(22,"Vulnerability Severity"),a()(),g(23,Mx,4,1,"div",22)(24,Sx,2,0,"ng-template",null,0,at),o(26,"div",23),g(27,Ox,3,4,"div",24),a()(),o(28,"mat-card",25)(29,"div",26)(30,"div",21)(31,"h3"),l(32,"Services Overview"),a()()(),o(33,"div",27),g(34,Px,2,0,"div",17)(35,Ex,3,1,"div",18)(36,Tx,2,1,"ng-container",28),a()()()()}if(t&2){let e=Ce(25),n=u();c(9),ae("ngModel",n.selectedAccount),c(),p("ngForOf",n.accounts),c(6),p("ngIf",n.loading),c(),p("ngIf",!n.loading&&n.errorMessage),c(),p("ngIf",!n.loading&&!n.errorMessage),c(5),p("ngIf",!n.noSeverityData)("ngIfElse",e),c(4),p("ngForOf",n.severityData),c(7),p("ngIf",n.servicesLoading),c(),p("ngIf",!n.servicesLoading&&n.servicesError),c(),p("ngIf",!n.servicesLoading&&!n.servicesError)}}var hp=(()=>{class t{get severitySegments(){let e=this.severityChartOrder.map(m=>this.severityData.find(f=>f.label===m)).filter(m=>!!m),n=e.reduce((m,f)=>m+f.count,0)||1,i=this.severityRingCircumference,s=i*this.severityGapRatio,d=0;return e.map(m=>{let f=i*(m.count/n),b=`${Math.max(f-s,i*.001).toFixed(2)} ${i.toFixed(2)}`,M=d.toFixed(2);return d-=f,{color:m.color,dashArray:b,dashOffset:M}})}constructor(e,n,i,s){this.fb=e,this.dashboardService=n,this.notify=i,this.cdr=s,this.hideNow=!0,this.accounts=[],this.selectedAccount="",this.account_Id=null,this.errorMessage="",this.loading=!1,this.ringCircumference=2*Math.PI*52,this.servicesOverview=[],this.servicesLoading=!1,this.servicesError="",this.severityLoading=!1,this.severityData=[],this.severityColorMap={CRITICAL:"#E53935",HIGH:"#F97316",MEDIUM:"#F4B400",LOW:"#1FBF54"},this.defaultSeverityOrder=["Critical","High","Medium","Low"],this.severityChartOrder=[...this.defaultSeverityOrder],this.fallbackSeverityColor="#CBD5F5",this.noSeverityData=!0,this.severityRingRadius=48,this.severityRingCircumference=2*Math.PI*this.severityRingRadius,this.severityGapRatio=.003}ngOnInit(){this.getAccountDetails()}getAccountDetails(){this.dashboardService.getClientCredentials(2).subscribe({next:e=>{this.accounts=e?.object||[];let n=this.accounts.find(s=>s?.MASTER_ACCOUNT===!0)||this.accounts[0];if(!n?.ACCOUNT_ID)return;let i=n?.ACCOUNT_ID;this.selectedAccount=i,this.account_Id=i,this.grfOrgId=n?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",i),window.localStorage.setItem("grfOrgId",this.grfOrgId),this.account_Id},error:e=>{e.error?.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onAccountChange(e){let n=this.accounts.find(i=>i?.ACCOUNT_ID===e);n&&this.switchAccount(n)}switchAccount(e){this.account_Id=e?.ACCOUNT_ID,this.selectedAccount=e?.ACCOUNT_ID;let n=e?.DATA_READY&&e?.MASTER_ACCOUNT;this.grfOrgId=e?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",this.account_Id),window.localStorage.setItem("hasReadyAccount",n),window.localStorage.setItem("grfOrgId",this.grfOrgId),this.refreshDashboardData()}
8refreshDashboardData(){this.getSecurityScoreData(),this.getVulnerabilitySeverity(),this.fetchServicesOverview()}displayErrorMessage(e){this.errorMessage=e}getStrokeOffset(){return this.ringCircumference-this.ringCircumference*this.overallSecurityData?.SCORE_PERCENTAGE/100}getSecurityScoreData(){this.loading=!0,this.errorMessage="",this.dashboardService.getOverallAzureSecurityScore(this.account_Id).subscribe({next:e=>{this.loading=!1,this.overallSecurityData=e?.object||[];let n=this.overallSecurityData?.SCORE_PERCENTAGE||0;n<75?(this.scoreStatus="Bad",this.scoreStatusClass="posture-bad"):n>=75&&n<85?(this.scoreStatus="Needs Improvement",this.scoreStatusClass="posture-warning"):(this.scoreStatus="Good",this.scoreStatusClass="posture-good")},error:e=>{this.loading=!1,this.displayErrorMessage("Error fetching Overall Security Score."),e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getSeverityColor(e){return this.severityColorMap[e]||this.fallbackSeverityColor}resetSeverityData(){this.severityData=this.defaultSeverityOrder.map(e=>({label:e,count:0,color:this.getSeverityColor(e.toUpperCase())})),this.severityChartOrder=[...this.defaultSeverityOrder],this.noSeverityData=!0}buildSeverityOrder(e){let n=e.filter(Boolean),i=this.defaultSeverityOrder.filter(s=>n.includes(s));return n.forEach(s=>{i.includes(s)||i.push(s)}),i.length?i:[...this.defaultSeverityOrder]}formatSeverityLabel(e){return e?e.toLowerCase().split(/[_\s]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Unknown"}getVulnerabilitySeverity(){this.account_Id&&(this.severityLoading=!0,this.dashboardService.getAzureVulnerabilitySeverity(this.account_Id).subscribe({next:e=>{this.severityLoading=!1;let n=Array.isArray(e?.object)?e.object:[];for(let m=0;m<n.length;m++)n[m].SEVERITY_LABEL=="INFORMATIONAL"&&n.splice(m,1);this.vulnerabilitySeverity=n;let i=n.reduce((m,f)=>{let _=(f?.SEVERITY_LABEL||"").toString().toUpperCase();if(!_)return m;let b=Number(f?.COUNT??0);return m[_]=(m[_]||0)+(isNaN(b)?0:b),m},{}),s=this.defaultSeverityOrder.map(m=>{let f=m.toUpperCase();return{label:m,count:i[f]??0,color:this.getSeverityColor(f)}});
8Object.keys(i).forEach(m=>{this.defaultSeverityOrder.some(f=>f.toUpperCase()===m)||s.push({label:this.formatSeverityLabel(m),count:i[m],color:this.getSeverityColor(m)})});let d=s.some(m=>m.count>0);this.noSeverityData=!d,this.severityData=s,this.severityChartOrder=this.buildSeverityOrder(s.map(m=>m.label))},error:e=>{this.resetSeverityData(),this.severityLoading=!1,this.notify.showNotification(e.error?.message||"Failed to fetch vulnerability severity","top",E[e.error?.status]?E[e.error?.status]:"error",e.error?.status||400)}}))}fetchServicesOverview(){if(!this.account_Id){this.servicesOverview=[];return}this.servicesLoading=!0,this.servicesError="",this.dashboardService.getAzureServicesOverview(this.account_Id).subscribe({next:e=>{this.servicesOverview=e.object||[],this.servicesLoading=!1},error:e=>{this.servicesOverview=[],this.servicesLoading=!1,this.servicesError="Unable to load service overview.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(re),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cspm-azure-dashboard"]],decls:5,vars:1,consts:[["severityChartEmpty",""],["class","cspm-page",4,"ngIf"],[1,"azure-container"],[1,"azure-card"],[1,"coming-soon"],[1,"cspm-page"],[1,"cspm-header"],[1,"acc-header"],[1,"sub-content"],[1,"filter-section"],[1,"filter-label"],[1,"filter-select","account-select"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"cards-grid"],[1,"card","score-card"],[1,"card-header","score-card__header"],["class","spinner-container",4,"ngIf"],["class","error-container",4,"ngIf"],["class","score-container",4,"ngIf"],[1,"card","severity-card"],[1,"severity-card__header"],["class","severity-chart",4,"ngIf","ngIfElse"],[1,"severity-legend"],["class","item",4,"ngFor","ngForOf"],[1,"card","services-card"],[1,"card-header","services-card__header"],[1,"service-list"],[4,"ngIf"],[3,"value"],[1,"spinner-container"],["diameter","70","mode","indeterminate","color","primary"],[1,"error-container"],[1,"error-message"],[1,"score-container"],[1,"score-visual"],[1,"score-ring"],["viewBox","0 0 120 120","role","img","aria-label","Security score gauge"],["id","azureScoreRingGradient","x1","0%","y1","0%","x2","100%","y2","100%"],["offset","0%","stop-color","#98A6FF"],["offset","100%","stop-color","#4B69F0"],["cx","60","cy","60","r","52",1,"bg"],["cx","60","cy","60","r","52","stroke","url(#azureScoreRingGradient)",1,"progress"],[1,"score-text"],[1,"score-footer"],[1,"score-label"],[1,"status-pill"],[3,"ngSwitch"],["icon","material-symbols:error-outline","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:warning-outline-rounded","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:check-circle-outline","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:error-outline","width","24","height","24"],["icon","material-symbols:warning-outline-rounded","width","24","height","24"],["icon","material-symbols:check-circle-outline","width","24","height","24"],[1,"severity-chart"],["viewBox","0 0 120 120","role","img","aria-label","Vulnerability severity distribution"],["cx","60","cy","60","r","48",1,"severity-chart__track"],[4,"ngFor","ngForOf"],["cx","60","cy","60","r","48","transform","rotate(-90 60 60)","stroke-linecap","round",1,"severity-chart__arc"],[1,"severity-chart","no-data"],[1,"item"],[1,"dot"],["class","service-row",4,"ngFor","ngForOf"],[1,"service-row"],[1,"service-header"],[1,"service-name"],[1,"service-metrics"],[1,"metric"],[1,"service-progress"],[1,"service-progress__track"],["class","service-progress__segment na",3,"width",4,"ngIf"],[1,"service-progress__segment","na"]],template:function(n,i){n&1&&(g(0,Ax,37,11,"div",1),o(1,"div",2)(2,"mat-card",3)(3,"div",4),l(4,"(Coming Soon)"),a()()()),n&2&&p("ngIf",!i.hideNow)},dependencies:[N,$,B,cr,dr,z,Pt,fe,ue,Jt,me,mt,Wt],styles:[".cspm-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.azure-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;padding:24px;background-color:#f9f9f9}.azure-card[_ngcontent-%COMP%]{width:100%;height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;box-shadow:2px 2px 10px #0000001a}.coming-soon[_ngcontent-%COMP%]{font-size:14px;color:#6f6f6f;font-style:italic}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.sub-content[_ngcontent-%COMP%]{font-size:16px!important;line-height:24px;font-weight:400;color:#4b5563}.provider-tabs[_ngcontent-%COMP%]{display:flex;gap:8px;margin-bottom:24px;overflow-x:auto;padding-bottom:8px}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 16px;border:none;border-radius:8px;background:#fff;color:#1d4ed8;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;white-space:nowrap}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover:not(.active):not(:disabled){background:#dbeafe;border-color:none}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:#f3f4f6;color:#374151}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled   .icon[_ngcontent-%COMP%]{opacity:.7;color:#374151}.provider-tabs[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{background:#f1f5f9;border-color:#dbeafe;color:#1d4ed8;font-weight:500}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   .icon-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.spinner-container[_ngcontent-%COMP%], .error-container[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:200px}.error-message[_ngcontent-%COMP%]{color:#d32f2f;font-weight:600;text-align:center}.filters[_ngcontent-%COMP%]{display:flex;gap:15px;flex-wrap:wrap}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.filter-label[_ngcontent-%COMP%]{font-size:13px;color:#6f7d94;font-weight:600}.filter-select[_ngcontent-%COMP%]{width:170px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;background:#fff;padding:0 10px;align-items:center}.account-select[_ngcontent-%COMP%]{width:220px}.cards-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:24px}.card[_ngcontent-%COMP%]{box-shadow:0 4px 18px #0f172a14;border-radius:20px;padding:24px;background:#fff}.score-card[_ngcontent-%COMP%]{padding:24px 28px;border:1px solid #e5e9f3;border-radius:24px;box-shadow:0 24px 45px #0f172a14}.score-card__header[_ngcontent-%COMP%]{margin-bottom:24px;align-items:center}.score-card__header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#111c44}.score-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#7a8bb1}.info-button[_ngcontent-%COMP%]{border:none;background:#f2f5ff;width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#4f5c82}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.card-icon-btn[_ngcontent-%COMP%]{border:none;background:transparent;padding:6px;border-radius:10px;cursor:pointer;color:#94a3b8;transition:background .2s ease,color .2s ease}.card-icon-btn[_ngcontent-%COMP%]:hover{background:#edf2ff;color:#1d4ed8}.card-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px}.helper-text[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.score-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.score-visual[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px;padding:8px 0 16px}.score-ring[_ngcontent-%COMP%]{position:relative;
8width:200px;height:200px}.score-ring[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%;height:100%;transform:rotate(-90deg)}.score-ring[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{fill:none;stroke-width:8;stroke-linecap:round}.score-ring[_ngcontent-%COMP%]   circle.bg[_ngcontent-%COMP%]{stroke:#eef1f7}.score-ring[_ngcontent-%COMP%]   circle.progress[_ngcontent-%COMP%]{transition:stroke-dashoffset .3s ease}.score-text[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:10px}.score-text[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#0f172a}.score-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#8a94ad;font-size:13px}.score-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center}.score-label[_ngcontent-%COMP%]{font-size:15px;color:#6f7d94}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:999px;font-weight:600;font-size:13px;line-height:1}.status-pill[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.posture-bad[_ngcontent-%COMP%]{background-color:#ffebee;color:#d32f2f}.posture-bad[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#d32f2f}.posture-warning[_ngcontent-%COMP%]{background:#fdf0c7;color:#b0760a}.posture-warning[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#b0760a}.posture-good[_ngcontent-%COMP%]{background-color:#e8f5e9;color:#388e3c}.posture-good[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#388e3c}.severity-card[_ngcontent-%COMP%]{border:1px solid #edf0f7;border-radius:24px;padding:24px;background:#fff;box-shadow:0 18px 40px #0f172a14}.severity-card__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px}.severity-card__header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:#0f172a}.severity-select[_ngcontent-%COMP%]{width:100%}.severity-select__native[_ngcontent-%COMP%]{width:85%;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:transparent;font-weight:400;font-size:14px;color:#000}.severity-select__native[_ngcontent-%COMP%]:focus{outline:none;border-color:#5b6cfe;box-shadow:0 0 0 2px #5b6cfe26}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-subscript-wrapper{display:none}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-flex{align-items:center;min-height:46px;padding:0 14px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;box-shadow:0 10px 24px #0f172a0d}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-infix{padding:0}.severity-select[_ngcontent-%COMP%]     .mdc-notched-outline__leading, .severity-select[_ngcontent-%COMP%]     .mdc-notched-outline__trailing{border:none}.severity-select[_ngcontent-%COMP%]     .mat-mdc-select-value-text{color:#0f172a;font-weight:600}.severity-select[_ngcontent-%COMP%]     .mat-mdc-select-arrow{color:#94a3b8}.severity-chart[_ngcontent-%COMP%]{width:190px;margin:0 auto 20px}.severity-chart.no-data[_ngcontent-%COMP%]{width:100%;max-width:320px;min-height:160px;margin:0 auto 20px;border:1px dashed #d1d5db;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-weight:600}.severity-chart[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto;cursor:pointer}.severity-chart__track[_ngcontent-%COMP%]{fill:none;stroke:#fff;stroke-width:18px}.severity-chart__arc[_ngcontent-%COMP%]{fill:none;stroke-width:24px;stroke-linecap:butt;transition:stroke .3s ease}.severity-legend[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,max-content));justify-content:center;gap:16px 24px;margin:16px auto 0;width:100%;max-width:100%;box-sizing:border-box;color:#4b5563;font-weight:500;font-size:13px}.severity-legend[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;width:auto;min-width:120px}.severity-legend[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex-shrink:0;width:10px;height:10px;border-radius:50%;margin-right:8px}.services-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:425px}.service-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;margin-top:10px;flex:1;overflow-y:auto;padding-right:6px;scrollbar-width:none;-ms-overflow-style:none}.service-list[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.service-row[_ngcontent-%COMP%]{padding-bottom:6px;display:flex;flex-direction:column;gap:10px}.service-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}
8.service-name[_ngcontent-%COMP%]{font-weight:600;color:#0f172a;text-transform:uppercase;font-size:13px}.service-metrics[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;font-weight:500;color:#6b7280}.service-progress__track[_ngcontent-%COMP%]{width:100%;height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden;display:flex}.service-progress__segment[_ngcontent-%COMP%]{display:inline-block;height:100%}.service-progress__segment.na[_ngcontent-%COMP%]{background:#e2e8f0}"]})}}return t})();var Dx=["findingsSection"],Rx=(t,r)=>({from:t,to:r});function kx(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e.ACCOUNT_ID),c(),x(" ",e.NAME," ")}}function Nx(t,r){t&1&&(o(0,"div",38),h(1,"mat-progress-spinner",39),a())}function Fx(t,r){if(t&1&&(o(0,"div",40)(1,"div",41),l(2),a()()),t&2){let e=u(2);c(2),C(e.errorMessage)}}function zx(t,r){t&1&&h(0,"iconify-icon",59)}function Lx(t,r){t&1&&h(0,"iconify-icon",60)}function Vx(t,r){t&1&&h(0,"iconify-icon",61)}function Bx(t,r){if(t&1&&(o(0,"div",42)(1,"div",43)(2,"div",44),Qn(),o(3,"svg",45)(4,"defs")(5,"linearGradient",46),h(6,"stop",47)(7,"stop",48),a()(),h(8,"circle",49)(9,"circle",50),a(),ar(),o(10,"div",51)(11,"strong"),l(12),F(13,"number"),a(),o(14,"span"),l(15,"Security Score"),a()()()(),o(16,"div",52)(17,"span",53),l(18,"Security Posture"),a(),o(19,"div",54)(20,"span",55),g(21,zx,1,0,"iconify-icon",56)(22,Lx,1,0,"iconify-icon",57)(23,Vx,1,0,"iconify-icon",58),a(),l(24),a()()()),t&2){let e=u(2);c(9),He("stroke-dasharray",e.ringCircumference)("stroke-dashoffset",e.getStrokeOffset()),c(3),x("",ie(13,10,(e.overallSecurityData==null?null:e.overallSecurityData.SCORE_PERCENTAGE)||0,"1.2-2"),"%"),c(7),yn(e.scoreStatusClass),c(),p("ngSwitch",e.scoreStatus),c(),p("ngSwitchCase","Bad"),c(),p("ngSwitchCase","Needs Improvement"),c(),p("ngSwitchCase","Good"),c(),x(" ",e.scoreStatus," ")}}function Ux(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit,n=u(2);p("value",e),c(),x(" ",n.formatName(e)," ")}}function jx(t,r){if(t&1&&(Qn(),I(0),h(1,"circle",66),T()),t&2){let e=r.$implicit;c(),He("stroke",e.color)("stroke-dasharray",e.dashArray)("stroke-dashoffset",e.dashOffset)}}function $x(t,r){if(t&1){let e=A();o(0,"div",62),v("click",function(){O(e);let i=u(2);return P(i.showVulnerabilityFindings())}),Qn(),o(1,"svg",63),h(2,"circle",64),g(3,jx,2,3,"ng-container",65),a()()}if(t&2){let e=u(2);c(3),p("ngForOf",e.severitySegments)}}function qx(t,r){t&1&&(o(0,"div",67),l(1,"No data found"),a())}function Hx(t,r){if(t&1&&(o(0,"div",68),h(1,"span",69),l(2),a()),t&2){let e=r.$implicit;c(),pe("background",e.color),c(),rt(" ",e.label,": ",e.count," ")}}function Wx(t,r){t&1&&(o(0,"div",38),h(1,"mat-progress-spinner",39),a())}function Gx(t,r){if(t&1&&(o(0,"div",40)(1,"div",41),l(2),a()()),t&2){let e=u(2);c(2),C(e.servicesError)}}function Yx(t,r){if(t&1&&(o(0,"span",84),l(1),a()),t&2){let e=u().$implicit;c(),x(" N/A: ",e.notAvailable," ")}}function Kx(t,r){if(t&1&&h(0,"span",85),t&2){let e=u().$implicit;pe("width",e.notAvailablePercent,"%")}}function Qx(t,r){if(t&1&&(o(0,"div",71)(1,"div",72)(2,"span",73),l(3),a(),o(4,"div",74)(5,"span",75),l(6),a(),o(7,"span",76),l(8),a(),o(9,"span",77),l(10),a(),g(11,Yx,2,1,"span",78),a()(),o(12,"div",79)(13,"div",80),h(14,"span",81)(15,"span",82),g(16,Kx,1,2,"span",83),a()()()),t&2){let e=r.$implicit;c(3),C(e.name),c(3),x("Total: ",e.total),c(2),x("Passed: ",e.passed),c(2),x("Failed: ",e.failed),c(),p("ngIf",e.notAvailable>0),c(3),pe("width",e.passedPercent,"%"),c(),pe("width",e.failedPercent,"%"),c(),p("ngIf",e.notAvailablePercent)}}function Jx(t,r){if(t&1&&(I(0),g(1,Qx,17,10,"div",70),T()),t&2){let e=u(2);c(),p("ngForOf",e.servicesOverview)}}function Zx(t,r){t&1&&(o(0,"div",101),h(1,"mat-progress-spinner",102),a())}function Xx(t,r){if(t&1&&(o(0,"div",103),l(1),a()),t&2){let e=u(3);c(),x(" ",e.complianceError," ")}}function ev(t,r){t&1&&(o(0,"div",101),l(1," No compliance data available for the selected range. "),a())}function tv(t,r){t&1&&(o(0,"th",115),l(1,"Compliance Standard"),a())}function nv(t,r){if(t&1&&(o(0,"td",116)(1,"div",117),l(2),a()()),t&2){let e=r.$implicit,n=u(4);c(2),C(n.formatName(e.METRIC))}}function iv(t,r){t&1&&(o(0,"th",115),l(1,"Score"),a())}function ov(t,r){if(t&1&&(o(0,"td",116)(1,"span",118),l(2),F(3,"number"),a()()),t&2){let e=r.$implicit,n=u(4);c(),p("ngClass",n.getComplianceScoreClass(e.SCORE_PERCENTAGE)),c(),x(" ",ie(3,2,e.SCORE_PERCENTAGE||0,"1.2-2"),"%")}}function rv(t,r){t&1&&(o(0,"th",115),l(1,"Progress"),a())}function av(t,r){if(t&1&&(o(0,"td",116)(1,"div",119)(2,"div",120)(3,"span",121),l(4),a(),o(5,"span",121),l(6,"Passed"),a()(),o(7,"div",120)(8,"span",122),l(9),a(),o(10,"span",122),l(11,"Failed"),a()(),o(12,"div",120)(13,"span",123),l(14),a(),o(15,"span",123),l(16,"Total"),a()()()()),t&2){let e=r.$implicit;c(4),C(e.PASSED_UNIQUE_CONTROLS),c(5),C(e.FAILED_UNIQUE_CONTROLS),c(5),C(e.TOTAL_UNIQUE_CONTROLS)}}function lv(t,r){t&1&&(o(0,"th",115),l(1,"Actions"),a())}function sv(t,r){if(t&1){let e=A();o(0,"td",124)(1,"button",125),v("click",function(){let i=O(e).$implicit,s=u(4);return P(s.showReport(i))}),l(2,"View Report"),a()()}}function cv(t,r){t&1&&h(0,"tr",126)}function dv(t,r){t&1&&h(0,"tr",127)}function pv(t,r){if(t&1&&(o(0,"div",104)(1,"table",105),I(2,106),g(3,tv,2,0,"th",107)(4,nv,3,1,"td",108),T(),I(5,109),g(6,iv,2,0,"th",107)(7,ov,4,5,"td",108),T(),I(8,110),g(9,rv,2,0,"th",107)(10,av,17,3,"td",108),T(),I(11,111),g(12,lv,2,0,"th",107)(13,sv,3,0,"td",112),T(),g(14,cv,1,0,"tr",113)(15,dv,1,0,"tr",114),a()()),t&2){let e=u(3);c(),p("dataSource",e.complianceRows),c(13),p("matHeaderRowDef",e.complianceDisplayedColumns),c(),p("matRowDefColumns",e.complianceDisplayedColumns)}}function mv(t,r){if(t&1){let e=A();o(0,"section",86)(1,"mat-card",87)(2,"div",88)(3,"div",89)(4,"h3"),l(5,"Compliance Status"),a()(),o(6,"div",90)(7,"div",91)(8,"mat-date-range-input",92),h(9,"input",93)(10,"input",94),a(),h(11,"mat-datepicker-toggle",95),o(12,"mat-date-range-picker",96,1),v("closed",function(){O(e);let i=u(2);return P(i.applyDateRange())}),a()()()(),o(14,"div",97),g(15,Zx,2,0,"div",98)(16,Xx,2,1,"div",99)(17,ev,2,0,"div",98)(18,pv,16,3,"div",100),a()()()}if(t&2){let e=Ce(13),n=u(2);c(8),p("rangePicker",e)("formGroup",n.dateRange),c(3),p("for",e),c(4),p("ngIf",n.complianceLoading),c(),p("ngIf",!n.complianceLoading&&n.complianceError),c(),p("ngIf",!n.complianceLoading&&!n.complianceError&&!n.complianceRows.length),c(),p("ngIf",!n.complianceLoading&&!n.complianceError&&n.complianceRows.length)}}function uv(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("value",e),c(),x(" ",n.formatName(e)," ")}}
8function gv(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function fv(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function hv(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function _v(t,r){if(t&1&&(o(0,"mat-option",29),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function Cv(t,r){t&1&&(o(0,"div",142),h(1,"mat-progress-spinner",143),a())}function xv(t,r){if(t&1&&(o(0,"div",144),l(1),a()),t&2){let e=u(3);c(),x(" ",e.vulnerabilityError," ")}}function vv(t,r){t&1&&(o(0,"th",115),l(1,"Finding"),a())}function bv(t,r){if(t&1&&(o(0,"td",116)(1,"div",153)(2,"div",154),l(3),a(),o(4,"div",155),l(5),a(),o(6,"div",156),l(7),a()()()),t&2){let e=r.$implicit;c(3),C(e==null?null:e.TITLE),c(2),C(e==null?null:e.DESCRIPTION),c(2),C(e==null?null:e.REGION)}}function yv(t,r){t&1&&(o(0,"th",115),l(1,"Severity"),a())}function Mv(t,r){if(t&1&&(o(0,"td",116)(1,"span"),l(2),a()()),t&2){let e=r.$implicit,n=u(4);c(),yn(n.severityBadgeClass(e==null?null:e.SEVERITY_LABEL)),c(),x(" ",e==null?null:e.SEVERITY_LABEL)}}function Sv(t,r){t&1&&(o(0,"th",115),l(1,"Workflow Status"),a())}function Ov(t,r){if(t&1&&(o(0,"td",116)(1,"span"),l(2),a()()),t&2){let e=r.$implicit,n=u(4);c(),yn(n.statusBadgeClass(e==null?null:e.WORKFLOW_STATUS)),c(),x(" ",e==null?null:e.WORKFLOW_STATUS)}}function Pv(t,r){t&1&&(o(0,"th",115),l(1,"Compliance Status"),a())}function Ev(t,r){if(t&1&&(o(0,"td",116)(1,"span"),l(2),a()()),t&2){let e=r.$implicit,n=u(4);c(),yn(n.statusBadgeClass(e==null?null:e.COMPLIANCE_STATUS)),c(),x(" ",e==null?null:e.COMPLIANCE_STATUS)}}function wv(t,r){t&1&&(o(0,"th",115),l(1,"Service"),a())}function Iv(t,r){if(t&1&&(o(0,"td",116),l(1),a()),t&2){let e=r.$implicit;c(),C(e==null?null:e.SERVICE)}}function Tv(t,r){t&1&&(o(0,"th",115),l(1,"Last Detected"),a())}function Av(t,r){if(t&1&&(o(0,"td",116),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),x(" ",ie(2,1,e==null?null:e.LAST_OBSERVED_AT,"dd-MM-yyyy")," ")}}function Dv(t,r){t&1&&(o(0,"th",115),l(1,"CVE"),a())}function Rv(t,r){if(t&1&&(o(0,"td",116),l(1),a()),t&2){let e=r.$implicit;c(),C(e==null?null:e.CVE_ID)}}function kv(t,r){t&1&&(o(0,"th",115),l(1,"Actions"),a())}function Nv(t,r){if(t&1){let e=A();o(0,"td",116)(1,"button",125),v("click",function(){let i=O(e).$implicit,s=u(4);return P(s.openFindingDetails(i))}),l(2," View "),a()()}}function Fv(t,r){t&1&&h(0,"tr",126)}function zv(t,r){t&1&&h(0,"tr",127)}function Lv(t,r){t&1&&(o(0,"div",142),l(1," No findings for the selected filters. "),a())}function Vv(t,r){if(t&1&&(I(0),o(1,"table",145),I(2,146),g(3,vv,2,0,"th",107)(4,bv,8,3,"td",108),T(),I(5,147),g(6,yv,2,0,"th",107)(7,Mv,3,3,"td",108),T(),I(8,148),g(9,Sv,2,0,"th",107)(10,Ov,3,3,"td",108),T(),I(11,149),g(12,Pv,2,0,"th",107)(13,Ev,3,3,"td",108),T(),I(14,150),g(15,wv,2,0,"th",107)(16,Iv,2,1,"td",108),T(),I(17,151),g(18,Tv,2,0,"th",107)(19,Av,3,4,"td",108),T(),I(20,152),g(21,Dv,2,0,"th",107)(22,Rv,2,1,"td",108),T(),I(23,111),g(24,kv,2,0,"th",107)(25,Nv,3,0,"td",108),T(),g(26,Fv,1,0,"tr",113)(27,zv,1,0,"tr",114),a(),g(28,Lv,2,0,"div",139),T()),t&2){let e=u(3);c(),p("dataSource",e.vulnerabilityFindings),c(25),p("matHeaderRowDef",e.vulnerabilityDisplayedColumns),c(),p("matRowDefColumns",e.vulnerabilityDisplayedColumns),c(),p("ngIf",!e.vulnerabilityFindings.length)}}function Bv(t,r){if(t&1){let e=A();o(0,"button",162),v("click",function(){O(e);let i=u().$implicit,s=u(4);return P(s.goToVulnerabilityPage(i))}),l(1),a()}if(t&2){let e=u().$implicit,n=u(4);Y("active",e===n.vulnerabilityCurrentPage),p("disabled",e===n.vulnerabilityCurrentPage),c(),x(" ",e," ")}}function Uv(t,r){t&1&&(o(0,"span",163),l(1,"..."),a())}function jv(t,r){if(t&1&&(I(0),g(1,Bv,2,4,"button",160)(2,Uv,2,0,"span",161),T()),t&2){let e=r.$implicit;c(),p("ngIf",e!=="ellipsis"),c(),p("ngIf",e==="ellipsis")}}function $v(t,r){if(t&1){let e=A();o(0,"div",157)(1,"span"),l(2),a(),o(3,"div",158)(4,"button",159),v("click",function(){O(e);let i=u(3);return P(i.goToVulnerabilityPage(i.vulnerabilityCurrentPage-1))}),l(5," Previous "),a(),g(6,jv,3,2,"ng-container",65),o(7,"button",159),v("click",function(){O(e);let i=u(3);return P(i.goToVulnerabilityPage(i.vulnerabilityCurrentPage+1))}),l(8," Next "),a()()()}if(t&2){let e=u(3);c(2),In("Showing ",e.vulnerabilityRangeStart," to ",e.vulnerabilityRangeEnd," of ",e.vulnerabilityTotalCount," results"),c(2),p("disabled",e.vulnerabilityCurrentPage===1||e.vulnerabilityLoading),c(2),p("ngForOf",e.vulnerabilityPaginationItems),c(),p("disabled",e.vulnerabilityCurrentPage===e.vulnerabilityTotalPages||e.vulnerabilityLoading)}}function qv(t,r){if(t&1){let e=A();o(0,"section",128,2)(2,"mat-card",129)(3,"div",130)(4,"div",26)(5,"h3"),l(6,"Vulnerability Findings"),a()()(),o(7,"div",131)(8,"div",14)(9,"div",15),l(10," Compliance Standard "),a(),o(11,"div",132)(12,"mat-select",133),v("selectionChange",function(i){O(e);let s=u(2);return P(s.onStandardChange(i.value))}),o(13,"mat-option",29),l(14,"ALL"),a(),g(15,uv,2,2,"mat-option",18),a()()(),o(16,"div",14)(17,"div",15),l(18," C
8ompliance Status "),a(),o(19,"div",132)(20,"mat-select",134),v("selectionChange",function(i){O(e);let s=u(2);return P(s.onStatusChange(i.value))}),o(21,"mat-option",29),l(22,"ALL"),a(),g(23,gv,2,2,"mat-option",18),a()()(),o(24,"div",14)(25,"div",15),l(26," Workflow Status "),a(),o(27,"div",132)(28,"mat-select",135),v("selectionChange",function(i){O(e);let s=u(2);return P(s.onWorkflowChange(i.value))}),o(29,"mat-option",29),l(30,"ALL"),a(),g(31,fv,2,2,"mat-option",18),a()()(),o(32,"div",14)(33,"div",15),l(34," Severity "),a(),o(35,"div",132)(36,"mat-select",136),v("selectionChange",function(i){O(e);let s=u(2);return P(s.onSeverityChange(i.value))}),o(37,"mat-option",29),l(38,"ALL"),a(),g(39,hv,2,2,"mat-option",18),a()()(),o(40,"div",14)(41,"div",15),l(42," Service "),a(),o(43,"div",132)(44,"mat-select",137),v("selectionChange",function(i){O(e);let s=u(2);return P(s.onServiceChange(i.value))}),o(45,"mat-option",29),l(46,"ALL"),a(),g(47,_v,2,2,"mat-option",18),a()()()(),o(48,"div",138),g(49,Cv,2,0,"div",139)(50,xv,2,1,"div",140)(51,Vv,29,4,"ng-container",7),a(),g(52,$v,9,6,"div",141),a()()}if(t&2){let e=u(2);c(12),p("value",e.selectedStandard),c(),p("value",""),c(2),p("ngForOf",e.standardOptions),c(5),p("value",e.selectedStatus),c(),p("value",""),c(2),p("ngForOf",e.statusOptions),c(5),p("value",e.selectedWorkflow),c(),p("value",""),c(2),p("ngForOf",e.workflowOptions),c(5),p("value",e.selectedSeverity),c(),p("value",""),c(2),p("ngForOf",e.severityOptions),c(5),p("value",e.selectedService),c(),p("value",""),c(2),p("ngForOf",e.serviceOptions),c(2),p("ngIf",e.vulnerabilityLoading),c(),p("ngIf",!e.vulnerabilityLoading&&e.vulnerabilityError),c(),p("ngIf",!e.vulnerabilityLoading&&!e.vulnerabilityError),c(),p("ngIf",e.vulnerabilityTotalCount)}}function Hv(t,r){if(t&1){let e=A();o(0,"div")(1,"div",11)(2,"div",12)(3,"div",13),l(4,"Cloud Security Posture Management & Compliance Monitoring"),a()(),o(5,"div",14)(6,"div",15),l(7," Accounts "),a(),o(8,"div",16)(9,"mat-select",17),se("ngModelChange",function(i){O(e);let s=u();return le(s.selectedAccount,i)||(s.selectedAccount=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onAccountChange(i.value))}),g(10,kx,2,2,"mat-option",18),a()()()(),o(11,"section",19)(12,"mat-card",20)(13,"div",21)(14,"h3"),l(15,"Overall Security Score"),a()(),g(16,Nx,2,0,"div",22)(17,Fx,3,1,"div",23)(18,Bx,25,13,"div",24),a(),o(19,"mat-card",25)(20,"div",26)(21,"h3"),l(22,"Vulnerability Severity"),a()(),o(23,"div",27)(24,"mat-select",28),se("ngModelChange",function(i){O(e);let s=u();return le(s.severityFilters.standard,i)||(s.severityFilters.standard=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onSeverityStandardChange(i.value))}),o(25,"mat-option",29),l(26,"ALL"),a(),g(27,Ux,2,2,"mat-option",18),a()(),g(28,$x,4,1,"div",30)(29,qx,2,0,"ng-template",null,0,at),o(31,"div",31),g(32,Hx,3,4,"div",32),a()(),o(33,"mat-card",33)(34,"div",34)(35,"div",26)(36,"h3"),l(37,"Services Overview"),a()()(),o(38,"div",35),g(39,Wx,2,0,"div",22)(40,Gx,3,1,"div",23)(41,Jx,2,1,"ng-container",7),a()()(),g(42,mv,19,7,"section",36)(43,qv,53,19,"section",37),a()}if(t&2){let e=Ce(30),n=u();c(9),ae("ngModel",n.selectedAccount),c(),p("ngForOf",n.accounts),c(6),p("ngIf",n.loading),c(),p("ngIf",!n.loading&&n.errorMessage),c(),p("ngIf",!n.loading&&!n.errorMessage),c(6),ae("ngModel",n.severityFilters.standard),c(),p("value",""),c(2),p("ngForOf",n.standardOptions),c(),p("ngIf",!n.noSeverityData)("ngIfElse",e),c(4),p("ngForOf",n.severityData),c(7),p("ngIf",n.servicesLoading),c(),p("ngIf",!n.servicesLoading&&n.servicesError),c(),p("ngIf",!n.servicesLoading&&!n.servicesError),c(),p("ngIf",n.isCspmEnabled),c(),p("ngIf",n.isCspmEnabled)}}function Wv(t,r){t&1&&(o(0,"div",165),h(1,"app-cspm-azure-dashboard"),a())}function Gv(t,r){if(t&1&&(o(0,"div"),g(1,Wv,2,0,"div",164),a()),t&2){let e=u();c(),p("ngIf",e.isCspmEnabled)}}function Yv(t,r){if(t&1){let e=A();o(0,"app-view-compliance-report",166),v("closed",function(){O(e);let i=u();return P(i.closeReport())}),a()}if(t&2){let e=u();p("complianceData",e.activeComplianceRow)("dateRange",Ei(2,Rx,e.complianceFromDate,e.complianceToDate))}}function Kv(t,r){if(t&1){let e=A();o(0,"app-view-finding-details",167),v("closed",function(){O(e);let i=u();return P(i.closeFindingDetails())}),a()}if(t&2){let e=u();p("open",e.isFindingDetailsOpen)("finding",e.activeFinding)}}function Qv(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function Jv(t,r){t&1&&(o(0,"span",174),l(1,"Requesting... "),h(2,"iconify-icon",175),a())}function Zv(t,r){if(t&1){let e=A();o(0,"section",168)(1,"div",169)(2,"div",170),h(3,"iconify-icon",171),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",172),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,Qv,2,0,"span",7)(10,Jv,3,0,"span",173),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var _p=(()=>{class t{get severitySegments(){let e=this.severityChartOrder.map(m=>this.severityData.find(f=>f.label===m)).filter(m=>!!m),n=e.reduce((m,f)=>m+f.count,0)||1,i=this.severityRingCircumference,s=i*this.severityGapRatio,d=0;return e.map(m=>{let f=i*(m.count/n),b=`${Math.max(f-s,i*.001).toFixed(2)} ${i.toFixed(2)}`,M=d.toFixed(2);return d-=f,{color:m.color,dashArray:b,dashOffset:M}})}constructor(e,n,i,s,d,m){this.fb=e,this.dashboardService=n,this.notify=i,this.dialog=s,this.ngZone=d,this.cdr=m,this.isAccessLoading=!1,this.ringCircumference=2*Math.PI*52,this.providerIconMap=Is,this.providerNameMap=Ts,this.providerOrder=["aws","azure","gcp","oracle"],this.providers=this.buildProviders(),this.selectedProvider=this.providers[0]?.id||"",this.isComplianceReportOpen=!1,this.isFindingDetailsOpen=!1,this.activeFinding=null,this.activeComplianceRow=null,this.loading=!1,this.account_Id=null,this.accounts=[],this.selectedAccount="",this.errorMessage="",this.severityLoading=!1,this.severityFilters={standard:""},this.severityData=[],this.severityColorMap={CRITICAL:"#E53935",HIGH:"#F97316",MEDIUM:"#F4B400",LOW:"#1FBF54"},this.defaultSeverityOrder=["Critical","High","Medium","Low"],this.severityChartOrder=[...this.defaultSeverityOrder],this.fallbackSeverityColor="#CBD5F5",this.noSeverityData=!0,this.severityRingRadius=48,this.severityRingCircumference=2*Math.PI*this.severityRingRadius,this.severityGapRatio=.003,this.servicesOverview=[],this.servicesLoading=!1,this.servicesError="",this.complianceRows=[],this.complianceLoading=!1,this.complianceError="",this.complianceFromDate="",this.complianceToDate="",this.vulnerabilityFindings=[],this.vulnerabilityTotalCount=0,this.vulnerabilityCurrentPage=1,this.vulnerabilityLoading=!1,this.vulnerabilityError="",this.vulnerabilityLimit=10,this.complianceDisplayedColumns=["standard","score","progress","actions"],this.vulnerabilityDisplayedColumns=["finding","severity","workflowStatus","complianceStatus","service","detected","cve","actions"],this.standardOptions=[],this.statusOptions=[],this.workflowOptions=[],this.severityOptions=[],this.serviceOptions=[],this.selectedStandard="",this.selectedStatus="",this.selectedWorkflow="",this.selectedSeverity="",this.selectedService="",this.selectedTab=0,this.isCspmEnabled=!0,this.dateRange=this.fb.group({start:[""],end:[""]}),this.resetSeverityData()}ngOnInit(){this.isCspmEnabled=this.isFeatureEnabled(3),this.isCspmEnabled&&(this.standardOptions=JSON.parse(window.localStorage.getItem("COMPLIANCE_STANDARD")||"[]"),this.statusOptions=JSON.parse(window.localStorage.getItem("COMPLIANCE_STATUS")||"[]"),this.workflowOptions=JSON.parse(window.localStorage.getItem("WORKFLOW_STATUS")||"[]"),this.severityOptions=JSON.parse(window.localStorage.getItem("SEVERITY_LABEL")||"[]"),this.serviceOptions=JSON.parse(window.localStorage.getItem("SERVICE")||"[]"),this.standardOptions.length!==0?this.severityFilters.standard=this.standardOptions[0]:this.resetSeverityData(),this.initializeComplianceDateRange(),this.getAccountDetails())}buildProviders(){return this.providerOrder.filter(n=>this.providerIconMap[n]).map(n=>({id:n,label:this.providerNameMap[n]||this.toTitleCase(n),icon:this.getProviderIcon(n)}))}
8toTitleCase(e){return e.split(" ").filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}setProvider(e){this.selectedProvider=e}getProviderIcon(e){if(!e)return"";let n=e.toLowerCase(),i=this.providerIconMap[n];return i?`assets/${i}`:""}getStrokeOffset(){return this.ringCircumference-this.ringCircumference*this.overallSecurityData?.SCORE_PERCENTAGE/100}severityBadgeClass(e){let n=(e||"").toLowerCase();return n==="critical"?"badge critical":n==="high"?"badge high":n==="medium"?"badge medium":n==="low"?"badge low":"badge neutral"}statusBadgeClass(e){let n=(e||"").toLowerCase();return n==="open"?"badge open":n==="progress"?"badge progress":n==="resolved"?"badge resolved":"badge neutral"}showReport(e){this.activeComplianceRow={metric:e?.METRIC||""},this.isComplianceReportOpen=!0}closeReport(){this.isComplianceReportOpen=!1,this.activeComplianceRow=null}showVulnerabilityFindings(){let e=this.findingsSectionRef?.nativeElement;e&&e.scrollIntoView({behavior:"smooth",block:"start"})}openFindingDetails(e){this.activeFinding=e,this.activeFinding={ID:e?.ROW_ID||""},this.isFindingDetailsOpen=!0}closeFindingDetails(){this.isFindingDetailsOpen=!1,this.activeFinding=null}getComplianceScoreClass(e){let n=Number(e);return Number.isNaN(n)?"":n<75?"score-bad":n<85?"score-warning":"score-good"}initializeComplianceDateRange(){let e=new Date,n=new Date;n.setDate(e.getDate()-30),this.dateRange.patchValue({start:n,end:e}),this.updateComplianceRange(n,e)}updateComplianceRange(e,n){this.complianceFromDate=(0,pl.default)(e).format("YYYY-MM-DD"),this.complianceToDate=(0,pl.default)(n).format("YYYY-MM-DD")}buildSeverityOrder(e){let n=e.filter(Boolean),i=this.defaultSeverityOrder.filter(s=>n.includes(s));return n.forEach(s=>{i.includes(s)||i.push(s)}),i.length?i:[...this.defaultSeverityOrder]}formatSeverityLabel(e){return e?e.toLowerCase().split(/[_\s]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Unknown"}getSeverityColor(e){return this.severityColorMap[e]||this.fallbackSeverityColor}resetSeverityData(){this.severityData=this.defaultSeverityOrder.map(e=>({label:e,count:0,color:this.getSeverityColor(e.toUpperCase())})),this.severityChartOrder=[...this.defaultSeverityOrder],this.noSeverityData=!0}displayErrorMessage(e){this.errorMessage=e}onSeverityStandardChange(e){this.severityFilters.standard=(e||"").toString(),this.getVulnerabilitySeverity()}getAccountDetails(){this.dashboardService.getClientCredentials(1).subscribe({next:e=>{this.accounts=e?.object||[];let n=this.accounts.find(s=>s?.MASTER_ACCOUNT===!0)||this.accounts[0];if(!n?.ACCOUNT_ID)return;let i=n?.ACCOUNT_ID;this.selectedAccount=i,this.account_Id=i,this.grfOrgId=n?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",i),window.localStorage.setItem("grfOrgId",this.grfOrgId),this.refreshDashboardData(),this.refreshView()},error:e=>{e.error?.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}onAccountChange(e){let n=this.accounts.find(i=>i?.ACCOUNT_ID===e);n&&this.switchAccount(n)}switchAccount(e){this.account_Id=e?.ACCOUNT_ID,this.selectedAccount=e?.ACCOUNT_ID;let n=e?.DATA_READY&&e?.MASTER_ACCOUNT;this.grfOrgId=e?.GRF_ORG_ID,window.localStorage.setItem("currentAccountID",this.account_Id),window.localStorage.setItem("hasReadyAccount",n),window.localStorage.setItem("grfOrgId",this.grfOrgId),this.refreshDashboardData(),this.refreshView()}refreshDashboardData(){this.getSecurityScoreData(),this.fetchServicesOverview(),this.fetchComplianceStatus(),this.fetchVulnerabilityFindings(),this.severityFilters.standard?this.getVulnerabilitySeverity():this.resetSeverityData()}getSecurityScoreData(){this.loading=!0,this.errorMessage="",this.dashboardService.getOverallSecurityScore(this.account_Id).subscribe({next:e=>{this.loading=!1,this.overallSecurityData=e?.object||[];let n=this.overallSecurityData?.SCORE_PERCENTAGE||0;n<75?(this.scoreStatus="Bad",this.scoreStatusClass="posture-bad"):n>=75&&n<85?(this.scoreStatus="Needs Improvement",this.scoreStatusClass="posture-warning"):(this.scoreStatus="Good",this.scoreStatusClass="posture-good"),this.refreshView()},error:e=>{this.loading=!1,this.displayErrorMessage("Error fetching Overall Security Score."),e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}getVulnerabilitySeverity(){let e=(this.severityFilters.standard||"").toString().trim();if(!this.account_Id||!e){this.resetSeverityData();return}this.severityLoading=!0,this.dashboardService.getVulnerabilitySeverity(this.account_Id,e).subscribe({next:n=>{this.severityLoading=!1;let i=Array.isArray(n?.object)?n.object:[];for(let f=0;f<i.length;f++)i[f].SEVERITY_LABEL=="INFORMATIONAL"&&i.splice(f,1);this.vulnerabilitySeverity=i;let s=i.reduce((f,_)=>{let b=(_?.SEVERITY_LABEL||"").toString().toUpperCase();if(!b)return f;let M=Number(_?.COUNT??0);return f[b]=(f[b]||0)+(isNaN(M)?0:M),f},{}),d=this.defaultSeverityOrder.map(f=>{let _=f.toUpperCase();return{label:f,count:s[_]??0,color:this.getSeverityColor(_)}});
8Object.keys(s).forEach(f=>{this.defaultSeverityOrder.some(_=>_.toUpperCase()===f)||d.push({label:this.formatSeverityLabel(f),count:s[f],color:this.getSeverityColor(f)})});let m=d.some(f=>f.count>0);this.noSeverityData=!m,this.severityData=d,this.severityChartOrder=this.buildSeverityOrder(d.map(f=>f.label)),this.refreshView()},error:n=>{this.resetSeverityData(),this.severityLoading=!1,this.notify.showNotification(n.error?.message||"Failed to fetch vulnerability severity","top",E[n.error?.status]?E[n.error?.status]:"error",n.error?.status||400),this.refreshView()}})}fetchServicesOverview(){if(!this.account_Id){this.servicesOverview=[];return}this.servicesLoading=!0,this.servicesError="",this.dashboardService.getServicesOverview(this.account_Id).subscribe({next:e=>{let n=Array.isArray(e?.object)?e.object:Array.isArray(e)?e:[];this.servicesOverview=n.map(i=>this.mapServiceOverview(i)).filter(i=>!!i),this.servicesLoading=!1,this.refreshView()},error:e=>{this.servicesOverview=[],this.servicesLoading=!1,this.servicesError="Unable to load service overview.",e.error.status==401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}fetchComplianceStatus(){if(!this.account_Id||!this.complianceFromDate||!this.complianceToDate){this.complianceRows=[];return}this.complianceLoading=!0,this.complianceError="",this.dashboardService.getComplianceStatus(this.account_Id,this.complianceFromDate,this.complianceToDate).subscribe({next:e=>{let n=Array.isArray(e?.object)?e.object:Array.isArray(e)?e:[];this.complianceRows=n,this.complianceLoading=!1,this.refreshView()},error:e=>{this.complianceRows=[],this.complianceLoading=!1,this.complianceError="Unable to load compliance status.",e?.error?.status===401&&this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}fetchVulnerabilityFindings(e=1){if(!this.account_Id){this.vulnerabilityFindings=[],this.vulnerabilityTotalCount=0,this.vulnerabilityCurrentPage=1;return}let n=Math.max(1,e),i=this.vulnerabilityCurrentPage||1;this.vulnerabilityCurrentPage=n,this.vulnerabilityLoading=!0,this.vulnerabilityError="",this.dashboardService.getVulnerabilityFindings(this.account_Id,this.selectedStandard.trim(),this.selectedStatus.trim(),this.selectedWorkflow.trim(),this.selectedSeverity.trim(),this.selectedService.trim(),n,this.vulnerabilityLimit).subscribe({next:s=>{let d=s?.object||s||{},m=Array.isArray(d?.DATA)?d.DATA:Array.isArray(d)?d:[];this.vulnerabilityFindings=m;let f=Number(d?.TOTAL_COUNT);this.vulnerabilityTotalCount=!isNaN(f)&&f>=0?f:m.length;let _=Number(d?.PAGE),b=!isNaN(_)&&_>0?_:n,M=this.vulnerabilityTotalPages;this.vulnerabilityCurrentPage=Math.min(Math.max(b,1),M),this.vulnerabilityLoading=!1,this.refreshView()},error:s=>{this.vulnerabilityFindings=[],this.vulnerabilityTotalCount=0,this.vulnerabilityCurrentPage=i,this.vulnerabilityLoading=!1,this.vulnerabilityError="Unable to load vulnerability findings.",s?.error?.status===401&&this.notify.showNotification(s.error.message,"top",E[s.error.status]?E[s.error.status]:"error",s.error.status),this.refreshView()}})}get vulnerabilityTotalPages(){return this.vulnerabilityTotalCount?Math.max(1,Math.ceil(this.vulnerabilityTotalCount/this.vulnerabilityLimit)):1}get vulnerabilityRangeStart(){return!this.vulnerabilityTotalCount||!this.vulnerabilityFindings.length?0:(this.vulnerabilityCurrentPage-1)*this.vulnerabilityLimit+1}get vulnerabilityRangeEnd(){if(!this.vulnerabilityTotalCount||!this.vulnerabilityFindings.length)return 0;let e=this.vulnerabilityRangeStart+this.vulnerabilityFindings.length-1;return Math.min(e,this.vulnerabilityTotalCount)}get vulnerabilityPaginationItems(){let e=this.vulnerabilityTotalPages;if(e<=7)return Array.from({length:e},(m,f)=>f+1);let n=this.vulnerabilityCurrentPage,i=new Set([1,e,n]);i.add(n-1),i.add(n+1),n<=3&&(i.add(2),i.add(3),i.add(4)),n>=e-2&&(i.add(e-1),i.add(e-2),i.add(e-3));let s=Array.from(i).filter(m=>m>=1&&m<=e).sort((m,f)=>m-f),d=[];return s.forEach((m,f)=>{f>0&&m-s[f-1]>1&&d.push("ellipsis"),d.push(m)}),d}goToVulnerabilityPage(e){let n=this.vulnerabilityTotalPages,i=Math.min(Math.max(e,1),n);i===this.vulnerabilityCurrentPage||this.vulnerabilityLoading||(this.fetchVulnerabilityFindings(i),this.showVulnerabilityFindings())}mapServiceOverview(e){if(!e)return null;let n=Number(e.PASSED)||0,i=Number(e.FAILED)||0,s=Number(e.NOT_AVAILABLE)||0,d=n+i+s,m=d||1;return{name:e.SERVICE||"Unknown Service",total:d,passed:n,failed:i,notAvailable:s,passedPercent:n/m*100,failedPercent:i/m*100,notAvailablePercent:s/m*100}}
8applyDateRange(){if(this.dateRange.invalid)return;let{start:e,end:n}=this.dateRange.value;if(!e||!n)return;let i=new Date(e),s=new Date(n);this.updateComplianceRange(i,s),this.fetchComplianceStatus()}formatName(e){return e.replace(/-/g," ").toUpperCase()}onStandardChange(e){this.selectedStandard=e,this.fetchVulnerabilityFindings()}onStatusChange(e){this.selectedStatus=e,this.fetchVulnerabilityFindings()}onWorkflowChange(e){this.selectedWorkflow=e,this.fetchVulnerabilityFindings()}onSeverityChange(e){this.selectedSeverity=e,this.fetchVulnerabilityFindings()}onServiceChange(e){this.selectedService=e,this.fetchVulnerabilityFindings()}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:3}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onTabChange(e){this.selectedTab=e.index}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(re),y(V),y(Se),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cspm-dashboard"]],viewQuery:function(n,i){if(n&1&&bt(Dx,5),n&2){let s;ht(s=_t())&&(i.findingsSectionRef=s.first)}},decls:12,vars:11,consts:[["severityChartEmpty",""],["picker",""],["findingsSection",""],[1,"cspm-page"],[1,"main-content"],[1,"tab-buttons"],[1,"tab-button",3,"click"],[4,"ngIf"],[3,"complianceData","dateRange","closed",4,"ngIf"],[3,"open","finding","closed",4,"ngIf"],["class","feature-lock-overlay",4,"ngIf"],[1,"cspm-header"],[1,"acc-header"],[1,"sub-content"],[1,"filter-section"],[1,"filter-label"],[1,"filter-select","account-select"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"cards-grid"],[1,"card","score-card"],[1,"card-header","score-card__header"],["class","spinner-container",4,"ngIf"],["class","error-container",4,"ngIf"],["class","score-container",4,"ngIf"],[1,"card","severity-card"],[1,"severity-card__header"],[1,"severity-filters"],["name","severityStandard",1,"severity-select__native",3,"ngModelChange","selectionChange","ngModel"],[3,"value"],["class","severity-chart",3,"click",4,"ngIf","ngIfElse"],[1,"severity-legend"],["class","item",4,"ngFor","ngForOf"],[1,"card","services-card"],[1,"card-header","services-card__header"],[1,"service-list"],["class","compliance-section",4,"ngIf"],["class","findings-section",4,"ngIf"],[1,"spinner-container"],["diameter","70","mode","indeterminate","color","primary"],[1,"error-container"],[1,"error-message"],[1,"score-container"],[1,"score-visual"],[1,"score-ring"],["viewBox","0 0 120 120","role","img","aria-label","Security score gauge"],["id","scoreRingGradient","x1","0%","y1","0%","x2","100%","y2","100%"],["offset","0%","stop-color","#98A6FF"],["offset","100%","stop-color","#4B69F0"],["cx","60","cy","60","r","52",1,"bg"],["cx","60","cy","60","r","52","stroke","url(#scoreRingGradient)",1,"progress"],[1,"score-text"],[1,"score-footer"],[1,"score-label"],[1,"status-pill"],[3,"ngSwitch"],["icon","material-symbols:error-outline","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:warning-outline-rounded","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:check-circle-outline","width","24","height","24",4,"ngSwitchCase"],["icon","material-symbols:error-outline","width","24","height","24"],["icon","material-symbols:warning-outline-rounded","width","24","height","24"],["icon","material-symbols:check-circle-outline","width","24","height","24"],[1,"severity-chart",3,"click"],["viewBox","0 0 120 120","role","img","aria-label","Vulnerability severity distribution"],["cx","60","cy","60","r","48",1,"severity-chart__track"],[4,"ngFor","ngForOf"],["cx","60","cy","60","r","48","transform","rotate(-90 60 60)","stroke-linecap","round",1,"severity-chart__arc"],[1,"severity-chart","no-data"],[1,"item"],[1,"dot"],["class","service-row",4,"ngFor","ngForOf"],[1,"service-row"],[1,"service-header"],[1,"service-name"],[1,"service-metrics"],[1,"metric"],[1,"metric","metric--secure"],[1,"metric","metric--issues"],["class","metric metric--na",4,"ngIf"],[1,"service-progress"],[1,"service-progress__track"],[1,"service-progress__segment","passed"],[1,"service-progress__segment","failed"],["class","service-progress__segment na",3,"width",4,"ngIf"],[1,"metric","metric--na"],[1,"service-progress__segment","na"],[1,"compliance-section"],[1,"compliance-card"],[1,"compliance-header"],[1,"compliance-card-header"],[1,"filter-row"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[3,"closed"],[1,"compliance-content"],["class","compliance-placeholder",4,"ngIf"],["class","compliance-placeholder error",4,"ngIf"],["class","compliance-table-wrapper",4,"ngIf"],[1,"compliance-placeholder"],["diameter","48","mode","indeterminate","color","primary"],[1,"compliance-placeholder","error"],[1,"compliance-table-wrapper"],["mat-table","",1,"compliance-table",3,"dataSource"],["matColumnDef","standard"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","score"],["matColumnDef","progress"],["matColumnDef","actions"],["mat-cell","","class","actions",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"name"],[1,"score",3,"ngClass"],[1,"progress-info"],[1,"progress-metric"],[1,"metric-value","passed"],[1,"metric-value","failed"],[1,"metric-value"],["mat-cell","",1,"actions"],[1,"view-report-btn",3,"click"],["mat-header-row",""],["mat-row",""],[1,"findings-section"],[1,"findings-card"],[1,"findings-header"],[1,"filters","findings-filter-row"],[1,"filter-select"],["placeholder","Standard",3,"selectionChange","value"],["placeholder","Compliance Status",3,"selectionChange","value"],["placeholder","Workflow Status",3,"selectionChange","value"],["placeholder","Severity Label",3,"selectionChange","value"],["placeholder","Service",3,"selectionChange","value"],[1,"findings-table"],["class","table-placeholder",4,"ngIf"],["class","table-placeholder error",4,"ngIf"],["class","pagination-row",4,"ngIf"],[1,"table-placeholder"],["diameter","46","mode","indeterminate","color","primary"],[1,"table-placeholder","error"],["mat-table","",1,"mat-elevation-0","findings-mat-table",3,"dataSource"],["matColumnDef","finding"],["matColumnDef","severity"],["matColumnDef","workflowStatus"],["matColumnDef","complianceStatus"],["matColumnDef","service"],["matColumnDef","detected"],["matColumnDef","cve"],[1,"finding-desc"],[1,"title"],[1,"sub"],[1,"meta"],[1,"pagination-row"],[1,"pagination"],[1,"pill",3,"click","disabled"],["class","page",3,"active","disabled","click",4,"ngIf"],["class","ellipsis",4,"ngIf"],[1,"page",3,"click","disabled"],[1,"ellipsis"],["class","azure-container",4,"ngIf"],[1,"azure-container"],[3,"closed","complianceData","dateRange"],[3,"closed","open","finding"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"button",6),v("click",function(){return i.onTabChange({index:0})}),l(4," AWS "),a(),o(5,"button",6),v("click",function(){return i.onTabChange({index:1})}),l(6," Azure "),a()(),g(7,Hv,44,16,"div",7)(8,Gv,2,1,"div",7)(9,Yv,1,5,"app-view-compliance-report",8)(10,Kv,1,2,"app-view-finding-details",9),a(),g(11,Zv,11,3,"
8section",10),a()),n&2&&(Y("is-locked",!i.isCspmEnabled),c(3),Y("active",i.selectedTab===0),c(2),Y("active",i.selectedTab===1),c(2),p("ngIf",i.selectedTab==0),c(),p("ngIf",i.selectedTab==1),c(),p("ngIf",i.isComplianceReportOpen&&i.isCspmEnabled),c(),p("ngIf",i.isFindingDetailsOpen&&i.isCspmEnabled),c(),p("ngIf",!i.isCspmEnabled))},dependencies:[N,xe,$,B,cr,dr,z,Pt,Nt,fe,ue,Jt,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,ve,me,$e,Gt,Ge,We,mt,Zt,Xt,en,tn,nn,un,Yt,gp,fp,hp,Wt,pt],styles:[`.all-config[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}.allCard[_ngcontent-%COMP%]{width:95%;height:200px;display:flex;align-items:center;justify-content:center;font-style:italic;box-shadow:2px 2px 10px #0000001a}.cspm-page[_ngcontent-%COMP%]{padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f9fb);min-height:100%;display:flex;flex-direction:column;position:relative}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.cspm-page.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.spinner-container[_ngcontent-%COMP%], .error-container[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:200px}.error-message[_ngcontent-%COMP%]{color:#d32f2f;font-weight:600;text-align:center}.cspm-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:24px}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.sub-content[_ngcontent-%COMP%]{font-size:16px!important;line-height:24px;font-weight:400;color:#4b5563}.provider-tabs[_ngcontent-%COMP%]{display:flex;gap:8px;margin-bottom:24px;overflow-x:auto;padding-bottom:8px}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 16px;border:none;border-radius:8px;background:#fff;color:#1d4ed8;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;white-space:nowrap}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover:not(.active):not(:disabled){background:#dbeafe;border-color:none}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:#f3f4f6;color:#374151}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled   .icon[_ngcontent-%COMP%]{opacity:.7;color:#374151}.provider-tabs[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{background:#f1f5f9;border-color:#dbeafe;color:#1d4ed8;font-weight:500}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:20px;height:20px}.provider-tabs[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   .icon-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.cards-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:24px}.card[_ngcontent-%COMP%]{box-shadow:0 4px 18px #0f172a14;border-radius:18px;padding:24px;background:#fff}.score-card[_ngcontent-%COMP%]{padding:24px 28px;border:1px solid #e5e9f3;border-radius:20px;box-shadow:0 24px 45px #0f172a14}.score-card__header[_ngcontent-%COMP%]{margin-bottom:24px;align-items:center}.score-card__header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#111c44}.score-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#7a8bb1}.info-button[_ngcontent-%COMP%]{border:none;background:#f2f5ff;width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#4f5c82}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.card-icon-btn[_ngcontent-%COMP%]{border:none;background:transparent;padding:6px;border-radius:10px;cursor:pointer;color:#94a3b8;transition:background .2s ease,color .2s ease}.card-icon-btn[_ngcontent-%COMP%]:hover{background:#edf2ff;color:#1d4ed8}.card-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px}.helper-text[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.score-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.score-visual[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px;padding:8px 0 16px}.score-ring[_ngcontent-%COMP%]{position:relative;
8width:200px;height:200px}.score-ring[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%;height:100%;transform:rotate(-90deg)}.score-ring[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{fill:none;stroke-width:8;stroke-linecap:round}.score-ring[_ngcontent-%COMP%]   circle.bg[_ngcontent-%COMP%]{stroke:#eef1f7}.score-ring[_ngcontent-%COMP%]   circle.progress[_ngcontent-%COMP%]{transition:stroke-dashoffset .3s ease}.score-text[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:10px}.score-text[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#0f172a}.score-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#8a94ad;font-size:13px}.score-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center}.score-label[_ngcontent-%COMP%]{font-size:15px;color:#6f7d94}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:999px;font-weight:600;font-size:13px;line-height:1}.status-pill[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.posture-bad[_ngcontent-%COMP%]{background-color:#ffebee;color:#d32f2f}.posture-bad[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#d32f2f}.posture-warning[_ngcontent-%COMP%]{background:#fdf0c7;color:#b0760a}.posture-warning[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#b0760a}.posture-good[_ngcontent-%COMP%]{background-color:#e8f5e9;color:#388e3c}.posture-good[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#388e3c}.filters[_ngcontent-%COMP%]{display:flex;gap:15px;flex-wrap:wrap}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.filter-label[_ngcontent-%COMP%]{font-size:13px;color:#6f7d94;font-weight:600}.filter-select[_ngcontent-%COMP%]{width:170px;max-width:100%;border-radius:12px;height:38px;display:flex;border:1px solid #D1D5DB;background:#fff;padding:0 10px;align-items:center}.account-select[_ngcontent-%COMP%]{width:220px}.severity-card[_ngcontent-%COMP%]{border:1px solid #edf0f7;border-radius:20px;padding:24px;background:#fff;box-shadow:0 18px 40px #0f172a14}.severity-card__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.severity-card__header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:#0f172a}.severity-filters[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin-bottom:24px;align-items:center;justify-content:center}.severity-filters[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{width:100%}.severity-select[_ngcontent-%COMP%]{width:100%}.severity-select__native[_ngcontent-%COMP%]{width:85%;padding:10px 14px;border-radius:12px;border:1px solid #D1D5DB;background:transparent;font-weight:400;font-size:14px;color:#000}.severity-select__native[_ngcontent-%COMP%]:focus{outline:none;border-color:#5b6cfe;box-shadow:0 0 0 2px #5b6cfe26}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-subscript-wrapper{display:none}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-flex{align-items:center;min-height:46px;padding:0 14px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;box-shadow:0 10px 24px #0f172a0d}.severity-select[_ngcontent-%COMP%]     .mat-mdc-form-field-infix{padding:0}.severity-select[_ngcontent-%COMP%]     .mdc-notched-outline__leading, .severity-select[_ngcontent-%COMP%]     .mdc-notched-outline__trailing{border:none}.severity-select[_ngcontent-%COMP%]     .mat-mdc-select-value-text{color:#0f172a;font-weight:600}.severity-select[_ngcontent-%COMP%]     .mat-mdc-select-arrow{color:#94a3b8}.severity-chart[_ngcontent-%COMP%]{width:190px;margin:0 auto 20px}.severity-chart.no-data[_ngcontent-%COMP%]{width:100%;max-width:320px;min-height:160px;margin:0 auto 20px;border:1px dashed #d1d5db;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-weight:600}.severity-chart[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto;cursor:pointer}.severity-chart__track[_ngcontent-%COMP%]{fill:none;stroke:#fff;stroke-width:18px}.severity-chart__arc[_ngcontent-%COMP%]{fill:none;stroke-width:24px;stroke-linecap:butt;transition:stroke .3s ease}.severity-legend[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,max-content));justify-content:center;gap:16px 24px;margin:16px auto 0;width:100%;max-width:100%;box-sizing:border-box;color:#4b5563;font-weight:500;font-size:13px}.severity-legend[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;width:auto;min-width:120px}.severity-legend[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex-shrink:0;width:10px;height:10px;border-radius:50%;margin-right:8px}.services-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:425px}.service-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;margin-top:10px;flex:1;overflow-y:auto;padding-right:6px;scrollbar-width:none;-ms-overflow-style:none}.service-list[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.service-row[_ngcontent-%COMP%]{padding-bottom:6px;display:flex;flex-direction:column;gap:10px}.service-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}
8.service-name[_ngcontent-%COMP%]{font-weight:600;color:#0f172a;text-transform:uppercase;font-size:13px}.service-metrics[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;font-weight:500;color:#6b7280}.metric--secure[_ngcontent-%COMP%]{color:#16a34a}.metric--issues[_ngcontent-%COMP%]{color:#dc2626}.metric--na[_ngcontent-%COMP%]{color:#94a3b8}.service-progress__track[_ngcontent-%COMP%]{width:100%;height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden;display:flex}.service-progress__segment[_ngcontent-%COMP%]{display:inline-block;height:100%}.service-progress__segment.passed[_ngcontent-%COMP%]{background:#16a34a}.service-progress__segment.failed[_ngcontent-%COMP%]{background:#dc2626}.service-progress__segment.na[_ngcontent-%COMP%]{background:#e2e8f0}.compliance-section[_ngcontent-%COMP%]{margin-bottom:24px}.compliance-card[_ngcontent-%COMP%]{padding:20px;border-radius:18px;box-shadow:0 4px 18px #0f172a14;display:flex;flex-direction:column;gap:20px}.compliance-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.compliance-card-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:#0f172a}.filter-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.date-picker-field[_ngcontent-%COMP%]{border-radius:12px;width:min(100%,270px);height:38px;display:flex;border:1px solid #D1D5DB;padding:0 15px;align-items:center}.filter-row[_ngcontent-%COMP%]   .pill[_ngcontent-%COMP%]{background:#fff;padding:8px 30px 8px 14px;color:#0f172a;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;font-weight:500;align-items:center;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.reports-btn[_ngcontent-%COMP%]{background-color:#57b5e7;border-radius:8px;color:#fff;border:none;text-align:center;display:flex;align-items:center;gap:8px;padding:7px 10px;cursor:pointer}.standard[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:flex-start}.standard[_ngcontent-%COMP%]   .icon-placeholder[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:12px;background:#e0e7ff}.score[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#111827}.score.score-bad[_ngcontent-%COMP%]{color:#dc2626}.score.score-warning[_ngcontent-%COMP%]{color:#d97706}.score.score-good[_ngcontent-%COMP%]{color:#16a34a}.progress-info[_ngcontent-%COMP%]   .counts[_ngcontent-%COMP%]{display:flex;gap:12px;font-size:12px;color:#64748b}.progress-info[_ngcontent-%COMP%]   .progress-track[_ngcontent-%COMP%]{margin-top:4px;height:8px;border-radius:999px;background:#e2e8f0}.progress-info[_ngcontent-%COMP%]   .progress-secure[_ngcontent-%COMP%]{height:100%;border-radius:999px;background:#22c55e}.view-report-btn[_ngcontent-%COMP%]{border:none;color:#2563eb;font-size:14px;font-weight:500;background:transparent;cursor:pointer;padding:0}.pill[_ngcontent-%COMP%]{padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600}.pill.success[_ngcontent-%COMP%]{background:#e6f8ed;color:#16a34a}.pill.warning[_ngcontent-%COMP%]{background:#fef4dc;color:#d97706}.pill.neutral[_ngcontent-%COMP%]{background:#e2e8f0;color:#475569}.findings-card[_ngcontent-%COMP%]{padding:24px;border-radius:18px;box-shadow:0 4px 18px #0f172a14}.findings-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;font-size:20px}.findings-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:4px 0 0;color:#94a3b8}.findings-table[_ngcontent-%COMP%]{margin-top:20px;overflow-x:auto;scrollbar-width:thin}.badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;font-size:12px;font-weight:600;display:inline-block}.badge.critical[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.badge.high[_ngcontent-%COMP%]{background:#fef3c7;color:#ea580c}
8.badge.medium[_ngcontent-%COMP%]{background:#fef6d9;color:#d97706}.badge.low[_ngcontent-%COMP%], .badge.resolved[_ngcontent-%COMP%]{background:#e8ffe5;color:#16a34a}.badge.open[_ngcontent-%COMP%]{background:#ffe4e6;color:#be123c}.badge.progress[_ngcontent-%COMP%]{background:#fef9c3;color:#ca8a04}.badge.success[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.badge.neutral[_ngcontent-%COMP%]{background:#e2e8f0;color:#475569}.pagination-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;color:#94a3b8;font-size:12px}.pagination[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.pagination[_ngcontent-%COMP%]   .page[_ngcontent-%COMP%]{border:1px solid #dbe3f0;border-radius:8px;padding:4px 10px;background:#fff;color:#0f172a}.pagination[_ngcontent-%COMP%]   .page.active[_ngcontent-%COMP%]{background:#0b79f7;border-color:#0b79f7;color:#fff}.pagination[_ngcontent-%COMP%]   .pill[_ngcontent-%COMP%]{border:1px solid #dbe3f0;background:#fff;border-radius:999px;padding:4px 12px;color:#94a3b8}.pagination[_ngcontent-%COMP%]   .ellipsis[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px;padding:0 4px}.pagination[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.compliance-table[_ngcontent-%COMP%]   .table-row[_ngcontent-%COMP%]   .standard[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-weight:500;color:#111827}.compliance-table[_ngcontent-%COMP%]   .table-row[_ngcontent-%COMP%]   .standard[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]{font-size:12px;color:#94a3b8}.compliance-table[_ngcontent-%COMP%]{width:100%;border-spacing:0}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%], .compliance-table[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none;padding:12px 10px}.compliance-content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.compliance-table-wrapper[_ngcontent-%COMP%]{flex:1;overflow:auto;padding-right:6px;scrollbar-width:none;-ms-overflow-style:none}.compliance-table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.compliance-table[_ngcontent-%COMP%]{min-width:760px}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%], .compliance-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:35% 20% 30% 15%;align-items:center;padding:0 10px}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%]{color:#6b7280;font-weight:600;font-size:14px!important;text-transform:none;min-height:36px;background:#f9fafb;border-radius:8px}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{font-size:14px;color:#475569;min-height:58px;border-bottom:1px solid #f1f5f9}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#f8fafc}.compliance-table[_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%], .compliance-table[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none!important}.compliance-table[_ngcontent-%COMP%]   .progress-info[_ngcontent-%COMP%]{display:flex;gap:20px;align-items:center;color:#475569}.compliance-table[_ngcontent-%COMP%]   .progress-metric[_ngcontent-%COMP%]{display:flex;flex-direction:column}.compliance-table[_ngcontent-%COMP%]   .progress-metric[_ngcontent-%COMP%]   .metric-value[_ngcontent-%COMP%]{font-size:12px}.compliance-table[_ngcontent-%COMP%]   .progress-metric[_ngcontent-%COMP%]   .metric-value.passed[_ngcontent-%COMP%]{color:#16a34a}.compliance-table[_ngcontent-%COMP%]   .progress-metric[_ngcontent-%COMP%]   .metric-value.failed[_ngcontent-%COMP%]{color:#dc2626}.table-placeholder[_ngcontent-%COMP%]{display:grid;place-items:center;padding:32px 0;color:#94a3b8}.table-placeholder.error[_ngcontent-%COMP%]{color:#dc2626}.findings-mat-table[_ngcontent-%COMP%]{width:100%;min-width:1120px;border-spacing:0}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%], .findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:18% 12% 10% 12% 11% 9% 12% 10%;column-gap:15px;padding:0 15px}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%]{min-height:44px;background:#f9fafb;color:#64748b;font-weight:600;font-size:13px}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{height:auto;border-bottom:1px solid #f1f5f9;align-items:center}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:nth-child(2n){background:#fcfdff}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:hover{background:#f8fafc}.findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%], .findings-mat-table[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{border:none!important;padding:18px 0;color:#0f172a}.finding-desc[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-weight:600;color:#0f172a;margin-bottom:6px}.finding-desc[_ngcontent-%COMP%]   .sub[_ngcontent-%COMP%]{color:#475569;font-size:13px;margin-bottom:4px}.finding-desc[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]{font-size:12px;color:#94a3b8;line-height:1.4}.finding-desc[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;margin-right:12px}.tab-buttons[_ngcontent-%COMP%]{display:flex;gap:12px;padding:0 4px 10px;border-bottom:1px solid #EDEDED;overflow-x:auto}.tab-button[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:8px;background-color:#f3f4f6;color:#374151;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;outline:none;min-width:80px}.tab-button[_ngcontent-%COMP%]:hover{background-color:#dfe9eb}.tab-button.active[_ngcontent-%COMP%]{background-color:#dbeafe;color:#374151;border-bottom:2px solid #1A1F3D}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}
8@media(max-width:900px){.cspm-page[_ngcontent-%COMP%]{padding:18px}.cards-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.filter-section[_ngcontent-%COMP%], .filter-select[_ngcontent-%COMP%], .account-select[_ngcontent-%COMP%], .date-picker-field[_ngcontent-%COMP%]{width:100%}.filters[_ngcontent-%COMP%], .compliance-header[_ngcontent-%COMP%]{align-items:stretch}}@media(max-width:640px){.cspm-page[_ngcontent-%COMP%]{padding:14px}.card[_ngcontent-%COMP%], .score-card[_ngcontent-%COMP%], .severity-card[_ngcontent-%COMP%], .services-card[_ngcontent-%COMP%], .compliance-card[_ngcontent-%COMP%], .findings-card[_ngcontent-%COMP%]{padding:18px;border-radius:14px}.score-ring[_ngcontent-%COMP%]{width:160px;height:160px}.severity-chart[_ngcontent-%COMP%]{width:160px}.pagination[_ngcontent-%COMP%]{flex-wrap:wrap}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}`]})}}return t})();var Xr=(()=>{class t{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-dashboard-ready-modal"]],decls:6,vars:0,consts:[[1,"container"],[1,"dashboard-container"],[1,"popup-header"],["src","assets/rafiki.png","alt","Rafiki"]],template:function(n,i){n&1&&(vn(0,"div",0)(1,"div",1)(2,"div",2),l(3,"Your dashboard is getting ready"),bn(),vn(4,"div"),wn(5,"img",3),bn()()())},dependencies:[N],styles:[".container[_ngcontent-%COMP%]{width:100%;height:auto;background-size:cover;background-position:center;background-repeat:no-repeat}.dashboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:50px;padding:5%}.popup-header[_ngcontent-%COMP%]{font-weight:600;color:#4b5563;font-size:40px;line-height:28px;letter-spacing:.91px}[_nghost-%COMP%]     .mat-mdc-dialog-container .mdc-dialog__surface{padding:0!important}"]})}}return t})();function Xv(t,r){if(t&1&&(o(0,"mat-option",28),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e.NAME," ")}}function eb(t,r){if(t&1&&(o(0,"mat-option",28),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}var Cp=(()=>{class t{constructor(e,n,i){this.fb=e,this.notify=n,this.sanitizer=i,this.panelLoadToken={ecscpuutilizationtaskdef:0,ecscpuutilizationcluster:0,ecscpuutilizationservice:0},this.noOfDays=0,this.regionList=[],this.selectedRegion=null,this.selectedCluster="",this.isFormChanged=!1,this.backendServiceDomain=ye.API_BASE_URL,this.grafanaDomain=ye.GRAFANA_DOMAIN,this.dataSource=ye.GRAFANA_DATASOURCE,this.grafanaProxyPath="web/reve/performance",this.grafanaDashboard="d-solo/6aadf46d-7244-47fc-bc0f-f3eea82a5dce/aws-ecs",this.timestamp=Date.now(),this.orgID=0,this.fromDate=0,this.toDate=0,this.regionID="",this.clusterID="",this.clusterServiceID="",this.ecsCPUUtilizationTaskDef="",this.ecsCPUUtilizationTaskDefURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.ecsCPUUtilizationCluster="",this.ecsCPUUtilizationClusterURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.ecsCPUUtilizationService="",this.ecsCPUUtilizationServiceURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.panelStatus={ecscpuutilizationtaskdef:{loading:!1,failed:!1},ecscpuutilizationcluster:{loading:!1,failed:!1},ecscpuutilizationservice:{loading:!1,failed:!1}}}ngOnInit(){this.accountID=window.localStorage.getItem("currentAccountID");let e=JSON.parse(window.localStorage.getItem("REGION")||"[]");this.regionList=e,this.clusterList=JSON.parse(window.localStorage.getItem("ECS_CLUSTER")||"[]"),this.grfOrgId=window.localStorage.getItem("grfOrgId");let n=new Date,i=new Date;i.setDate(n.getDate()-29),this.dateRange=this.fb.group({start:[i,U.required],end:[n,U.required]}),this.regionList&&this.regionList.length>0&&(this.selectedRegion=this.regionList[0],this.regionID=this.selectedRegion.CODE,this.clusterList&&this.clusterList.length>0&&(this.selectedCluster=this.clusterList[0],this.clusterID=this.selectedCluster,setTimeout(()=>{this.reloadIframe()}))),this.dateRange.valueChanges.subscribe(()=>{this.isFormChanged=!0})}getGrafanaURL(e){let n=this.grfOrgId;return this.timestamp=Date.now(),`${this.backendServiceDomain}/${this.grafanaProxyPath}/${this.grafanaDashboard}?orgId=${n}&from=${this.fromDate}&to=${this.toDate}&timezone=browser&var-datasource=${this.dataSource}&var-region=${this.regionID}&var-cluster=${this.clusterID}&panelId=${e}&__feature.dashboardSceneSolo=true&ts=${this.timestamp}`}getDayTimestamps(e,n=!0){let i=new Date(e);return n?i.setHours(0,0,0,0):i.setHours(23,59,59,999),i.getTime()}reloadIframe(){return St(this,null,function*(){if(this.isFormChanged=!1,this.dateRange.valid){let e=this.dateRange.get("start")?.value,n=this.dateRange.get("end")?.value;e&&n&&(this.fromDate=this.getDayTimestamps(e,!0),this.toDate=this.getDayTimestamps(n,!1))}this.fromDate&&this.toDate&&this.regionID&&this.clusterID&&(this.setPanelLoading("ecscpuutilizationtaskdef"),this.ecsCPUUtilizationTaskDef=this.getGrafanaURL("panel-1"),this.ecsCPUUtilizationTaskDefURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.ecsCPUUtilizationTaskDef),this.setPanelLoading("ecscpuutilizationcluster"),this.ecsCPUUtilizationCluster=this.getGrafanaURL("panel-6"),this.ecsCPUUtilizationClusterURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.ecsCPUUtilizationCluster),this.setPanelLoading("ecscpuutilizationservice"),this.ecsCPUUtilizationService=this.getGrafanaURL("panel-2"),this.ecsCPUUtilizationServiceURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.ecsCPUUtilizationService),console.log(this.ecsCPUUtilizationTaskDefURL,this.ecsCPUUtilizationClusterURL,this.ecsCPUUtilizationServiceURL))})}onRegionSelected(e){this.selectedRegion=e,this.regionID=e.CODE,this.isFormChanged=!0}onClusterSelected(e){this.selectedCluster=e,this.clusterID=e,this.isFormChanged=!0}onUpdateClick(){this.dateRange.valid&&this.isFormChanged?(this.isFormChanged=!0,this.reloadIframe()):this.notify.showNotification("Please select a valid date range","top","error",400),this.dateRange.valid?this.reloadIframe():this.notify.showNotification("Please select a valid date range","top","error",400)}onIframeLoad(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!1}onIframeError(e){console.log(e),this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0}setPanelLoading(e){let n=Date.now();this.panelLoadToken[e]=n,this.panelStatus[e].loading=!0,this.panelStatus[e].failed=!1,setTimeout(()=>{this.panelLoadToken[e]===n&&this.panelStatus[e].loading&&(this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0)},100)}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(V),y(Tn))}}static{this.\u0275cmp=k({type:t,selectors:[["app-ecs-performance"]],inputs:{ecsCPUUtilizationTaskDef:"ecsCPUUtilizationTaskDef",ecsCPUUtilizationCluster:"ecsCPUUtilizationCluster",ecsCPUUtilizationService:"ecsCPUUtilizationService"},decls:47,vars:11,consts:[["picker",""],[1,"dashboard-container"],[1,"acc-header"],[1,"header"],[1,"analysis-period"],[1,"days-container"],[1,"period-label"],[1,"filter-container"],[1,"date-picker-container"],[1,"date-range-picker"],[1,"period-type"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[1,"filter-section"],[1,"filter-label"],[1,"region-select"],["placeholder","Region",3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["placeholder","Cluster",3,"selectionChange","value"],[1,"update-button",3,"click","disabled"],[1,"fa","fa-sync"],[1,"performance-analysis-container"],[1,"performance-analysis-container-card"],[1,"performance-analysis-container-content"],["frameborder","0",1,"embedded-iframe",3,"src"],[3,"value"]],template:function(n,i){if
8(n&1){let s=A();o(0,"div",1)(1,"div",2)(2,"div",3),l(3,"ECS"),a()(),o(4,"div",4)(5,"div",5)(6,"div",6),l(7,"Analysis Period"),a()(),o(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),l(12,"Primary Period"),a(),o(13,"div",11)(14,"mat-date-range-input",12),h(15,"input",13)(16,"input",14),a(),h(17,"mat-datepicker-toggle",15)(18,"mat-date-range-picker",null,0),a()(),o(20,"div",16)(21,"div",17),l(22," Region "),a(),o(23,"div",18)(24,"mat-select",19),se("valueChange",function(m){return O(s),le(i.selectedRegion,m)||(i.selectedRegion=m),P(m)}),v("selectionChange",function(m){return i.onRegionSelected(m.value)}),g(25,Xv,2,2,"mat-option",20),a()()(),o(26,"div",16)(27,"div",17),l(28," Cluster "),a(),o(29,"div",18)(30,"mat-select",21),v("selectionChange",function(m){return i.onClusterSelected(m.value)}),g(31,eb,2,2,"mat-option",20),a()()(),o(32,"button",22),v("click",function(){return i.onUpdateClick()}),l(33," Update "),h(34,"i",23),a()()()(),o(35,"div",24)(36,"mat-card",25)(37,"div",26),h(38,"iframe",27),a()()(),o(39,"div",24)(40,"mat-card",25)(41,"div",26),h(42,"iframe",27),a()()(),o(43,"div",24)(44,"mat-card",25)(45,"div",26),h(46,"iframe",27),a()()()()}if(n&2){let s=Ce(19);c(14),p("rangePicker",s)("formGroup",i.dateRange),c(3),p("for",s),c(7),ae("value",i.selectedRegion),c(),p("ngForOf",i.regionList),c(5),p("value",i.selectedCluster),c(),p("ngForOf",i.clusterList),c(),p("disabled",!i.isFormChanged),c(6),p("src",i.ecsCPUUtilizationTaskDefURL,et),c(4),p("src",i.ecsCPUUtilizationClusterURL,et),c(4),p("src",i.ecsCPUUtilizationServiceURL,et)}},dependencies:[N,$,z,Pt,Nt,fe,ue,ve,me,$e,Gt,Ge,We,Zt,Xt,en,tn,nn],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.dashboard-container[_ngcontent-%COMP%]{height:100%;padding:1.5%;box-sizing:border-box;display:flex;flex-direction:column;position:relative}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.analysis-period[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:20px 0;padding:16px;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.period-label[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.days-label[_ngcontent-%COMP%]{font-size:14px;line-height:28px;color:#374151;font-weight:500}.days-container[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.date-range-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.period-type[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.update-button[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s;align-self:center;position:relative;top:12px}.update-button[_ngcontent-%COMP%]:hover{background:#2563eb}.update-button[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.date-picker-container[_ngcontent-%COMP%]{display:flex;gap:15px}.date-picker-field[_ngcontent-%COMP%]{border-radius:16px;width:190px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;font-size:12px}.filter-content[_ngcontent-%COMP%]{display:flex;gap:15px;padding:10px 0}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.filter-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.region-select[_ngcontent-%COMP%]{width:120px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;align-self:center;font-size:12px}.performance-analysis-container[_ngcontent-%COMP%]{display:flex;gap:25px;margin:20px 0;justify-content:space-between}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1;min-width:0px;height:auto;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px;overflow:hidden}.performance-analysis-container-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:700;color:#111827}.performance-analysis-container-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;gap:10px;overflow-y:auto;scrollbar-width:none}  .dashboard-container iframe{width:100%;height:420px;min-height:420px;border:none;display:block}.error-state[_ngcontent-%COMP%]{color:red;font-size:12px}@media(max-width:1024px){.dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:18px;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-wrap:wrap}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1 1 100%}}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:14px}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}
8.date-picker-field[_ngcontent-%COMP%], .region-select[_ngcontent-%COMP%], .update-button[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.update-button[_ngcontent-%COMP%]{top:0}.analysis-period[_ngcontent-%COMP%], .performance-analysis-container-card[_ngcontent-%COMP%]{padding:18px;border-radius:14px}  .dashboard-container iframe{height:340px;min-height:340px}}"]})}}return t})();function tb(t,r){if(t&1&&(o(0,"mat-option",28),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e.NAME," ")}}var xp=(()=>{class t{constructor(e,n,i){this.fb=e,this.notify=n,this.sanitizer=i,this.panelLoadToken={rdsclustercpuutilization:0,rdsclusterdbconnection:0,rdsclusteravailableram:0,rdsinstancecpuutilization:0,rdsinstanceavailableram:0,rdsinstancereadlatency:0,rdsinstancewritelatency:0,rdsinstancereadoperation:0,rdsinstancewriteoperation:0},this.noOfDays=0,this.regionList=[],this.selectedRegion=null,this.isFormChanged=!1,this.backendServiceDomain=ye.API_BASE_URL,this.grafanaDomain=ye.GRAFANA_DOMAIN,this.dataSource=ye.GRAFANA_DATASOURCE,this.grafanaProxyPath="web/reve/performance",this.grafanaDashboard="d-solo/HdeaRHxWz/amazon-rds",this.timestamp=Date.now(),this.orgID=0,this.fromDate=0,this.toDate=0,this.regionID="",this.rdsClusterCPUUtilization="",this.rdsClusterCPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsClusterDBConnection="",this.rdsClusterDBConnectionURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsClusterAvailableRAM="",this.rdsClusterAvailableRAMURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceCPUUtilization="",this.rdsInstanceCPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceAvailableRAM="",this.rdsInstanceAvailableRAMURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceReadLatency="",this.rdsInstanceReadLatencyURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceWriteLatency="",this.rdsInstanceWriteLatencyURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceReadOperation="",this.rdsInstanceReadOperationURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.rdsInstanceWriteOperation="",this.rdsInstanceWriteOperationURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.panelStatus={rdsclustercpuutilization:{loading:!1,failed:!1},rdsclusterdbconnection:{loading:!1,failed:!1},rdsclusteravailableram:{loading:!1,failed:!1},rdsinstancecpuutilization:{loading:!1,failed:!1},rdsinstanceavailableram:{loading:!1,failed:!1},rdsinstancereadlatency:{loading:!1,failed:!1},rdsinstancewritelatency:{loading:!1,failed:!1},rdsinstancereadoperation:{loading:!1,failed:!1},rdsinstancewriteoperation:{loading:!1,failed:!1}}}ngOnInit(){this.accountID=window.localStorage.getItem("currentAccountID"),this.grfOrgId=window.localStorage.getItem("grfOrgId");let e=JSON.parse(window.localStorage.getItem("REGION")||"[]");this.regionList=e;let n=new Date,i=new Date;i.setDate(n.getDate()-29),this.dateRange=this.fb.group({start:[i,U.required],end:[n,U.required]}),this.regionList&&this.regionList.length>0&&(this.selectedRegion=this.regionList[0],this.regionID=this.selectedRegion.CODE,setTimeout(()=>{this.reloadIframe()})),this.dateRange.valueChanges.subscribe(()=>{this.isFormChanged=!0})}getGrafanaURL(e){let n=this.grfOrgId;return this.timestamp=Date.now(),`${this.backendServiceDomain}/${this.grafanaProxyPath}/${this.grafanaDashboard}?orgId=${n}&from=${this.fromDate}&to=${this.toDate}&timezone=browser&var-datasource=${this.dataSource}&var-region=${this.regionID}&var-period=300&panelId=${e}&__feature.dashboardSceneSolo=true&ts=${this.timestamp}`}getDayTimestamps(e,n=!0){let i=new Date(e);return n?i.setHours(0,0,0,0):i.setHours(23,59,59,999),i.getTime()}reloadIframe(){return St(this,null,function*(){if(this.isFormChanged=!1,this.dateRange.valid){let e=this.dateRange.get("start")?.value,n=this.dateRange.get("end")?.value;e&&n&&(this.fromDate=this.getDayTimestamps(e,!0),this.toDate=this.getDayTimestamps(n,!1))}this.fromDate&&this.toDate&&this.regionID&&(this.setPanelLoading("rdsclustercpuutilization"),this.rdsClusterCPUUtilization=this.getGrafanaURL("panel-5"),this.rdsClusterCPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsClusterCPUUtilization),this.setPanelLoading("rdsclusterdbconnection"),this.rdsClusterDBConnection=this.getGrafanaURL("panel-8"),this.rdsClusterDBConnectionURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsClusterDBConnection),this.setPanelLoading("rdsclusteravailableram"),this.rdsClusterAvailableRAM=this.getGrafanaURL("panel-9"),this.rdsClusterAvailableRAMURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsClusterAvailableRAM),this.setPanelLoading("rdsinstancecpuutilization"),this.rdsInstanceCPUUtilization=this.getGrafanaURL("panel-4"),this.rdsInstanceCPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceCPUUtilization),this.setPanelLoading("rdsinstanceavailableram"),this.rdsInstanceAvailableRAM=this.getGrafanaURL("panel-12"),this.rdsInstanceAvailableRAMURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceAvailableRAM),this.setPanelLoading("rdsinstancereadlatency"),this.rdsInstanceReadLatency=this.getGrafanaURL("panel-13"),this.rdsInstanceReadLatencyURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceReadLatency),this.setPanelLoading("rdsinstancewritelatency"),this.rdsInstanceWriteLatency=this.getGrafanaURL("panel-17"),this.rdsInstanceWriteLatencyURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceWriteLatency),this.setPanelLoading("rdsinstancereadoperation"),this.rdsInstanceReadOperation=this.getGrafanaURL("panel-15"),this.rdsInstanceReadOperationURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceReadOperation),this.setPanelLoading("rdsinstancewriteoperation"),this.rdsInstanceWriteOperation=this.getGrafanaURL("panel-18"),this.rdsInstanceWriteOperationURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.rdsInstanceWriteOperation))})}onRegionSelected(e){this.selectedRegion=e,this.regionID=e.CODE,this.isFormChanged=!0}onUpdateClick(){this.dateRange.valid&&this.isFormChanged?(this.isFormChanged=!0,this.reloadIframe()):this.notify.showNotification("Please select a valid date range","top","error",400),this.dateRange.valid?this.reloadIframe():this.notify.showNotification("Please select a valid date range","top","error",400)}onIframeLoad(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!1}onIframeError(e){console.log(e),this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0}setPanelLoading(e){let n=Date.now();this.panelLoadToken[e]=n,this.panelStatus[e].loading=!0,this.panelStatus[e].failed=!1,setTimeout(()=>{this.panelLoadToken[e]===n&&this.panelStatus[e].loading&&(this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0)},100)}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(V),y(Tn))}}static{this.\u0275cmp=k({type:t,selectors:[["app-rds-performance"]],inputs:{rdsClusterCPUUtilization:"rdsClusterCPUUtilization",rdsClusterDBConnection:"rdsClusterDBConnection",rdsClusterAvailableRAM:"rdsClusterAvailableRAM",rdsInstanceCPUUtilization:"rdsInstanceCPUUtilization",rdsInstanceAvailableRAM:"rdsInstanceAvailableRAM",rdsInstanceReadLatency:"rdsInstanceReadLatency",rdsInstanceWriteLatency:"rdsInstanceWriteLatency",rdsInstanceReadOperation:"rdsInstanceReadOperation",rdsInstanceWriteOperation:"rdsInstanceWriteOperation"},decls:71,vars:15,consts:[["picker",""],[1,"dashboard-container"],[1,"acc-header"],[1,"header"],[1,"analysis-period"],[1,"days-container"],[1,"period-label"],[1,"filter-container"],[1,"date-picker-container"],[1,"date-range-picker"],[1,"period-type"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[1,"filter-section"],[1,"filter-label"],[1,"region-select"],["placeholder","Region",3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],[1,"update-button",3,"click","disabled"],[1,"fa","fa-sync"],[1,"sub-header"],[1,"performance-analysis-container"],[1,"performance-analysis-container-card"],[1,"performance-analysis-container-content"],["frameborder","0",1,"embedded-iframe",3,"src"],[3,"value"]],template:function(n,i){if
8(n&1){let s=A();o(0,"div",1)(1,"div",2)(2,"div",3),l(3,"RDS"),a()(),o(4,"div",4)(5,"div",5)(6,"div",6),l(7,"Analysis Period"),a()(),o(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),l(12,"Primary Period"),a(),o(13,"div",11)(14,"mat-date-range-input",12),h(15,"input",13)(16,"input",14),a(),h(17,"mat-datepicker-toggle",15)(18,"mat-date-range-picker",null,0),a()(),o(20,"div",16)(21,"div",17),l(22," Region "),a(),o(23,"div",18)(24,"mat-select",19),se("valueChange",function(m){return O(s),le(i.selectedRegion,m)||(i.selectedRegion=m),P(m)}),v("selectionChange",function(m){return i.onRegionSelected(m.value)}),g(25,tb,2,2,"mat-option",20),a()()(),o(26,"button",21),v("click",function(){return i.onUpdateClick()}),l(27," Update "),h(28,"i",22),a()()()(),o(29,"div")(30,"div",23),l(31,"Cluster Metrics"),a(),o(32,"div",24)(33,"mat-card",25)(34,"div",26),h(35,"iframe",27),a()()(),o(36,"div",24)(37,"mat-card",25)(38,"div",26),h(39,"iframe",27),a()()(),o(40,"div",24)(41,"mat-card",25)(42,"div",26),h(43,"iframe",27),a()()()(),o(44,"div")(45,"div",23),l(46,"Instance Metrics"),a(),o(47,"div",24)(48,"mat-card",25)(49,"div",26),h(50,"iframe",27),a()()(),o(51,"div",24)(52,"mat-card",25)(53,"div",26),h(54,"iframe",27),a()()(),o(55,"div",24)(56,"mat-card",25)(57,"div",26),h(58,"iframe",27),a()()(),o(59,"div",24)(60,"mat-card",25)(61,"div",26),h(62,"iframe",27),a()()(),o(63,"div",24)(64,"mat-card",25)(65,"div",26),h(66,"iframe",27),a()()(),o(67,"div",24)(68,"mat-card",25)(69,"div",26),h(70,"iframe",27),a()()()()()}if(n&2){let s=Ce(19);c(14),p("rangePicker",s)("formGroup",i.dateRange),c(3),p("for",s),c(7),ae("value",i.selectedRegion),c(),p("ngForOf",i.regionList),c(),p("disabled",!i.isFormChanged),c(9),p("src",i.rdsClusterCPUUtilizationURL,et),c(4),p("src",i.rdsClusterDBConnectionURL,et),c(4),p("src",i.rdsClusterAvailableRAMURL,et),c(7),p("src",i.rdsInstanceCPUUtilizationURL,et),c(4),p("src",i.rdsInstanceAvailableRAMURL,et),c(4),p("src",i.rdsInstanceReadLatencyURL,et),c(4),p("src",i.rdsInstanceWriteLatencyURL,et),c(4),p("src",i.rdsInstanceReadOperationURL,et),c(4),p("src",i.rdsInstanceWriteOperationURL,et)}},dependencies:[N,$,z,Pt,Nt,fe,ue,ve,me,$e,Gt,Ge,We,Zt,Xt,en,tn,nn],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.dashboard-container[_ngcontent-%COMP%]{height:100%;padding:1.5%;box-sizing:border-box;display:flex;flex-direction:column;position:relative}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.analysis-period[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:20px 0;padding:16px;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.period-label[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.days-label[_ngcontent-%COMP%]{font-size:14px;line-height:28px;color:#374151;font-weight:500}.days-container[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.date-range-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.period-type[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.update-button[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s;align-self:center;position:relative;top:12px}.update-button[_ngcontent-%COMP%]:hover{background:#2563eb}.update-button[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.date-picker-container[_ngcontent-%COMP%]{display:flex;gap:15px}.date-picker-field[_ngcontent-%COMP%]{border-radius:16px;width:190px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;font-size:12px}.filter-content[_ngcontent-%COMP%]{display:flex;gap:15px;padding:10px 0}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.filter-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.region-select[_ngcontent-%COMP%]{width:120px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;align-self:center;font-size:12px}.performance-analysis-container[_ngcontent-%COMP%]{display:flex;gap:25px;margin:20px 0;justify-content:space-between}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1;min-width:0px;height:auto;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px;overflow:hidden}.performance-analysis-container-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:700;color:#111827}.performance-analysis-container-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;gap:10px;overflow-y:auto;scrollbar-width:none}  .dashboard-container iframe{width:100%;height:420px;min-height:420px;border:none;display:block}.error-state[_ngcontent-%COMP%]{color:red;font-size:12px}.sub-header[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:600;color:#111827}@media(max-width:1024px){.dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:18px;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-wrap:wrap}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1 1 100%}}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:14px}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}
8.date-picker-field[_ngcontent-%COMP%], .region-select[_ngcontent-%COMP%], .update-button[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.update-button[_ngcontent-%COMP%]{top:0}.analysis-period[_ngcontent-%COMP%], .performance-analysis-container-card[_ngcontent-%COMP%]{padding:18px;border-radius:14px}  .dashboard-container iframe{height:340px;min-height:340px}}"]})}}return t})();function nb(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e.NAME," ")}}function ib(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function ob(t,r){if(t&1){let e=A();o(0,"div",1)(1,"div",8)(2,"div",9),l(3,"EC2"),a()(),o(4,"div",10)(5,"div",11)(6,"div",12),l(7,"Analysis Period"),a()(),o(8,"div",13)(9,"div",14)(10,"div",15)(11,"div",16),l(12,"Primary Period"),a(),o(13,"div",17)(14,"mat-date-range-input",18),h(15,"input",19)(16,"input",20),a(),h(17,"mat-datepicker-toggle",21)(18,"mat-date-range-picker",null,0),a()(),o(20,"div",22)(21,"div",23),l(22," Region "),a(),o(23,"div",24)(24,"mat-select",25),se("valueChange",function(i){O(e);let s=u();return le(s.selectedRegion,i)||(s.selectedRegion=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onRegionSelected(i.value))}),g(25,nb,2,2,"mat-option",26),a()()(),o(26,"div",22)(27,"div",23),l(28," Instance ID "),a(),o(29,"div",24)(30,"mat-select",27),se("valueChange",function(i){O(e);let s=u();return le(s.selectedInstance,i)||(s.selectedInstance=i),P(i)}),v("selectionChange",function(i){O(e);let s=u();return P(s.onInstanceSelected(i.value))}),g(31,ib,2,2,"mat-option",26),a()()(),o(32,"button",28),v("click",function(){O(e);let i=u();return P(i.onUpdateClick())}),l(33," Update "),h(34,"i",29),a()()()(),o(35,"div",30)(36,"mat-card",31)(37,"div",32),h(38,"iframe",33),a()()(),o(39,"div",30)(40,"mat-card",31)(41,"div",32),h(42,"iframe",33),a()()(),o(43,"div",30)(44,"mat-card",31)(45,"div",32),h(46,"iframe",33),a()()(),o(47,"div",30)(48,"mat-card",31)(49,"div",32),h(50,"iframe",33),a()()(),o(51,"div",30)(52,"mat-card",31)(53,"div",32),h(54,"iframe",33),a()()()()}if(t&2){let e=Ce(19),n=u();c(14),p("rangePicker",e)("formGroup",n.dateRange),c(3),p("for",e),c(7),ae("value",n.selectedRegion),c(),p("ngForOf",n.regionList),c(5),ae("value",n.selectedInstance),c(),p("ngForOf",n.instanceList),c(),p("disabled",!n.isFormChanged),c(6),p("src",n.ec2CPUUtilizationURL,et),c(4),p("src",n.ebsVolumeOpsURL,et),c(4),p("src",n.diskReadOpsDiskWriteOpsURL,et),c(4),p("src",n.diskReadBytesDiskWriteBytesURL,et),c(4),p("src",n.networkInNetworkOutURL,et)}}function rb(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function ab(t,r){t&1&&(o(0,"span",42),l(1,"Requesting... "),h(2,"iconify-icon",43),a())}function lb(t,r){if(t&1){let e=A();o(0,"section",35)(1,"div",36)(2,"div",37),h(3,"iconify-icon",38),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",39),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,rb,2,0,"span",40)(10,ab,3,0,"span",41),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var vp=(()=>{class t{constructor(e,n,i,s,d){this.fb=e,this.notify=n,this.sanitizer=i,this.dialog=s,this.dashboardService=d,this.hideNow=!0,this.panelLoadToken={ec2cpuutilization:0,ebsvolumeops:0,diskreadopsdiskwriteops:0,diskreadbytesdiskwritebytes:0,networkinnetworkout:0},this.noOfDays=0,this.regionList=[],this.selectedRegion=null,this.selectedInstance="",this.isFormChanged=!1,this.backendServiceDomain=ye.API_BASE_URL,this.grafanaDomain=ye.GRAFANA_DOMAIN,this.dataSource=ye.GRAFANA_DATASOURCE,this.grafanaProxyPath="web/reve/performance",this.grafanaDashboard="d-solo/AWSEc2000/aws-ec2",this.timestamp=Date.now(),this.orgID=0,this.fromDate=0,this.toDate=0,this.regionID="",this.instanceID="",this.isAccessLoading=!1,this.ec2CPUUtilization="",this.ec2CPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.ebsVolumeOps="",this.ebsVolumeOpsURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.diskReadOpsDiskWriteOps="",this.diskReadOpsDiskWriteOpsURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.diskReadBytesDiskWriteBytes="",this.diskReadBytesDiskWriteBytesURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.networkInNetworkOut="",this.networkInNetworkOutURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.panelStatus={ec2cpuutilization:{loading:!1,failed:!1},ebsvolumeops:{loading:!1,failed:!1},diskreadopsdiskwriteops:{loading:!1,failed:!1},diskreadbytesdiskwritebytes:{loading:!1,failed:!1},networkinnetworkout:{loading:!1,failed:!1}},this.isPerformanceEnabled=!0}ngOnInit(){if(this.isPerformanceEnabled=this.isFeatureEnabled(6),!this.isPerformanceEnabled)return;this.accountID=window.localStorage.getItem("currentAccountID");let e=JSON.parse(window.localStorage.getItem("REGION")||"[]");this.regionList=e,this.instanceList=JSON.parse(window.localStorage.getItem("EC2_INSTANCE")||"[]"),this.grfOrgId=window.localStorage.getItem("grfOrgId");let n=new Date,i=new Date;i.setDate(n.getDate()-29),this.dateRange=this.fb.group({start:[i,U.required],end:[n,U.required]}),this.regionList&&this.regionList.length>0&&(this.selectedRegion=this.regionList[0],this.regionID=this.selectedRegion.CODE,this.instanceList&&this.instanceList.length>0&&(this.selectedInstance=this.instanceList[0],this.instanceID=this.selectedInstance,setTimeout(()=>{this.reloadIframe()}))),this.dateRange.valueChanges.subscribe(()=>{this.isFormChanged=!0})}getGrafanaURL(e){let n=this.grfOrgId;return this.timestamp=Date.now(),`${this.backendServiceDomain}/${this.grafanaProxyPath}/${this.grafanaDashboard}?orgId=${n}&from=${this.fromDate}&to=${this.toDate}&timezone=browser&var-datasource=${this.dataSource}&var-region=${this.regionID}&var-instanceid=${this.instanceID}&panelId=${e}&__feature.dashboardSceneSolo=true&ts=${this.timestamp}`}getDayTimestamps(e,n=!0){let i=new Date(e);return n?i.setHours(0,0,0,0):i.setHours(23,59,59,999),i.getTime()}reloadIframe(){return St(this,null,function*(){if(this.isFormChanged=!1,this.dateRange.valid){let e=this.dateRange.get("start")?.value,n=this.dateRange.get("end")?.value;e&&n&&(this.fromDate=this.getDayTimestamps(e,!0),this.toDate=this.getDayTimestamps(n,!1))}this.fromDate&&this.toDate&&this.regionID&&this.instanceID&&(this.setPanelLoading("ec2cpuutilization"),this.ec2CPUUtilization=this.getGrafanaURL("panel-7"),this.ec2CPUUtilizationURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.ec2CPUUtilization),this.setPanelLoading("ebsvolumeops"),this.ebsVolumeOps=this.getGrafanaURL("panel-14"),this.ebsVolumeOpsURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.ebsVolumeOps),this.setPanelLoading("diskreadopsdiskwriteops"),this.diskReadOpsDiskWriteOps=this.getGrafanaURL("panel-9"),this.diskReadOpsDiskWriteOpsURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.diskReadOpsDiskWriteOps),this.setPanelLoading("diskreadbytesdiskwritebytes"),this.diskReadBytesDiskWriteBytes=this.getGrafanaURL("panel-10"),this.diskReadBytesDiskWriteBytesURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.diskReadBytesDiskWriteBytes),this.setPanelLoading("networkinnetworkout"),this.networkInNetworkOut=this.getGrafanaURL("panel-11"),this.networkInNetworkOutURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.networkInNetworkOut))})}onRegionSelected(e){this.selectedRegion=e,this.regionID=e.CODE,this.isFormChanged=!0}onInstanceSelected(e){this.selectedInstance=e,this.instanceID=e,this.isFormChanged=!0}onUpdateClick(){this.dateRange.valid&&this.isFormChanged?(this.isFormChanged=!0,this.reloadIframe()):this.notify.showNotification("Please select a valid date range","top","error",400),this.dateRange.valid?this.reloadIframe():this.notify.showNotification("Please select a valid date range","top","error",400)}onIframeLoad(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!1}onIframeError(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0}setPanelLoading(e){let n=Date.now();this.panelLoadToken[e]=n,this.panelStatus[e].loading=!0,this.panelStatus[e].failed=!1,setTimeout(()=>{this.panelLoadToken[e]===n&&this.panelStatus[e].loading&&(this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0)},100)}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:6}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(V),y(Tn),y(Se),y(re))}}static{this.\u0275cmp=k({type:t,selectors:[["app-ec2-performance"]],inputs:{ec2CPUUtilization:"ec2CPUUtilization",ebsVolumeOps:"ebsVolumeOps",diskReadOpsDiskWriteOps:"diskReadOpsDiskWriteOps",diskReadBytesDiskWriteBytes:"diskReadBytesDiskWriteBytes",networkInNetworkOut:"networkInNetworkOut"},decls:8,vars:4,consts:[["picker",""],[1,"dashboard-container"],[1,"main-content"],["class","dashboard-container",4,"ngIf"],[1,"azure-container"],[1,"azure-card"],[1,"coming-soon"],["class","feature-lock-overlay",4,"ngIf"],[1,"acc-header"],[1,"header"],[1,"analysis-period"],[1,"days-container"],[1,"period-label"],[1,"filter-container"],[1,"date-picker-container"],[1,"date-range-picker"],[1,"period-type"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[1,"filter-section"],[1,"filter-label"],[1,"region-select"],["placeholder","Region",3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["placeholder","Instance ID",3,"valueChange","selectionChange","value"],[1,"update-button",3,"click","disabled"],[1,"fa","fa-sync"],[1,"performance-analysis-container"],[1,"performance-analysis-container-card"],[1,"performance-analysis-container-content"],["frameborder","0",1,"embedded-iframe",3,"src"],[3,"value"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],[4,"ngIf"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2),g(2,ob,55,13,"div",3),o(3,"div",4)(4,"mat-card",5)(5,"div",6),l(6,"(Coming Soon)"),a()()()(),g(7,lb,11,3,"
8section",7),a()),n&2&&(Y("is-locked",!i.isPerformanceEnabled),c(2),p("ngIf",!i.hideNow),c(5),p("ngIf",!i.isPerformanceEnabled))},dependencies:[N,$,B,z,Pt,Nt,fe,ue,ve,me,$e,Gt,Ge,We,Zt,Xt,en,tn,nn],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.dashboard-container[_ngcontent-%COMP%]{height:100%;padding:1.5%;box-sizing:border-box;display:flex;flex-direction:column;position:relative}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.dashboard-container.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.analysis-period[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:20px 0;padding:16px;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.period-label[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.days-label[_ngcontent-%COMP%]{font-size:14px;line-height:28px;color:#374151;font-weight:500}.days-container[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.date-range-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.period-type[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.update-button[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s;align-self:center;position:relative;top:12px}.update-button[_ngcontent-%COMP%]:hover{background:#2563eb}.update-button[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.date-picker-container[_ngcontent-%COMP%]{display:flex;gap:15px}.date-picker-field[_ngcontent-%COMP%]{border-radius:16px;width:190px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;font-size:12px}.filter-content[_ngcontent-%COMP%]{display:flex;gap:15px;padding:10px 0}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.filter-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.region-select[_ngcontent-%COMP%]{width:120px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;align-self:center;font-size:12px}.performance-analysis-container[_ngcontent-%COMP%]{display:flex;gap:25px;margin:20px 0;justify-content:space-between}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1;min-width:0px;height:auto;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px;overflow:hidden}.performance-analysis-container-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:700;color:#111827}.performance-analysis-container-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;gap:10px;overflow-y:auto;scrollbar-width:none}  .dashboard-container iframe{width:100%;height:420px;min-height:420px;border:none;display:block}.error-state[_ngcontent-%COMP%]{color:red;font-size:12px}.azure-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;padding:24px;background-color:#f9f9f9}.azure-card[_ngcontent-%COMP%]{width:100%;height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;box-shadow:2px 2px 10px #0000001a}.coming-soon[_ngcontent-%COMP%]{font-size:14px;color:#6f6f6f;font-style:italic}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}@media(max-width:1024px){.dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:18px;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-wrap:wrap}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1 1 100%}}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:14px}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}
8.date-picker-field[_ngcontent-%COMP%], .region-select[_ngcontent-%COMP%], .update-button[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.update-button[_ngcontent-%COMP%]{top:0}.analysis-period[_ngcontent-%COMP%], .performance-analysis-container-card[_ngcontent-%COMP%]{padding:18px;border-radius:14px}  .dashboard-container iframe{height:340px;min-height:340px}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}"]})}}return t})();function sb(t,r){if(t&1&&(o(0,"mat-option",27),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e.NAME," ")}}var bp=(()=>{class t{constructor(e,n,i){this.fb=e,this.notify=n,this.sanitizer=i,this.panelLoadToken={totalvolumereadwrite:0,volumereadperinstance:0,volumewriteperinstance:0,volumeidletimeperinstance:0,volumequeuelength:0,burstbalanceperinstance:0},this.noOfDays=0,this.regionList=[],this.selectedRegion=null,this.isFormChanged=!1,this.backendServiceDomain=ye.API_BASE_URL,this.grafanaDomain=ye.GRAFANA_DOMAIN,this.dataSource=ye.GRAFANA_DATASOURCE,this.grafanaProxyPath="web/reve/performance",this.grafanaDashboard="d-solo/MP7gaHbZz/amazon-ebs",this.timestamp=Date.now(),this.orgID=0,this.fromDate=0,this.toDate=0,this.regionID="",this.totalVolumeReadWrite="",this.totalVolumeReadWriteURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.volumeReadPerInstance="",this.volumeReadPerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.volumeWritePerInstance="",this.volumeWritePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.volumeIdleTimePerInstance="",this.volumeIdleTimePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.volumeQueueLength="",this.volumeQueueLengthURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.burstBalancePerInstance="",this.burstBalancePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(""),this.panelStatus={totalvolumereadwrite:{loading:!1,failed:!1},volumereadperinstance:{loading:!1,failed:!1},volumewriteperinstance:{loading:!1,failed:!1},volumeidletimeperinstance:{loading:!1,failed:!1},volumequeuelength:{loading:!1,failed:!1},burstbalanceperinstance:{loading:!1,failed:!1}}}ngOnInit(){this.accountID=window.localStorage.getItem("currentAccountID");let e=JSON.parse(window.localStorage.getItem("REGION")||"[]");this.grfOrgId=window.localStorage.getItem("grfOrgId"),this.regionList=e;let n=new Date,i=new Date;i.setDate(n.getDate()-29),this.dateRange=this.fb.group({start:[i,U.required],end:[n,U.required]}),this.regionList&&this.regionList.length>0&&(this.selectedRegion=this.regionList[0],this.regionID=this.selectedRegion.CODE,setTimeout(()=>{this.reloadIframe()})),this.dateRange.valueChanges.subscribe(()=>{this.isFormChanged=!0})}getGrafanaURL(e){let n=this.grfOrgId;return this.timestamp=Date.now(),`${this.backendServiceDomain}/${this.grafanaProxyPath}/${this.grafanaDashboard}?orgId=${n}&from=${this.fromDate}&to=${this.toDate}&timezone=browser&var-datasource=${this.dataSource}&var-region=${this.regionID}&var-period=300&panelId=${e}&__feature.dashboardSceneSolo=true&ts=${this.timestamp}`}getDayTimestamps(e,n=!0){let i=new Date(e);return n?i.setHours(0,0,0,0):i.setHours(23,59,59,999),i.getTime()}reloadIframe(){return St(this,null,function*(){if(this.isFormChanged=!1,this.dateRange.valid){let e=this.dateRange.get("start")?.value,n=this.dateRange.get("end")?.value;e&&n&&(this.fromDate=this.getDayTimestamps(e,!0),this.toDate=this.getDayTimestamps(n,!1))}this.fromDate&&this.toDate&&this.regionID&&(this.setPanelLoading("totalvolumereadwrite"),this.totalVolumeReadWrite=this.getGrafanaURL("panel-2"),this.totalVolumeReadWriteURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.totalVolumeReadWrite),this.setPanelLoading("volumereadperinstance"),this.volumeReadPerInstance=this.getGrafanaURL("panel-13"),this.volumeReadPerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.volumeReadPerInstance),this.setPanelLoading("volumewriteperinstance"),this.volumeWritePerInstance=this.getGrafanaURL("panel-14"),this.volumeWritePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.volumeWritePerInstance),this.setPanelLoading("volumeidletimeperinstance"),this.volumeIdleTimePerInstance=this.getGrafanaURL("panel-17"),this.volumeIdleTimePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.volumeIdleTimePerInstance),this.setPanelLoading("volumequeuelength"),this.volumeQueueLength=this.getGrafanaURL("panel-18"),this.volumeQueueLengthURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.volumeQueueLength),this.setPanelLoading("burstbalanceperinstance"),this.burstBalancePerInstance=this.getGrafanaURL("panel-23"),this.burstBalancePerInstanceURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.burstBalancePerInstance))})}onRegionSelected(e){this.selectedRegion=e,this.regionID=e.CODE,this.isFormChanged=!0}onUpdateClick(){this.dateRange.valid&&this.isFormChanged?(this.isFormChanged=!0,this.reloadIframe()):this.notify.showNotification("Please select a valid date range","top","error",400),this.dateRange.valid?this.reloadIframe():this.notify.showNotification("Please select a valid date range","top","error",400)}onIframeLoad(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!1}onIframeError(e){this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0}setPanelLoading(e){let n=Date.now();this.panelLoadToken[e]=n,this.panelStatus[e].loading=!0,this.panelStatus[e].failed=!1,setTimeout(()=>{this.panelLoadToken[e]===n&&this.panelStatus[e].loading&&(this.panelStatus[e].loading=!1,this.panelStatus[e].failed=!0)},100)}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(V),y(Tn))}}static{this.\u0275cmp=k({type:t,selectors:[["app-ebs-performance"]],inputs:{totalVolumeReadWrite:"totalVolumeReadWrite",volumeReadPerInstance:"volumeReadPerInstance",volumeWritePerInstance:"volumeWritePerInstance",volumeIdleTimePerInstance:"volumeIdleTimePerInstance",volumeQueueLength:"volumeQueueLength",burstBalancePerInstance:"burstBalancePerInstance"},decls:53,vars:12,consts:[["picker",""],[1,"dashboard-container"],[1,"acc-header"],[1,"header"],[1,"analysis-period"],[1,"days-container"],[1,"period-label"],[1,"filter-container"],[1,"date-picker-container"],[1,"date-range-picker"],[1,"period-type"],[1,"date-picker-field"],[3,"rangePicker","formGroup"],["matStartDate","","formControlName","start","placeholder","Start date","required",""],["matEndDate","","formControlName","end","placeholder","End date","required",""],["matSuffix","",3,"for"],[1,"filter-section"],[1,"filter-label"],[1,"region-select"],["placeholder","Region",3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],[1,"update-button",3,"click","disabled"],[1,"fa","fa-sync"],[1,"performance-analysis-container"],[1,"performance-analysis-container-card"],[1,"performance-analysis-container-content"],["frameborder","0",1,"embedded-iframe",3,"src"],[3,"value"]],template:function(n,i){if
8(n&1){let s=A();o(0,"div",1)(1,"div",2)(2,"div",3),l(3,"EBS"),a()(),o(4,"div",4)(5,"div",5)(6,"div",6),l(7,"Analysis Period"),a()(),o(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),l(12,"Primary Period"),a(),o(13,"div",11)(14,"mat-date-range-input",12),h(15,"input",13)(16,"input",14),a(),h(17,"mat-datepicker-toggle",15)(18,"mat-date-range-picker",null,0),a()(),o(20,"div",16)(21,"div",17),l(22," Region "),a(),o(23,"div",18)(24,"mat-select",19),se("valueChange",function(m){return O(s),le(i.selectedRegion,m)||(i.selectedRegion=m),P(m)}),v("selectionChange",function(m){return i.onRegionSelected(m.value)}),g(25,sb,2,2,"mat-option",20),a()()(),o(26,"button",21),v("click",function(){return i.onUpdateClick()}),l(27," Update "),h(28,"i",22),a()()()(),o(29,"div",23)(30,"mat-card",24)(31,"div",25),h(32,"iframe",26),a()()(),o(33,"div",23)(34,"mat-card",24)(35,"div",25),h(36,"iframe",26),a()()(),o(37,"div",23)(38,"mat-card",24)(39,"div",25),h(40,"iframe",26),a()()(),o(41,"div",23)(42,"mat-card",24)(43,"div",25),h(44,"iframe",26),a()()(),o(45,"div",23)(46,"mat-card",24)(47,"div",25),h(48,"iframe",26),a()()(),o(49,"div",23)(50,"mat-card",24)(51,"div",25),h(52,"iframe",26),a()()()()}if(n&2){let s=Ce(19);c(14),p("rangePicker",s)("formGroup",i.dateRange),c(3),p("for",s),c(7),ae("value",i.selectedRegion),c(),p("ngForOf",i.regionList),c(),p("disabled",!i.isFormChanged),c(6),p("src",i.totalVolumeReadWriteURL,et),c(4),p("src",i.volumeReadPerInstanceURL,et),c(4),p("src",i.volumeWritePerInstanceURL,et),c(4),p("src",i.volumeIdleTimePerInstanceURL,et),c(4),p("src",i.volumeQueueLengthURL,et),c(4),p("src",i.burstBalancePerInstanceURL,et)}},dependencies:[N,$,z,Pt,Nt,fe,ue,ve,me,$e,Gt,Ge,We,Zt,Xt,en,tn,nn],styles:["body, html[_ngcontent-%COMP%]{height:100%;margin:0;background-color:#f9f9f9}.dashboard-container[_ngcontent-%COMP%]{height:100%;padding:1.5%;box-sizing:border-box;display:flex;flex-direction:column;position:relative}.acc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 10px;gap:10px}.header[_ngcontent-%COMP%]{font-size:24px!important;line-height:32px;font-weight:700;color:#111827}.analysis-period[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;gap:5px;margin:20px 0;padding:16px;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.period-label[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.days-label[_ngcontent-%COMP%]{font-size:14px;line-height:28px;color:#374151;font-weight:500}.days-container[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.date-range-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.period-type[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.update-button[_ngcontent-%COMP%]{height:40px;padding:0 16px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s;align-self:center;position:relative;top:12px}.update-button[_ngcontent-%COMP%]:hover{background:#2563eb}.update-button[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}.date-picker-container[_ngcontent-%COMP%]{display:flex;gap:15px}.date-picker-field[_ngcontent-%COMP%]{border-radius:16px;width:190px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;font-size:12px}.filter-content[_ngcontent-%COMP%]{display:flex;gap:15px;padding:10px 0}.filter-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding:10px 0}.filter-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.region-select[_ngcontent-%COMP%]{width:120px;border-radius:16px;height:38px;display:flex;border:1px solid #D1D5DB;padding:0 10px;align-items:center;align-self:center;font-size:12px}.performance-analysis-container[_ngcontent-%COMP%]{display:flex;gap:25px;margin:20px 0;justify-content:space-between}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1;min-width:0px;height:auto;border-radius:20px;padding:30px 25px;box-shadow:0 4px 18px #0f172a14;border:1px solid #e6edf6;background:#fff;display:flex;flex-direction:column;gap:25px;overflow:hidden}.performance-analysis-container-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:700;color:#111827}.performance-analysis-container-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex-grow:1;gap:10px;overflow-y:auto;scrollbar-width:none}  .dashboard-container iframe{width:100%;height:420px;min-height:420px;border:none;display:block}.error-state[_ngcontent-%COMP%]{color:red;font-size:12px}@media(max-width:1024px){.dashboard-container[_ngcontent-%COMP%]{min-height:100%;height:auto;padding:18px;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-wrap:wrap}.performance-analysis-container-card[_ngcontent-%COMP%]{flex:1 1 100%}}@media(max-width:760px){.dashboard-container[_ngcontent-%COMP%]{padding:14px}.filter-container[_ngcontent-%COMP%], .filter-content[_ngcontent-%COMP%], .date-picker-container[_ngcontent-%COMP%], .performance-analysis-container[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}
8.date-picker-field[_ngcontent-%COMP%], .region-select[_ngcontent-%COMP%], .update-button[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.update-button[_ngcontent-%COMP%]{top:0}.analysis-period[_ngcontent-%COMP%], .performance-analysis-container-card[_ngcontent-%COMP%]{padding:18px;border-radius:14px}  .dashboard-container iframe{height:340px;min-height:340px}}"]})}}return t})();var Rm=So(Tp());var bo=So(Tm(),1);var _2=["qrcElement"],Am=(()=>{class t{allowEmptyString=!1;colorDark="#000000ff";colorLight="#ffffffff";cssClass="qrcode";elementType="canvas";errorCorrectionLevel="M";imageSrc;imageHeight;imageWidth;margin=4;qrdata="";scale=4;version;width=10;alt;ariaLabel;title;qrCodeURL=new kt;qrcElement;context=null;centerImage;renderer=ga(Ql);sanitizer=ga(Tn);ngOnChanges(){return St(this,null,function*(){yield this.createQRCode()})}isValidQrCodeText(e){return this.allowEmptyString===!1?!(typeof e>"u"||e===""||e==="null"||e===null):!(typeof e>"u")}toDataURL(e){return new Promise((n,i)=>{(0,bo.toDataURL)(this.qrdata,e,(s,d)=>{s?i(s):n(d)})})}toCanvas(e,n){return new Promise((i,s)=>{(0,bo.toCanvas)(e,this.qrdata,n,d=>{d?s(d):i("success")})})}toSVG(e){return new Promise((n,i)=>{(0,bo.toString)(this.qrdata,e,(s,d)=>{s?i(s):n(d)})})}renderElement(e){for(let n of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,n);this.renderer.appendChild(this.qrcElement.nativeElement,e)}createQRCode(){return St(this,null,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):this.version!==void 0&&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=" ");let e={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,version:this.version,width:this.width},n=this.imageSrc,i=this.imageHeight?+this.imageHeight:40,s=this.imageWidth?+this.imageWidth:40;switch(this.elementType){case"canvas":{let d=this.renderer.createElement("canvas");this.context=d.getContext("2d"),this.toCanvas(d,e).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(d,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(d,"title",`${this.title}`),n&&this.context){this.centerImage=new Image(s,i),n!==this.centerImage.src&&(this.centerImage.crossOrigin="anonymous",this.centerImage.src=n),i!==this.centerImage.height&&(this.centerImage.height=i),s!==this.centerImage.width&&(this.centerImage.width=s);let m=this.centerImage;m&&(m.onload=()=>{this.context?.drawImage(m,d.width/2-s/2,d.height/2-i/2,s,i)})}this.renderElement(d),this.emitQRCodeURL(d)}).catch(m=>{console.error("[angularx-qrcode] canvas error:",m)});break}case"svg":{let d=this.renderer.createElement("div");this.toSVG(e).then(m=>{this.renderer.setProperty(d,"innerHTML",m);let f=d.firstChild;this.renderer.setAttribute(f,"height",`${this.width}`),this.renderer.setAttribute(f,"width",`${this.width}`),this.renderElement(f),this.emitQRCodeURL(f)}).catch(m=>{console.error("[angularx-qrcode] svg error:",m)});break}default:{let d=this.renderer.createElement("img");this.toDataURL(e).then(m=>{this.alt&&d.setAttribute("alt",this.alt),this.ariaLabel&&d.setAttribute("aria-label",this.ariaLabel),d.setAttribute("src",m),this.title&&d.setAttribute("title",this.title),this.renderElement(d),this.emitQRCodeURL(d)}).catch(m=>{console.error("[angularx-qrcode] img/url error:",m)})}}}catch(e){console.error("[angularx-qrcode] Error generating QR Code:",e.message)}})}convertBase64ImageUrlToBlob(e){let n=e.split(";base64,"),i=n[0].split(":")[1],s=atob(n[1]),d=new Uint8Array(s.length);for(let m=0;m<s.length;++m)d[m]=s.charCodeAt(m);return new Blob([d],{type:i})}emitQRCodeURL(e){let n=e.constructor.name;if(n===SVGSVGElement.name){let f=e.outerHTML,_=new Blob([f],{type:"image/svg+xml"}),b=URL.createObjectURL(_),M=this.sanitizer.bypassSecurityTrustUrl(b);this.qrCodeURL.emit(M);return}let i="";n===HTMLCanvasElement.name&&(i=e.toDataURL("image/png")),n===HTMLImageElement.name&&(i=e.src);let s=this.convertBase64ImageUrlToBlob(i),d=URL.createObjectURL(s),m=this.sanitizer.bypassSecurityTrustUrl(d);this.qrCodeURL.emit(m)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["qrcode"]],viewQuery:function(n,i){if
8(n&1&&bt(_2,7),n&2){let s;ht(s=_t())&&(i.qrcElement=s.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:[En],decls:2,vars:2,consts:[["qrcElement",""]],template:function(n,i){n&1&&wn(0,"div",null,0),n&2&&yn(i.cssClass)},encapsulation:2,changeDetection:0})}return t})();function C2(t,r){t&1&&h(0,"iconify-icon",16)}function x2(t,r){t&1&&h(0,"iconify-icon",17)}var Dm=(()=>{class t{constructor(e,n,i){this.dialog=e,this.dialogRef=n,this.data=i,this.isSuccess=!0}ngOnInit(){this.isSuccess=this.data?.isSuccess!==!1}onClose(){this.dialogRef.close("close")}onPrimaryAction(){if(!this.isSuccess){this.dialogRef.close("retry"),this.dialog.open(ma,{height:"auto",width:"960px",maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)",disableClose:!0,panelClass:"authenticator-app-dialog"});return}this.dialogRef.close(this.isSuccess?"done":"retry")}get statusTitle(){return this.isSuccess?"2FA Successfully Enabled!":"2FA Not Enabled Due To Unexpected Error"}get statusDescription(){return this.isSuccess?`Your account is now protected with two-factor authentication. 
9You will be asked for a verification code each time you sign in.`:`An unexpected error occurred while enabling two-factor authentication. 
10Please try again.`}get actionLabel(){return this.isSuccess?"Done":"Try Again"}static{this.\u0275fac=function(n){return new(n||t)(y(Se),y(Et),y(Qt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-authenticator-response"]],decls:22,vars:7,consts:[[1,"auth-response-dialog"],[1,"dialog-header"],[1,"header-left"],[1,"header-icon"],["icon","ri:shield-keyhole-line"],[1,"header-title"],[1,"header-subtitle"],["type","button",1,"close-btn",3,"click"],["icon","material-symbols:close-rounded"],[1,"dialog-content"],[1,"status-circle"],["icon","ri:shield-check-fill",4,"ngIf"],["icon","material-symbols:error-rounded",4,"ngIf"],[1,"status-title"],[1,"status-description"],["type","button",1,"primary-btn",3,"click"],["icon","ri:shield-check-fill"],["icon","material-symbols:error-rounded"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),h(4,"iconify-icon",4),a(),o(5,"div")(6,"div",5),l(7,"Two-Factor Authentication"),a(),o(8,"div",6),l(9,"Secure your account with an authenticator app"),a()()(),o(10,"button",7),v("click",function(){return i.onClose()}),h(11,"iconify-icon",8),a()(),o(12,"div",9)(13,"div",10),g(14,C2,1,0,"iconify-icon",11)(15,x2,1,0,"iconify-icon",12),a(),o(16,"div",13),l(17),a(),o(18,"div",14),l(19),a(),o(20,"button",15),v("click",function(){return i.onPrimaryAction()}),l(21),a()()()),n&2&&(c(13),Y("error",!i.isSuccess),c(),p("ngIf",i.isSuccess),c(),p("ngIf",!i.isSuccess),c(2),C(i.statusTitle),c(2),C(i.statusDescription),c(2),C(i.actionLabel))},dependencies:[N,B],styles:[".auth-response-dialog[_ngcontent-%COMP%]{background:#fff;border-radius:16px;overflow:hidden}.dialog-header[_ngcontent-%COMP%]{border-bottom:1px solid #eceff3;padding:5px 5px 20px;display:flex;align-items:center;justify-content:space-between}.header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.header-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:12px;background:#35a5db18;color:#35a5db;display:flex;align-items:center;justify-content:center;font-size:18px}.header-title[_ngcontent-%COMP%]{color:#111827;font-size:16px;line-height:20px;font-weight:700}.header-subtitle[_ngcontent-%COMP%]{color:#9ca3af;font-size:12px;line-height:16px}.close-btn[_ngcontent-%COMP%]{border:none;width:32px;height:32px;border-radius:50%;background:#f3f4f6;color:#6b7280;display:flex;align-items:center;justify-content:center;cursor:pointer}.close-btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:14px}.dialog-content[_ngcontent-%COMP%]{padding:32px 32px 40px;display:flex;flex-direction:column;align-items:center;text-align:center}
10.status-circle[_ngcontent-%COMP%]{width:80px;height:80px;border-radius:50%;background:#d1fae5;color:#10b981;display:flex;align-items:center;justify-content:center}.status-circle.error[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.status-circle[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:28px}.status-title[_ngcontent-%COMP%]{margin-top:20px;color:#111827;font-size:18px;line-height:28px;font-weight:700}.status-description[_ngcontent-%COMP%]{margin-top:10px;color:#9ca3af;font-size:14px;line-height:23px;white-space:pre-line}.primary-btn[_ngcontent-%COMP%]{margin-top:20px;border:none;border-radius:12px;background:#35a5db;color:#fff;padding:12px 32px;font-size:14px;line-height:20px;font-weight:600;cursor:pointer}.close-btn[_ngcontent-%COMP%]:focus, .close-btn[_ngcontent-%COMP%]:focus-visible, .primary-btn[_ngcontent-%COMP%]:focus, .primary-btn[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:none}[_nghost-%COMP%]     .authenticator-response-dialog .mat-mdc-dialog-surface{padding:0;border-radius:16px;background:transparent}[_nghost-%COMP%]     .authenticator-response-dialog .mat-mdc-dialog-container{padding:0}[_nghost-%COMP%]     .authenticator-response-dialog .mdc-dialog__surface{border-radius:16px;background:transparent}"]})}}return t})();function v2(t,r){t&1&&(o(0,"div",25)(1,"div",26)(2,"div",27),h(3,"span",28),a()()())}var ma=(()=>{class t{constructor(e,n,i,s,d,m){this.cdr=e,this.ngZone=n,this.dialog=i,this.dialogRef=s,this.adminService=d,this.notify=m,this.loading=!0,this.secretCode="",this.qrData="",this.qrCodeDownloadLink=null,this.passkeyCode="",this.issuer=ye.MFA_ISSUER,this.accountName=""}ngOnInit(){let e=JSON.parse(window.localStorage.getItem("userInfo")||"{}");this.accountName=e?.emailId,this.associateToken()}associateToken(){this.loading=!0,this.cdr.detectChanges(),this.adminService.associateSoftwareToken().pipe(Xe(()=>{this.ngZone.run(()=>{this.loading=!1,this.cdr.detectChanges()})})).subscribe({next:e=>{let n=e?.object?.SECRET_CODE;n!=null&&n!==""&&(this.secretCode=this.normalizeSecret(String(n)),this.qrData=this.buildOtpAuthUri(this.secretCode,this.issuer,this.accountName))},error:e=>{this.ngZone.run(()=>{this.loading=!1,this.cdr.detectChanges()}),this.notify.showNotification(e.error?.message||"Error associating software token","top",E[e.error?.status]?E[e.error.status]:"error",e.error?.status||500)}})}onChangeURL(e){this.qrCodeDownloadLink=e}onCancel(){this.dialogRef.close("cancel")}onVerify(){let e=(this.passkeyCode||"").trim();if(!/^\d{6}$/.test(e))return;let n={CODE:e};this.loading=!0,this.adminService.verifyAuthenticatorApp(n).subscribe({next:i=>{this.loading=!1;let s=JSON.parse(window.localStorage.getItem("userInfo")||"{}");s.mfa_enforce=!0,s.mfa_configured=!0,window.localStorage.setItem("userInfo",JSON.stringify(s)),this.dialogRef.close("verified"),this.openAuthenticatorResponseDialog(!0)},error:i=>{this.loading=!1,this.dialogRef.close("verify_failed"),this.openAuthenticatorResponseDialog(!1)}})}openAuthenticatorResponseDialog(e){this.dialog.open(Dm,{height:"auto",width:"600px",disableClose:!0,data:{isSuccess:e}})}buildOtpAuthUri(e,n,i){return`otpauth://totp/${encodeURIComponent(n)}:${encodeURIComponent(i)}?secret=${encodeURIComponent(e)}&issuer=${encodeURIComponent(n)}&algorithm=SHA1&digits=6&period=30`}normalizeSecret(e){return String(e||"").replace(/\s+/g,"").toUpperCase()}onPasskeyInput(){this.passkeyCode=(this.passkeyCode||"").replace(/\D/g,"").slice(0,6)}onPasskeyKeydown(e){if(!["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(e.key)){if(!/^\d$/.test(e.key)){e.preventDefault();return}(this.passkeyCode||"").length>=6&&e.preventDefault()}}onPasskeyPaste(e){e.preventDefault();let i=(e.clipboardData?.getData("text")||"").replace(/\D/g,"");this.passkeyCode=((this.passkeyCode||"")+i).slice(0,6)}static{this.\u0275fac=function(n){return new(n||t)(y(Z),y(be),y(Se),y(Et),y(Je),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-authenticator-app"]],decls:37,vars:7,consts:[[1,"authenticator-dialog"],["class","overlay",4,"ngIf"],[1,"dialog-head"],[1,"icon-box"],["icon","bi:phone"],[1,"title"],[1,"subtitle"],[1,"setup-body"],[1,"scan-card"],[1,"scan-title"],[1,"qr-shell"],["elementType","svg",3,"qrCodeURL","width","qrdata","errorCorrectionLevel","allowEmptyString"],[1,"scan-note"],[1,"passkey-card"],[1,"passkey-header"],[1,"icon-box","small"],["icon","ri:fingerprint-line"],[1,"passkey-title"],[1,"passkey-input"],["type","text","placeholder","Enter verification code","inputmode","numeric","pattern","[0-9]*","autocomplete","one-time-code","tabindex","-1","maxlength","6",1,"passkey-field",3,"ngModelChange","input","keydown","paste","ngModel"],[1,"passkey-note"],[1,"actions"],["type","button","tabindex","-1",1,"verify-btn",3,"click","disabled"],["icon","material-symbols:arrow-forward-rounded"],["type","button","tabindex","-1",1,"cancel-btn",3,"click"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"]],template:function(n,i){n&1&&(o(0,"div",0),g(1,v2,4,0,"div",1),o(2,"div",2)(3,"div",3),h(4,"iconify-icon",4),a(),o(5,"div")(6,"div",5),l(7,"Authenticator app"),a(),o(8,"div",6),l(9,"Scan the QR code below to set up"),a()()(),o(10,"div",7)(11,"div",8)(12,"div",9),l(13,"Scan with your device"),a(),o(14,"div",10)(15,"qrcode",11),v("qrCodeURL",function(d){return i.onChangeURL(d)}),a()(),o(16,"div",12),l(17,"Point your camera at this code to"),h(18,"br"),l(19,"register the MFA device"),a()(),o(20,"div",13)(21,"div",14)(22,"div",15),h(23,"iconify-icon",16),a(),o(24,"div",17),l(25,"Passkey Verification Code"),a()(),o(26,"div",18),h(27,"iconify-icon",16),o(28,"input",19),se("ngModelChange",function(d){return le(i.passkeyCode,d)||(i.passkeyCode=d),d}),v("input",function(){return i.onPasskeyInput()})("keydown",function(d){return i.onPasskeyKeydown(d)})("paste",function(d){return i.onPasskeyPaste(d)}),a()(),o(29,"div",20),l(30," Enter the passkey code generated by your registered device after scanning the QR. "),a(),o(31,"div",21)(32,"button",22),v("click",function(){return i.onVerify()}),l(33," Verify Code "),h(34,"iconify-icon",23),a(),o(35,"button",24),v("click",function(){return i.onCancel()}),l(36,"Cancel"),a()()()()()),n&2&&(c(),p("ngIf",i.loading),c(14),p("width",220)("qrdata",i.qrData)("errorCorrectionLevel","H")("allowEmptyString",!0),c(13),ae("ngModel",i.passkeyCode),c(4),p("disabled",!i.passkeyCode||i.passkeyCode.length!==6))},dependencies:[N,B,z,ve,me,_r,ns,mt,Am],styles:[".authenticator-dialog[_ngcontent-%COMP%]{width:100%;padding:22px;display:flex;flex-direction:column;gap:18px;box-sizing:border-box;max-height:calc(100vh - 32px);overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.authenticator-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:start;gap:16px}.icon-box[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:12px;background:#35a5db1f;color:#35a5db;display:flex;align-items:center;justify-content:center;font-size:14px}.icon-box.small[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:8px;font-size:16px}.title[_ngcontent-%COMP%]{color:#1f2937;font-size:14px;line-height:20px;font-weight:600;white-space:nowrap}.subtitle[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px}.setup-body[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(200px,.9fr) minmax(200px,1fr);gap:18px;align-items:stretch}.scan-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:16px;padding:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;min-height:100%;background:#fff}.scan-title[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px;font-weight:600;letter-spacing:1.2px}.qr-shell[_ngcontent-%COMP%]{width:196px;display:flex;align-items:center;justify-content:center}.qr-shell[_ngcontent-%COMP%]   qr-code[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.scan-note[_ngcontent-%COMP%]{color:#9ca3af;text-align:center;font-size:12px;line-height:20px}.passkey-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:16px;padding:22px;display:flex;flex-direction:column;justify-content:center;gap:16px;flex:1;background:#fff}.passkey-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.passkey-title[_ngcontent-%COMP%]{color:#374151;font-size:12px;line-height:16px;font-weight:600}.passkey-input[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:12px;padding:12px 20px;display:flex;align-items:center;gap:8px}.passkey-input[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#9aa3b1;font-size:16px}.passkey-field[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;width:100%;color:#2e3645;font-size:14px;line-height:20px;letter-spacing:7px}.passkey-field[_ngcontent-%COMP%]::placeholder{color:#9ca3af;letter-spacing:normal}.passkey-note[_ngcontent-%COMP%]{color:#8c96a7;font-size:12px;line-height:16px}.actions[_ngcontent-%COMP%]{border-radius:16px;padding:18px;margin-top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px;background:#fff}.cancel-btn[_ngcontent-%COMP%]{width:100%;border:1px solid #E5E7EB;border-radius:12px;background:#fff;color:#6b7280;font-size:14px;font-weight:500;cursor:pointer;padding:8px 16px}.verify-btn[_ngcontent-%COMP%]{width:100%;border:none;border-radius:12px;background:#35a5db;color:#fff;padding:10px 24px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:14px;line-height:20px;font-weight:600;cursor:pointer}.verify-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed}.verify-btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:16px}.cancel-btn[_ngcontent-%COMP%]:focus, .cancel-btn[_ngcontent-%COMP%]:focus-visible, .verify-btn[_ngcontent-%COMP%]:focus, .verify-btn[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:none}@media(max-width:760px){.authenticator-dialog[_ngcontent-%COMP%]{padding:18px}.setup-body[_ngcontent-%COMP%]{grid-template-columns:1fr}.scan-card[_ngcontent-%COMP%], .passkey-card[_ngcontent-%COMP%]{min-height:0;padding:18px}.qr-shell[_ngcontent-%COMP%]{width:180px}.actions[_ngcontent-%COMP%]{padding:16px}}@media(max-width:460px){.authenticator-dialog[_ngcontent-%COMP%]{padding:14px;gap:14px}.dialog-head[_ngcontent-%COMP%]{gap:12px}.title[_ngcontent-%COMP%]{white-space:normal}.passkey-input[_ngcontent-%COMP%]{padding:11px 12px}.passkey-field[_ngcontent-%COMP%]{letter-spacing:4px}.cancel-btn[_ngcontent-%COMP%], .verify-btn[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function b2(t,r){t&1&&(o(0,"div",11)(1,"div",12)(2,"div",13),h(3,"span",14),a()()())}function y2(t,r){t&1&&h(0,"app-dashboard-ready-modal")}function M2(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function S2(t,r){t&1&&(o(0,"span",21),l(1,"Requesting... "),h(2,"iconify-icon",22),a())}function O2(t,r){if(t&1){let e=A();o(0,"section",15)(1,"div",16)(2,"div",17),h(3,"iconify-icon",18),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",19),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,M2,2,0,"span",9)(10,S2,3,0,"span",20),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var km=(()=>{class t{static{this.MFA_PROMPT_PENDING_KEY="mfa_prompt_pending_after_login"}constructor(e,n,i,s,d,m,f){this.elementRef=e,this.embedService=n,this.route=i,this.dialog=s,this.notify=d,this.ngZone=m,this.cdr=f,this.switchAccountButton=!0,this.supersetDomain=ye?.SUPERSET_DOMAIN,this.loading=!0,this.dashboardKey=1,this.selectedTab=0,this.integrationCompleted=!1,this.iframeObserver=null,this.loaderFallbackTimer=null,this.isFinopsEnabled=!0,this.isAccessLoading=!1,this.dashboardReady=!1,this.tabKeyM
10ap={0:5,1:1,2:2}}ngOnInit(){if(this.userInfo=JSON.parse(window.localStorage.getItem("userInfo")||"{}"),this.shouldOpenMfaSetupDialog()&&this.openAuthenticatorDialog(),this.isFinopsEnabled=this.isFeatureEnabled(1),!this.isFinopsEnabled)return;let e=JSON.parse(window.localStorage.getItem("accountData")||"[]");Array.isArray(e)&&e.length>0&&(this.switchAccountButton=!1),window.localStorage.getItem("integrationCompleted")=="true"&&(this.integrationCompleted=!0),this.dashboardKey=5,this.selectedTab=0,this.loading=!0,this.route.queryParamMap.subscribe(n=>{let i=Number(n.get("key"));Number.isFinite(i)&&i>0&&i!==this.dashboardKey&&(this.dashboardKey=i,this.selectedTab=this.resolveSelectedTab(this.dashboardKey),this.loading=!0,this.embedSupersetDashboard())})}ngAfterViewInit(){this.loading&&setTimeout(()=>{this.embedSupersetDashboard()},100)}openAuthenticatorDialog(){this.dialog.open(ma,{height:"auto",width:"960px",maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)",disableClose:!0,panelClass:"authenticator-app-dialog"}).afterClosed().subscribe(n=>{n==="cancel"&&window.localStorage.removeItem(t.MFA_PROMPT_PENDING_KEY)})}shouldOpenMfaSetupDialog(){let e=window.localStorage.getItem(t.MFA_PROMPT_PENDING_KEY)==="true",n=this.userInfo?.mfa_enforce===!0&&this.userInfo?.mfa_configured===!1;return e&&n}onTabChange(e){this.selectedTab=e.index,this.dashboardKey=this.tabKeyMap[e.index]||5,this.loading=!0,this.dashboardReady=!1,this.embedSupersetDashboard()}embedSupersetDashboard(){let e=this.resolveDashboardId(this.dashboardKey),n=this.elementRef.nativeElement.querySelector(`#${e}`);n?(this.clearLoaderWatchers(),n.innerHTML="",this.embedService.getGuestToken(this.dashboardKey).subscribe({next:i=>{!i||!i.object||!i.object.TOKEN||!i.object.EMBED_ID?(this.finishLoading(),this.dashboardReady=!0):((0,Rm.embedDashboard)({id:i.object.EMBED_ID,supersetDomain:this.supersetDomain,mountPoint:document.getElementById(e),fetchGuestToken:()=>i.object.TOKEN,dashboardUiConfig:{hideTitle:!0,hideTab:!0}}),this.bindIframeLoadWatcher(n))},error:i=>{this.finishLoading(),this.dashboardReady=!0}})):(console.error("Dashboard element not found:",e),this.finishLoading())}ngOnDestroy(){this.clearLoaderWatchers(),this.routerSubscription&&this.routerSubscription.unsubscribe();let e=this.elementRef.nativeElement.querySelector("#finops_dashboard_overview"),n=this.elementRef.nativeElement.querySelector("#finops_dashboard_aws"),i=this.elementRef.nativeElement.querySelector("#finops_dashboard_azure");e&&(e.innerHTML=""),n&&(n.innerHTML=""),i&&(i.innerHTML="")}resolveSelectedTab(e){return e===1?1:e===2?2:0}resolveDashboardId(e){return e===1?"finops_dashboard_aws":e===2?"finops_dashboard_azure":"finops_dashboard_overview"}bindIframeLoadWatcher(e){let n=()=>this.finishLoading(),i=d=>
10{d.dataset.finopsLoadBound!=="true"&&(d.dataset.finopsLoadBound="true",d.addEventListener("load",n,{once:!0}))},s=e.querySelector("iframe");s&&i(s),this.iframeObserver=new MutationObserver(()=>{let d=e.querySelector("iframe");d&&i(d)}),this.iframeObserver.observe(e,{childList:!0,subtree:!0}),this.loaderFallbackTimer=setTimeout(()=>this.finishLoading(),1e4)}clearLoaderWatchers(){this.iframeObserver&&(this.iframeObserver.disconnect(),this.iframeObserver=null),this.loaderFallbackTimer&&(clearTimeout(this.loaderFallbackTimer),this.loaderFallbackTimer=null)}finishLoading(){this.clearLoaderWatchers(),this.ngZone.run(()=>{this.loading=!1,this.cdr.detectChanges()})}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.embedService.requestForService({SERVICE_ID:1}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}static{this.\u0275fac=function(n){return new(n||t)(y(lr),y(re),y(Le),y(Se),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-fin-ops-dashboard"]],decls:16,vars:14,consts:[[1,"superset-dashboard-container"],[1,"main-content"],["class","overlay",4,"ngIf"],[1,"tab-buttons"],[1,"tab-button",3,"click"],[1,"dashboard-content"],["id","finops_dashboard_overview",1,"embedded-iframe",3,"hidden"],["id","finops_dashboard_aws",1,"embedded-iframe",3,"hidden"],["id","finops_dashboard_azure",1,"embedded-iframe",3,"hidden"],[4,"ngIf"],["class","feature-lock-overlay",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1),g(2,b2,4,0,"div",2),o(3,"div",3)(4,"button",4),v("click",function(){return i.onTabChange({index:0})}),l(5," Overview "),a(),o(6,"button",4),v("click",function(){return i.onTabChange({index:1})}),l(7," AWS "),a(),o(8,"button",4),v("click",function(){return i.onTabChange({index:2})}),l(9," Azure "),a()(),o(10,"div",5),h(11,"div",6)(12,"div",7)(13,"div",8),g(14,y2,1,0,"app-dashboard-ready-modal",9),a()(),g(15,O2,11,3,"section",10),a()),n&2&&(Y("is-locked",!i.isFinopsEnabled),c(2),p("ngIf",i.loading),c(2),Y("active",i.selectedTab===0),c(2),Y("active",i.selectedTab===1),c(2),Y("active",i.selectedTab===2),c(3),p("hidden",i.selectedTab!==0),c(),p("hidden",i.selectedTab!==1),c(),p("hidden",i.selectedTab!==2),c(),p("ngIf",i.dashboardReady),c(),p("ngIf",!i.isFinopsEnabled))},dependencies:[N,B,z,Xr],styles:[".superset-dashboard-container[_ngcontent-%COMP%]{width:100%;min-height:100%;padding:24px;position:relative;z-index:0;box-sizing:border-box;background:linear-gradient(180deg,#fbfdff,#f9f9f9)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.superset-dashboard-container.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;display:flex;justify-content:center;align-items:center}.tab-buttons[_ngcontent-%COMP%]{display:flex;gap:12px;padding:0 4px 10px;border-bottom:1px solid #EDEDED;overflow-x:auto}.tab-button[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:8px;background-color:#f3f4f6;color:#374151;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;outline:none;min-width:80px}.tab-button[_ngcontent-%COMP%]:hover{background-color:#dfe9eb}.tab-button.active[_ngcontent-%COMP%]{background-color:#dbeafe;color:#374151;border-bottom:2px solid #1A1F3D}.dashboard-content[_ngcontent-%COMP%]{position:relative;min-height:min(75vh,100vh - 180px);background:#fff;border:1px solid #E6EDF6;border-radius:16px;overflow:hidden;box-shadow:0 10px 24px #0f172a0f}  .superset-dashboard-container iframe{width:100%;height:calc(100vh - 210px);min-height:560px;border:none}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}[_nghost-%COMP%]     .authenticator-app-dialog .mat-mdc-dialog-surface{padding:0;border-radius:0}[_nghost-%COMP%]     .authenticator-app-dialog .mat-mdc-dialog-container{padding:0}[_nghost-%COMP%]     .authenticator-app-dialog .mdc-dialog__surface{border-radius:0}@media(max-width:760px){.superset-dashboard-container[_ngcontent-%COMP%]{padding:14px}.dashboard-content[_ngcontent-%COMP%]{min-height:70vh}  .superset-dashboard-container iframe{height:70vh;min-height:460px}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}"]})}}return t})();var Nm=(t,r,e)=>({high:t,medium:r,low:e});function P2(t,r){if(t&1&&(o(0,"span",14),l(1),a()),t&2){let e=u();c(),C(e.workflow==null?null:e.workflow.name)}}function E2(t,r){if(t&1&&(o(0,"span",14),l(1),a()),t&2){let e=u();c(),C(e.workflow==null?null:e.workflow.workflowId)}}function w2(t,r){if(t&1&&(o(0,"div",15),l(1),a()),t&2){let e=u();c(),C(e.workflow==null?null:e.workflow.name)}}function I2(t,r){if(t&1&&(o(0,"div",15),l(1),a()),t&2){let e=u();c(),C(e.workflow==null?null:e.workflow.workflowId)}}function T2(t,r){t&1&&(o(0,"div",16),h(1,"mat-progress-spinner",17),a())}function A2(t,r){if(t&1&&(o(0,"div",18),l(1),a()),t&2){let e=u();c(),C(e.error)}}function D2(t,r){if(t&1&&(o(0,"div",31)(1,"span",32),l(2),a()()),t&2){let e=u(2);c(),Y("active",e.workflow.ACTIVE===!0)("inactive",e.workflow.ACTIVE===!1),c(),x(" ",e.workflow.ACTIVE===!0?"Active":e.workflow.ACTIVE===!1?"Inactive":"Unknown"," ")}}function R2(t,r){if(t&1&&(o(0,"div",31)(1,"span",32),l(2),a()()),t&2){let e=u(2);c(),Y("active",e.workflow.status==="success")("inactive",e.workflow.status==="error"),c(),x(" ",e.workflow.status," ")}}function k2(t,r){if(t&1&&(o(0,"span",33),l(1),F(2,"date"),a()),t&2){let e=u(2);c(),x(" ",e.workflow.CREATED_AT?ie(2,1,e.workflow.CREATED_AT,"MMM d, y HH:mm"):"N/A"," ")}}function N2(t,r){if(t&1&&(o(0,"span",33),l(1),F(2,"date"),a()),t&2){let e=u(2);c(),x(" ",e.workflow.startedAt?ie(2,1,e.workflow.startedAt,"MMM d, y HH:mm"):"N/A"," ")}}function F2(t,r){if(t&1&&(o(0,"span",33),l(1),F(2,"date"),a()),t&2){let e=u(2);c(),x(" ",e.workflow.UPDATED_AT?ie(2,1,e.workflow.UPDATED_AT,"MMM d, y HH:mm"):"N/A"," ")}}function z2(t,r){if(t&1&&(o(0,"span",33),l(1),F(2,"date"),a()),t&2){let e=u(2);c(),x(" ",e.workflow.stoppedAt?ie(2,1,e.workflow.stoppedAt,"MMM d, y HH:mm"):"N/A"," ")}}function L2(t,r){if(t&1&&(o(0,"div",23)(1,"span",24),l(2,"Success Rate:"),a(),o(3,"span",34),l(4),F(5,"number"),a()()),t&2){let e=u(2);c(3),p("ngClass",fa(5,Nm,e.workflow.SUCCESS_RATE>=90,e.workflow.SUCCESS_RATE>
10=70&&e.workflow.SUCCESS_RATE<90,e.workflow.SUCCESS_RATE<70)),c(),x(" ",ie(5,2,e.workflow.SUCCESS_RATE||0,"1.1-1"),"% ")}}function V2(t,r){if(t&1&&(o(0,"div",23)(1,"span",24),l(2,"Progress:"),a(),o(3,"span",34),l(4),F(5,"number"),a()()),t&2){let e=u(2);c(3),p("ngClass",fa(5,Nm,e.workflow.progress>=90,e.workflow.progress>=70&&e.workflow.progress<90,e.workflow.progress<70)),c(),x(" ",ie(5,2,e.workflow.progress||0,"1.1-1"),"% ")}}function B2(t,r){if(t&1&&(o(0,"div",39)(1,"div",40),h(2,"span",41),o(3,"span",42),l(4),F(5,"date"),a()(),o(6,"span",43),l(7),a()()),t&2){let e=r.$implicit;c(2),p("ngClass",(e.status||e.STATUS||"unknown").toLowerCase()),c(2),x(" ",e.DATE||e.date||e.timestamp?ie(5,4,e.DATE||e.date||e.timestamp,"MMM d, y HH:mm"):"N/A"," "),c(2),p("ngClass",(e.status||e.STATUS||"").toLowerCase()),c(),x(" ",e.status||e.STATUS||"Unknown"," ")}}function U2(t,r){if(t&1&&(o(0,"div",37),g(1,B2,8,7,"div",38),a()),t&2){let e=u(3);c(),p("ngForOf",e.workflow.RECENT_EXECUTIONS)}}function j2(t,r){t&1&&(o(0,"div",44)(1,"p"),l(2,"No recent executions available."),a()())}function $2(t,r){if(t&1&&(o(0,"div",35)(1,"h3"),l(2,"Recent Executions"),a(),g(3,U2,2,1,"div",36)(4,j2,3,0,"ng-template",null,0,at),a()),t&2){let e=Ce(5),n=u(2);c(3),p("ngIf",n.workflow.RECENT_EXECUTIONS==null?null:n.workflow.RECENT_EXECUTIONS.length)("ngIfElse",e)}}function q2(t,r){if(t&1&&(o(0,"div",21)(1,"h3"),l(2,"Last Execution Logs"),a(),o(3,"div",45)(4,"span",46),l(5),a()()()),t&2){let e=u(2);c(5),C(e.workflow.logs||"No logs available")}}function H2(t,r){if(t&1&&(o(0,"div",21)(1,"h3"),l(2,"Error Messages"),a(),o(3,"div",47)(4,"ul",48)(5,"li"),l(6),a()()()()),t&2){let e=u(2);c(6),C(e.workflow.errorMessage||"No error messages available")}}function W2(t,r){if(t&1&&(o(0,"div",19)(1,"div",20)(2,"div",21)(3,"h3"),l(4,"Workflow Overview"),a(),o(5,"div",22)(6,"div",23)(7,"span",24),l(8,"Status:"),a(),g(9,D2,3,5,"div",25)(10,R2,3,5,"div",25),a(),o(11,"div",23)(12,"span",24),l(13,"n8n Workflow ID:"),a(),o(14,"span",26),l(15),a()(),o(16,"div",23)(17,"span",24),l(18,"Started Date:"),a(),g(19,k2,3,4,"span",27)(20,N2,3,4,"span",27),a(),o(21,"div",23)(22,"span",24),l(23,"Updated Date:"),a(),g(24,F2,3,4,"span",27)(25,z2,3,4,"span",27),a(),g(26,L2,6,9,"div",28)(27,V2,6,9,"div",28),a()(),g(28,$2,6,2,"div",29),a(),g(29,q2,6,1,"div",30)(30,H2,7,1,"div",30),a()),t&2){let e=u();c(9),p("ngIf",!e.isExecutionView),c(),p("ngIf",e.isExecutionView),c(5),C(e.workflow.workflowId||"N/A"),c(4),p("ngIf",!e.isExecutionView),c(),p("ngIf",e.isExecutionView),c(4),p("ngIf",!e.isExecutionView),c(),p("ngIf",e.isExecutionView),c(),p("ngIf",!e.isExecutionView),c(),p("ngIf",e.isExecutionView),c(),p("ngIf",!e.isExecutionView),c(),p("ngIf",e.isExecutionView),c(),p("ngIf",e.workflow.errorMessage)}}var Fm=(()=>{class t{constructor(e,n,i){this.route=e,this.router=n,this.dashboardService=i,this.loading=!0,this.error=null,this.isExecutionView=!1,this.navigationState={},this.initialMeta={},this.initialMetaExecutions={},this.navigationState=this.router.getCurrentNavigation()?.extras?.state||(typeof history<"u"?history.state:{});let s=this.navigationState?.meta||this.navigationState;this.initialMeta={createdAt:s?.createdAt??s?.CREATED_AT,updatedAt:s?.updatedAt??s?.UPDATED_AT,active:s?.active??s?.ACTIVE,successRate:s?.successRate??s?.SUCCESS_RATE};let d=this.navigationState?.metaExecutions||this.navigationState;this.initialMetaExecutions={progress:d?.progress??d?.PROGRESS}}ngOnInit(){this.route.paramMap.subscribe(e=>{let n=e.get("id");if(n){let i=this.router.getCurrentNavigation()?.extras?.state||(typeof history<"u"?history.state:{});i?.isExecutionView&&i?.executionId?(this.isExecutionView=!0,this.fetchExecutionDetail
10s(n,i.executionId)):(this.isExecutionView=!1,this.fetchWorkflowDetails(n))}})}fetchWorkflowDetails(e){this.loading=!0,this.dashboardService.getWorkflowDetailsById(e).subscribe({next:n=>{this.executions=n?.object?.EXECUTIONS;let i=this.executions?.[0];if(i){let s=i.data?.resultData?.error?.stack||i.data?.resultData?.error?.message||null,d=m=>m?Object.entries(m).map(([f,_])=>{let b=Array.isArray(_)?_[0]:_;if(!b)return"";let M=b.startTime?new Date(b.startTime).toISOString():"N/A",S=b.executionTime?`${b.executionTime}ms`:"N/A";return`[${M}] ${f} - Execution Time: ${S}`}).filter(Boolean).join(`
11`):"No execution data available";this.workflow=Kn(Ke({},i),{name:i.name,workflowId:i.workflowId||i.ID||i.id,ACTIVE:this.initialMeta.active,CREATED_AT:this.initialMeta.createdAt,UPDATED_AT:this.initialMeta.updatedAt,SUCCESS_RATE:this.initialMeta.successRate,RECENT_EXECUTIONS:this.executions?.slice(0,4).map(m=>({status:m.STATUS||m.status,date:m.startedAt||m.date||m.timestamp})),logs:d(i.data?.resultData?.runData),errorMessage:s})}else this.workflow=n?.object||n;this.loading=!1},error:n=>{this.error="Failed to load workflow details. Please try again later.",this.loading=!1}})}
11fetchExecutionDetails(e,n){this.loading=!0,this.dashboardService.getExecutionDetailsById(e,n).subscribe({next:i=>{let s=i?.object?.EXECUTION_DETAILS?.[0];if(s){let d=s.data?.resultData?.error?.stack||s.data?.resultData?.error?.message||null,m=f=>f?Object.entries(f).map(([_,b])=>{let M=Array.isArray(b)?b[0]:b;if(!M)return"";let S=M.startTime?new Date(M.startTime).toISOString():"N/A",w=M.executionTime?`${M.executionTime}ms`:"N/A",D=M.executionStatus||"unknown";return`[${S}] ${_} - Status: ${D}, Execution Time: ${w}`}).filter(Boolean).join(`
12`):"No execution data available";this.workflow={id:s.id,workflowId:s.workflowId,status:s.status,startedAt:s.startedAt,stoppedAt:s.stoppedAt,progress:this.initialMetaExecutions?.progress,data:s.data,logs:m(s.data?.resultData?.runData),errorMessage:d},this.executions=[this.workflow]}else this.error="No execution details found";this.loading=!1},error:i=>{this.error="Failed to load execution details. Please try again later.",this.loading=!1,console.error("Error fetching execution details:",i)}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"workflow-blueprints"}})}static{this.\u0275fac=function(n){return new(n||t)(y(Le),y(G),y(re))}}static{this.\u0275cmp=k({type:t,selectors:[["app-critical-security-details"]],decls:24,vars:7,consts:[["emptyExecutions",""],[1,"details-page"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],["class","breadcrumb-item breadcrumb-current",4,"ngIf"],[1,"header-row"],[1,"title-block"],["class","page-title",4,"ngIf"],["class","spinner-container",4,"ngIf"],["class","error-container",4,"ngIf"],["class","details-card",4,"ngIf"],[1,"breadcrumb-item","breadcrumb-current"],[1,"page-title"],[1,"spinner-container"],["diameter","70","mode","indeterminate","color","primary"],[1,"error-container"],[1,"details-card"],[1,"section-grid"],[1,"overview"],[1,"info-list"],[1,"info-row"],[1,"label"],["class","value with-dot",4,"ngIf"],[1,"value","code"],["class","value",4,"ngIf"],["class","info-row",4,"ngIf"],["class","executions",4,"ngIf"],["class","overview",4,"ngIf"],[1,"value","with-dot"],[1,"status-badge"],[1,"value"],[1,"value","success-rate",3,"ngClass"],[1,"executions"],["class","execution-list",4,"ngIf","ngIfElse"],[1,"execution-list"],["class","execution-item",4,"ngFor","ngForOf"],[1,"execution-item"],[1,"exec-left"],[1,"status-dot",3,"ngClass"],[1,"exec-date"],[1,"exec-status",3,"ngClass"],[1,"empty-state"],[1,"execution-logs"],[1,"logs"],[1,"error-message"],[1,"error-msg"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2)(2,"div",3)(3,"span",4),l(4,"Auto Pilot"),a(),o(5,"span",5),l(6,">"),a(),o(7,"span",4),l(8,"Patch Management"),a(),o(9,"span",5),l(10,">"),a(),o(11,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(12," Workflow Blueprints"),a(),o(13,"span",5),l(14,">"),a(),g(15,P2,2,1,"span",7)(16,E2,2,1,"span",7),a(),o(17,"div",8)(18,"div",9),g(19,w2,2,1,"div",10)(20,I2,2,1,"div",10),a()()(),g(21,T2,2,0,"div",11)(22,A2,2,1,"div",12)(23,W2,31,12,"div",13),a()),n&2&&(c(15),p("ngIf",!i.isExecutionView),c(),p("ngIf",i.isExecutionView),c(3),p("ngIf",!i.isExecutionView),c(),p("ngIf",i.isExecutionView),c(),p("ngIf",i.loading),c(),p("ngIf",i.error),c(),p("ngIf",!i.loading&&!i.error&&i.workflow))},dependencies:[N,xe,$,B,z,Jt,Wt,pt],styles:[".details-page[_ngcontent-%COMP%]{background:#f7f8fb;display:flex;flex-direction:column;gap:25px;padding:24px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.page-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827}.spinner-container[_ngcontent-%COMP%], .error-container[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:200px}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{text-align:center;color:#475467}.error[_ngcontent-%COMP%]{color:#b42318}.details-card[_ngcontent-%COMP%]{background:#fff;border-radius:14px;box-shadow:0 16px 45px #18274b14;padding:24px 28px;border:1px solid #ecf0f5}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500}.status-badge.active[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.status-badge.failed[_ngcontent-%COMP%], .status-badge.inactive[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.status-badge.success[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.status-badge.error[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.section-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.1fr 1fr;gap:32px;align-items:start}.overview[_ngcontent-%COMP%], .executions[_ngcontent-%COMP%]{padding:18px 20px}.overview[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .executions[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0 0 16px;font-size:18px;line-height:28px;font-weight:500;color:#111827}.info-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.info-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}.label[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:20px;font-weight:400;min-width:140px}.value[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:400;display:inline-flex;align-items:center;gap:10px}.value.code[_ngcontent-%COMP%]{color:#111827}.value.with-dot[_ngcontent-%COMP%]{gap:8px}.success-rate[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;font-weight:500;text-align:right}.success-rate.high[_ngcontent-%COMP%]{color:#16a34a}
12.success-rate.medium[_ngcontent-%COMP%]{color:#ca8a04}.success-rate.low[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{background:#9ca3af;display:inline-block;min-width:10px;min-height:10px;border-radius:50%;margin-right:8px}.status-dot.success[_ngcontent-%COMP%], .status-dot.active[_ngcontent-%COMP%]{background-color:#22c55e}.status-dot.error[_ngcontent-%COMP%], .status-dot.failed[_ngcontent-%COMP%]{background-color:#ef4444}.exec-status.active[_ngcontent-%COMP%], .exec-status.success[_ngcontent-%COMP%]{color:#16a34a}.exec-status.failed[_ngcontent-%COMP%]{color:#dc2626}.status-dot.inactive[_ngcontent-%COMP%]{background:#9ca3af}.status-dot.error[_ngcontent-%COMP%]{background:#ef4444}.exec-status.error[_ngcontent-%COMP%]{color:#dc2626}.execution-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.execution-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background:#f9fafb;border-radius:16px;padding:12px 14px}.exec-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:#111827;font-size:14px;line-height:20px;font-weight:400}.exec-status[_ngcontent-%COMP%]{font-weight:400;text-transform:capitalize;font-size:12px;line-height:16px}.exec-status.inactive[_ngcontent-%COMP%]{color:#9ca3af}.empty-state[_ngcontent-%COMP%]{background:#fff;border:1px dashed #d6dce5;border-radius:10px;padding:14px;text-align:center;color:#6b7280}.execution-logs[_ngcontent-%COMP%]{background:#111827;color:#fff;padding:12px;border-radius:14px}.logs[_ngcontent-%COMP%]{font-size:14px;line-height:20px;white-space:pre-line;word-break:break-word;display:block}.error-message[_ngcontent-%COMP%]{background:#fef2f2;border:1px solid #FECACA;border-radius:16px;padding:12px}.error-msg[_ngcontent-%COMP%]{color:#991b1b;font-size:12px;line-height:16px;font-weight:400}"]})}}return t})();function G2(t,r){t&1&&(o(0,"div",33)(1,"div",34)(2,"div",35),h(3,"span",36),a()()())}function Y2(t,r){if(t&1&&(o(0,"div",37)(1,"div",38),l(2),a(),o(3,"div",39),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.value),c(2),C(e.label)}}function K2(t,r){t&1&&(o(0,"th",40),l(1,"Instance Details"),a())}function Q2(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function J2(t,r){if(t&1&&(o(0,"td",41)(1,"div",42)(2,"span",43),h(3,"iconify-icon",44),a(),o(4,"div",45),l(5),o(6,"div",46),l(7),g(8,Q2,2,0,"span",47),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function Z2(t,r){t&1&&(o(0,"th",40),l(1,"Account ID"),a())}function X2(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function ey(t,r){t&1&&(o(0,"th",40),l(1,"Region"),a())}function ty(t,r){if(t&1&&(o(0,"td",41),l(1),o(2,"div",46),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function ny(t,r){t&1&&(o(0,"th",40),l(1,"Application"),a())}function iy(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function oy(t,r){t&1&&(o(0,"th",40),l(1,"Environment"),a())}function ry(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function ay(t,r){t&1&&(o(0,"th",40),l(1,"Patch Baseline"),a())}function ly(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a(),o(3,"div",42),l(4),a(),o(5,"div",46),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function sy(t,r){t&1&&(o(0,"th",40),l(1,"Patch Group"),a())}function cy(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function dy(t,r){t&1&&(o(0,"th",40),l(1,"Last Scanned"),a())}function py(t,r){if(t&1&&(o(0,"td",41),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function my(t,r){t&1&&(o(0,"th",40),l(1,"Running Status"),a())}function uy(t,r){if(t&1&&(o(0,"td",41)(1,"div",48),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function gy(t,r){t&1&&(o(0,"th",40),l(1,"Compliance Status"),a())}function fy(t,r){if(t&1&&(o(0,"td",41)(1,"div",49),h(2,"span",50),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function hy(t,r){t&1&&(o(0,"th",40),l(1,"Actions"),a())}function _y(t,r){if(t&1){let e=A();o(0,"td",41)(1,"button",51),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function Cy(t,r){t&1&&h(0,"tr",52)}function xy(t,r){t&1&&h(0,"tr",53)}var zm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dashboardService=n,this.notify=i,this.ngZone=s,this.cdr=d,this.loading=!1,this.account_Id=null,this.displayedColumns=["instance","account","regi
12on","application","environment","baseline","group","lastScanned","runningStatus","complianceStatus","actions"],this.groupOptions=["All Patch Groups"],this.baselineOptions=["All Baselines"],this.selectedGroup=this.groupOptions[0],this.selectedBaseline=this.baselineOptions[0],this.summaryStats=[],this.complaintRows=[]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getInventoryList()}getInventoryList(){this.loading=!0,this.dashboardService.getInventoryInstancesList("patch-complaint").subscribe({next:e=>{this.summaryStats=[{value:e?.object?.TOTAL_INSTANCES||0,label:"Total Instances"},{value:e?.object?.PATCH_COMPLIANT||0,label:"Patch Compliant"},{value:e?.object?.ACTIVE_GROUPS||0,label:"Patch Group"},{value:e?.object?.COMPLIANCE_RATE+"%"||0,label:"Compliance Rate"}],this.complaintRows=e?.object?.DATA||[],this.complaintRows.forEach(n=>{this.awsRegion.forEach(i=>{i.CODE==n.REGION&&(n.REGION_NAME=i.NAME)}),n.RISK_SCORE=Math.floor(Math.random()*100),n.CONFIDENCE_SCORE=Math.floor(Math.random()*100)}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"inventory",instanceID:e?.INSTANCE_ID},state:{row:e}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"inventory"}})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-patch-complaint-details"]],decls:67,vars:5,consts:[[1,"patch-complaints"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"title"],[1,"subtitle"],[1,"summary-card"],[1,"summary-header"],[1,"summary-icon"],["icon","ri:shield-check-line"],[1,"summary-stats"],["class","summary-item",4,"ngFor","ngForOf"],[1,"table-responsive"],["mat-table","",1,"complaints-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","account"],["matColumnDef","region"],["matColumnDef","application"],["matColumnDef","environment"],["matColumnDef","baseline"],["matColumnDef","group"],["matColumnDef","lastScanned"],["matColumnDef","runningStatus"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"summary-item"],[1,"summary-value"],[1,"summary-label"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],["icon","ri:server-line"],[1,"instance-details"],[1,"cell-sub"],[4,"ngIf"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"action",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",0),g(1,G2,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13,"Inventory"),a(),o(14,"span",5),l(15,">"),a(),o(16,"span",7),l(17,"Patch Complaints"),a()(),o(18,"div",8),l(19,"Patch Complaints"),a(),o(20,"div",9),l(21,"EC2 instances with current patch baselines and group assignments"),a()(),o(22,"div",10)(23,"div",11)(24,"span",12),h(25,"iconify-icon",13),a(),o(26,"span"),l(27,"Patch Complaints"),a()(),o(28,"div",14),g(29,Y2,5,2,"div",15),a()(),o(30,"div",16)(31,"table",17),I(32,18),g(33,K2,2,0,"th",19)(34,J2,10,4,"td",20),T(),I(35,21),g(36,Z2,2,0,"th",19)(37,X2,2,1,"td",20),T(),I(38,22),g(39,ey,2,0,"th",19)(40,ty,4,2,"td",20),T(
vendor: 4,399 bytes, line 12
12),I(41,23),g(42,ny,2,0,"th",19)(43,iy,2,1,"td",20),T(),I(44,24),g(45,oy,2,0,"th",19)(46,ry,2,1,"td",20),T(),I(47,25),g(48,ay,2,0,"th",19)(49,ly,7,3,"td",20),T(),I(50,26),g(51,sy,2,0,"th",19)(52,cy,3,1,"td",20),T(),I(53,27),g(54,dy,2,0,"th",19)(55,py,3,4,"td",20),T(),I(56,28),g(57,my,2,0,"th",19)(58,uy,4,4,"td",20),T(),I(59,29),g(60,gy,2,0,"th",19)(61,fy,5,4,"td",20),T(),I(62,30),g(63,hy,2,0,"th",19)(64,_y,3,0,"td",20),T(),g(65,Cy,1,0,"tr",31)(66,xy,1,0,"tr",32),a()()()),n&2&&(c(),p("ngIf",i.loading),c(28),p("ngForOf",i.summaryStats),c(2),p("dataSource",i.complaintRows),c(34),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht,pt],styles:[".patch-complaints[_ngcontent-%COMP%]{padding:24px;background:#f9fafb;color:#111827;display:flex;flex-direction:column;gap:25px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;padding-top:10px}.subtitle[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.filters[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.summary-card[_ngcontent-%COMP%]{background:#fff7ed;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.summary-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600;color:#111827;font-size:16px}.summary-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;background:#ffedd5;color:#ea580c;display:inline-flex;align-items:center;justify-content:center;font-size:14px}.summary-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary-item[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:4px}.summary-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#ea580c}.summary-label[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto;background:#fff;padding:0}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.complaints-table[_ngcontent-%COMP%]{width:100%}.complaints-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px}.complaints-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:13px;color:#111827;vertical-align:center}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600}.instance-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cell-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:400}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#ffedd5;color:#ea580c}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.action[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}[_nghost-%COMP%]     .complaints-table .mat-column-instance{min-width:200
12px}[_nghost-%COMP%]     .complaints-table .mat-column-account{min-width:130px}[_nghost-%COMP%]     .complaints-table .mat-column-region{min-width:120px}[_nghost-%COMP%]     .complaints-table .mat-column-application{min-width:130px}[_nghost-%COMP%]     .complaints-table .mat-column-environment{min-width:100px}[_nghost-%COMP%]     .complaints-table .mat-column-baseline{min-width:150px}[_nghost-%COMP%]     .complaints-table .mat-column-group{min-width:120px}[_nghost-%COMP%]     .complaints-table .mat-column-lastScanned{min-width:100px}[_nghost-%COMP%]     .complaints-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .complaints-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .complaints-table .mat-column-actions{min-width:100px}@media(max-width:1024px){.summary-stats[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.filter[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function vy(t,r){t&1&&(o(0,"div",33)(1,"div",34)(2,"div",35),h(3,"span",36),a()()())}function by(t,r){if(t&1&&(o(0,"div",37)(1,"div",38),l(2),a(),o(3,"div",39),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.value),c(2),C(e.label)}}function yy(t,r){t&1&&(o(0,"th",40),l(1,"Instance Details"),a())}function My(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function Sy(t,r){if(t&1&&(o(0,"td",41)(1,"div",42)(2,"span",43),h(3,"iconify-icon",44),a(),o(4,"div",45),l(5),o(6,"div",46),l(7),g(8,My,2,0,"span",47),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function Oy(t,r){t&1&&(o(0,"th",40),l(1,"Account ID"),a())}function Py(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function Ey(t,r){t&1&&(o(0,"th",40),l(1,"Region"),a())}function wy(t,r){if(t&1&&(o(0,"td",41),l(1),o(2,"div",46),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function Iy(t,r){t&1&&(o(0,"th",40),l(1,"Application"),a())}function Ty(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function Ay(t,r){t&1&&(o(0,"th",40),l(1,"Environment"),a())}function Dy(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function Ry(t,r){t&1&&(o(0,"th",40),l(1,"Patch Baseline"),a())}function ky(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a(),o(3,"div",42),l(4),a(),o(5,"div",46),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function Ny(t,r){t&1&&(o(0,"th",40),l(1,"Patch Group"),a())}function Fy(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function zy(t,r){t&1&&(o(0,"th",40),l(1,"Last Scanned"),a())}function Ly(t,r){if(t&1&&(o(0,"td",41),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function Vy(t,r){t&1&&(o(0,"th",40),l(1,"Running Status"),a())}function By(t,r){if(t&1&&(o(0,"td",41)(1,"div",48),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function Uy(t,r){t&1&&(o(0,"th",40),l(1,"Compliance Status"),a())}function jy(t,r){if(t&1&&(o(0,"td",41)(1,"div",49),h(2,"span",50),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function $y(t,r){t&1&&(o(0,"th",40),l(1,"Actions"),a())}function qy(t,r){if(t&1){let e=A();o(0,"td",41)(1,"button",51),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function Hy(t,r){t&1&&h(0,"tr",52)}function Wy(t,r){t&1&&h(0,"tr",53)}var Lm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dashboardService=n,this.notify=i,this.ngZone=s,this.cdr=d,this.loading=!1,this.account_Id=null,this.displayedColumns=["instance","account","regi
12on","application","environment","baseline","group","lastScanned","runningStatus","complianceStatus","actions"],this.groupOptions=["All Patch Groups"],this.baselineOptions=["All Baselines"],this.selectedGroup=this.groupOptions[0],this.selectedBaseline=this.baselineOptions[0],this.summaryStats=[],this.runningRows=[]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getInventoryList()}getInventoryList(){this.loading=!0,this.dashboardService.getInventoryInstancesList("running").subscribe({next:e=>{this.summaryStats=[{value:e?.object?.TOTAL_INSTANCES||0,label:"Total Instances"},{value:e?.object?.RUNNING_INSTANCES||0,label:"Running Instances"},{value:e?.object?.ACTIVE_GROUPS||0,label:"Patch Group"},{value:e?.object?.COMPLIANCE_RATE+"%"||0,label:"Compliance Rate"}],this.runningRows=e?.object?.DATA||[],this.runningRows.forEach(n=>{this.awsRegion.forEach(i=>{i.CODE==n.REGION&&(n.REGION_NAME=i.NAME)}),n.RISK_SCORE=Math.floor(Math.random()*100),n.CONFIDENCE_SCORE=Math.floor(Math.random()*100)}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"inventory",instanceID:e?.INSTANCE_ID},state:{row:e}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"inventory"}})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-running-instances-details"]],decls:67,vars:5,consts:[[1,"running-instances"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"title"],[1,"subtitle"],[1,"summary-card"],[1,"summary-header"],[1,"summary-icon"],["icon","octicon:play-16"],[1,"summary-stats"],["class","summary-item",4,"ngFor","ngForOf"],[1,"table-responsive"],["mat-table","",1,"running-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","account"],["matColumnDef","region"],["matColumnDef","application"],["matColumnDef","environment"],["matColumnDef","baseline"],["matColumnDef","group"],["matColumnDef","lastScanned"],["matColumnDef","runningStatus"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"summary-item"],[1,"summary-value"],[1,"summary-label"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],["icon","ri:server-line"],[1,"running-details"],[1,"cell-sub"],[4,"ngIf"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"action",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",0),g(1,vy,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13,"Inventory"),a(),o(14,"span",5),l(15,">"),a(),o(16,"span",7),l(17,"Running Instances"),a()(),o(18,"div",8),l(19,"Running Instances"),a(),o(20,"div",9),l(21,"Active EC2 instances with current patch baselines and group assignments"),a()(),o(22,"div",10)(23,"div",11)(24,"span",12),h(25,"iconify-icon",13),a(),o(26,"span"),l(27,"Running Instances"),a()(),o(28,"div",14),g(29,by,5,2,"div",15),a()(),o(30,"div",16)(31,"table",17),I(32,18),g(33,yy,2,0,"th",19)(34,Sy,10,4,"td",20),T(),I(35,21),g(36,Oy,2,0,"th",19)(37,Py,2,1,"td",20),T(),I(38,22),g(39,Ey,2,0,"th",19)(40,wy,4,2,"td",20),T(
vendor: 4,385 bytes, line 12
12),I(41,23),g(42,Iy,2,0,"th",19)(43,Ty,2,1,"td",20),T(),I(44,24),g(45,Ay,2,0,"th",19)(46,Dy,2,1,"td",20),T(),I(47,25),g(48,Ry,2,0,"th",19)(49,ky,7,3,"td",20),T(),I(50,26),g(51,Ny,2,0,"th",19)(52,Fy,3,1,"td",20),T(),I(53,27),g(54,zy,2,0,"th",19)(55,Ly,3,4,"td",20),T(),I(56,28),g(57,Vy,2,0,"th",19)(58,By,4,4,"td",20),T(),I(59,29),g(60,Uy,2,0,"th",19)(61,jy,5,4,"td",20),T(),I(62,30),g(63,$y,2,0,"th",19)(64,qy,3,0,"td",20),T(),g(65,Hy,1,0,"tr",31)(66,Wy,1,0,"tr",32),a()()()),n&2&&(c(),p("ngIf",i.loading),c(28),p("ngForOf",i.summaryStats),c(2),p("dataSource",i.runningRows),c(34),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht,pt],styles:[".running-instances[_ngcontent-%COMP%]{padding:24px;background:#f9fafb;color:#111827;display:flex;flex-direction:column;gap:25px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;padding-top:10px}.subtitle[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.filters[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.filter[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.summary-card[_ngcontent-%COMP%]{background:#f0fdf4;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.summary-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600;color:#111827;font-size:16px}.summary-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;background:#dcfce7;color:#16a34a;display:inline-flex;align-items:center;justify-content:center;font-size:14px}.summary-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary-item[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:4px}.summary-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#16a34a}.summary-label[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto;background:#fff;padding:0}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.running-table[_ngcontent-%COMP%]{width:100%}.running-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px}.running-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:13px;color:#111827;vertical-align:center}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600}.running-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cell-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:400}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#dcfce7;color:#16a34a}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.action[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}[_nghost-%COMP%]     .running-table .mat-column-instance{min-width:200
12px}[_nghost-%COMP%]     .running-table .mat-column-account{min-width:130px}[_nghost-%COMP%]     .running-table .mat-column-region{min-width:120px}[_nghost-%COMP%]     .running-table .mat-column-application{min-width:130px}[_nghost-%COMP%]     .running-table .mat-column-environment{min-width:100px}[_nghost-%COMP%]     .running-table .mat-column-baseline{min-width:150px}[_nghost-%COMP%]     .running-table .mat-column-group{min-width:120px}[_nghost-%COMP%]     .running-table .mat-column-lastScanned{min-width:100px}[_nghost-%COMP%]     .running-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .running-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .running-table .mat-column-actions{min-width:100px}@media(max-width:1024px){.summary-stats[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.filter[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function Gy(t,r){t&1&&(o(0,"div",33)(1,"div",34)(2,"div",35),h(3,"span",36),a()()())}function Yy(t,r){if(t&1&&(o(0,"div",37)(1,"div",38),l(2),a(),o(3,"div",39),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.value),c(2),C(e.label)}}function Ky(t,r){t&1&&(o(0,"th",40),l(1,"Instance Details"),a())}function Qy(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function Jy(t,r){if(t&1&&(o(0,"td",41)(1,"div",42)(2,"span",43),h(3,"iconify-icon",13),a(),o(4,"div",44),l(5),o(6,"div",45),l(7),g(8,Qy,2,0,"span",46),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function Zy(t,r){t&1&&(o(0,"th",40),l(1,"Account ID"),a())}function Xy(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function eM(t,r){t&1&&(o(0,"th",40),l(1,"Region"),a())}function tM(t,r){if(t&1&&(o(0,"td",41),l(1),o(2,"div",45),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function nM(t,r){t&1&&(o(0,"th",40),l(1,"Application"),a())}function iM(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function oM(t,r){t&1&&(o(0,"th",40),l(1,"Environment"),a())}function rM(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function aM(t,r){t&1&&(o(0,"th",40),l(1,"Patch Baseline"),a())}function lM(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a(),o(3,"div",42),l(4),a(),o(5,"div",45),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function sM(t,r){t&1&&(o(0,"th",40),l(1,"Patch Group"),a())}function cM(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function dM(t,r){t&1&&(o(0,"th",40),l(1,"Last Scanned"),a())}function pM(t,r){if(t&1&&(o(0,"td",41),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function mM(t,r){t&1&&(o(0,"th",40),l(1,"Running Status"),a())}function uM(t,r){if(t&1&&(o(0,"td",41)(1,"div",47),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function gM(t,r){t&1&&(o(0,"th",40),l(1,"Compliance Status"),a())}function fM(t,r){if(t&1&&(o(0,"td",41)(1,"div",48),h(2,"span",49),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function hM(t,r){t&1&&(o(0,"th",40),l(1,"Actions"),a())}function _M(t,r){if(t&1){let e=A();o(0,"td",41)(1,"button",50),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function CM(t,r){t&1&&h(0,"tr",51)}function xM(t,r){t&1&&h(0,"tr",52)}var Vm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dashboardService=n,this.notify=i,this.ngZone=s,this.cdr=d,this.loading=!1,this.account_Id=null,this.displayedColumns=["instance","account","regi
12on","application","environment","baseline","group","lastScanned","runningStatus","complianceStatus","actions"],this.groupOptions=["All Patch Groups"],this.baselineOptions=["All Baselines"],this.selectedGroup=this.groupOptions[0],this.selectedBaseline=this.baselineOptions[0],this.summaryStats=[],this.totalRows=[]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getInventoryList()}getInventoryList(){this.loading=!0,this.dashboardService.getInventoryInstancesList("all").subscribe({next:e=>{this.summaryStats=[{value:e?.object?.TOTAL_INSTANCES||0,label:"Total Instances"},{value:e?.object?.PATCH_COMPLIANT||0,label:"Patch Compliant"},{value:e?.object?.PATCH_NEEDED||0,label:"Non Patch Compliant"},{value:e?.object?.COMPLIANCE_RATE+"%"||0,label:"Compliance Rate"}],this.totalRows=e?.object?.DATA||[],this.totalRows.forEach(n=>{this.awsRegion.forEach(i=>{i.CODE==n.REGION&&(n.REGION_NAME=i.NAME)}),n.RISK_SCORE=Math.floor(Math.random()*100),n.CONFIDENCE_SCORE=Math.floor(Math.random()*100)}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"inventory",instanceID:e?.INSTANCE_ID},state:{row:e}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"inventory"}})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-total-instances-details"]],decls:67,vars:5,consts:[[1,"total-instances"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"title"],[1,"subtitle"],[1,"summary-card"],[1,"summary-header"],[1,"summary-icon"],["icon","ri:server-line"],[1,"summary-stats"],["class","summary-item",4,"ngFor","ngForOf"],[1,"table-responsive"],["mat-table","",1,"total-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","account"],["matColumnDef","region"],["matColumnDef","application"],["matColumnDef","environment"],["matColumnDef","baseline"],["matColumnDef","group"],["matColumnDef","lastScanned"],["matColumnDef","runningStatus"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"summary-item"],[1,"summary-value"],[1,"summary-label"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],[1,"total-details"],[1,"cell-sub"],[4,"ngIf"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"action",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",0),g(1,Gy,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13,"Inventory"),a(),o(14,"span",5),l(15,">"),a(),o(16,"span",7),l(17,"Total Instances"),a()(),o(18,"div",8),l(19,"All EC2 Instances"),a(),o(20,"div",9),l(21,"Complete inventory of EC2 instances with patch baselines and group assignments"),a()(),o(22,"div",10)(23,"div",11)(24,"span",12),h(25,"iconify-icon",13),a(),o(26,"span"),l(27,"All Instances"),a()(),o(28,"div",14),g(29,Yy,5,2,"div",15),a()(),o(30,"div",16)(31,"table",17),I(32,18),g(33,Ky,2,0,"th",19)(34,Jy,10,4,"td",20),T(),I(35,21),g(36,Zy,2,0,"th",19)(37,Xy,2,1,"td",20),T(),I(38,22),g(39,eM,2,0,"th",19)(40,tM,4,2,"td",20),T(),I(41,23),g(42,nM,2,0,"th",19)(43,iM,2,1,"td",20),T(
vendor: 4,318 bytes, line 12
12),I(44,24),g(45,oM,2,0,"th",19)(46,rM,2,1,"td",20),T(),I(47,25),g(48,aM,2,0,"th",19)(49,lM,7,3,"td",20),T(),I(50,26),g(51,sM,2,0,"th",19)(52,cM,3,1,"td",20),T(),I(53,27),g(54,dM,2,0,"th",19)(55,pM,3,4,"td",20),T(),I(56,28),g(57,mM,2,0,"th",19)(58,uM,4,4,"td",20),T(),I(59,29),g(60,gM,2,0,"th",19)(61,fM,5,4,"td",20),T(),I(62,30),g(63,hM,2,0,"th",19)(64,_M,3,0,"td",20),T(),g(65,CM,1,0,"tr",31)(66,xM,1,0,"tr",32),a()()()),n&2&&(c(),p("ngIf",i.loading),c(28),p("ngForOf",i.summaryStats),c(2),p("dataSource",i.totalRows),c(34),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht,pt],styles:[".total-instances[_ngcontent-%COMP%]{padding:24px;background:#f9fafb;color:#111827;display:flex;flex-direction:column;gap:25px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;padding-top:10px}.subtitle[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.filters[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.filter[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.summary-card[_ngcontent-%COMP%]{background:#eff6ff;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.summary-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600;color:#111827;font-size:16px}.summary-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;background:#dbeafe;color:#2563eb;display:inline-flex;align-items:center;justify-content:center;font-size:14px}.summary-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary-item[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:4px}.summary-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#2563eb}.summary-label[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto;background:#fff;padding:0}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.total-table[_ngcontent-%COMP%]{width:100%}.total-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px}.total-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:13px;color:#111827;vertical-align:center}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600}.total-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cell-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:400}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#dbeafe;color:#2563eb}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.action[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}[_nghost-%COMP%]     .total-table .mat-column-instance{min-width:200
12px}[_nghost-%COMP%]     .total-table .mat-column-account{min-width:130px}[_nghost-%COMP%]     .total-table .mat-column-region{min-width:120px}[_nghost-%COMP%]     .total-table .mat-column-application{min-width:130px}[_nghost-%COMP%]     .total-table .mat-column-environment{min-width:100px}[_nghost-%COMP%]     .total-table .mat-column-baseline{min-width:150px}[_nghost-%COMP%]     .total-table .mat-column-group{min-width:120px}[_nghost-%COMP%]     .total-table .mat-column-lastScanned{min-width:100px}[_nghost-%COMP%]     .total-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .total-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .total-table .mat-column-actions{min-width:100px}@media(max-width:1024px){.summary-stats[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.filter[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function vM(t,r){t&1&&(o(0,"div",33)(1,"div",34)(2,"div",35),h(3,"span",36),a()()())}function bM(t,r){if(t&1&&(o(0,"div",37)(1,"div",38),l(2),a(),o(3,"div",39),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.value),c(2),C(e.label)}}function yM(t,r){t&1&&(o(0,"th",40),l(1,"Instance Details"),a())}function MM(t,r){t&1&&(o(0,"span"),l(1,"\u2022"),a())}function SM(t,r){if(t&1&&(o(0,"td",41)(1,"div",42)(2,"span",43),h(3,"iconify-icon",44),a(),o(4,"div",45),l(5),o(6,"div",46),l(7),g(8,MM,2,0,"span",47),l(9),a()()()()),t&2){let e=r.$implicit;c(5),x(" ",e==null?null:e.INSTANCE_ID," "),c(2),x("",e==null?null:e.INSTANCE_TYPE," "),c(),p("ngIf",e==null?null:e.INSTANCE_NAME),c(),x(" ",e==null?null:e.INSTANCE_NAME)}}function OM(t,r){t&1&&(o(0,"th",40),l(1,"Account ID"),a())}function PM(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ACCOUNT_ID," ")}}function EM(t,r){t&1&&(o(0,"th",40),l(1,"Region"),a())}function wM(t,r){if(t&1&&(o(0,"td",41),l(1),o(2,"div",46),l(3),a()()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.REGION," "),c(2),C(e==null?null:e.REGION_NAME)}}function IM(t,r){t&1&&(o(0,"th",40),l(1,"Application"),a())}function TM(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.APPLICATION," ")}}function AM(t,r){t&1&&(o(0,"th",40),l(1,"Environment"),a())}function DM(t,r){if(t&1&&(o(0,"td",41),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null?null:e.ENVIRONMENT," ")}}function RM(t,r){t&1&&(o(0,"th",40),l(1,"Patch Baseline"),a())}function kM(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a(),o(3,"div",42),l(4),a(),o(5,"div",46),l(6),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.BASELINE_ID),c(2),C(e==null?null:e.BASELINE_NAME),c(2),C(e==null?null:e.BASELINE_DESCRIPTION)}}function NM(t,r){t&1&&(o(0,"th",40),l(1,"Patch Group"),a())}function FM(t,r){if(t&1&&(o(0,"td",41)(1,"div",42),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.PATCH_GROUP)}}function zM(t,r){t&1&&(o(0,"th",40),l(1,"Last Scanned"),a())}function LM(t,r){if(t&1&&(o(0,"td",41),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),x(" ",ie(2,1,e==null?null:e.LAST_OPERATION_DATE,"dd-MM-yyyy")," ")}}function VM(t,r){t&1&&(o(0,"th",40),l(1,"Running Status"),a())}function BM(t,r){if(t&1&&(o(0,"td",41)(1,"div",48),l(2),F(3,"titlecase"),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e==null||e.INSTANCE_STATUS==null?null:e.INSTANCE_STATUS.toLowerCase()),c(),x(" ",X(3,2,e==null?null:e.INSTANCE_STATUS))}}function UM(t,r){t&1&&(o(0,"th",40),l(1,"Compliance Status"),a())}function jM(t,r){if(t&1&&(o(0,"td",41)(1,"div",49),h(2,"span",50),o(3,"span"),l(4),a()()()),t&2){let e=r.$implicit;c(),p("ngClass",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"compliance-status":"non-compliance-status"),c(),pe("background",(e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"#16A34A":"#DC2626"),c(2),C((e==null?null:e.PATCH_COMPLIANT_FLAG)==1?"Compliant":"Non-Compliant")}}function $M(t,r){t&1&&(o(0,"th",40),l(1,"Actions"),a())}function qM(t,r){if(t&1){let e=A();o(0,"td",41)(1,"button",51),v("click",function(){let i=O(e).$implicit,s=u();return P(s.viewDetails(i))}),l(2,"View Details"),a()()}}function HM(t,r){t&1&&h(0,"tr",52)}function WM(t,r){t&1&&h(0,"tr",53)}var Bm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dashboardService=n,this.notify=i,this.ngZone=s,this.cdr=d,this.loading=!1,this.account_Id=null,this.displayedColumns=["instance","account","regi
12on","application","environment","baseline","group","lastScanned","runningStatus","complianceStatus","actions"],this.groupOptions=["All Patch Groups"],this.baselineOptions=["All Baselines"],this.selectedGroup=this.groupOptions[0],this.selectedBaseline=this.baselineOptions[0],this.summaryStats=[],this.nonComplianceRows=[]}ngOnInit(){this.account_Id=window.localStorage.getItem("currentAccountID"),this.awsRegion=JSON.parse(window.localStorage.getItem("AWS_REGION")||"{}"),this.getInventoryList()}getInventoryList(){this.loading=!0,this.dashboardService.getInventoryInstancesList("needs-patching").subscribe({next:e=>{this.summaryStats=[{value:e?.object?.TOTAL_INSTANCES||0,label:"Total Instances"},{value:e?.object?.PATCH_NEEDED||0,label:"Needs Patching"},{value:e?.object?.ACTIVE_GROUPS||0,label:"Patch Group"},{value:e?.object?.COMPLIANCE_RATE+"%"||0,label:"Compliance Rate"}],this.nonComplianceRows=e?.object?.DATA||[],this.nonComplianceRows.forEach(n=>{this.awsRegion.forEach(i=>{i.CODE==n.REGION&&(n.REGION_NAME=i.NAME)}),n.RISK_SCORE=Math.floor(Math.random()*100),n.CONFIDENCE_SCORE=Math.floor(Math.random()*100)}),this.loading=!1,this.refreshView()},error:e=>{this.loading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status),this.refreshView()}})}viewDetails(e){e?.INSTANCE_ID&&this.router.navigate(["/admin-dashboard/patch-management/risk-analysis-details"],{queryParams:{tab:"inventory",instanceID:e?.INSTANCE_ID},state:{row:e}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"inventory"}})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(re),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-non-compliance-instances-details"]],decls:67,vars:5,consts:[[1,"non-compliance"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"title"],[1,"subtitle"],[1,"summary-card"],[1,"summary-header"],[1,"summary-icon"],["icon","ri:alert-line"],[1,"summary-stats"],["class","summary-item",4,"ngFor","ngForOf"],[1,"table-responsive"],["mat-table","",1,"non-compliance-table",3,"dataSource"],["matColumnDef","instance"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","account"],["matColumnDef","region"],["matColumnDef","application"],["matColumnDef","environment"],["matColumnDef","baseline"],["matColumnDef","group"],["matColumnDef","lastScanned"],["matColumnDef","runningStatus"],["matColumnDef","complianceStatus"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"summary-item"],[1,"summary-value"],[1,"summary-label"],["mat-header-cell",""],["mat-cell",""],[1,"cell-title"],[1,"instance-icon"],["icon","ri:server-line"],[1,"instance-details"],[1,"cell-sub"],[4,"ngIf"],[1,"cell-title","instance-status",3,"ngClass"],[1,"cell-title",3,"ngClass"],[1,"status-dot"],["type","button",1,"action",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(o(0,"div",0),g(1,vM,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13,"Inventory"),a(),o(14,"span",5),l(15,">"),a(),o(16,"span",7),l(17,"Needs Patching"),a()(),o(18,"div",8),l(19,"Needs Patching"),a(),o(20,"div",9),l(21,"EC2 instances with current patch baselines and group assignments that need patching"),a()(),o(22,"div",10)(23,"div",11)(24,"span",12),h(25,"iconify-icon",13),a(),o(26,"span"),l(27,"Needs Patching"),a()(),o(28,"div",14),g(29,bM,5,2,"div",15),a()(),o(30,"div",16)(31,"table",17),I(32,18),g(33,yM,2,0,"th",19)(34,SM,10,4,"td",20),T(),I(35,21),g(36,OM,2,0,"th",19)(37,PM,2,1,"td",20),T(),I(38,22),g(39,EM,2,0,"th",19)(40,wM,4,2,"td",20),T(
vendor: 4,417 bytes, line 12
12),I(41,23),g(42,IM,2,0,"th",19)(43,TM,2,1,"td",20),T(),I(44,24),g(45,AM,2,0,"th",19)(46,DM,2,1,"td",20),T(),I(47,25),g(48,RM,2,0,"th",19)(49,kM,7,3,"td",20),T(),I(50,26),g(51,NM,2,0,"th",19)(52,FM,3,1,"td",20),T(),I(53,27),g(54,zM,2,0,"th",19)(55,LM,3,4,"td",20),T(),I(56,28),g(57,VM,2,0,"th",19)(58,BM,4,4,"td",20),T(),I(59,29),g(60,UM,2,0,"th",19)(61,jM,5,4,"td",20),T(),I(62,30),g(63,$M,2,0,"th",19)(64,qM,3,0,"td",20),T(),g(65,HM,1,0,"tr",31)(66,WM,1,0,"tr",32),a()()()),n&2&&(c(),p("ngIf",i.loading),c(28),p("ngForOf",i.summaryStats),c(2),p("dataSource",i.nonComplianceRows),c(34),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Ht,pt],styles:[".non-compliance[_ngcontent-%COMP%]{padding:24px;background:#f9fafb;color:#111827;display:flex;flex-direction:column;gap:25px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;padding-top:10px}.subtitle[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.filters[_ngcontent-%COMP%]{display:flex;gap:15px;align-items:center}.filter[_ngcontent-%COMP%]{width:180px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.summary-card[_ngcontent-%COMP%]{background:#fef2f2;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:15px}.summary-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600;color:#111827;font-size:16px}.summary-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;background:#fee2e2;color:#dc2626;display:inline-flex;align-items:center;justify-content:center;font-size:14px}.summary-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary-item[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:4px}.summary-value[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#dc2626}.summary-label[_ngcontent-%COMP%]{font-size:12px;color:#4b5563}.table-responsive[_ngcontent-%COMP%]{width:100%;overflow-x:auto;background:#fff;padding:0}.table-responsive[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.table-responsive[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.non-compliance-table[_ngcontent-%COMP%]{width:100%}.non-compliance-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#6b7280;background:#f9fafb;letter-spacing:.6px}.non-compliance-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:13px;color:#111827;vertical-align:center}th.mat-mdc-header-cell[_ngcontent-%COMP%], td.mat-mdc-cell[_ngcontent-%COMP%]{padding:15px 10px}tr.mat-mdc-row[_ngcontent-%COMP%]:last-child   td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.cell-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-weight:600}.instance-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cell-sub[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;font-weight:400}.instance-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;background:#fee2e2;color:#dc2626}.instance-status[_ngcontent-%COMP%]{color:#6b7280}.instance-status.running[_ngcontent-%COMP%]{color:#16a34a}.instance-status.pending[_ngcontent-%COMP%]{color:#f59e0b}.instance-status.stopping[_ngcontent-%COMP%], .instance-status.stopped[_ngcontent-%COMP%], .instance-status.shutting-down[_ngcontent-%COMP%], .instance-status.terminated[_ngcontent-%COMP%]{color:#dc2626}.status-dot[_ngcontent-%COMP%]{border-radius:50%;min-width:8px;min-height:8px}.compliance-status[_ngcontent-%COMP%]{color:#16a34a}.non-compliance-status[_ngcontent-%COMP%]{color:#dc2626}.action[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;white-space:nowrap}[_nghost-%COMP%]     .non-compliance-table .mat-column-instance{min-width:200
12px}[_nghost-%COMP%]     .non-compliance-table .mat-column-account{min-width:130px}[_nghost-%COMP%]     .non-compliance-table .mat-column-region{min-width:120px}[_nghost-%COMP%]     .non-compliance-table .mat-column-application{min-width:130px}[_nghost-%COMP%]     .non-compliance-table .mat-column-environment{min-width:100px}[_nghost-%COMP%]     .non-compliance-table .mat-column-baseline{min-width:150px}[_nghost-%COMP%]     .non-compliance-table .mat-column-group{min-width:120px}[_nghost-%COMP%]     .non-compliance-table .mat-column-lastScanned{min-width:100px}[_nghost-%COMP%]     .non-compliance-table .mat-column-runningStatus{min-width:100px}[_nghost-%COMP%]     .non-compliance-table .mat-column-complianceStatus{min-width:120px}[_nghost-%COMP%]     .non-compliance-table .mat-column-actions{min-width:100px}@media(max-width:1024px){.summary-stats[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.filters[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.filter[_ngcontent-%COMP%]{width:100%}}"]})}}return t})();function GM(t,r){if(t&1&&(o(0,"mat-option",17),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e.NAME," ")}}var Um=(()=>{class t{constructor(e,n){this.dialogRef=e,this.data=n,this.minDate=new Date,this.selectedDate=new Date,this.selectedTime="00:00",this.timezones=[],this.baseInstantMs=null,this.timezoneOffsets={UTC:0,EST:-300,CST:-360,PST:-480}}ngOnInit(){this.timezones=JSON.parse(window.localStorage.getItem("TIMEZONES")||"[]"),this.data?.initialDate&&(this.selectedDate=new Date(this.data.initialDate)),this.selectedTime=this.data?.initialTime||"12:00",this.data?.initialTimezoneId?this.selectedTimezone=this.timezones.find(e=>e.ID==this.data.initialTimezoneId)||this.timezones[0]:this.selectedTimezone=this.timezones[0]}formatLocalDate(e){let n=e.getFullYear(),i=`${e.getMonth()+1}`.padStart(2,"0");return`${`${e.getDate()}`.padStart(2,"0")}-${i}-${n}`}parseTime(e){let n=e.split(":"),i=parseInt(n[0]||"0",10),s=parseInt(n[1]||"0",10);return{hours:i,minutes:s}}
12updateInstantFromLocal(){if(!this.selectedDate)return;let{hours:e,minutes:n}=this.parseTime(this.selectedTime),i=this.timezoneOffsets[this.selectedTimezone]??0,s=Date.UTC(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate(),e,n);this.baseInstantMs=s-i*60*1e3}applyInstantToLocal(){if(this.baseInstantMs==null)return;let e=this.timezoneOffsets[this.selectedTimezone]??0,n=this.baseInstantMs+e*60*1e3,i=new Date(n),s=i.getUTCFullYear(),d=i.getUTCMonth(),m=i.getUTCDate(),f=i.getUTCHours(),_=i.getUTCMinutes();this.selectedDate=new Date(s,d,m),this.selectedTime=`${f}`.padStart(2,"0")+":"+`${_}`.padStart(2,"0")}onDateChange(){this.updateInstantFromLocal()}onTimeChange(){this.updateInstantFromLocal()}onTimezoneChange(){this.selectedDate&&this.updateDisplayValue()}updateDisplayValue(){if(this.selectedDate&&this.selectedTimezone){let e=this.formatLocalDate(this.selectedDate)}}get displayValue(){return this.selectedDate?`${this.formatLocalDate(this.selectedDate)} ${this.selectedTime} ${this.selectedTimezone.VALUE}`:""}onCancel(){this.dialogRef.close()}onApply(){let e={date:this.selectedDate,time:this.selectedTime,timezone:this.selectedTimezone?.VALUE||"",timezoneId:this.selectedTimezone?.ID?.toString()||""};this.dialogRef.close(e)}static{this.\u0275fac=function(n){return new(n||t)(y(Et),y(Qt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-schedule-datetime-dialog"]],decls:23,vars:6,consts:[[1,"dialog"],[1,"dialog-title"],[1,"dialog-input"],[1,"input-icon"],["icon","ri:calendar-line"],["matInput","","readonly","",3,"value"],[1,"dialog-body"],[1,"calendar-section"],[3,"selectedChange","selected","minDate"],[1,"controls"],[1,"field-label"],[1,"field-select",3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["type","time",1,"time-input",3,"ngModelChange","ngModel"],[1,"dialog-actions"],["type","button",1,"btn","ghost",3,"click"],["type","button",1,"btn","primary",3,"click"],[3,"value"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1),l(2,"Date and Time Range"),a(),o(3,"div",2)(4,"span",3),h(5,"iconify-icon",4),a(),h(6,"input",5),a(),o(7,"div",6)(8,"div",7)(9,"mat-calendar",8),se("selectedChange",function(d){return le(i.selectedDate,d)||(i.selectedDate=d),d}),v("selectedChange",function(){return i.onDateChange()}),a()(),o(10,"div",9)(11,"label",10),l(12,"Select Time Zone"),a(),o(13,"mat-select",11),se("valueChange",function(d){return le(i.selectedTimezone,d)||(i.selectedTimezone=d),d}),v("selectionChange",function(){return i.onTimezoneChange()}),g(14,GM,2,2,"mat-option",12),a(),o(15,"label",10),l(16,"Enter HH:MM"),a(),o(17,"input",13),se("ngModelChange",function(d){return le(i.selectedTime,d)||(i.selectedTime=d),d}),v("ngModelChange",function(){return i.onTimeChange()}),a()()(),o(18,"div",14)(19,"button",15),v("click",function(){return i.onCancel()}),l(20,"Cancel"),a(),o(21,"button",16),v("click",function(){return i.onApply()}),l(22,"Apply"),a()()()),n&2&&(c(6),p("value",i.displayValue),c(3),ae("selected",i.selectedDate),p("minDate",i.minDate),c(4),ae("value",i.selectedTimezone),c(),p("ngForOf",i.timezones),c(3),ae("ngModel",i.selectedTime))},dependencies:[N,$,z,An,fe,ue,ve,me,mt,ds],styles:[".dialog[_ngcontent-%COMP%]{width:620px;max-width:90vw;height:500px;display:flex;flex-direction:column;gap:15px;overflow-y:scroll;overflow-x:hidden;-ms-overflow-style:none;scrollbar-width:none}.dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.dialog-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#111827}.dialog-input[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:8px;border:1px solid #D1D5DB;background:#fff;font-weight:400;color:#000}.dialog-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font-size:14px;width:100%}.input-icon[_ngcontent-%COMP%]{color:#6b7280;font-size:18px}.dialog-body[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.3fr 1fr;gap:20px}.controls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.field-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#374151}.field-select[_ngcontent-%COMP%]{width:88%;padding:10px 14px;border-radius:8px;border:1px solid #D1D5DB;background:#fff;font-weight:400;font-size:14px;color:#000}.time-input[_ngcontent-%COMP%]{border:1px solid #D1D5DB;border-radius:8px;padding:10px 14px;font-size:14px;color:#111827}.dialog-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
12gap:10px}.btn[_ngcontent-%COMP%]{border:1px solid #D1D5DB;border-radius:8px;padding:8px 16px;font-size:13px;cursor:pointer}.btn.ghost[_ngcontent-%COMP%]{background:#f3f4f6;color:#374151}.btn.primary[_ngcontent-%COMP%]{background:#4f9fef;border-color:#4f9fef;color:#fff}[_nghost-%COMP%]     .mat-calendar{border:none}[_nghost-%COMP%]     .mat-calendar-table-header, [_nghost-%COMP%]     .mat-calendar-body-label{color:#6b7280;font-size:12px}[_nghost-%COMP%]     .mat-calendar-body-selected{background:#4f9fef}@media(max-width:700px){.dialog-body[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return t})();var Ll=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-success-popup"]],decls:7,vars:0,consts:[[1,"success-popup"],[1,"icon-wrap"],["icon","ri:checkbox-circle-fill"],[1,"title"],[1,"subtitle"]],template:function(n,i){n&1&&(vn(0,"div",0)(1,"div",1),wn(2,"iconify-icon",2),bn(),vn(3,"div",3),l(4,"Workflow triggered successfully"),bn(),vn(5,"div",4),l(6,"You will be redirected shortly."),bn()())},dependencies:[N],styles:[".success-popup[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 32px;min-width:280px;text-align:center}.icon-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:50%;background:#ecfdf3;color:#16a34a;font-size:34px}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#111827}.subtitle[_ngcontent-%COMP%]{font-size:13px;color:#6b7280}"]})}}return t})();function KM(t,r){t&1&&(o(0,"div",30)(1,"div",31)(2,"div",32),h(3,"span",33),a()()())}function QM(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function JM(t,r){if(t&1){let e=A();o(0,"div",13)(1,"label",14),l(2,"Execution Date and Time"),a(),o(3,"div",35),v("click",function(){O(e);let i=u();return P(i.openDateTimePicker())}),h(4,"input",36)(5,"iconify-icon",37),a()()}if(t&2){let e=u();c(4),p("value",e.selectedDateTimeDisplay)}}function ZM(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function XM(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function eS(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function tS(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.NAME," ")}}function nS(t,r){if(t&1&&(o(0,"mat-option",34),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function iS(t,r){if(t&1&&(o(0,"div",20)(1,"div",13)(2,"label",14),l(3,"Select Instances"),a(),o(4,"mat-select",38),g(5,nS,2,2,"mat-option",17),a()()()),t&2){let e=u();c(4),p("value",e.selectedInstance),c(),p("ngForOf",e.instanceOptions)}}function oS(t,r){if(t&1&&(o(0,"span",41),l(1),a()),t&2){let e=r.$implicit;c(),C(e)}}function rS(t,r){if(t&1&&(o(0,"div",13)(1,"label",14),l(2,"Selected Instances"),a(),o(3,"div",39),g(4,oS,2,1,"span",40),a()()),t&2){let e=u();c(4),p("ngForOf",e.selectedInstances)}}var jm=(()=>{class t{constructor(e,n,i,s,d){this.dashboardService=e,this.notify=n,this.router=i,this.route=s,this.dialog=d,this.loading=!1,this.scheduleTypeOptions=["Execute Now","Schedule"],this.scheduleType="Schedule",this.scheduleName="",this.selectedDateTimeDisplay=null,this.selectedTimezoneId="",this.pendingWorkflowId=null,this.environmentOptions=["Staging Environment","Production Environment","Development Environment"],this.selectedEnvironment=this.environmentOptions[0],this.applicationGroups=["Application Servers","Database Servers","API Servers"],this.selectedApplicationGroup=this.applicationGroups[0],this.baselineOptions=["Jan-Patch-Baseline-ubuntu-20-LTS","Feb-Patch-Baseline-ubuntu-20-LTS"],this.selectedBaseline=this.baselineOptions[0],this.sourceTab="",this.breadcrumbItem="",this.navigateToRoute="",this.workflowOptions=[],this.selectedWorkflow="",this.selectedWorkflowName="",this.isEditingScheduledJob=!1,this.selectByTags=!0,this.filterByInstance=!1,this.instanceOptions=[""],this.selectedInstance=this.instanceOptions[0],this.selectedInstances=[""]}ngOnInit(){this.route.queryParams.subscribe(e=>{let n=e.source;n==="inventory"?(this.sourceTab="Inventory",this.breadcrumbItem="EC2 Instance Critical Risk Analysis",this.navigateToRoute="/admin-dashboard/patch-management/risk-analysis-detail
12s"):n==="ai-risk-analytics"?(this.sourceTab="AI Risk Analytics",this.breadcrumbItem="EC2 Instance Critical Risk Analysis",this.navigateToRoute="/admin-dashboard/patch-management/risk-analysis-details"):n==="workflow-blueprints"&&(this.sourceTab="Workflow Blueprints",this.navigateToRoute="/admin-dashboard/patch-management"),this.pendingWorkflowId=e.workflowId||null,this.isEditingScheduledJob=!!e.jobId,this.getWorkflows(),e.jobId&&this.loadJobDetails(e.jobId)})}ngAfterViewInit(){this.scrollToTop()}getWorkflows(){let e=this.selectedWorkflow;this.dashboardService.getWorkflows(!0).subscribe({next:n=>{if(n?.object?.WORKFLOWS){if(this.workflowOptions=n.object.WORKFLOWS,this.isEditingScheduledJob)e&&!this.workflowOptions.some(s=>s.ID===e)&&this.selectedWorkflowName&&(this.workflowOptions=[{ID:e,NAME:this.selectedWorkflowName},...this.workflowOptions]);else{let i=this.pendingWorkflowId||this.workflowOptions[0]?.ID,s=this.workflowOptions.find(d=>d.ID==i);this.selectedWorkflow=s?s.ID:this.workflowOptions[0]?.ID,this.selectedWorkflowName=s?s.NAME:this.workflowOptions[0]?.NAME}this.sourceTab==="Workflow Blueprints"&&this.selectedWorkflowName&&(this.breadcrumbItem=this.selectedWorkflowName)}},error:n=>{n.error.status==401&&this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status)}})}openDateTimePicker(){let e=null,n="12:00",i=this.selectedTimezoneId||"1";if(this.selectedDateTimeDisplay){let[d,m,f]=this.selectedDateTimeDisplay.split(" "),[_,b,M]=d.split("-").map(Number);e=new Date(M,b-1,_),n=m}this.dialog.open(Um,{panelClass:"schedule-datetime-dialog",data:{initialDate:e,initialTime:n,initialTimezoneId:i}}).afterClosed().subscribe(d=>{if(d?.date){let m=this.formatLocalDate(d.date);this.selectedDateTimeDisplay=`${m} ${d.time} ${d.timezone}`,this.selectedTimezoneId=d.timezoneId}})}formatLocalDate(e){let n=e.getFullYear(),i=`${e.getMonth()+1}`.padStart(2,"0");return`${`${e.getDate()}`.padStart(2,"0")}-${i}-${n}`}navigateTo(e){e&&this.route.queryParams.subscribe(n=>{this.router.navigate([e],{queryParams:{tab:n.source}})})}scrollToTop(){setTimeout(()=>{let e=document.querySelector(".right-container");e?.scrollTo&&e.scrollTo({top:0,left:0,behavior:"smooth"}),window.scrollTo({top:0,left:0,behavior:"smooth"}),document.documentElement.scrollTop=0,document.body.scrollTop=0},0)}loadJobDetails(e){this.dashboardService.getScheduledJobsById(e).subscribe({next:n=>{if(n.object){let i=n.object;if(this.scheduleName=i.SCHEDULED_JOB_NAME,this.selectedWorkflow=i.WORKFLOW_ID,this.selectedWorkflowName=i.WORKFLOW_NAME,this.selectedInstance=i.INSTANCE_ID||"",this.selectedTimezoneId=i.TIMEZONE?.ID?.toString(),this.workflowOptions.length>0&&!this.workflowOptions.some(d=>d.ID===i.WORKFLOW_ID)&&i.WORKFLOW_ID&&i.WORKFLOW_NAME&&(this.workflowOptions=[{ID:i.WORKFLOW_ID,NAME:i.WORKFLOW_NAME},...this.workflowOptions]),i.EXECUTION_DATE){let s=new Date(i.EXECUTION_DATE),d=s.toTimeString().split(" ")[0].substring(0,5);this.selectedDateTimeDisplay=`${s.getDate().toString().padStart(2,"0")}-${(s.getMonth()+1).toString().padStart(2,"0")}-${s.getFullYear()} ${d} ${i.TIMEZONE?.VALUE||"IST"}`}}},error:n=>{this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status)}})}saveAndTrigger(){if(this.loading=!0,this.isEditingScheduledJob){let e="";if(this.selectedDateTimeDisplay){let[i,s]=this.selectedDateTimeDisplay.split(" "),[d,m,f]=i.split("-"),[_,b]=s.split(":");e=`${f}-${m.padStart(2,"0")}-${d.padStart(2,"0")}T${_}:${b}:00`}let n={ID:this.route.snapshot.queryParams.jobId,TIMEZONE_ID:this.selectedTimezoneId,DATE_TIME:e};this.dashboardService.updateScheduledJob(n).subscribe({next:i=>{this.loading=!1;let s=this.dialog.open(Ll,{panelClass:"success-popup-dialog",disableClose:!0});setTimeout(()=>{s.close(),this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"workflow-blueprints",workflowTab:"schedules"}})},2e3)},error:i=>{this.loading=!1,this.notify.showNotification(i.error.message||"Failed to update scheduled job","top",E[i.error?.status]?E[i.error.status]:"error",i.error?.status||500)}})}else{let e=this.scheduleType==="Execute Now"?"now":"later",n="";if(e==="now"){let s=new Date,d=5.5*60*60*1e3;n=new Date(s.getTime()+s.getTimezoneOffset()*60*1e3+d).toISOString().slice(0,19).replace("T"," ")}else if(this.selectedDateTimeDisplay){let[s,d]=this.selectedDateTimeDisplay.split(" "),[m,f,_]=s.split("-"),[b,M]=d.split(":");n=`${_}-${f.padStart(2,"0")}-${m.padStart(2,"0")}T${b}:${M}:00`}let i={TOOL:"n8n",NAME:this.scheduleName,WORKFLOW_ID:this.selectedWorkflow,INSTANCE_ID:this.selectedInstance,TIMEZONE_ID:this.selectedTimezoneId,EXECUTE:e,DATE_TIME:n};this.dashboardService.executeWorkflow(i).subscribe({next:s=>{this.loading=!1;let d=this.dialog.open(Ll,{panelClass:"success-popup-dialog",disableClose:!0});setTimeout(()=>{d.close(),this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"workflow-blueprints",workflowTab:"executions"}})},5e3)},error:s=>{this.loading=!1,this.notify.showNotification(s.error.message,"top",E[s.error.status]?E[s.error.status]:"error",s.error.status)}})}}static{this.\u0275fac=function(n){return new(n||t)(y(re),y(V),y(G),y(Le),y(Se))}}static{this.\u0275cmp=k({type:t,selectors:[["app-edit-schedule"]],decls:80,vars:27,consts:[[1,"edit-schedule"],["class","overlay",4,"ngIf"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"title"],[1,"subtitle"],[1,"card"],[1,"section-title"],[1,"schedule-grid"],[1,"form-field"],[1,"field-label"],["type","text",1,"schedule-input",3,"ngModelChange","ngModel","disabled"],[1,"schedule-select",3,"valueChange","value","disabled"],[3,"value",4,"ngFor","ngForOf"],["class","form-field",4,"ngIf"],[1,"section-divider"],[1,"form-grid"],[1,"field-select",3,"value","disabled"],[1,"form-field","field-checkbox"],[1,"info-checkbox",3,"ngModelChange","ngModel","disabled"],[1,"field-select",3,"ngModelChange","ngModel","disabled"],["class","form-grid",4,"ngIf"],[1,"footer-actions"],["type","button",1,"btn","ghost",3,"click"],["type","button",1,"btn","primary",3,"click"],["icon","octicon:play-16"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],[1,"execution-date",3,"click"],["matInput","","readonly","",3,"value"],["icon","ri:calendar-line",1,"calendar-icon"],[1,"field-select",3,"value"],[1,"chips"],["class","chip",4,"ngFor","ngForOf"],[1,"chip"]],template:function(n,i){n&1&&(o(0,"div",0),g(1,KM,4,0,"div",1),o(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Auto Pilot"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",4),l(9,"Patch Management"),a(),o(10,"span",5),l(11,">"),a(),o(12,"span",6),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(13),a(),o(14,"span",5),l(15,">"),a(),o(16,"span",6),v("click",function(){return i.navigateTo(i.navigateToRoute)}),l(17),a(),o(18,"span",5),l(19,">"),a(),o(20,"span",7),l(21,"Edit Job Schedule"),a()(),o(22,"div",8),l(23,"Edit Job Schedule"),a(),o(24,"div",9),l(25,"Modify patch deployment schedule and configuration"),a()(),o(26,"div",10)(27,"div",11),l(28,"Schedule Configuration"),a(),o(29,"div",12)(30,"div",13)(31,"label",14),l(32,"Schedule Name"),a(),o(33,"input",15),se("ngModelChange",function(d){return le(i.scheduleName,d)||(i.scheduleName=d),d}),a()(),o(34,"div",13)(35,"label",14),l(36,"Schedule Type"),a(),o(37,"mat-select",16),se("valueChange",function(d){return le(i.scheduleType,d)||(i.scheduleType=d),d}),g(38,QM,2,2,"mat-option",17),a()(),g(39,JM,6,1,"div",18),a(),h(40,"div",19),o(41,"div",11),l(42,"Target Systems Configuration"),a(),o(43,"div",20)(44,"div",13)(45,"label",14),l(46,"Environment"),a(),o(47,"mat-select",21),g(48,ZM,2,2,"mat-option",17),a()(),o(49,"div",13)(50,"label",14),l(51,"Application Group"),a(),o(52,"mat-select",21),g(53,XM,2,2,"mat-option",17),a()()(),o(54,"div",22)(55,"label",14),l(56,"System Selection Criteria"),a(),o(57,"mat-checkbox",23),se("ngModelChange",function(d){return le(i.selectByTags,d)||(i.selectByTags=d),d}),l(58,"Select by AWS tags (Environment=staging, Application=data-platform)"),a(),o(59,"mat-checkbox",23),se("ngModelChange",function(d){return le(i.filterByInstance,d)||(i.filterByInstance=d),d}),l(60,"Filter by instance"),a()(),o(61,"div",20)(62,"div",13)(63,"label",14),l(64,"Patch Baseline"),a(),o(65,"mat-select",21),g(66,eS,2,2,"mat-option",17),a()(),o(67,"div",13)(68,"label",14),l(69,"Workflows"),a(),o(70,"mat-select",24),se("ngModelChange",function(d){return le(i.selectedWorkflow,d)||(i.selectedWorkflow=d),d}),g(71,tS,2,2,"mat-option",17),a()()(),g(72,iS,6,2,"div",25)(73,rS,5,1,"div",18),a(),o(74,"div",26)(75,"button",27),v("click",function(){return i.navigateTo(i.navigateToRoute)}),l(76,"Cancel"),a(),o(77,"button",28),v("click",function(){return i.saveAndTrigger()}),h(78,"iconify-icon",29),l(79," Save & Trigger "),a()()()),n&2&&(c(),p("ngIf",i.loading),c(12),x(" ",i.sourceTab," "),c(4),x(" ",i.breadcrumbItem," "),c(16),ae("ngModel",i.scheduleName),p("disabled",i.isEditingScheduledJob),c(4),ae("value",i.scheduleType),p("disabled",i.isEditingScheduledJob),c(),p("ngForOf",i.scheduleTypeOptions),c(),p("ngIf",i.scheduleType==="Schedule"),c(8),p("value",i.selectedEnvironment)("disabled",i.isEditingScheduledJob),c(),p("ngForOf",i.environmentOptions),c(4),p("value",i.selectedApplicationGroup)("disabled",i.isEditingScheduledJob),c(),p("ngForOf",i.applicationGroups),c(4),ae("ngModel",i.selectByTags),p("disabled",i.isEditingScheduledJob),c(2),ae("ngModel",i.filterByInstance),p("disabled",i.isEditingScheduledJob),c(6),p("value",i.selectedBaseline)("disabled",i.isEditingScheduledJob),c(),p("ngForOf",i.baselineOptions),c(4),ae("ngModel",i.selectedWorkflow),p("disabled",i.isEditingScheduledJob),c(),p("ngForOf",i.workflowOptions),c(),p("ngIf",i.filterByInstance),c(),p("ngIf",i.filterByInstance))},dependencies:[N,$,B,z,An,fe,ue,ve,me,mt,xr],styles:[".edit-schedule[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:20px 24px;background:#f7f8fb;min-height:100%}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;padding-top:10px}.subtitle[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.card[_ngcontent-%COMP%]{background:#fff;padding:30px 25px;display:flex;flex-direction:column;gap:15px}.section-title[_ngcontent-%COMP%]{font-weight:600;font-size:16px;color:#111827}.section-divider[_ngcontent-%COMP%]{height:1px;background:#e5e7eb;margin:4px 0}.schedule-grid[_ngcontent-%COMP%]{display:flex;gap:25px}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px}.form-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px}.field-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#374151}.schedule-select[_ngcontent-%COMP%]{width:250px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.schedule-input[_ngcontent-%COMP%]{width:250px;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#fff;font-weight:400;font-size:14px;color:#000}.schedule-input[_ngcontent-%COMP%]:disabled{background:#efefef;color:#6b7280;cursor:not-allowed}.execution-date[_ngcontent-%COMP%]{border-radius:16px;width:250px;height:40px;
12display:flex;border:1px solid #D1D5DB;padding:0 15px;align-items:center;justify-content:space-between}.execution-date[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font-weight:400;font-size:14px;color:#000;width:100%;box-shadow:none;padding:0}.field-select[_ngcontent-%COMP%], .field-input[_ngcontent-%COMP%]{width:90%;padding:10px 14px;border-radius:16px;border:1px solid #D1D5DB;background:#efefef;font-weight:400;font-size:14px;color:#000}.field-checkbox[_ngcontent-%COMP%]{font-size:13px;color:#374151}[_nghost-%COMP%]     .info-checkbox.mat-mdc-checkbox.mat-accent .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background{background-color:#2d75ff!important;border-color:#2d75ff!important}.chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.chip[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af;padding:5px 15px;border-radius:999px;font-size:12px}.footer-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px}.btn[_ngcontent-%COMP%]{border:1px solid #D1D5DB;border-radius:8px;padding:10px 20px;font-size:14px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.btn.ghost[_ngcontent-%COMP%]{background:transparent;color:#374151}.btn.primary[_ngcontent-%COMP%]{background:#22c55e;border-color:#22c55e;color:#fff}@media(max-width:900px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.calendar-icon[_ngcontent-%COMP%]{color:#6b7280;font-size:18px;cursor:pointer}[_nghost-%COMP%]     .schedule-datetime-dialog .mat-mdc-dialog-container{padding:0;border-radius:16px}[_nghost-%COMP%]     .success-popup-dialog .mat-mdc-dialog-container{padding:0;border-radius:16px}"]})}}return t})();function aS(t,r){t&1&&(o(0,"div",23)(1,"div",24)(2,"div",25),h(3,"span",26),a()()())}function lS(t,r){if(t&1&&(o(0,"section",27)(1,"div",28)(2,"p",29),l(3),a()()()),t&2){let e=u();c(3),C(e.successTitle)}}function sS(t,r){if(t&1&&(o(0,"section",27)(1,"div",30)(2,"p",29),l(3),a()()()),t&2){let e=u();c(3),C(e.errorTitle)}}var $m=(()=>{class t{constructor(e,n,i,s){this.router=e,this.route=n,this.dashboardService=i,this.notify=s,this.connectionName="",this.n8nEndpointUrl="",this.apiKey="",this.integrationData=null,this.loading=!1,this.testResult=null,this.successTitle="Test connection successful",this.errorTitle="Error connecting to the account"}ngOnInit(){this.scrollToTop(),this.loadIntegrationFromQueryParams()}loadIntegrationFromQueryParams(){this.route.queryParams.subscribe(e=>{let n=e.tool,i=e.id;n&&i&&this.getIntegrationsById(n,i)})}cancel(){this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"integrations"}})}navigateTo(e){e&&this.router.navigate([e],{queryParams:{tab:"integrations"}})}scrollToTop(){setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"}),document.documentElement.scrollTop=0,document.body.scrollTop=0;let e=document.querySelector(".right-container");e?.scrollTo&&e.scrollTo({top:0,left:0,behavior:"smooth"});let n=document.querySelector('[style*="overflow"]');n?.scrollTo&&n.scrollTo({top:0,left:0,behavior:"smooth"})},100)}getIntegrationsById(e,n){this.dashboardService.getIntegrationsById(e,n).subscribe({next:i=>{if(i.status===200&&i.object){let s=Array.isArray(i.object)?i.object[0]:i.object;s&&(this.connectionName=s.NAME||"",this.n8nEndpointUrl=s.ENDPOINT||"",this.apiKey=s.API_KEY||"",this.integrationData={id:s.ID,tool:s.TOOL,name:s.NAME,endpoint:s.ENDPOINT,apiKey:s.API_KEY})}},error:i=>{this.notify.showNotification(i.error.message,"top",E[i.error.status]?E[i.error.status]:"error",i.error.status)}})}testConnection(){this.loading=!0;let e={TOOL:this.integrationData?.tool||this.connectionName,ENDPOINT:this.n8nEndpointUrl,API_KEY:this.apiKey};this.dashboardService.testIntegration(e).subscribe({next:n=>{this.loading=!1,this.testResult=n.status===200?"success":"error"},error:n=>{this.loading=!1,this.testResult="error"}})}save(){if(this.loading=!0,this.integrationData?.id){let e={ID:this.integrationData.id,NAME:this.connectionName,ENDPOINT:this.n8nEndpointUrl,API_KEY:this.apiKey};this.dashboardService.updateIntegration(e).subscribe({next:n=>{this.loading=!1,this.notify.showNotification("Connection updated successfully","top","success",200),this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"integrations"}})},error:n=>{this.loading=!1,this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status)}})}else{let e={TOOL:"n8n",NAME:this.connectionName,ENDPOINT:this.n8nEndpointUrl,API_KEY:this.apiKey};this.dashboardService.addIntegration(e).subscribe({next:n=>{this.loading=!1,this.notify.showNotification("Integration added successfully","top","success",200),this.router.navigate(["/admin-dashboard/patch-management"],{queryParams:{tab:"integrations"}})},error:n=>{this.loading=!1,this.notify.showNotification(n.error.message,"top",E[n.error.status]?E[n.error.status]:"error",n.error.status)}})}}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(re),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-configure-integration"]],decls:46,vars:6,consts:[[1,"configure-integration-container"],["class","overlay",4,"ngIf"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-link",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-card"],[1,"form-card"],[1,"integration-form"],[1,"form-group"],["for","connectionName"],["type","text","id","connectionName","placeholder","Connection Name","name","connectionName",1,"form-input",3,"ngModelChange","ngModel"],[1,"form-row"],[1,"form-group","flex-item"],["for","n8nEndpointUrl"],["type","text","id","n8nEndpointUrl","placeholder","https://your-instance.service-now.com/","name","n8nEndpointUrl",1,"form-input",3,"ngModelChange","ngModel"],["for","apiKey"],["type","password","id","apiKey","placeholder","API Key","name","apiKey",1,"form-input",3,"ngModelChange","ngModel"],["class","message-card",4,"ngIf"],[1,"form-actions"],["type","button",1,"btn","btn-primary",3,"click"],["type","button",1,"btn","btn-secondary",3,"click"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"message-card"],[1,"alert","success"],[1,"alert-title"],[1,"alert","error"]],template:function(n,i){n&1&&(o(0,"div",0),g(1,aS,4,0,"div",1),o(2,"div",2)(3,"span",3),l(4,"Auto P
12ilot"),a(),o(5,"span",4),l(6,">"),a(),o(7,"span",3),l(8,"Patch Management"),a(),o(9,"span",4),l(10,">"),a(),o(11,"span",5),v("click",function(){return i.navigateTo("/admin-dashboard/patch-management")}),l(12," Integrations"),a(),o(13,"span",4),l(14,">"),a(),o(15,"span",6),l(16,"Edit Integration"),a()(),o(17,"section",7)(18,"h1"),l(19,"Configure Integration"),a(),o(20,"p"),l(21,"Connect with your ServiceNow instance for automated n8n workflows"),a()(),o(22,"section",8)(23,"form",9)(24,"div",10)(25,"label",11),l(26,"Connection Name"),a(),o(27,"input",12),se("ngModelChange",function(d){return le(i.connectionName,d)||(i.connectionName=d),d}),a()(),o(28,"div",13)(29,"div",14)(30,"label",15),l(31,"n8n Endpoint URL"),a(),o(32,"input",16),se("ngModelChange",function(d){return le(i.n8nEndpointUrl,d)||(i.n8nEndpointUrl=d),d}),a()(),o(33,"div",14)(34,"label",17),l(35,"API Key"),a(),o(36,"input",18),se("ngModelChange",function(d){return le(i.apiKey,d)||(i.apiKey=d),d}),a()()()()(),g(37,lS,4,1,"section",19)(38,sS,4,1,"section",19),o(39,"div",20)(40,"button",21),v("click",function(){return i.testConnection()}),l(41," Test Connection "),a(),o(42,"button",22),v("click",function(){return i.save()}),l(43," Save "),a(),o(44,"button",22),v("click",function(){return i.cancel()}),l(45," Cancel "),a()()()),n&2&&(c(),p("ngIf",i.loading),c(26),ae("ngModel",i.connectionName),c(5),ae("ngModel",i.n8nEndpointUrl),c(4),ae("ngModel",i.apiKey),c(),p("ngIf",i.testResult==="success"),c(),p("ngIf",i.testResult==="error"))},dependencies:[N,B,z,mn,ve,me,$e,mt,es],styles:[".breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-link[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.configure-integration-container[_ngcontent-%COMP%]{background:#f6f8fb;min-height:100vh;padding:32px 48px 40px;display:flex;flex-direction:column;gap:16px}.header-card[_ngcontent-%COMP%], .form-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #edf0f5;border-radius:16px;box-shadow:0 6px 20px #1118270a}.header-card[_ngcontent-%COMP%]{padding:24px 28px}.header-card[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0 0 6px;font-size:24px;font-weight:700;line-height:32px;color:#111827}.header-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;color:#4b5563;font-size:15px;line-height:24px}.form-card[_ngcontent-%COMP%]{padding:28px 28px 32px}.integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:22px}.integration-form[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));column-gap:24px;row-gap:20px}.integration-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}.integration-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin-bottom:10px;font-size:14px;line-height:20px;font-weight:600;color:#374151}.integration-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]{padding:13px 16px;border:1px solid #dfe4ea;border-radius:18px;font-size:14px;color:#111827;background:#fff;transition:all .15s ease}.integration-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]::placeholder{color:#a0aec0}.integration-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#51b0e0;box-shadow:0 0 0 3px #51b0e02e}.message-card[_ngcontent-%COMP%]{padding:22px 24px 24px}.message-card[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0 0 14px;font-size:15px;font-weight:700;color:#1f2937}.message-card[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]{padding:16px 18px;border-radius:12px;border:1px solid transparent;font-size:13.5px;line-height:1.5;text-align:center}.message-card[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   .alert-title[_ngcontent-%COMP%]{margin:0 0 8px;font-weight:700}.message-card[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:18px}.message-card[_ngcontent-%COMP%]   .alert.success[_ngcontent-%COMP%]{background:#e5f7ea;border-color:#9fddb1;color:#116638}.message-card[_ngcontent-%COMP%]   .alert.error[_ngcontent-%COMP%]{background:#fdeeee;border-color:#f2c8c8;color:#b32222}.form-actions[_ngcontent-%COMP%]{width:100%;max-width:1200px;margin:0 auto;padding-top:18px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end;
12gap:12px}.form-actions[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:10px 18px;font-size:14px;font-weight:400;border-radius:8px;cursor:pointer;border:1px solid #D1D5DB;background:#fff;color:#374151;transition:all .15s ease}.form-actions[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{background:#f8fafc;border-color:#cfd8e3}.form-actions[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff;border-color:#57b5e7;box-shadow:0 4px 10px #57b5e759}.form-actions[_ngcontent-%COMP%]   .btn.btn-secondary[_ngcontent-%COMP%]{min-width:92px;text-align:center}"]})}}return t})();function cS(t,r){t&1&&(o(0,"div",30)(1,"div",31)(2,"div",32),h(3,"span",33),a()()())}function dS(t,r){t&1&&(o(0,"span",40),h(1,"iconify-icon",41),a())}function pS(t,r){if(t&1){let e=A();o(0,"button",34),v("click",function(){let i=O(e).$implicit,s=u();return P(s.selectProvider(i))}),g(1,dS,2,0,"span",35),o(2,"div",36),h(3,"img",37),a(),o(4,"div",38),l(5),a(),o(6,"div",39),l(7),a()()}if(t&2){let e=r.$implicit,n=u();Y("selected",(n.selectedProvider==null?null:n.selectedProvider.ID)===e.ID)("inactive",!n.isProviderEnabled(e)),p("disabled",!n.isProviderEnabled(e)),c(),p("ngIf",(n.selectedProvider==null?null:n.selectedProvider.ID)===e.ID),c(2),p("src",e.iconUrl,Qe)("alt",e.NAME),c(2),C(e.shortName),c(2),C(e.NAME)}}function mS(t,r){if(t&1){let e=A();o(0,"button",42),v("click",function(){let i=O(e).$implicit,s=u();return P(s.setActiveTab(i.key))}),h(1,"iconify-icon",43),l(2),a()}if(t&2){let e=r.$implicit,n=u();Y("active",n.activeTab===e.key),c(),p("icon",e.icon),c(),x(" ",e.label," ")}}function uS(t,r){if(t&1){let e=A();o(0,"section",44)(1,"div",45)(2,"div",46)(3,"div",47)(4,"div",48),l(5,"Total Connections"),a(),o(6,"div",49),l(7),a()(),o(8,"div",50),h(9,"iconify-icon",51),a()(),o(10,"div",46)(11,"div",47)(12,"div",48),l(13,"Active Capabilities"),a(),o(14,"div",49),l(15),a()(),o(16,"div",52),h(17,"iconify-icon",53),a()(),o(18,"div",46)(19,"div",47)(20,"div",48),l(21,"Issues"),a(),o(22,"div",49),l(23),a()(),o(24,"div",54),h(25,"iconify-icon",55),a()(),o(26,"div",46)(27,"div",47)(28,"div",48),l(29,"Sync Health"),a(),o(30,"div",56),l(31,"Healthy"),a()(),o(32,"div",52),h(33,"iconify-icon",57),a()()(),o(34,"div",58)(35,"div",59)(36,"div",60),l(37),a(),o(38,"div",61),l(39),a()(),o(40,"div",62)(41,"div",63)(42,"div",64)(43,"div",65),l(44,"1"),a(),o(45,"div",66)(46,"div",67),l(47),a(),o(48,"div",68),l(49),a()()(),o(50,"button",69),v("click",function(){O(e);let i=u();return P(i.navigateToConnectionsTab())}),h(51,"iconify-icon",70),l(52," Add Account "),a()(),o(53,"div",63)(54,"div",64)(55,"div",65),l(56,"2"),a(),o(57,"div",66)(58,"div",67),l(59,"Validate Permissions"),a(),o(60,"div",68),l(61,"Verify required access permissions for cost and usage data "),a()()(),o(62,"button",69),v("click",function(){O(e);let i=u();return P(i.navigateToPermissionsTab())}),h(63,"iconify-icon",71),l(64," Validate Access "),a()(),o(65,"div",63)(66,"div",64)(67,"div",65),l(68,"3"),a(),o(69,"div",66)(70,"div",67),l(71,"Enable Capabilities"),a(),o(72,"div",68),l(73,"Configure cost monitoring, optimization, and metrics collection"),a()()(),o(74,"button",69),v("click",function(){O(e);let i=u();return P(i.navigateToCapabilitiesTab())}),h(75,"iconify-icon",53),l(76," Configure "),a()(),o(77,"div",63)(78,"div",64)(79,"div",65),l(80,"4"),a(),o(81,"div",66)(82,"div",67),l(83,"Monitor Sync Health"),a(),o(84,"div",68),l(85,"Track data synchronization status and connection health"),a()()(),o(86,"button",69),v("click",function(){O(e);let i=u();return P(i.navigateToCapabilitiesTab())}),h(87,"iconify-icon",72),l(88," View Status "),a()()()()()}if(t&2){let e=u();c(7),C(e.totalConnections),c(8),C(e.activeCapabilities),c(8),C(e.issuesCount),c(14),x("",e.currentProviderName," Connection Setup Guide"),c(2),x(" Follow these steps to connect your ",e.currentProviderName," account and start monitoring costs "),c(8),x("Connect ",e.currentProviderName," Account"),c(2),x("Add your ",e.currentProviderName," account credentials to establish connection")}}function gS(t,r){t&1&&(o(0,"th",90),l(1,"Name"),a())}function fS(t,r){if(t&1&&(o(0,"td",91),l(1),a()),t&2){let e=r.$implicit;c(),C(e.NAME)}}function hS(t,r){t&1&&(o(0,"th",90),l(1,"Account ID"),a())}function _S(t,r){if(t&1&&(o(0,"td",91),l(1),a()),t&2){let e=r.$implicit;c(),C(e.ACCOUNT_ID)}}function CS(t,r){t&1&&(o(0,"th",90),l(1,"Master Account"),a())}function xS(t,r){if(t&1&&(o(0,"td",91),h(1,"iconify-icon",92),a()),t&2){let e=r.$implicit;c(),Y("master-yes",e.MASTER_ACCOUNT)("master-no",!e.MASTER_ACCOUNT),p("icon",e.MASTER_ACCOUNT?"hugeicons:tick-01":"iconamoon:close-fill")}}function vS(t,r){t&1&&(o(0,"th",90),l(1,"Regions"),a())}function bS(t,r){if(t&1&&(o(0,"td",91),l(1),a()),t&2){let e=r.$implicit,n=u(3);c(),C(n.formatRegions(e.REGION))}}function yS(t,r){t&1&&h(0,"tr",93)}function MS(t,r){t&1&&h(0,"tr",94)}function SS(t,r){if(t&1&&(o(0,"div",78)(1,"div",79)(2,"table",80),I(3,81),g(4,gS,2,0,"th",82)(5,fS,2,1,"td",83),T(),I(6,84),g(7,hS,2,0,"th",82)(8,_S,2,1,"td",83),T(),I(9,85),g(10,CS,2,0,"th",82)(11,xS,2,5,"td",83),T(),I(12,86),g(13,vS,2,0,"th",82)(14,bS,2,1,"td",83),T(),g(15,yS,1,0,"tr",87)(16,MS,1,0,"tr",88),a()(),h(17,"mat-paginator",89),a()),t&2){let e=u(2);c(2),p("dataSource",e.dataSource),c(13),p("matHeaderRowDef",e.displayedColumns),c(),p("matRowDefColumns",e.displayedColumns),c(),p("length",e.dataSource.data.length)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("hidePageSize",!0)}}function OS(t,r){if(t&1){let e=A();o(0,"div",95)(1,"div",96),h(2,"iconify-icon",97),a(),o(3,"div",98),l(4,"No connections configured"),a(),o(5,"div",99),l(6),a(),o(7,"button",100),v("click",function(){O(e);let i=u(2);return P(i.addConnection())}),h(8,"iconify-icon",70),l(9," Add Your First Connection "),a()()}if(t&2){let e=u(2);c(6),x(" Get started by adding your first ",e.currentProviderName," account connection to begin monitoring costs and resources. ")}}function PS(t,r){if(t&1){let e=A();o(0,"section",73)(1,"div",74)(2,"div")(3,"div",75),l(4),a(),o(5,"div",76),l(6),a()(),o(7,"button",69),v("click",function(){O(e);let i=u();return P(i.addConnection())}),h(8,"iconify-icon",70),l(9," Add Connection "),a()(),g(10,SS,18,7,"div",77)(11,OS,10,1,"ng-template",null,0,at),a()}if(t&2){let e=Ce(12),n=u();c(4),x("",n.currentProviderName," Connections"),c(2),x("Manage your ",n.currentProviderLongName," account connections and monitor their health status."),c(4),p("ngIf",n.hasConnections)("ngIfElse",e)}}function ES(t,r){if(t&1&&(o(0,"div",124),h(1,"iconify-icon",125),l(2),a()),t&2){let e=r.$implicit;c(2),x(" ",e," ")}}function wS(t,r){if(t&1){let e=A();o(0,"div",114)(1,"div",115),h(2,"iconify-icon",116),a(),o(3,"div",117),l(4),a(),o(5,"div",118),l(6),a(),o(7,"div",119),g(8,ES,3,1,"div",120),a(),o(9,"div",121),h(10,"iconify-icon",122),o(11,"span"),l(12),a()(),o(13,"button",123),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.openCapabilityConfiguration(i))}),l(14),a()()}if(t&2){let e=r.$implicit;c(4),C(e.title),c(2),C(e.description),c(2),p("ngForOf",e.tags),c(4),C(e.info),c(),p("disabled",e.disabled),c(),x(" ",e.buttonText," ")}}function IS(t,r){if(t&1&&(o(0,"div",106)(1,"div",107)(2,"div",108),h(3,"iconify-icon",109),a(),o(4,"div",110),l(5),a(),o(6,"div",111),l(7),a()(),o(8,"div",112),g(9,wS,15,6,"div",113),a()()),t&2){let e=r.$implicit;c(5),C(e.title),c(2),C(e.description),c(2),p("ngForOf",e.cards)}}function TS(t,r){if(t&1&&(o(0,"section",101)(1,"div",102)(2,"div",103),l(3),a(),o(4,"div",104),l(5),a()(),g(6,IS,10,3,"div",105),a()),t&2){let e=u();c(3),x("",e.currentProviderName," Capabilities"),c(2),x(" Configure ",e.currentProviderName," data sources and integrations to enable comprehensive cloud management. "),c(),p("ngForOf",e.capabilitySections)}}function AS(t,r){if(t&1&&(o(0,"div",138)(1,"div",139),l(2),a(),o(3,"div",140),l(4),a(),o(5,"a",141),l(6," Official documentation "),h(7,"iconify-icon",142),a()()),t&2){let e=r.$implicit;c(2),C(e.title),c(2),C(e.description),c(),p("href",e.link,Qe)}}function DS(t,r){if(t&1&&(o(0,"a",143)(1,"div",144),h(2,"iconify-icon",43),a(),o(3,"div")(4,"div",145),l(5),a(),o(6,"div",146),l(7),a()()()),t&2){let e=r.$implicit;p("href",e.link,Qe),c(),p("ngClass",e.iconClass),c(),p("icon",e.icon),c(3),C(e.title),c(2),C(e.description)}}function RS(t,r){if(t&1&&(o(0,"section",126)(1,"div",127)(2,"div",128)(3,"div")(4,"div",129),l(5,"Access & Permissions"),a(),o(6,"div",130),l(7,"Minimum permissions required for cost data, optimization, and metrics onboarding"),a()(),o(8,"button",131),h(9,"iconify-icon",132),l(10," Validate Connections "),a()(),o(11,"div",133),g(12,AS,8,3,"div",134),a()(),o(13,"div",127)(14,"div",135)(15,"div")(16,"div",129),l(17,"Helpful Resources"),a(),o(18,"div",130),l(19),a()()(),o(20,"div",136),g(21,DS,8,5,"a",137),a()()()),t&2){let e=u();c(12),p("ngForOf",e.permissionCategories),c(7),x("Provider-specific setup references for ",e.currentProviderName," integrations"),c(2),p("ngForOf",e.permissionResources)}}var qm=(()=>{class t{set paginator(e){this.paginatorRef=e,this.attachPaginator()}constructor(e,n,i,s,d,m,f){this.authService=e,this.dashboardService=n,this.notify=i,this.router=s,this.route=d,this.ngZone=m,this.cdr=f,this.activeTab="overview",this.tabs=[{key:"overview",label:"Overview",icon:"akar-icons:info-fill"},{key:"connections",label:"Connections",icon:"fa-solid:plug"},{key:"capabilities",label:"Capabilities",icon:"fa7-solid:cogs"},{key:"permissions",label:"Permissions & Docs",icon:"fa7-solid:shield-halved"}],this.loading=!1,this.providers=[],this.selectedProvider=null,this.totalConnections=0,this.activeCapabilities="-",this.issuesCount=0,this.displayedColumns=["name","accountId","masterAccount","regi
12ons"],this.dataSource=new fn([]),this.pageSize=5,this.pageIndex=0,this.pendingRequests=0,this.capabilitySections=[{title:"Financial Data & Optimization",description:"Configure cost data, tracking, and optimization tools to manage cloud spend effectively.",cards:[{id:"cost-data",title:"Cost Data Configuration",description:"Configure AWS CUR 2.0 Standard Data Export for billing visibility, allocation, and cost trend analysis",tags:["Export","Organization"],info:"Use Daily granularity, Primary billing view, all columns (130/130), no filters, and Parquet output. First delivery can take up to 24 hours.",buttonText:"Configure"},{id:"cost-optimization",title:"Cost Optimization",description:"Collect savings and optimization recommendations across compute and database services",tags:["Export","Either"],info:"Set Recommendation Filters to All, select all columns (26/26), enable all table configurations, and use Parquet output.",buttonText:"Configure"}]},{title:"Security & Operations",description:"Enable security posture monitoring, resource tracking, and performance metrics.",cards:[{id:"inventory",title:"Inventory",description:"Collect scheduled snapshots of cloud resources, tags, and service metadata for asset visibility",tags:["Live-api","Multiple-accounts"],info:"Add one or more read-only cross-account role ARNs for multiple accounts",buttonText:"Configure",disabled:!0}]}],this.permissionCategories=[{title:"Cost Data (CUR)",description:"cur:PutReportDefinition, cur:ModifyReportDefinition, cur:DeleteReportDefinition, cur:DescribeReportDefinitions plus S3 write/read permissions for delivery",link:"https://docs.aws.amazon.com/cur/latest/userguide/what-is-data-exports.html"},{title:"Optimization",description:"Read access to Cost Optimization Hub, Compute Optimizer, and related recommendation services",link:"https://docs.aws.amazon.com/cost-management/latest/userguide/what-is-costmanagement.html"},{title:"Metrics",description:"cloudwatch:GetMetricData, cloudwatch:GetMetricStatistics, cloudwatch:ListMetrics",link:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/permissions-reference-cw.html"}],this.permissionResources=[{title:"IAM Role Setup Guide",description:"How to create the necessary IAM roles and policies.",link:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html",icon:"fa-solid:user-shield",iconClass:"resource-icon-blue"},{title:"Understanding External IDs",description:"Best practices for securing cross-account access.",link:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html",icon:"fa7-solid:shield-halved",iconClass:"resource-icon-green"},{title:"CUR Configuration",description:"Step-by-step guide to setting up Cost & Usage Reports.",link:"https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html",icon:"fluent:document-text-32-filled",iconClass:"resource-icon-purple"}]}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("tab");this.isSetupTab(e)&&(this.activeTab=e),this.loadProviders()}get currentProviderName(){return this.selectedProvider?.shortName||"Cloud"}get currentProviderLongName(){return this.selectedProvider?.NAME||"Cloud Provider"}get hasConnections(){return this.dataSource.data.length>0}setActiveTab(e){this.activeTab=e,e==="connections"&&this.selectedProvider&&this.isProviderEnabled(this.selectedProvider)&&this.loadConnections(this.selectedProvider)}selectProvider(e){this.isProviderEnabled(e)&&(this.selectedProvider=e,this.activeTab==="connections"&&this.loadConnections(e))}navigateToConnectionsTab(){this.setActiveTab("connections")}navigateToPermissionsTab(){this.setActiveTab("permissions")}navigateToCapabilitiesTab(){this.setActiveTab("capabilities")}addConnection(){this.selectedProvider&&(window.localStorage.setItem("serviceProviderInfo",JSON.stringify({serviceId:this.selectedProvider.ID,serviceCode:this.selectedProvider.CODE})),this.router.navigate(["/admin-dashboard/cloud-config/connection-setup"],{queryParams:{providerId:this.selectedProvider.ID}}))}openCapabilityConfiguration(e){if(e.disabled||!this.selectedProvider)return;let n={capabilityId:e.id,capabilityTitle:e.title,providerId:this.selectedProvider.ID,providerCode:this.selectedProvider.CODE,providerName:this.selectedProvider.shortName,providerLongName:this.selectedProvider.
12NAME};window.localStorage.setItem("costCapabilitySetupContext",JSON.stringify(n)),this.router.navigate(["/admin-dashboard/cloud-config/cost-configure-and-optimize"],{state:{costCapabilityContext:n}})}formatRegions(e){return!Array.isArray(e)||e.length===0?"-":e.map(n=>typeof n=="string"?n:n?.NAME||n?.CODE||n?.ID||"-").join(", ")}trackByProvider(e,n){return n.ID}isProviderEnabled(e){return e?.CODE?.toLowerCase()==="aws"}loadProviders(){this.startLoading(),this.authService.getMasterData().subscribe({next:e=>{let n=e?.object?.[0]||{},i=kn(Array.isArray(n?.CLOUD_PROVIDER)?n.CLOUD_PROVIDER:[]);if(this.providers=i.filter(s=>Number(s?.ID??s?.id??0)!==0).map(s=>this.mapProvider(s)),this.providers.length>0){let s=this.providers.find(d=>this.isProviderEnabled(d))||this.providers[0];this.selectedProvider=s,this.loadConnections(s)}this.stopLoading()},error:e=>{this.stopLoading(),this.notify.showNotification(e.error?.message||"Failed to load cloud providers","top",E[e.error?.status]?E[e.error?.status]:"error",e.error?.status||500)}})}loadConnections(e){let n=Number(e?.ID??0);if(!n){this.ngZone.run(()=>{this.dataSource.data=[],this.totalConnections=0,this.attachPaginator(!0),this.refreshView()});return}this.startLoading(),this.dashboardService.getClientCredentials(n).subscribe({next:i=>{let s=Array.isArray(i?.object)?i.object:[];this.ngZone.run(()=>{this.dataSource.data=[...s],this.totalConnections=s.length,this.attachPaginator(!0),this.stopLoading()})},error:i=>{this.ngZone.run(()=>{this.dataSource.data=[],this.totalConnections=0,this.attachPaginator(!0),this.stopLoading()}),this.notify.showNotification(i.error?.message||"Failed to load connections","top",E[i.error?.status]?E[i.error?.status]:"error",i.error?.status||500)}})}mapProvider(e){let n=String(e?.CODE??e?.code??"").toLowerCase(),i=Number(e?.ID??e?.id??0),s=String(e?.NAME??e?.name??n.toUpperCase());return{ID:i,CODE:n,NAME:s,LOGO:e?.LOGO,iconUrl:this.resolveProviderIcon(e),shortName:this.getProviderShortName(n,s)}}resolveProviderIcon(e){let n=String(e?.LOGO??"").trim();return n?/^https?:\/\//i.test(n)?n:`${ye.BUCKET_URL}${n.replace(/^\/+/,"")}`:"assets/images/company.png"}getProviderShortName(e,n){let i=(e||"").toLowerCase();return{aws:"AWS",azure:"Azure",gcp:"GCP",oracle:"OCI"}[i]||n}isSetupTab(e){return e==="overview"||e==="connections"||e==="capabilities"||e==="permissions"}startLoading(){this.pendingRequests+=1,this.loading=!0,this.refreshView()}stopLoading(){this.pendingRequests=Math.max(0,this.pendingRequests-1),this.loading=this.pendingRequests>0,this.refreshView()}attachPaginator(e=!1){this.paginatorRef&&(this.dataSource.paginator=this.paginatorRef,e&&(this.paginatorRef.firstPage(),this.pageIndex=0))}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(Kt),y(re),y(V),y(G),y(Le),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-setup-configuration"]],viewQuery:function(n,i){if(n&1&&bt(gt,5),n&2){let s;ht(s=_t())&&(i.paginator=s.first)}},decls:43,vars:10,consts:[["emptyState",""],[1,"setup-config-page"],["class","overlay",4,"ngIf"],[1,"top-breadcrumb"],["icon","mdi:chevron-right","width","18","height","18"],[1,"active"],[1,"page-header"],[1,"page-title"],[1,"page-subtitle"],["type","button",1,"back-button",3,"click"],["icon","mdi:arrow-left"],[1,"provider-selection-card"],[1,"selection-header"],[1,"selection-title"],[1,"selection-subtitle"],[1,"multi-cloud-note"],["icon","akar-icons:info-fill","width","16","height","16"],[1,"provider-grid"],["class","provider-tile","type","button",3,"selected","inactive","disabled","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"help-card"],[1,"help-icon"],["icon","fa-solid:lightbulb","width","16","height","16"],[1,"help-title"],[1,"help-description"],[1,"setup-tabs"],["class","tab-btn","type","button",3,"active","click",4,"ngFor","ngForOf"],["class","overview-panel",4,"ngIf"],["class","connections-panel",4,"ngIf"],["class","capabilities-panel",4,"ngIf"],["class","permissions-panel",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["type","button",1,"provider-tile",3,"click","disabled"],["class","selected-indicator",4,"ngIf"],[1,"provider-logo-wrap"],["onerror","this.src='assets/images/company.png';",1,"provider-logo",3,"src","alt"],[1,"provider-short"],[1,"provider-long"],[1,"selected-indicator"],["icon","mdi:check","width","16","height","16"],["type","button",1,"tab-btn",3,"click"],["width","18","height","18",3,"icon"],[1,"overview-panel"],[1,"overview-stats"],[1,"overview-stat-card"],[1,"stat-text"],[1,"stat-label"],[1,"stat-value"],[1,"stat-icon","stat-icon-blue"],["icon","fa-solid:plug","width","18","height","18"],[1,"stat-icon","stat-icon-green"],["icon","fa7-solid:cogs","width","20","height","20"],[1,"stat-icon","stat-icon-red"],["icon","ic:baseline-warning","width","18","height","18"],[1,"stat-value","stat-healthy"],["
12icon","fa6-solid:heart","width","18","height","18"],[1,"overview-guide"],[1,"overview-guide-header"],[1,"overview-guide-title"],[1,"overview-guide-subtitle"],[1,"overview-step-list"],[1,"overview-step-item"],[1,"overview-step-left"],[1,"step-index"],[1,"step-content"],[1,"step-title"],[1,"step-description"],["type","button",1,"add-button",3,"click"],["icon","mdi:plus","width","20","height","20"],["icon","fa7-solid:shield-halved","width","20","height","20"],["icon","fa7-solid:chart-line","width","20","height","20"],[1,"connections-panel"],[1,"connections-header"],[1,"connections-title"],[1,"connections-subtitle"],["class","connections-content",4,"ngIf","ngIfElse"],[1,"connections-content"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","accountId"],["matColumnDef","masterAccount"],["matColumnDef","regions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"length","pageSize","pageIndex","hidePageSize"],["mat-header-cell",""],["mat-cell",""],["width","22","height","22",3,"icon"],["mat-header-row",""],["mat-row",""],[1,"empty-state"],[1,"empty-icon"],["icon","fa-solid:plug","width","32","height","32"],[1,"empty-title"],[1,"empty-description"],["type","button",1,"add-first-button",3,"click"],[1,"capabilities-panel"],[1,"capabilities-header"],[1,"capabilities-title"],[1,"capabilities-subtitle"],["class","capability-section",4,"ngFor","ngForOf"],[1,"capability-section"],[1,"capability-section-header"],[1,"capability-section-icon"],["icon","fa7-solid:shield-halved","width","18","height","18"],[1,"capability-section-title"],[1,"capability-section-description"],[1,"capability-card-grid"],["class","capability-card",4,"ngFor","ngForOf"],[1,"capability-card"],[1,"capability-card-top-icon"],["icon","fa7-solid:list","width","16","height","16"],[1,"capability-card-title"],[1,"capability-card-description"],[1,"capability-tags"],["class","capability-tag",4,"ngFor","ngForOf"],[1,"capability-info-box"],["icon","akar-icons:info-fill","width","14","height","14"],["type","button",1,"add-button","capability-btn",3,"click","disabled"],[1,"capability-tag"],["icon","hugeicons:tick-01","width","16","height","16"],[1,"permissions-panel"],[1,"permissions-section"],[1,"permissions-header"],[1,"permissions-title"],[1,"permissions-subtitle"],["type","button",1,"add-button"],["icon","mdi:check","width","18","height","18"],[1,"permission-columns"],["class","permission-column",4,"ngFor","ngForOf"],[1,"permissions-header","resources-header"],[1,"resource-grid"],["class","resource-card","target","_blank","rel","noopener noreferrer",3,"href",4,"ngFor","ngForOf"],[1,"permission-column"],[1,"permission-column-title"],[1,"permission-column-description"],["target","_blank","rel","noopener noreferrer",1,"permission-link",3,"href"],["icon","mdi:open-in-new","width","16","height","16"],["target","_blank","rel","noopener noreferrer",1,"resource-card",3,"href"],[1,"resource-icon-wrap",3,"ngClass"],[1,"resource-title"],[1,"resource-description"]],template:function(n,i){n&1&&(o(0,"div",1),g(1,cS,4,0,"div",2),o(2,"div",3)(3,"span"),l(4,"Setup and Config"),a(),h(5,"iconify-icon",4),o(6,"span",5),l(7,"Cloud"),a()(),o(8,"div",6)(9,"div")(10,"div",7),l(11),a(),o(12,"div",8),l(13),a()(),o(14,"button",9),v("click",function(){return i.navigateToConnectionsTab()}),h(15,"iconify-icon",10),l(16," Back to Connections "),a()(),o(17,"section",11)(18,"div",12)(19,"div")(20,"div",13),l(21,"Cloud Provider Selection"),a(),o(22,"div",14),l(23,"Choose your cloud platform to configure connection settings and capabilities"),a()(),o(24,"div",15),h(25,"iconify-icon",16),l(26," Multi-cloud support available "),a()(),o(27,"div",17),g(28,pS,8,10,"button",18),a(),o(29,"div",19)(30,"div",20),h(31,"iconify-icon",21),a(),o(32,"div")(33,"div",22),l(34,"Need help choosing?"),a(),o(35,"div",23),l(36," Each provider offers unique capabilities. You can connect multiple cloud accounts and switch between them anytime. "),a()()()(),o(37,"div",24),g(38,mS,3,4,"button",25),a(),g(39,uS,89,7,"section",26)(40,PS,13,4,"section",27)(41,TS,7,3,"section",28)(42,RS,22,3,"section",29),a()),n&2&&(c(),p("ngIf",i.loading),c(10),x("",i.currentProviderName," Connection Setup"),c(2),x(" Configure your ",i.currentProviderLongName," account connection for cost monitoring and resource management "),c(15),p("ngForOf",i.providers)("ngForTrackBy",i.trackByProvider),c(10),p("ngForOf",i.tabs),c(),p("ngIf",i.activeTab==="overview"),c(),p("ngIf",i.activeTab==="connections"),c(),p("ngIf",i.activeTab==="capabilities"),c(),p("ngIf",i.activeTab==="permissions"))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gt],styles:['.setup-config-page[_ngcontent-%COMP%]{color:#111827;padding:24px 28px 40px;position:relative}.top-breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#6b7280;font-size:14px;line-height:20px;margin-bottom:28px}.top-breadcrumb[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.page-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.page-title[_ngcontent-%COMP%]{font-size:24px;line-height:32px;font-weight:600;color:#0f172a;margin:0 0 10px}.page-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px;font-weight:400;max-width:1100px}.back-button[_ngcontent-%COMP%]{border:none;background:transparent;color:#4b5563;font-size:16px;line-height:24px;display:inline-flex;align-items:center;gap:10px;cursor:pointer;padding:0}.back-button[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px;font-weight:600}.provider-selection-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:32px;margin-bottom:30px}.selection-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.selection-title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:20px;line-height:28px;font-weight:600;color:#111827}.selection-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#475569}.multi-cloud-note[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.provider-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-bottom:22px}.provider-tile[_ngcontent-%COMP%]{position:relative;border:2px solid #E5E7EB;background:#fff;border-radius:12px;padding:26px;min-height:210px;cursor:pointer;transition:all .2s ease;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}.provider-tile[_ngcontent-%COMP%]:hover{border-color:#9fc9ef}.provider-tile[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.provider-tile.inactive[_ngcontent-%COMP%]{opacity:.66;border-color:#dbe2ea;background:#f8fafc;box-shadow:none}.provider-tile.inactive[_ngcontent-%COMP%]:hover{border-color:#dbe2ea}.provider-tile.inactive[_ngcontent-%COMP%]   .provider-logo-wrap[_ngcontent-%COMP%], .provider-tile.inactive[_ngcontent-%COMP%]   .provider-logo[_ngcontent-%COMP%]{filter:grayscale(30%)}.provider-tile.selected[_ngcontent-%COMP%]{border-color:#57b5e7;background:#f8fbff;box-shadow:0 4px 6px -1px #0000001a}.selected-indicator[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-12px;width:24px;height:24px;border-radius:50%;background:#57b5e7;display:inline-flex;align-items:center;justify-content:center;color:#fff}.provider-logo-wrap[_ngcontent-%COMP%]{width:64px;
12height:64px;border-radius:16px;background:#f5f7fb;display:inline-flex;align-items:center;justify-content:center;margin-bottom:18px}.provider-logo[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.provider-short[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:600;color:#111827;margin-bottom:8px}.provider-long[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.provider-tile.selected[_ngcontent-%COMP%]:after{content:"";position:absolute;left:30px;right:30px;bottom:16px;height:4px;border-radius:999px;background:#57b5e7}.help-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:8px;background:#f9fafb;padding:18px;display:flex;gap:14px}.help-icon[_ngcontent-%COMP%]{width:24px;height:24px;min-width:24px;border-radius:50%;background:#dbeafe;color:#2563eb;display:inline-flex;align-items:center;justify-content:center}.help-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500;color:#111827;margin-bottom:6px}.help-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.setup-tabs[_ngcontent-%COMP%]{border-bottom:1px solid #dbe2ea;display:flex;gap:8px;margin-bottom:24px}.overview-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.overview-stats[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.overview-stat-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:25px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 1px 2px #0000000d}.stat-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;margin-bottom:6px}.stat-value[_ngcontent-%COMP%]{font-size:24px;line-height:32px;font-weight:600;color:#111827}.stat-healthy[_ngcontent-%COMP%]{color:#16a34a}.stat-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}.stat-icon-blue[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.stat-icon-green[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.stat-icon-red[_ngcontent-%COMP%]{background:#fee2e2;color:#dc2626}.overview-guide[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;overflow:hidden}.overview-guide-header[_ngcontent-%COMP%]{padding:20px 24px;border-bottom:1px solid #E5E7EB}.overview-guide-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827;margin-bottom:6px}.overview-guide-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.overview-step-list[_ngcontent-%COMP%]{padding:6px 24px 14px}.overview-step-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0}.overview-step-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;min-width:0}.step-index[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:999px;background:#57b5e7;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:20px;font-weight:500;flex-shrink:0}.step-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.step-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;margin-top:2px}.tab-btn[_ngcontent-%COMP%]{border:none;border-bottom:2px solid transparent;background:transparent;color:#6b7280;font-size:15px;line-height:20px;font-weight:500;padding:14px 14px 18px;display:inline-flex;align-items:center;gap:10px;cursor:pointer}.tab-btn.active[_ngcontent-%COMP%]{color:#57b5e7;border-bottom-color:#57b5e7}.connections-panel[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;overflow:hidden}.capabilities-panel[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:25px;display:flex;flex-direction:column;gap:32px}.capabilities-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.capabilities-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827}.capabilities-subtitle[_ngcontent-%COMP%]{font-size:16px;line-height:24px;color:#4b5563}.capability-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.capability-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.capability-section-icon[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:999px;background:#f0e6ff;color:#9333ea;display:inline-flex;align-items:center;justify-content:center}.capability-section-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.capability-section-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.capability-card-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}.capability-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:12px;background:#fff;padding:25px;display:flex;flex-direction:column;gap:20px}.capability-card-top-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;background:#dbeafe;color:#2563eb;display:inline-flex;align-items:center;justify-content:center}.capability-card-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827}.capability-card-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.capability-tags[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.capability-tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;font-size:14px;line-height:20px;color:#4b5563}.capability-tag[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#9ca3af}.capability-info-box[_ngcontent-%COMP%]{border:1px solid #FED7AA;background:#fff7ed;border-radius:8px;padding:13px;font-size:13px;line-height:20px;color:#c2410c;display:flex;align-items:flex-start;gap:8px}.capability-info-box[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{margin-top:4px;color:#c2410c;flex-shrink:0}.capability-btn[_ngcontent-%COMP%]{width:100%;justify-content:center;margin-top:auto}.capability-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.permissions-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.permissions-section[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:12px;overflow:hidden}.permissions-header[_ngcontent-%COMP%]{padding:20px 24px;border-bottom:1px solid #E5E7EB;display:flex;align-items:center;justify-content:space-between;gap:16px}.resources-header[_ngcontent-%COMP%]{justify-content:flex-start}.permissions-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827;margin-bottom:4px}.permissions-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.permission-columns[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;padding:20px 24px 24px}.permission-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.permission-column-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#57b5e7}.permission-column-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;max-width:340px}.permission-link[_ngcontent-%COMP%]{color:#57b5e7;font-size:14px;line-height:20px;font-weight:500;text-decoration:none;display:inline-flex;align-items:center;gap:6px;width:fit-content}.permission-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.resource-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:20px 24px 24px}.resource-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:8px;background:#fff;padding:17px;
12display:flex;align-items:flex-start;gap:16px;text-decoration:none}.resource-card[_ngcontent-%COMP%]:hover{border-color:#d1d5db;box-shadow:0 1px 2px #0000000a}.resource-icon-wrap[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.resource-icon-blue[_ngcontent-%COMP%]{background:#dbeafe;color:#57b5e7}.resource-icon-green[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.resource-icon-purple[_ngcontent-%COMP%]{background:#f3e8ff;color:#9333ea}.resource-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:600;color:#111827;margin-bottom:4px}.resource-description[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.connections-header[_ngcontent-%COMP%]{padding:26px 28px;border-bottom:1px solid #E5E7EB;display:flex;align-items:center;justify-content:space-between;gap:16px}.connections-title[_ngcontent-%COMP%]{margin:0 0 8px;color:#111827;font-size:20px;line-height:28px;font-weight:600}.connections-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px}.add-button[_ngcontent-%COMP%], .add-first-button[_ngcontent-%COMP%]{border:none;border-radius:8px;background:#57b5e7;color:#fff;font-size:14px;line-height:20px;font-weight:500;padding:8px 16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.connections-content[_ngcontent-%COMP%]{padding:0 0 10px}.table-container[_ngcontent-%COMP%]{overflow-x:auto}.table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{width:100%}.table-container[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{color:#334155;font-size:14px;font-weight:600;background:#f8fafc;border-bottom:1px solid #dbe2ea}.table-container[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{color:#111827;font-size:13px;border-bottom:1px solid #eef2f7}.table-container[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px 20px;text-align:center}.master-yes[_ngcontent-%COMP%]{color:#10b981}.master-no[_ngcontent-%COMP%]{color:#ef4444}mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #eef2f7}.empty-state[_ngcontent-%COMP%]{min-height:320px;padding:40px 24px;text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column}.empty-icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;background:#f1f5f9;color:#94a3b8;display:inline-flex;align-items:center;justify-content:center;margin-bottom:18px}.empty-title[_ngcontent-%COMP%]{margin:0 0 12px;font-size:18px;line-height:28px;font-weight:600;color:#111827}.empty-description[_ngcontent-%COMP%]{margin:0 0 28px;max-width:450px;font-size:16px;line-height:24px;color:#4b5563}.overlay[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;position:fixed;background:#ada7a780;z-index:999}.overlay__inner[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;position:absolute}.overlay__content[_ngcontent-%COMP%]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}@media(max-width:1280px){.permissions-panel[_ngcontent-%COMP%]{gap:24px}.permissions-header[_ngcontent-%COMP%]{padding:18px 20px}.permissions-title[_ngcontent-%COMP%]{font-size:18px;line-height:26px}.permissions-subtitle[_ngcontent-%COMP%]{font-size:13px;line-height:19px}.permission-columns[_ngcontent-%COMP%], .resource-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr;padding:18px 20px 20px}.permission-columns[_ngcontent-%COMP%]{gap:24px}.resource-grid[_ngcontent-%COMP%]{gap:18px}.permission-column[_ngcontent-%COMP%]{gap:12px}.permission-column-title[_ngcontent-%COMP%]{font-size:17px;line-height:25px}.permission-column-description[_ngcontent-%COMP%]{font-size:13px;line-height:19px;max-width:none}.permission-link[_ngcontent-%COMP%]{font-size:13px;line-height:19px}.resource-card[_ngcontent-%COMP%]{padding:14px;gap:12px}.resource-icon-wrap[_ngcontent-%COMP%]{width:36px;height:36px}.resource-title[_ngcontent-%COMP%]{font-size:15px;line-height:22px}.resource-description[_ngcontent-%COMP%]{font-size:13px;line-height:19px}.capabilities-panel[_ngcontent-%COMP%]{padding:22px;gap:24px}.capability-section[_ngcontent-%COMP%]{gap:20px}.capability-card[_ngcontent-%COMP%]{padding:20px;gap:16px}.capability-card-title[_ngcontent-%COMP%]{font-size:17px;line-height:26px}.capability-card-description[_ngcontent-%COMP%], .capability-tag[_ngcontent-%COMP%]{font-size:13px;line-height:19px}.capability-info-box[_ngcontent-%COMP%]{padding:12px;font-size:12px;line-height:18px}.overview-stats[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.overview-stat-card[_ngcontent-%COMP%]{padding:20px}.stat-value[_ngcontent-%COMP%]{font-size:22px;line-height:30px}.overview-guide-title[_ngcontent-%COMP%]{font-size:18px;line-height:26px}.step-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px}.provider-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.capability-card-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}}@media(max-width:980px){.permissions-panel[_ngcontent-%COMP%]{gap:16px}.permissions-header[_ngcontent-%COMP%]{padding:14px;align-items:flex-start;flex-direction:column;gap:10px}.permissions-title[_ngcontent-%COMP%]{font-size:17px;line-height:24px}.permission-columns[_ngcontent-%COMP%], .resource-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;padding:12px 14px 14px;gap:10px}.permission-columns[_ngcontent-%COMP%]{gap:14px}.permission-column[_ngcontent-%COMP%]{gap:10px}.permission-column-title[_ngcontent-%COMP%]{font-size:15px;line-height:22px}.permission-column-description[_ngcontent-%COMP%]{min-height:auto;font-size:13px;line-height:18px}.permission-link[_ngcontent-%COMP%], .permissions-subtitle[_ngcontent-%COMP%], .resource-description[_ngcontent-%COMP%]{font-size:12px;line-height:18px}.resource-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.resource-card[_ngcontent-%COMP%]{padding:12px;gap:10px}.resource-icon-wrap[_ngcontent-%COMP%]{width:34px;height:34px}.setup-config-page[_ngcontent-%COMP%]{padding:18px 16px 28px}.page-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:12px}.page-title[_ngcontent-%COMP%]{font-size:22px;line-height:28px;margin-bottom:8px}.page-subtitle[_ngcontent-%COMP%], .back-button[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.provider-selection-card[_ngcontent-%COMP%]{padding:22px 16px}.selection-header[_ngcontent-%COMP%]{align-items:flex-start;gap:10px}.selection-title[_ngcontent-%COMP%]{font-size:18px;line-height:24px;margin-bottom:6px}.multi-cloud-note[_ngcontent-%COMP%]{font-size:11px;line-height:16px}.provider-tile[_ngcontent-%COMP%]{min-height:180px;padding:20px 16px}.provider-logo-wrap[_ngcontent-%COMP%]{width:56px;height:56px;margin-bottom:14px}.provider-logo[_ngcontent-%COMP%]{width:28px;height:28px}.provider-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:14px}.capabilities-panel[_ngcontent-%COMP%]{padding:16px;gap:18px}.capabilities-title[_ngcontent-%COMP%]{font-size:17px;line-height:24px}.capabilities-subtitle[_ngcontent-%COMP%]{font-size:12px;line-height:18px}.capability-section-header[_ngcontent-%COMP%]{align-items:flex-start;gap:8px}.capability-section[_ngcontent-%COMP%]{gap:14px}.capability-section-icon[_ngcontent-%COMP%]{width:26px;height:26px}.capability-section-title[_ngcontent-%COMP%]{font-size:15px;line-height:21px}.capability-section-description[_ngcontent-%COMP%]{font-size:12px;line-height:18px}.capability-card-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:10px}.capability-card[_ngcontent-%COMP%]{padding:12px;gap:12px}.capability-card-top-icon[_ngcontent-%COMP%]{width:28px;height:28px}.capability-card-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.capability-card-description[_ngcontent-%COMP%], .capability-tag[_ngcontent-%COMP%]{font-size:12px;line-height:17px}.capability-info-box[_ngcontent-%COMP%]{min-height:auto;font-size:12px;line-height:16px;padding:10px;gap:6px}.capability-btn[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.overview-stats[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:12px}.overview-panel[_ngcontent-%COMP%]{gap:16px}.overview-stat-card[_ngcontent-%COMP%]{padding:16px}.stat-label[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.stat-value[_ngcontent-%COMP%]{font-size:20px;line-height:28px}.stat-icon[_ngcontent-%COMP%]{width:42px;height:42px}.overview-guide-header[_ngcontent-%COMP%]{padding:14px}.overview-guide-title[_ngcontent-%COMP%]{font-size:17px;line-height:24px}.overview-guide-subtitle[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.overview-step-list[_ngcontent-%COMP%]{padding:2px 14px 10px}.overview-step-item[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:12px;padding:14px 0}.overview-step-left[_ngcontent-%COMP%]{align-items:flex-start;gap:12px}.step-index[_ngcontent-%COMP%]{width:36px;height:36px;font-size:13px;line-height:18px}.step-title[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.step-description[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.setup-tabs[_ngcontent-%COMP%]{overflow-x:auto;white-space:nowrap}.tab-btn[_ngcontent-%COMP%]{font-size:12px;line-height:16px;flex-shrink:0;padding:10px 10px 14px}.selection-subtitle[_ngcontent-%COMP%], .connections-subtitle[_ngcontent-%COMP%], .help-description[_ngcontent-%COMP%], .empty-description[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.provider-short[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.help-title[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.connections-title[_ngcontent-%COMP%]{font-size:18px;line-height:24px}.empty-title[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.connections-header[_ngcontent-%COMP%]{padding:20px 16px;align-items:flex-start}.table-container[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:12px 14px}.table-container[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:12px}.empty-state[_ngcontent-%COMP%]{min-height:260px;padding:28px 16px}.empty-icon[_ngcontent-%COMP%]{width:52px;height:52px;margin-bottom:12px}.add-button[_ngcontent-%COMP%], .add-first-button[_ngcontent-%COMP%]{font-size:13px;line-height:18px;padding:8px 12px}}']})}}return t})();var kS=["stepSectionTop"];function NS(t,r){t&1&&(o(0,"div",22)(1,"div",23)(2,"div",24),h(3,"span",25),a()()())}function FS(t,r){if(t&1){let e=A();o(0,"button",26),v("click",function(){let i=O(e).$implicit,s=u();return P(s.goToStep(i.step))}),h(1,"iconify-icon",27),l(2),a()}if(t&2){let e=r.$implicit,n=u();Y("active",n.currentStep===e.step),c(2),x(" ",e.label," ")}}function zS(t,r){t&1&&h(0,"mat-spinner",48)}function LS(t,r){t&1&&h(0,"iconify-icon",49)}function VS(t,r){t&1&&(o(0,"div",50),l(1," Handle must start with a letter and use lowercase letters, numbers, and underscores. "),a())}function BS(t,r){if(t&1&&(o(0,"div",51),l(1),a()),t&2){let e=u(2);Y("error",e.handleCheckError),c(),x(" ",e.handleCheckMessage," ")}}function US(t,r){if(t&1&&(o(0,"mat-option",52),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.NAME," ")}}function jS(t,r){t&1&&(o(0,"div",50),l(1," Account ID must be a valid 12-digit number. "),a())}function $S(t,r){if(t&1){let e=A();o(0,"button",53),v("click",function(){let i,s=O(e).$implicit,d=u(2);return P((i=d.accountForm.get("scopeType"))==null?null:i.setValue(s.ID))}),h(1,"span",54),o(2,"div",55)(3,"div",56),h(4,"iconify-icon",57),o(5,"span",58),l(6),a()(),o(7,"div",59),l(8),a()()()}if(t&2){let e,n=r.$implicit,i=u(2);Y("selected",((e=i.accountForm.get("scopeType"))==null?null:e.value)===n.ID),c(4),p("icon",n.ICON),c(2),C(n.TITLE),c(2),C(n.DESCRIPTION)}}function qS(t,r){if(t&1){let e=A();o(0,"div",28)(1,"div",29)(2,"div",30),l(3,"Account Information"),a()(),o(4,"div",31)(5,"label",32),l(6,"Connection Name "),o(7,"span",33),l(8,"*"),a()(),h(9,"input",34),o(10,"div",35),l(11,"A friendly name to identify this connection"),a()(),o(12,"div",31)(13,"label",32),l(14,"Handle "),o(15,"span",33),l(16,"*"),a()(),o(17,"div",36)(18,"input",37),v("input",function(){O(e);let i=u();return P(i.onHandleInput())}),a(),o(19,"button",38),v("click",function(){O(e);let i=u();return P(i.getHandleData())}),g(20,zS,1,0,"mat-spinner",39)(21,LS,1,0,"iconify-icon",40),a()(),o(22,"div",35),l(23,"A unique identifier for this connection"),a(),g(24,VS,2,0,"div",41)(25,BS,2,3,"div",42),a(),o(26,"div",31)(27,"label",32),l(28,"Regions "),a(),o(29,"mat-form-field",43)(30,"mat-select",44),g(31,US,2,2,"mat-option",45),a()(),o(32,"div",35),l(33,"Select multiple regions for better coverage and performance"),a()(),o(34,"div",31)(35,"label",32),l(36,"AWS Account ID "),o(37,"span",33),l(38,"*"),a()(),h(39,"input",46),o(40,"div",35),l(41,"Your 12-digit AWS account identifier"),a(),g(42,jS,2,0,"div",41),a(),o(43,"div",31)(44,"label",32),l(45,"Scope Type "),o(46,"span",33),l(47,"*"),a()(),g(48,$S,9,5,"button",47),a()()}if(t&2){let e,n,i,s=u();
12p("formGroup",s.accountForm),c(19),p("disabled",!((e=s.accountForm.get("handle"))!=null&&e.valid)||s.isCheckingHandle),c(),p("ngIf",s.isCheckingHandle),c(),p("ngIf",!s.isCheckingHandle),c(3),p("ngIf",((n=s.accountForm.get("handle"))==null?null:n.hasError("pattern"))&&((n=s.accountForm.get("handle"))==null?null:n.touched)),c(),p("ngIf",s.handleCheckMessage),c(6),p("ngForOf",s.regions),c(11),p("ngIf",((i=s.accountForm.get("awsAccountId"))==null?null:i.hasError("pattern"))&&((i=s.accountForm.get("awsAccountId"))==null?null:i.touched)),c(6),p("ngForOf",s.scopeTypes)}}function HS(t,r){t&1&&(o(0,"div",50),l(1," Please enter a valid IAM role ARN. "),a())}function WS(t,r){if(t&1){let e=A();o(0,"div",28)(1,"div",60)(2,"div",61),h(3,"iconify-icon",62),a(),o(4,"div")(5,"div",30),l(6,"Create Access Role"),a(),o(7,"div",63),l(8,"atlerpilot requires cross-account access to your AWS environment securely. "),a()()(),o(9,"div",64)(10,"div",65)(11,"label",32),l(12,"TRUSTED ROOT PRINCIPAL"),a(),o(13,"div",66),h(14,"input",67),o(15,"button",68),v("click",function(){O(e);let i=u();return P(i.copyToClipboard(i.trustedRootPrincipal))}),h(16,"iconify-icon",69),a()()(),o(17,"div",65)(18,"label",32),l(19,"EXTERNAL ID"),a(),o(20,"div",66),h(21,"input",67),o(22,"button",70),v("click",function(){O(e);let i=u();return P(i.refreshExternalId())}),h(23,"iconify-icon",71),a(),o(24,"button",72),v("click",function(){O(e);let i=u();return P(i.copyToClipboard(i.externalId))}),h(25,"iconify-icon",69),a()()()(),o(26,"div",31)(27,"label",32),l(28,"Role Name "),o(29,"span",33),l(30,"*"),a()(),h(31,"input",73),o(32,"div",35),l(33,"This is the name of the role that will be created in your AWS account."),a()(),o(34,"div",31)(35,"label",32),l(36,"Role ARN "),o(37,"span",33),l(38,"*"),a()(),h(39,"input",74),o(40,"div",35),l(41,"Paste the ARN of the role you created above."),a(),g(42,HS,2,0,"div",41),a(),o(43,"label",75),h(44,"input",76),o(45,"span"),l(46,"Add to atlerpilot automatically"),a()()()}if(t&2){let e,n=u();p("formGroup",n.authForm),c(14),p("value",n.trustedRootPrincipal),c(7),p("value",n.externalId),c(21),p("ngIf",((e=n.authForm.get("roleArn"))==null?null:e.hasError("pattern"))&&((e=n.authForm.get("roleArn"))==null?null:e.touched))}}function GS(t,r){if(t&1&&(o(0,"div",77)(1,"div",60)(2,"div",78),h(3,"iconify-icon",79),a(),o(4,"div")(5,"div",30),l(6,"Connection Ready"),a(),o(7,"div",63),l(8,"Review your configuration before saving"),a()()(),o(9,"div",80)(10,"div",81)(11,"div",82),l(12,"Account Details"),a(),o(13,"div",83)(14,"span"),l(15,"Connection Name:"),a(),o(16,"strong"),l(17),a()(),o(18,"div",83)(19,"span"),l(20,"Handle:"),a(),o(21,"strong"),l(22),a()(),o(23,"div",83)(24,"span"),l(25,"AWS Account ID:"),a(),o(26,"strong"),l(27),a()(),o(28,"div",83)(29,"span"),l(30,"Scope Type:"),a(),o(31,"strong"),l(32),a()(),o(33,"div",83)(34,"span"),l(35,"Regions:"),a(),o(36,"strong"),l(37),a()()(),o(38,"div",81)(39,"div",82),l(40,"Configuration"),a(),o(41,"div",83)(42,"span"),l(43,"Authentication:"),a(),o(44,"strong"),l(45,"IAM Role"),a()(),o(46,"div",83)(47,"span"),l(48,"Status:"),a(),o(49,"strong",84),h(50,"iconify-icon",85),l(51," Validated "),a()()()()()),t&2){let e,n,i,s=u();c(17),C(((e=s.accountForm.get("name"))==null?null:e.value)||"-"),c(5),C(((n=s.accountForm.get("handle"))==null?null:n.value)||"-"),c(5),C(((i=s.accountForm.get("awsAccountId"))==null?null:i.value)||"-"),c(5),C(s.selectedScopeLabel),c(5),C(s.selectedRegionName)}}function YS(t,r){t&1&&h(0,"iconify-icon",86)}var Hm=(()=>{class t{constructor(e,n,i,s,d,m){this.authService=e,this.router=n,this.route=i,this.notify=s,this.ngZone=d,this.cdr=m,this.roleName="AtlerPilot-Role",this.accountIdPattern="^[1-9]\\d{11}$",this.roleArnPattern="^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role\\/[A-Za-z0-9+=,.@_\\/-]+$",this.handlePattern="^[a-z](?:[a-z0-9]*(?:_[a-z0-9]+)*)?$",this.trustedRootPrincipal="arn:aws:iam::349934269881:root",this.loading=!1,this.pendingRequests=0,this.currentStep=1,this.regions=[],this.externalId="",this.isHandleAvailable=!1,this.isCheckingHandle=!1,this.handleCheckMessage="",this.handleCheckError=!1,this.providerName="AWS",this.providerLongName="Amazon Web Services",this.providerId=1,this.stepItems=[{step:1,label:"Account Details"},{step:2,label:"Authentication"},{step:3,label:"Validate"}],this.scopeTypes=[{ID:1,TITLE:"Single Account",DESCRIPTION:"Connect to a single AWS account",ICON:"mdi:account"},{ID:2,TITLE:"Organization",DESCRIPTION:"Connect to an entire AWS organization",ICON:"fa6-solid:building"}
12],this.accountForm=new Oo({name:new Vt("",[U.required]),handle:new Vt("",[U.required,U.pattern(this.handlePattern)]),region:new Vt([]),awsAccountId:new Vt("",[U.required,U.pattern(this.accountIdPattern)]),scopeType:new Vt(1,[U.required])}),this.authForm=new Oo({roleName:new Vt(this.roleName,[U.required]),roleArn:new Vt("",[U.required,U.pattern(this.roleArnPattern)]),autoAdd:new Vt(!1)})}ngOnInit(){this.initializeProviderContext(),this.externalId=this.generateExternalId(),this.getDataFromLocalStorage()}get isFirstStep(){return this.currentStep===1}get isLastStep(){return this.currentStep===3}get selectedRegionName(){let e=Array.isArray(this.accountForm.get("region")?.value)?this.accountForm.get("region")?.value:[];return e.length?this.regions.filter(n=>e.includes(Number(n.ID))).map(n=>n.NAME).join(", "):"-"}get selectedScopeLabel(){let e=Number(this.accountForm.get("scopeType")?.value||1);return this.scopeTypes.find(n=>n.ID===e)?.TITLE||"Single Account"}goToStep(e){e!==this.currentStep&&(e>this.currentStep&&(this.currentStep===1&&!this.validateStepOne()||this.currentStep===2&&!this.validateStepTwo())||(this.currentStep=e,this.scrollToStepTop()))}onPrevious(){this.currentStep!==1&&(this.currentStep=this.currentStep-1,this.scrollToStepTop())}onPrimaryAction(){if(this.currentStep===1){this.validateStepOne()&&(this.currentStep=2,this.scrollToStepTop());return}if(this.currentStep===2){this.validateStepTwo()&&(this.currentStep=3,this.scrollToStepTop());return}this.saveConnection()}onHandleInput(){this.isHandleAvailable=!1,this.handleCheckMessage="",this.handleCheckError=!1;let e=this.accountForm.get("handle"),n=String(e?.value||""),i=n.trim().toLowerCase();i!==n&&e?.setValue(i)}getHandleData(){let e=this.accountForm.get("handle"),n=String(e?.value||"").trim().toLowerCase();if(!n||e?.invalid){e?.markAsTouched();return}this.isCheckingHandle=!0,this.isHandleAvailable=!1,this.handleCheckMessage="",this.handleCheckError=!1,this.refreshView(),this.authService.getHandleData(n).subscribe({next:i=>{this.isCheckingHandle=!1,i?.status===200&&Object.keys(i?.object||{}).length===0?(this.handleCheckMessage="Handle is available",this.handleCheckError=!1,this.isHandleAvailable=!0,e?.setErrors(null)):(this.handleCheckMessage="Handle already exists",this.handleCheckError=!0,this.isHandleAvailable=!1,e?.setErrors({handleTaken:!0})),this.refreshView()},error:i=>{this.isCheckingHandle=!1,this.handleCheckError=!0,this.isHandleAvailable=!1,this.handleCheckMessage=i?.error?.message||"Failed to validate handle",this.refreshView()}})}refreshExternalId(){this.externalId=this.generateExternalId()}copyToClipboard(e){e&&navigator.clipboard.writeText(e).then(()=>{this.notify.showNotification("Copied to clipboard","top","success",200)}).catch(()=>{this.notify.showNotification("Failed to copy","top","error",500)})}navigateToCloud(){this.navigateToSetupConfig()}navigateToConnections(){this.navigateToSetupConfig("connections")}validateStepOne(){return this.accountForm.markAllAsTouched(),this.accountForm.invalid?!1:this.isHandleAvailable?!0:(this.handleCheckError=!0,this.handleCheckMessage=this.accountForm.get("handle")?.value?"Please validate handle availability":"Handle is required",!1)}validateStepTwo(){return this.authForm.markAllAsTouched(),this.authForm.valid}getDataFromLocalStorage(){let e=this.readLocalArray("AWS_REGION"),i=kn(this.readLocalArray("CLOUD_PROVIDER")).find(s=>String(s?.CODE||"").toLowerCase()==="aws");this.regions=e,i&&(this.providerName="AWS",this.providerLongName=i?.NAME||"Amazon Web Services",this.providerId=Number(i?.ID||this.providerId||1)),this.refreshView()}initializeProviderContext(){let e=Number(this.route.snapshot.queryParamMap.get("providerId")||0);if(e>0){this.providerId=e;return}try{let n=JSON.parse(window.localStorage.getItem("serviceProviderInfo")||"{}"),i=Number(n?.serviceId||0);i>0&&(this.providerId=i)}catch(n){this.providerId=1}}saveConnection(){if(!this.validateStepOne()||!this.validateStepTwo())return;let e=this.accountForm.value,n=this.authForm.value,i={CLOUD_PROVIDER:this.providerId,NAME:e.name,HANDLE:e.handle,REGIONS:[],ROLE_NAME:n.roleName,EXTERNAL_ID:this.externalId?.split(":")[1]||"",ACCOUNT_ID:e.awsAccountId,ROLE_ARN:n.roleArn,SCOPE:e.scopeType||1};this.startLoading(),this.authService.createClientConnection(i).subscribe({next:()=>{this.stopLoading(),this.notify.showNotification("Connection saved successfully","top","success",200),this.navigateToSetupConfig("connections")},error:s=>{this.stopLoading(),this.notify.showNotification(s?.error?.message||"Failed to save connection","top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status||500)}})}navigateToSetupConfig(e){this.router.navigate(["/admin-dashboard/cloud-config"],{queryParams:e?{tab:e}:{}})}generateExternalId(){let e="o_d1noeogj2eec713tldl0:",n=Math.random().toString(36).substring(2,10);return e+n}startLoading(){this.pendingRequests+=1,this.loading=!0,this.refreshView()}stopLoading(){this.pendingRequests=Math.max(0,this.pendingRequests-1),this.loading=this.pendingRequests>0,this.refreshView()}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}scrollToStepTop(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.stepSectionTop?.nativeElement?.scrollIntoView({behavior:"smooth",block:"start"})},0)})}readLocalArray(e){try{let n=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(n)?n:[]}catch(n){return[]}}static{this.\u0275fac=function(n){return new(n||t)(y(Kt),y(G),y(Le),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-connection-setup"]],viewQuery:function(n,i){if
12(n&1&&bt(kS,5),n&2){let s;ht(s=_t())&&(i.stepSectionTop=s.first)}},decls:37,vars:13,consts:[["stepSectionTop",""],[1,"connection-setup-page"],["class","overlay",4,"ngIf"],[1,"top-breadcrumb"],["icon","mdi:chevron-right","width","18","height","18"],["type","button",1,"breadcrumb-link",3,"click"],[1,"active"],[1,"page-header"],[1,"page-title"],[1,"page-subtitle"],["type","button",1,"back-button",3,"click"],["icon","mdi:arrow-left"],[1,"setup-steps-tabs"],["type","button","class","tab-item",3,"active","click",4,"ngFor","ngForOf"],["class","setup-step-card",3,"formGroup",4,"ngIf"],["class","setup-step-card validate-card",4,"ngIf"],[1,"wizard-footer"],["type","button",1,"footer-secondary",3,"click","disabled"],[1,"footer-right"],[1,"step-count"],["type","button",1,"footer-primary",3,"click","disabled"],["icon","fa7-solid:save","width","18","height","18",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["type","button",1,"tab-item",3,"click"],["icon","ri:brain-line","width","18","height","18"],[1,"setup-step-card",3,"formGroup"],[1,"detail-header"],[1,"section-title"],[1,"form-group"],[1,"field-label"],[1,"required"],["type","text","formControlName","name","placeholder","My Connection Name","autocomplete","off",1,"form-input"],[1,"field-note"],[1,"handle-container"],["type","text","formControlName","handle","placeholder","my_aws_connection","autocomplete","off",1,"form-input","handle-input",3,"input"],["type","button",1,"check-handle-btn",3,"click","disabled"],["diameter","20","strokeWidth","3",4,"ngIf"],["icon","flowbite:check-circle-outline","width","20","height","20",4,"ngIf"],["class","field-error",4,"ngIf"],["class","handle-message",3,"error",4,"ngIf"],["appearance","outline",1,"region-mat-field"],["formControlName","region","placeholder","Select Regions","multiple",""],[3,"value",4,"ngFor","ngForOf"],["type","text","formControlName","awsAccountId","placeholder","123456789012","autocomplete","off",1,"form-input"],["type","button","class","scope-option",3,"selected","click",4,"ngFor","ngForOf"],["diameter","20","strokeWidth","3"],["icon","flowbite:check-circle-outline","width","20","height","20"],[1,"field-error"],[1,"handle-message"],[3,"value"],["type","button",1,"scope-option",3,"click"],[1,"scope-radio"],[1,"scope-text-wrap"],[1,"scope-head"],["width","24","height","24",3,"icon"],[1,"scope-title"],[1,"scope-description"],[1,"auth-header"],[1,"auth-icon-wrap"],["icon","fa7-solid:shield-halved","width","20","height","20"],[1,"section-subtitle"],[1,"principal-card"],[1,"principal-block"],[1,"inline-field"],["type","text","readonly","",1,"form-input","readonly",3,"value"],["type","button","aria-label","Copy trusted root principal",1,"icon-btn",3,"click"],["icon","solar:copy-outline","width","22","height","22"],["type","button","aria-label","Refresh external id",1,"icon-btn",3,"click"],["icon","mdi:refresh","width","22","height","22"],["type","button","aria-label","Copy external id",1,"icon-btn",3,"click"],["type","text","formControlName","roleName","readonly","","placeholder","AtlerPilot-Role",1,"form-input","readonly"],["type","text","formControlName","roleArn","placeholder","e.g., arn:aws:iam::123456789012:role/AtlerPilot-Role","autocomplete","off",1,"form-input"],[1,"checkbox-row"],["type","checkbox","formControlName","autoAdd"],[1,"setup-step-card","validate-card"],[1,"auth-icon-wrap","success"],["icon","mdi:check","width","22","height","22"],[1,"validate-columns"],[1,"validate-column"],[1,"validate-title"],[1,"validate-row"],[1,"status-validated"],["icon","mdi:check-circle","width","18","height","18"],["icon","fa7-solid:save","width","18","height","18"]],template:function(n,i){n&1&&(o(0,"div",1),g(1,NS,4,0,"div",2),o(2,"div",3)(3,"span"),l(4,"Setup and Config"),a(),h(5,"iconify-icon",4),o(6,"button",5),v("click",function(){return i.navigateToCloud()}),l(7,"Cloud"),a(),h(8,"iconify-icon",4),o(9,"span",6),l(10),a()(),o(11,"div",7)(12,"div")(13,"div",8),l(14),a(),o(15,"div",9),l(16),a()(),o(17,"button",10),v("click",function(){return i.navigateToConnections()}),h(18,"iconify-icon",11),l(19," Back to Connections "),a()(),h(20,"div",null,0),o(22,"div",12),g(23,FS,3,3,"button",13),a(),g(24,qS,49,9,"div",14)(25,WS,47,4,"div",14)(26,GS,52,5,"div",15),o(27,"div",16)(28,"button",17),v("click",function(){return i.onPrevious()}),h(29,"iconify-icon",11),l(30," Previous "),a(),o(31,"div",18)(32,"div",19),l(33),a(),o(34,"button",20),v("click",function(){return i.onPrimaryAction()}),g(35,YS,1,0,"iconify-icon",21),l(36),a()()()()),n&2&&(c(),p("ngIf",i.loading),c(9),x("",i.providerName," Setup"),c(4),x("",i.providerName," Connection Setup"),c(2),x(" Configure your ",i.providerLongName," account connection for cost monitoring and resource management "),c(7),p("ngForOf",i.stepItems),c(),p("ngIf",i.currentStep===1),c(),p("ngIf",i.currentStep===2),c(),p("ngIf",i.currentStep===3),c(2),p("disabled",i.isFirstStep),c(5),x("Step ",i.currentStep," of 3"),c(),p("disabled",i.isFirstStep&&!i.validateStepOne()||i.currentStep===2&&i.authForm.invali
12d),c(),p("ngIf",i.isLastStep),c(),x(" ",i.isLastStep?"Save Connection":"Next"," "))},dependencies:[N,$,B,z,ei,fe,ue,Jt,ve,mr,me,$e,Ge,We],styles:['.connection-setup-page[_ngcontent-%COMP%]{color:#111827;padding:24px 28px 40px;position:relative}.top-breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#6b7280;font-size:14px;line-height:20px;margin-bottom:28px}.top-breadcrumb[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.breadcrumb-link[_ngcontent-%COMP%]{border:none;background:transparent;padding:0;color:#2563eb;font-size:14px;line-height:20px;cursor:pointer}.page-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.page-title[_ngcontent-%COMP%]{font-size:24px;line-height:32px;font-weight:600;color:#0f172a;margin:0 0 10px}.page-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px}.back-button[_ngcontent-%COMP%]{border:none;background:transparent;color:#4b5563;font-size:16px;line-height:24px;display:inline-flex;align-items:center;gap:10px;cursor:pointer;padding:0}.back-button[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px;font-weight:600}.setup-steps-tabs[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:8px;background:#fff;display:inline-flex;overflow:hidden;margin-bottom:28px;min-width:100%}.tab-item[_ngcontent-%COMP%]{border:none;border-bottom:3px solid transparent;background:transparent;color:#374151;display:inline-flex;align-items:center;justify-content:flex-start;gap:10px;font-size:14px;line-height:20px;font-weight:500;padding:16px 36px;cursor:pointer}.tab-item.active[_ngcontent-%COMP%]{color:#35a5db;border-bottom-color:#35a5db}.setup-step-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:32px;margin-bottom:30px}.detail-header[_ngcontent-%COMP%]{margin-bottom:20px}.section-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827;margin-bottom:4px}.section-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}.field-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.required[_ngcontent-%COMP%]{color:#ef4444}.form-input[_ngcontent-%COMP%]{height:46px;border-radius:12px;border:1px solid #D1D5DB;padding:0 18px;font-size:14px;line-height:20px;color:#000;outline:none;background:#fff}.form-input[_ngcontent-%COMP%]:focus{border-color:#57b5e7;box-shadow:0 0 0 2px #57b5e733}.form-input.readonly[_ngcontent-%COMP%]{background:#fff}.region-mat-field[_ngcontent-%COMP%]{width:100%}  .region-mat-field .mat-mdc-text-field-wrapper{height:46px;border-radius:12px}  .region-mat-field .mdc-notched-outline__leading,   .region-mat-field .mdc-notched-outline__notch,   .region-mat-field .mdc-notched-outline__trailing{border-color:#d1d5db!important}  .region-mat-field.mat-focused .mdc-notched-outline__leading,   .region-mat-field.mat-focused .mdc-notched-outline__notch,   .region-mat-field.mat-focused .mdc-notched-outline__trailing{border-color:#57b5e7!important}  .region-mat-field .mat-mdc-form-field-infix{min-height:46px;padding-top:0!important;padding-bottom:0!important}  .region-mat-field .mat-mdc-select-trigger{min-height:46px;display:flex;align-items:center}  .region-mat-field .mat-mdc-select-value-text{font-size:14px;line-height:20px;color:#000}  .region-mat-field .mat-mdc-select-placeholder{font-size:14px;line-height:20px;color:#9ca3af}  .region-mat-field .mat-mdc-form-field-subscript-wrapper{display:none}.field-note[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.field-error[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#dc2626}.handle-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}.handle-input[_ngcontent-%COMP%]{flex:1}.check-handle-btn[_ngcontent-%COMP%]{width:46px;min-width:46px;height:46px;border-radius:12px;border:1px solid #D1D5DB;background:#fff;color:#64748b;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.check-handle-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.check-handle-btn[_ngcontent-%COMP%]:enabled{background-color:#57b5e7;color:#fff}.check-handle-btn[_ngcontent-%COMP%]:enabled   mat-spinner[_ngcontent-%COMP%]{color:#fff}.handle-message[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#16a34a}.handle-message.error[_ngcontent-%COMP%]{color:#dc2626}.scope-option[_ngcontent-%COMP%]{width:100%;border:1px solid #E5E7EB;border-radius:12px;background:#fff;padding:16px 18px;margin-bottom:14px;display:flex;align-items:center;gap:14px;text-align:left;color:#111827;cursor:pointer}.scope-option[_ngcontent-%COMP%]:last-child{margin-bottom:0}.scope-option.selected[_ngcontent-%COMP%]{border-color:#93c5fd;background:#f8fbff}.scope-radio[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid #64748b;border-radius:50%;display:inline-block;position:relative}.scope-option.selected[_ngcontent-%COMP%]   .scope-radio[_ngcontent-%COMP%]{border-color:#2563eb}.scope-option.selected[_ngcontent-%COMP%]   .scope-radio[_ngcontent-%COMP%]:after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#2563eb;top:50%;left:50%;transform:translate(-50%,-50%)}.scope-text-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.scope-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.scope-head[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#4b5563}.scope-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500}
12.scope-description[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.auth-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:14px;margin-bottom:24px}.auth-icon-wrap[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;background:#dbeafe;color:#2563eb;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.auth-icon-wrap.success[_ngcontent-%COMP%]{width:48px;height:48px;background:#dcfce7;color:#16a34a}.principal-card[_ngcontent-%COMP%]{border:1px solid #BFDBFE;background:#eff6ff;border-radius:12px;padding:18px;margin-bottom:28px;display:flex;flex-direction:column;gap:20px}.principal-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.inline-field[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.inline-field[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]{flex:1}.icon-btn[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background:transparent;color:#2563eb;cursor:pointer;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}.icon-btn[_ngcontent-%COMP%]:hover{background:#2563eb14}.checkbox-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;color:#374151;font-size:14px;line-height:20px;cursor:pointer}.checkbox-row[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:22px;height:22px}.validate-columns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:48px;margin-top:8px}.validate-title[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:600;color:#111827;margin-bottom:24px}.validate-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:16px;margin-bottom:14px;font-size:14px;line-height:20px;color:#4b5563}.validate-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#111827;font-weight:500;text-align:right}.status-validated[_ngcontent-%COMP%]{color:#16a34a!important;display:inline-flex;align-items:center;gap:6px}.wizard-footer[_ngcontent-%COMP%]{border-top:1px solid #E5E7EB;padding-top:30px;display:flex;align-items:center;justify-content:space-between;gap:16px}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{border:none;border-radius:8px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.footer-secondary[_ngcontent-%COMP%]{background:transparent;border:1px solid #e5e7eb;color:#111827;padding:10px 18px}.footer-secondary[_ngcontent-%COMP%]:disabled{color:#9ca3af;border-color:#e5e7eb;cursor:not-allowed}.footer-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff;padding:10px 24px}.footer-primary[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.footer-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:24px}.step-count[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#6b7280}.overlay[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;position:fixed;background:#ada7a780;z-index:999}.overlay__inner[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;position:absolute}.overlay__content[_ngcontent-%COMP%]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}@media(max-width:1280px){.connection-setup-page[_ngcontent-%COMP%]{padding:22px 24px 34px}.top-breadcrumb[_ngcontent-%COMP%]{margin-bottom:24px;font-size:13px;line-height:18px}.breadcrumb-link[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.page-header[_ngcontent-%COMP%]{margin-bottom:20px;gap:14px}.page-title[_ngcontent-%COMP%]{font-size:22px;line-height:30px;margin-bottom:8px}.page-subtitle[_ngcontent-%COMP%], .back-button[_ngcontent-%COMP%]{font-size:15px;line-height:22px}.setup-steps-tabs[_ngcontent-%COMP%]{margin-bottom:24px}.tab-item[_ngcontent-%COMP%]{font-size:13px;line-height:19px;padding:14px 28px;gap:8px}.setup-step-card[_ngcontent-%COMP%]{padding:28px;margin-bottom:24px}.detail-header[_ngcontent-%COMP%]{margin-bottom:16px}.section-title[_ngcontent-%COMP%]{font-size:17px;line-height:24px;margin-bottom:4px}.section-subtitle[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.form-group[_ngcontent-%COMP%]{gap:7px;margin-bottom:18px}.field-label[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.form-input[_ngcontent-%COMP%]{height:44px;border-radius:11px;padding:0 16px;font-size:13px;line-height:18px}  .region-mat-field .mat-mdc-text-field-wrapper{height:44px;border-radius:11px}
12  .region-mat-field .mat-mdc-form-field-infix,   .region-mat-field .mat-mdc-select-trigger{min-height:44px}  .region-mat-field .mat-mdc-select-value-text,   .region-mat-field .mat-mdc-select-placeholder{font-size:13px;line-height:18px}.field-note[_ngcontent-%COMP%], .field-error[_ngcontent-%COMP%], .handle-message[_ngcontent-%COMP%]{font-size:11px;line-height:15px}.handle-container[_ngcontent-%COMP%]{gap:14px}.check-handle-btn[_ngcontent-%COMP%]{width:44px;min-width:44px;height:44px;border-radius:11px}.scope-option[_ngcontent-%COMP%]{padding:14px 16px;margin-bottom:12px;gap:12px}.scope-title[_ngcontent-%COMP%], .checkbox-row[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.scope-description[_ngcontent-%COMP%]{font-size:11px;line-height:15px}.auth-header[_ngcontent-%COMP%]{gap:12px;margin-bottom:20px}.auth-icon-wrap.success[_ngcontent-%COMP%]{width:44px;height:44px}.principal-card[_ngcontent-%COMP%]{padding:16px;margin-bottom:24px;gap:16px}.principal-block[_ngcontent-%COMP%]{gap:8px}.icon-btn[_ngcontent-%COMP%]{width:36px;height:36px}.validate-columns[_ngcontent-%COMP%]{gap:32px}.validate-title[_ngcontent-%COMP%]{font-size:17px;line-height:24px;margin-bottom:18px}.validate-row[_ngcontent-%COMP%]{margin-bottom:12px;font-size:13px;line-height:18px}.wizard-footer[_ngcontent-%COMP%]{padding-top:24px}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%], .step-count[_ngcontent-%COMP%]{font-size:13px;line-height:18px}}@media(max-width:980px){.connection-setup-page[_ngcontent-%COMP%]{padding:18px 16px 28px}.top-breadcrumb[_ngcontent-%COMP%]{margin-bottom:18px;font-size:12px;line-height:16px}.breadcrumb-link[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.page-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:14px}.page-title[_ngcontent-%COMP%]{font-size:20px;line-height:26px;margin-bottom:6px}.page-subtitle[_ngcontent-%COMP%], .back-button[_ngcontent-%COMP%]{font-size:12px;line-height:17px}.setup-steps-tabs[_ngcontent-%COMP%]{overflow-x:auto;white-space:nowrap;min-width:100%;display:flex;margin-bottom:16px}.tab-item[_ngcontent-%COMP%]{flex:none;font-size:12px;line-height:17px;padding:12px 14px}.setup-step-card[_ngcontent-%COMP%]{padding:18px 14px;margin-bottom:18px}.detail-header[_ngcontent-%COMP%]{margin-bottom:14px}.section-title[_ngcontent-%COMP%]{font-size:16px;line-height:22px;margin-bottom:4px}.section-subtitle[_ngcontent-%COMP%], .field-note[_ngcontent-%COMP%], .scope-description[_ngcontent-%COMP%], .validate-row[_ngcontent-%COMP%], .field-label[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.form-group[_ngcontent-%COMP%]{gap:6px;margin-bottom:14px}.form-input[_ngcontent-%COMP%]{height:42px;padding:0 12px;font-size:12px;line-height:16px;border-radius:10px}  .region-mat-field .mat-mdc-text-field-wrapper{height:42px;border-radius:10px}  .region-mat-field .mat-mdc-form-field-infix,   .region-mat-field .mat-mdc-select-trigger{min-height:42px}  .region-mat-field .mat-mdc-select-value-text,   .region-mat-field .mat-mdc-select-placeholder{font-size:12px;line-height:16px}.handle-container[_ngcontent-%COMP%]{gap:10px}.check-handle-btn[_ngcontent-%COMP%]{width:42px;min-width:42px;height:42px;border-radius:10px}.scope-option[_ngcontent-%COMP%]{min-height:72px;padding:10px 12px;gap:10px}.scope-option.selected[_ngcontent-%COMP%]   .scope-radio[_ngcontent-%COMP%]:after{width:8px;height:8px}.scope-title[_ngcontent-%COMP%], .checkbox-row[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.auth-header[_ngcontent-%COMP%]{gap:10px;margin-bottom:16px}.auth-icon-wrap[_ngcontent-%COMP%]{width:32px;height:32px}.auth-icon-wrap.success[_ngcontent-%COMP%]{width:40px;height:40px}.principal-card[_ngcontent-%COMP%]{padding:14px;margin-bottom:18px;gap:12px}.principal-block[_ngcontent-%COMP%]{gap:7px}.icon-btn[_ngcontent-%COMP%]{width:34px;height:34px}.validate-columns[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:12px}.validate-title[_ngcontent-%COMP%]{font-size:16px;line-height:22px;margin-bottom:10px}.wizard-footer[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:10px;padding-top:20px}.footer-right[_ngcontent-%COMP%]{justify-content:space-between;width:100%}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{font-size:12px;line-height:16px;padding:9px 12px}.step-count[_ngcontent-%COMP%]{font-size:12px;line-height:16px}}']}
12)}}return t})();function KS(t,r){if(t&1&&h(0,"div",21),t&2){let e=u().$implicit,n=u();Y("complete",n.currentStep>e.step)}}function QS(t,r){if(t&1&&(o(0,"div",17)(1,"div",18),l(2),a(),o(3,"div",19),l(4),a(),g(5,KS,1,2,"div",20),a()),t&2){let e=r.$implicit,n=r.index,i=u();Y("active",i.currentStep>=e.step),c(2),C(e.step),c(2),C(e.label),c(),p("ngIf",n<i.stepItems.length-1)}}function JS(t,r){if(t&1&&(o(0,"div",46),h(1,"iconify-icon",47),o(2,"span"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function ZS(t,r){if(t&1){let e=A();o(0,"label",44)(1,"input",45),se("ngModelChange",function(i){O(e);let s=u(2);return le(s.formData.confirmsDailyGranularity,i)||(s.formData.confirmsDailyGranularity=i),P(i)}),a(),o(2,"span"),l(3,"I confirm Time Granularity is set to Daily as the standard recommendation."),a()()}if(t&2){let e=u(2);c(),ae("ngModel",e.formData.confirmsDailyGranularity)}}function XS(t,r){if(t&1){let e=A();o(0,"label",44)(1,"input",45),se("ngModelChange",function(i){O(e);let s=u(2);return le(s.formData.confirmsAllColumns,i)||(s.formData.confirmsAllColumns=i),P(i)}),a(),o(2,"span"),l(3,"I confirm CUR 2.0 has all columns selected (130/130) with Billing View Name set to Primary."),a()()}if(t&2){let e=u(2);c(),ae("ngModel",e.formData.confirmsAllColumns)}}function eO(t,r){if(t&1){let e=A();o(0,"label",44)(1,"input",45),se("ngModelChange",function(i){O(e);let s=u(2);return le(s.formData.confirmsNoFilters,i)||(s.formData.confirmsNoFilters=i),P(i)}),a(),o(2,"span"),l(3,"I confirm no filters are applied and export format is Parquet/Parquet."),a()()}if(t&2){let e=u(2);c(),ae("ngModel",e.formData.confirmsNoFilters)}}function tO(t,r){if(t&1){let e=A();o(0,"label",44)(1,"input",45),se("ngModelChange",function(i){O(e);let s=u(2);return le(s.formData.confirmsCostHubAllFilters,i)||(s.formData.confirmsCostHubAllFilters=i),P(i)}),a(),o(2,"span"),l(3,"I confirm Cost Optimization Recommendation Filters are set to All and all data table configurations are enabled."),a()()}if(t&2){let e=u(2);c(),ae("ngModel",e.formData.confirmsCostHubAllFilters)}}function nO(t,r){if(t&1){let e=A();o(0,"label",44)(1,"input",45),se("ngModelChange",function(i){O(e);let s=u(2);return le(s.formData.confirmsCostHubAllColumns,i)||(s.formData.confirmsCostHubAllColumns=i),P(i)}),a(),o(2,"span"),l(3,"I confirm all columns are selected (26/26) and export format is Parquet/Parquet."),a()()}if(t&2){let e=u(2);c(),ae("ngModel",e.formData.confirmsCostHubAllColumns)}}function iO(t,r){if(t&1){let e=A();o(0,"section",22)(1,"div",23)(2,"div",24),h(3,"iconify-icon",25),l(4),a(),o(5,"div",26),l(6),a()(),o(7,"div",27)(8,"div",28),l(9,"Required configuration in AWS"),a(),o(10,"div",29),g(11,JS,4,1,"div",30),a()(),o(12,"div",31)(13,"div",24),h(14,"iconify-icon",32),l(15),a(),o(16,"div",33)(17,"button",34),v("click",function(){O(e);let i=u();return P(i.setupMethod="cloudformation")}),o(18,"div",35),l(19),a(),o(20,"div",36),l(21,"Recommended for guided setup and consistent permissions."),a()(),o(22,"button",34),v("click",function(){O(e);let i=u();return P(i.setupMethod="manual")}),o(23,"div",35),l(24,"Manual Setup"),a(),o(25,"div",36),l(26,"Download template/JSON and run manually in your account."),a()()(),o(27,"div",37)(28,"button",38),v("click",function(){O(e);let i=u();return P(i.launchCloudFormation())}),h(29,"iconify-icon",39),l(30),a(),o(31,"button",38),v("click",function(){O(e);let i=u();return P(i.downloadTemplatePackage())}),h(32,"iconify-icon",40),l(33," Download template package "),a(),o(34,"button",38),v("click",function(){O(e);let i=u();return P(i.openSetupGuide())}),h(35,"iconify-icon",41),l(36," View setup guide "),a()()(),o(37,"div",42),g(38,ZS,4,1,"label",43)(39,XS,4,1,"label",43)(40,eO,4,1,"label",43)(41,tO,4,1,"label",43)(42,nO,4,1,"label",43),o(43,"label",44)(44,"input",45),se("ngModelChange",function(i){O(e);let s=u();return le(s.formData.confirmsDailyRefreshExpectation,i)||(s.formData.confirmsDailyRefreshExpectation=i),P(i)}),a(),o(45,"span"),l(46,"I understand refresh is Daily and initial validation can be limited until complete source history is available."),a()()()()}if(t&2){let e=u();c(4),x(" ",e.primaryGuideTitle," "),c(2),C(e.primaryGuideDescription),c(5),p("ngForOf",e.primaryGuideItems),c(4),x(" ",e.setupActionTitle," "),c(2),Y("selected",e.setupMethod==="cloudformation"),c(2),C(e.nativeStackOptionTitle),c(3),Y("selected",e.setupMethod==="manual"),c(8),x(" ",e.openNativeStackLabel," "),c(8),p("ngIf",e.isAwsCurConfiguration),c(),p("ngIf",e.isAwsCurConfiguration),c(),p("ngIf",e.isAwsCurConfiguration),c(),p("ngIf",e.isAwsCostOptimizationConfiguration),c(),p("ngIf",e.isAwsCostOptimizationConfiguration),c(2),ae("ngModel",e.formData.confirmsDailyRefreshExpectation)}}function oO(t,r){if(t&1&&(o(0,"mat-option",58),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.NAME," ")}}function rO(t,r){if(t&1){let e=A();o(0,"section",22)(1,"div",48)(2,"div",28),l(3,"Before validation"),a(),o(4,"div",26),l(5),a()(),o(6,"div",49)(7,"label",50),l(8),o(9,"span",51),l(10,"*"),a()(),o(11,"input",52),se("ngModelChange",function(i){O(e);let s=u();return le(s.formData.s3BucketName,i)||(s.formData.s3BucketName=i),P(i)}),a(),o(12,"div",53),l(13,"The delivery destination where AWS export files are written."),a()(),o(14,"div",49)(15,"label",50),l(16,"Report Prefix (Optional)"),a(),o(17,"input",54),se("ngModelChange",function(i){O(e);let s=u();return le(s.formData.prefix,i)||(s.formData.prefix=i),P(i)}),a()(),o(18,"div",49)(19,"label",50),l(20),o(21,"span",51),l(22,"*"),a()(),o(23,"mat-form-field",55)(24,"mat-select",56),se("ngModelChange",function(i){O(e);let s=u();return le(s.formData.region,i)||(s.formData.region=i),P(i)}),g(25,oO,2,2,"mat-option",57),a()()()()}if(t&2){let e=u();c(5),C(e.firstDeliveryExpectation),c(3),x("",e.primaryStorageName," Name "),c(3),ae("ngModel",e.formData.s3BucketName),p("placeholder",e.storageInputPlaceholder),c(6),ae("ngModel",e.formData.prefix),c(3),x("",e.regionLabel," "),c(4),ae("ngModel",e.formData.region),c(),p("ngForOf",e.regions)}}function aO(t,r){t&1&&(o(0,"div",61)(1,"div",62),h(2,"iconify-icon",63),a(),o(3,"div",64),l(4,"Validating Access"),a(),o(5,"div",65),l(6,"Checking export delivery permissions and scanning data paths..."),a()())}function lO(t,r){if(t&1&&(o(0,"div",61)(1,"div",66),h(2,"iconify-icon",67),a(),o(3,"div",64),l(4,"Capability Enabled!"),a(),o(5,"div",65),l(6,"Successfully verified access to the export destination."),a(),o(7,"div",68)(8,"div",69)(9,"span"),l(10,"Capability"),a(),o(11,"strong"),l(12),a()(),o(13,"div",69)(14,"span"),l(15,"Status"),a(),o(16,"strong",70),l(17,"Syncing Data"),a()()()()),t&2){let e=u(2);c(12),C(e.isAwsCurConfiguration?"Cost Data Configuration":"Cost Optimization")}}function sO(t,r){if(t&1&&(o(0,"section",59),g(1,aO,7,0,"div",60)(2,lO,18,1,"div",60),a()),t&2){let e=u();c(),p("ngIf",e.isValidating),c(),p("ngIf",!e.isValidating&&e.validationSuccess)}}var Wm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.notify=n,this.ngZone=i,this.cdr=s,this.document=d,this.loading=!1,this.currentStep=1,this.setupMethod="cloudformation",this.isValidating=!1,this.validationSuccess=!1,this.providerName="AWS",this.providerLongName="Amazon Web Services",this.capabilityId="cost-data",this.regions=[],this.formData={s3BucketName:"",prefix:"",region:"",confirmsDailyGranularity:!1,confirmsAllColumns:!1,confirmsNoFilters:!1,confirmsCostHubAllFilters:!1,confirmsCostHubAllColumns:!1,confirmsDailyRefreshExpectation:!1},this.stepItems=[{step:1,label:"Prerequisites"},{step:2,label:"Integration"},{step:3,label:"Sync & Verify"}]}ngOnInit(){this.initializeContext(),this.loadRegionsFromLocalStorage(),this.scrollToTop()}ngAfterViewInit(){this.scrollToTop()}get isAwsCurConfiguration(){return this.capabilityId==="cost-data"}get isAwsCostOptimizationConfiguration(){return this.capabilityId==="cost-optimization"}get title(){return this.isAwsCurConfiguration?"Configure Cost Data Configuration":"Configure Cost Optimization"}get subtitle(){return"Enable and configure data integration."}get breadcrumbLast(){return this.isAwsCurConfiguration?"Cost Configuration":"Cost Optimization"}get primaryGuideTitle(){return this.isAwsCurConfiguration?"AWS CUR 2.0 configuration requirements":"Cost Optimization Hub export requirements"}get primaryGuideDescription(){return`Configure native AWS exports first, then connect the target ${this.primaryStorageName} path here for validation and onboarding.`}get primaryGuideItems(){return this.isAwsCurConfiguration?["Data Export Type / Version: AWS CUR 2.0","Export Details: Standard Data 
12Export","Table Name: CUR 2.0","Additional Export Content: Include Resource IDs and Split Cost Allocation Data","Time Granularity: Daily (recommended standard)","Billing View Name: Primary","Column Selection: All columns selected (130/130)","No filters should be applied","Data Export Overwriting: Create new data export file version","Compression Type / File Type: Parquet / Parquet"]:["Table Name: Cost Optimization Recommendations","Recommendation Filters: All","Column Selection: All columns selected (26/26)","Data Table Configurations: All enabled","Data Export Overwriting: Create new data export file version","Compression Type / File Type: Parquet / Parquet"]}get setupActionTitle(){return this.isAwsCurConfiguration?"Choose setup method for AWS CUR 2.0":"Choose setup method for Cost Optimization Hub export"}get firstDeliveryExpectation(){return`Wait up to 24 hours after configuration to confirm first data delivery into ${this.primaryStorageName}.`}get primaryStorageName(){return"S3 Bucket"}get regionLabel(){return"AWS Region"}get storageInputPlaceholder(){return this.isAwsCurConfiguration?"e.g., my-cost-data-bucket":"e.g., my-optimization-export-bucket"}get openNativeStackLabel(){return"Open CloudFormation"}get nativeStackOptionTitle(){return"Launch CloudFormation Stack"}get isStepOne(){return this.currentStep===1}get isStepThree(){return this.currentStep===3}get primaryButtonLabel(){return this.currentStep===1?"Next: Integration Details":this.currentStep===2?"Validate & Sync":"Finish"}isStep1Valid(){return this.isAwsCurConfiguration?this.formData.confirmsDailyGranularity&&this.formData.confirmsAllColumns&&this.formData.confirmsNoFilters&&this.formData.confirmsDailyRefreshExpectation:this.formData.confirmsCostHubAllFilters&&this.formData.confirmsCostHubAllColumns&&this.formData.confirmsDailyRefreshExpectation}isStep2Valid(){return!!String(this.formData.s3BucketName||"").trim()&&!!String(this.formData.region||"").trim()}onPrimaryAction(){if(this.currentStep===1){this.isStep1Valid()&&(this.currentStep=2,this.scrollToTop());return}if(this.currentStep===2){this.isStep2Valid()&&(this.currentStep=3,this.scrollToTop(),this.simulateValidation());return}this.finishSetup()}onPrevious(){this.currentStep!==1&&(this.currentStep=this.currentStep-1,this.isValidating=!1,this.validationSuccess=!1,this.scrollToTop())}navigateToCloud(){this.router.navigate(["/admin-dashboard/cloud-config"],{queryParams:{tab:"capabilities"}})}launchCloudFormation(){window.open("https://console.aws.amazon.com/cloudformation/home#/stacks/create","_blank","noopener,noreferrer")}downloadTemplatePackage(){let e=this.isAwsCurConfiguration?this.getCurTemplate():this.getCostOptimizationTemplate(),n=this.isAwsCurConfiguration?"atlerpilot-cur-template.json":"atlerpilot-cost-optimization-template.json",i=new Blob([JSON.stringify(e,null,2)],{type:"application/json;charset=utf-8"}),s=document.createElement("a");s.href=URL.createObjectURL(i),s.download=n,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(s.href)}openSetupGuide(){let e=this.isAwsCostOptimizationConfiguration?"https://docs.aws.amazon.com/cost-management/latest/userguide/coh-what-is.html":"https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html";window.open(e,"_blank","noopener,noreferrer")}simulateValidation(){this.isValidating=!0,this.validationSuccess=!1,this.refreshView(),setTimeout(()=>{this.ngZone.run(()=>{this.isValidating=!1,this.validationSuccess=!0,this.refreshView()})},2e3)}finishSetup(){this.validationSuccess&&(this.notify.showNotification("Configuration saved successfully","top","success",200),this.router.navigate(["/admin-dashboard/cloud-config"],{queryParams:{tab:"capabilities"}}))}initializeContext(){let e=this.router.getCurrentNavigation()?.extras?.state,n=window.history.state,i=e?.costCapabilityContext||n?.costCapabilityContext||null;i||(i=this.readContextFromLocalStorage()),(i?.capabilityId==="cost-data"||i?.capabilityId==="cost-optimization")&&(this.capabilityId=i.capabilityId),i?.providerName&&(this.providerName=i.providerName),i?.providerLongName&&(this.providerLongName=i.providerLongName)}loadRegionsFromLocalStorage(){let e=this.readLocalArray("AWS_REGION");this.regions=e}readContextFromLocalStorage(){try{let e=JSON.parse(window.localStorage.getItem("costCapabilitySetupContext")||"{}");return e&&typeof e=="object"?e:null}catch(e){return null}}readLocalArray(e){try{let n=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(n)?n:[]}catch(n){return[]}}scrollToTop(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{let e=this.document.querySelector(".right-container");e&&typeof e.scrollTo=="function"&&e.scrollTo({top:0,behavior:"smooth"}),window.scrollTo({top:0,behavior:"smooth"}),this.document.documentElement.scrollTop=0,this.document.body.scrollTop=0},0)})}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}getCurTemplate(){return{AWSTemplateFormatVersion:"2010-09-09",Description:"atlerpilot starter template for AWS CUR 2.0 export prerequisites",Resources:{CurExportBucket:{Type:"AWS::S3::Bucket",Properties:{BucketEncryption:{ServerSideEncryptionConfiguration:[{ServerSideEncryptionByDefault:{SSEAlgorithm:"AES256"}}]},VersioningConfiguration:{Status:"Enabled"}}}}}}getCostOptimizationTemplate(){return{AWSTemplateFormatVersion:"2010-09-09",Description:"atlerpilot starter template for Cost Optimization Hub export prerequisites",Resources:{CostOptimizationExportBucket:{Type:"AWS::S3::Bucket",Properties:{BucketEncryption:{ServerSideEncryptionConfiguration:[{ServerSideEncryptionByDefault:{SSEAlgorithm:"AES256"}}]},VersioningConfiguration:{Status:"Enabled"}}}}}}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(V),y(be),y(Z),y(Yl))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cost-configure-and-optimize"]],decls:28,vars:11,consts:[[1,"cost-setup-page"],[1,"top-breadcrumb"],["icon","mdi:chevron-right","width","18","height","18"],["type","button",1,"breadcrumb-link",3,"click"],[1,"active"],[1,"page-header"],[1,"page-title"],[1,"page-subtitle"],[1,"stepper-row"],["class","stepper-item",3,"active",4,"ngFor","ngForOf"],["class","content-card",4,"ngIf"],["class","content-card validate-card",4,"ngIf"],[1,"wizard-footer"],["type","button",1,"footer-secondary",3,"click","disabled"],[1,"footer-right"],[1,"step-count"],["type","button",1,"footer-primary",3,"click","disabled"],[1,"stepper-item"],[1,"step-number"],[1,"step-label"],["class","step-line",3,"complete",4,"ngIf"],[1,"step-line"],[1,"content-card"],[1,"block","info-block"],[1,"block-title","with-icon"],["icon","akar-icons:info-fill","width","14","height","14"],[1,"block-desc"],[1,"block","list-block"],[1,"block-title"],[1,"config-list"],["class","config-item",4,"ngFor","ngForOf"],[1,"block","action-block"],["icon","mdi:lock-outline","width","14","height","14"],[1,"method-grid"],["type","button",1,"method-btn",3,"click"],[1,"method-title"],[1,"method-desc"],[1,"link-row"],["type","button",1,"inline-link",3,"click"],["icon","ri:external-link-line","width","14","height","14"],["icon","ri:download-2-line","width","14","height","14"],["icon","ri:file-text-line","width","14","height","14"],[1,"block","checklist-block"],["class","check-row",4,"ngIf"],[1,"check-row"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"config-item"],["icon","hugeicons:tick-01"],[1,"block","warning-block"],[1,"form-group"],[1,"field-label"],[1,"required"],["type","text",1,"form-input",3,"ngModelChange","ngModel","placeholder"],[1,"field-note"],["type","text","placeholder","e.g., cur-reports/",1,"form-input",3,"ngModelChange","ngModel"],["appearance","outline",1,"region-mat-field"],["placeholder","Select Region","multiple","",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"content-card","validate-card"],["class","validate-center",4,"ngIf"],[1,"validate-center"],[1,"validate-icon","loading"],["icon","ri:loader-4-line","width","34","height","34"],[1,"validate-title"],[1,"validate-note"],[1,"validate-icon","success"],["icon","ri:checkbox-circle-fill","width","34","height","34"],[1,"summary-card"],[1,"summary-row"],[1,"syncing"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"span"),l(3,"Setup and Config"),a(),h(4,"iconify-icon",2),o(5,"button",3),v("click",function(){return i.navigateToCloud()}),l(6,"Cloud"),a(),h(7,"iconify-icon",2),o(8,"span",4),l(9),a()(),o(10,"div",5)(11,"div",6),l(12),a(),o(13,"div",7),l(14),a()(),o(15,"div",8),g(16,QS,6,5,"div",9),a(),g(17,iO,47,16,"section",10)(18,rO,26,8,"section",10)(19,sO,3,2,"section",11),o(20,"div",12)(21,"button",13),v("click",function(){return i.onPrevious()}),l(22," Back "),a(),o(23,"div",14)(24,"div",15),l(25),a(),o(26,"button",16),v("click",function(){return i.onPrimaryAction()}),l(27),a()()()()),n&2&&(c(9),C(i.breadcrumbLast),c(3),C(i.title),c(2),C(i.subtitle),c(2),p("ngForOf",i.stepItems),c(),p("ngIf",i.currentStep===1),c(),p("ngIf",i.currentStep===2),c(),p("ngIf",i.currentStep===3),c(2),p("disabled",i.isStepOne),c(4),x("Step ",i.currentStep," of 3"),c(),p("disabled",i.currentStep===1&&!i.isStep1Valid()||i.currentStep===2&&!i.isStep2Valid()||i.currentStep===3&&!i.validationSuccess),c(),x(" ",i.primaryButtonLabel," "))},dependencies:[N,$,B,un,ve,mr,me,mt,z,ei,fe,ue],styles:[".cost-setup-page[_ngcontent-%COMP%]{color:#111827;padding:24px 28px 40px}.top-breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#6b7280;font-size:14px;line-height:20px;margin-bottom:28px}.top-breadcrumb[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.breadcrumb-link[_ngcontent-%COMP%]{border:none;background:transparent;color:#2563eb;padding:0;font-size:14px;line-height:20px;cursor:pointer}.page-header[_ngcontent-%COMP%]{margin-bottom:28px}.page-title[_ngcontent-%COMP%]{font-size:24px;line-height:32px;font-weight:600;color:#0f172a;margin-bottom:10px}.page-subtitle[_ngcontent-%COMP%]{font-size:16px;line-height:24px;color:#4b5563}.stepper-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;margin-bottom:26px;overflow-x:auto;padding-bottom:4px}.stepper-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:12px;min-width:max-content}.stepper-item[_ngcontent-%COMP%]   .step-number[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:#e5e7eb;color:#4b5563;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:20px;font-weight:500;flex-shrink:0}.stepper-item[_ngcontent-%COMP%]   .step-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500;color:#6b7280;white-space:nowrap}.stepper-item[_ngcontent-%COMP%]   .step-line[_ngcontent-%COMP%]{width:90px;height:2px;background:#e5e7eb;border-radius:99px;margin-left:2px}.stepper-item[_ngcontent-%COMP%]   .step-line.complete[_ngcontent-%COMP%]{background:#57b5e7}.stepper-item.active[_ngcontent-%COMP%]   .step-number[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.stepper-item.active[_ngcontent-%COMP%]   .step-label[_ngcontent-%COMP%]{color:#111827}.content-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:25px;display:flex;flex-direction:column;gap:18px}.block[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:12px;padding:16px}.block-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:600;color:#111827;margin-bottom:6px}.block-desc[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.with-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;color:#57b5e7}.info-block[_ngcontent-%COMP%]{background:#f8fbff;border-color:#bfdbfe}.list-block[_ngcontent-%COMP%]{background:#fff}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding-top:10px}.config-item[_ngcontent-%COMP%]{font-size:13px;line-height:18px;color:#374151;display:inline-flex;align-items:flex-start;gap:8px}
12.config-item[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#10b981;font-size:16px;margin-top:2px;flex-shrink:0}.action-block[_ngcontent-%COMP%]{background:#f8fbff;border-color:#c7d2fe}.method-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:6px}.method-btn[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:8px;background:#fff;padding:10px;text-align:left;cursor:pointer}.method-btn.selected[_ngcontent-%COMP%]{border-color:#57b5e7}.method-btn.selected[_ngcontent-%COMP%]   .method-title[_ngcontent-%COMP%]{color:#57b5e7}.method-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:600;color:#374151;margin-bottom:4px}.method-desc[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#4b5563}.link-row[_ngcontent-%COMP%]{margin-top:15px;display:flex;flex-wrap:wrap;gap:24px}.inline-link[_ngcontent-%COMP%]{border:none;background:transparent;padding:0;font-size:13px;font-weight:500;line-height:18px;color:#57b5e7;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.inline-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.checklist-block[_ngcontent-%COMP%]{background:#f8fafc}.check-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:10px;font-size:14px;line-height:20px;color:#374151;margin-bottom:10px}.check-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}.check-row[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{margin-top:1px;flex-shrink:0}.warning-block[_ngcontent-%COMP%]{background:#fff7ed;border-color:#fed7aa}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}.field-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.required[_ngcontent-%COMP%]{color:#ef4444}.form-input[_ngcontent-%COMP%]{height:46px;border:1px solid #d1d5db;border-radius:12px;padding:0 18px;font-size:14px;line-height:20px;color:#111827;background:#fff;outline:none}.form-input[_ngcontent-%COMP%]:focus{border-color:#57b5e7;box-shadow:0 0 0 2px #57b5e733}.region-mat-field[_ngcontent-%COMP%]{width:100%}  .region-mat-field .mat-mdc-text-field-wrapper{height:46px;border-radius:12px}  .region-mat-field .mdc-notched-outline__leading,   .region-mat-field .mdc-notched-outline__notch,   .region-mat-field .mdc-notched-outline__trailing{border-color:#d1d5db!important}  .region-mat-field.mat-focused .mdc-notched-outline__leading,   .region-mat-field.mat-focused .mdc-notched-outline__notch,   .region-mat-field.mat-focused .mdc-notched-outline__trailing{border-color:#57b5e7!important}  .region-mat-field .mat-mdc-form-field-infix{min-height:46px;padding-top:0!important;padding-bottom:0!important}  .region-mat-field .mat-mdc-select-trigger{min-height:46px;display:flex;align-items:center}  .region-mat-field .mat-mdc-select-value-text{font-size:14px;line-height:20px;color:#000}  .region-mat-field .mat-mdc-select-placeholder{font-size:14px;line-height:20px;color:#9ca3af}  .region-mat-field .mat-mdc-form-field-subscript-wrapper{display:none}.field-note[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.validate-card[_ngcontent-%COMP%]{min-height:300px;justify-content:center}.validate-center[_ngcontent-%COMP%]{text-align:center}.validate-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;margin-bottom:16px}.validate-icon.loading[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.validate-icon.loading[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1.1s linear infinite}.validate-icon.success[_ngcontent-%COMP%]{background:#dcfce7;color:#16a34a}.validate-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827;margin-bottom:6px}.validate-note[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563}.summary-card[_ngcontent-%COMP%]{margin:18px auto 0;width:100%;max-width:340px;border:1px solid #e5e7eb;border-radius:10px;background:#f8fafc;padding:14px}.summary-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:18px;color:#64748b;margin-bottom:8px}.summary-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}.summary-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#111827}.summary-row[_ngcontent-%COMP%]   .syncing[_ngcontent-%COMP%]{color:#16a34a}.wizard-footer[_ngcontent-%COMP%]{border-top:1px solid #e5e7eb;margin-top:24px;padding-top:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:10px 18px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer}.footer-secondary[_ngcontent-%COMP%]{background:#fff;border:1px solid #d1d5db;color:#1f2937}.footer-secondary[_ngcontent-%COMP%]:disabled{cursor:not-allowed;color:#9ca3af;border-color:#e5e7eb}.footer-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.footer-primary[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.footer-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:20px}.step-count[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;line-height:20px}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:1280px){.cost-setup-page[_ngcontent-%COMP%]{padding:22px 24px 34px}.top-breadcrumb[_ngcontent-%COMP%]{margin-bottom:24px;font-size:13px;line-height:18px}.breadcrumb-link[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.page-header[_ngcontent-%COMP%]{margin-bottom:22px}.page-title[_ngcontent-%COMP%]{font-size:22px;line-height:30px}.page-subtitle[_ngcontent-%COMP%]{font-size:15px;line-height:22px}.stepper-row[_ngcontent-%COMP%]{margin-bottom:22px}.stepper-item[_ngcontent-%COMP%]   .step-number[_ngcontent-%COMP%]{width:50px;height:50px;font-size:21px;line-height:30px}.stepper-item[_ngcontent-%COMP%]   .step-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.stepper-item[_ngcontent-%COMP%]   .step-line[_ngcontent-%COMP%]{width:80px;height:2px}
12.content-card[_ngcontent-%COMP%]{padding:24px 26px;gap:16px}.block[_ngcontent-%COMP%]{padding:14px}.block-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.block-desc[_ngcontent-%COMP%], .field-label[_ngcontent-%COMP%], .form-input[_ngcontent-%COMP%], .validate-note[_ngcontent-%COMP%], .check-row[_ngcontent-%COMP%]{font-size:13px;line-height:19px}.config-item[_ngcontent-%COMP%], .inline-link[_ngcontent-%COMP%], .summary-row[_ngcontent-%COMP%]{font-size:12px;line-height:17px}.form-input[_ngcontent-%COMP%]{height:44px;border-radius:11px}  .region-mat-field .mat-mdc-text-field-wrapper{height:44px;border-radius:11px}  .region-mat-field .mat-mdc-form-field-infix,   .region-mat-field .mat-mdc-select-trigger{min-height:44px}  .region-mat-field .mat-mdc-select-value-text,   .region-mat-field .mat-mdc-select-placeholder{font-size:13px;line-height:19px}.validate-title[_ngcontent-%COMP%]{font-size:18px;line-height:25px}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%], .step-count[_ngcontent-%COMP%]{font-size:13px;line-height:18px}}@media(max-width:980px){.cost-setup-page[_ngcontent-%COMP%]{padding:18px 16px 28px}.top-breadcrumb[_ngcontent-%COMP%]{margin-bottom:18px;font-size:12px;line-height:16px}.breadcrumb-link[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.page-header[_ngcontent-%COMP%]{margin-bottom:16px}.page-title[_ngcontent-%COMP%]{font-size:20px;line-height:26px;margin-bottom:6px}.page-subtitle[_ngcontent-%COMP%]{font-size:12px;line-height:17px}.stepper-row[_ngcontent-%COMP%]{gap:10px;margin-bottom:16px}.stepper-item[_ngcontent-%COMP%]{gap:8px}.stepper-item[_ngcontent-%COMP%]   .step-number[_ngcontent-%COMP%]{width:38px;height:38px;font-size:16px;line-height:22px}.stepper-item[_ngcontent-%COMP%]   .step-label[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.stepper-item[_ngcontent-%COMP%]   .step-line[_ngcontent-%COMP%]{width:44px}.content-card[_ngcontent-%COMP%]{padding:16px 14px;gap:12px}.block[_ngcontent-%COMP%]{padding:12px}.method-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:8px}.block-title[_ngcontent-%COMP%]{font-size:13px;line-height:18px}.block-desc[_ngcontent-%COMP%], .field-label[_ngcontent-%COMP%], .form-input[_ngcontent-%COMP%], .check-row[_ngcontent-%COMP%], .validate-note[_ngcontent-%COMP%], .step-count[_ngcontent-%COMP%]{font-size:12px;line-height:16px}.form-group[_ngcontent-%COMP%]{gap:6px}.form-input[_ngcontent-%COMP%]{height:42px;border-radius:10px;padding:0 12px}  .region-mat-field .mat-mdc-text-field-wrapper{height:42px;border-radius:10px}  .region-mat-field .mat-mdc-form-field-infix,   .region-mat-field .mat-mdc-select-trigger{min-height:42px}  .region-mat-field .mat-mdc-select-value-text,   .region-mat-field .mat-mdc-select-placeholder{font-size:12px;line-height:16px}.field-note[_ngcontent-%COMP%], .config-item[_ngcontent-%COMP%], .inline-link[_ngcontent-%COMP%], .summary-row[_ngcontent-%COMP%]{font-size:11px;line-height:15px}.link-row[_ngcontent-%COMP%]{gap:8px}.validate-card[_ngcontent-%COMP%]{min-height:250px}.validate-icon[_ngcontent-%COMP%]{width:58px;height:58px;margin-bottom:12px}.validate-title[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.wizard-footer[_ngcontent-%COMP%]{margin-top:16px;padding-top:16px;flex-direction:column;align-items:stretch;gap:10px}.footer-right[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{font-size:12px;line-height:16px;padding:9px 12px}}"]})}}return t})();function cO(t,r){t&1&&h(0,"span",7)}var Gm=(()=>{class t{constructor(e,n,i,s,d){this.dialogRef=e,this.data=n,this.adminService=i,this.notify=s,this.cdr=d,this.teamName="",this.deleting=!1,this.teamId=null,this.teamId=n?.team?.ID||null,this.teamName=n?.team?.TEAM_NAME||""}onSubmit(){!this.teamId||this.deleting||(this.deleting=!0,this.cdr.detectChanges(),this.adminService.updateTeam({ID:this.teamId,DELETED:!0}).subscribe({next:e=>{this.deleting=!1,this.cdr.detectChanges(),this.notify.showNotification(e?.message||"Team deleted successfully","top","success",e?.status),this.dialogRef.close({state:!0,id:this.teamId})},error:e=>{this.deleting=!1,this.cdr.detectChanges(),this.notify.showNotification(e?.error?.message||"Failed to delete team","top","error",e?.error?.status)}}))}onClose(){this.deleting||this.dialogRef.close({state:!1})}static{this.\u0275fac=function(n){return new(n||t)(y(Et),y(Qt),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-delete-team"]],decls:12,vars:5,consts:[[1,"content"],["mat-dialog-title","",1,"heading"],["mat-dialog-content","",1,"message"],["mat-dialog-actions","",1,"actions"],["mat-stroked-button","",1,"button",3,"click","disabled"],["mat-stroked-button","",1,"save-button",3,"click","disabled"],["class","loader",4,"ngIf"],[1,"loader"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1),l(2,"Delete Confirmation"),a(),o(3,"div",2),l(4),a(),o(5,"div",3)(6,"button",4),v("click",function(){return i.onClose()}),l(7," Cancel "),a(),o(8,"button",5),v("click",function(){return i.onSubmit()}),g(9,cO,1,0,"span",6),o(10,"span"),l(11),a()()()()),n&2&&(c(4),x(" Are you sure you want to delete ",i.teamName?i.teamName:""," team? "),c(2),p("disabled",i.deleting),c(2),p("disabled",i.deleting),c(),p("ngIf",i.deleting),c(2),C(i.deleting?"Deleting...":"Confirm"))},dependencies:[N,B,z,ut,Yi,Qi,Ki],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-top:10px}.heading[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:24px;color:#000}.message[_ngcontent-%COMP%]{font-size:16px;font-weight:300;line-height:28px;color:#000c}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
12gap:4%;align-items:center;margin-top:4%}.button[_ngcontent-%COMP%]{width:100px;height:38px;background:#fff;border:1px solid #1A73E9;border-radius:4px;color:#1a73e9!important;font-size:14px;font-weight:600;cursor:pointer}.save-button[_ngcontent-%COMP%]{width:100px;height:38px;color:#f8f8f8;border:1px solid #1A73E9;border-radius:4px;background:#1a73e9!important;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.save-button[_ngcontent-%COMP%]:disabled, .button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.75}.loader[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"]})}}return t})();function dO(t,r){t&1&&(o(0,"div",35)(1,"div",36)(2,"div",37),h(3,"span",38),a()()())}function pO(t,r){if(t&1&&(o(0,"div",39)(1,"div",40)(2,"div",41),l(3),a(),o(4,"div",42),l(5),a(),o(6,"div",43),l(7),a()(),o(8,"div",44),h(9,"iconify-icon",45),a()()),t&2){let e=r.$implicit,n=u();c(3),C(e.label),c(2),C((n.teamStatsData==null?null:n.teamStatsData[e.key])||0),c(2),C(e.subLabel),c(),p("ngClass",e.iconClass),c(),p("icon",e.icon)}}function mO(t,r){t&1&&(o(0,"th",46),l(1,"Team"),a())}function uO(t,r){if(t&1&&(o(0,"td",47)(1,"div",48)(2,"span",49),h(3,"iconify-icon",50),a(),o(4,"div",51)(5,"div",52),l(6),a(),o(7,"div",53),l(8),a()()()()),t&2){let e=r.$implicit;c(6),C(e.TEAM_NAME),c(2),C(e.TEAM_DESCRIPTION||"-")}}function gO(t,r){t&1&&(o(0,"th",46),l(1,"Team Head"),a())}function fO(t,r){if(t&1&&(o(0,"td",47)(1,"div",48)(2,"span",54),l(3),a(),o(4,"div",51)(5,"div",52),l(6),a(),o(7,"div",53),l(8),a()()()()),t&2){let e=r.$implicit,n=u();c(3),C(n.getInitials(e.OWNER)),c(3),C(n.getDisplayName(e.OWNER)),c(2),C((e.OWNER==null?null:e.OWNER.EMAIL_ID)||"-")}}function hO(t,r){t&1&&(o(0,"th",46),l(1,"Team Size"),a())}function _O(t,r){if(t&1&&(o(0,"td",55),l(1),a()),t&2){let e=r.$implicit;c(),C(e.TEAM_MEMBER_COUNT||0)}}function CO(t,r){t&1&&(o(0,"th",46),l(1,"Creation Date"),a())}function xO(t,r){if(t&1&&(o(0,"td",56),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),C(ie(2,1,e.CREATED_DATE,"dd-MM-yyyy"))}}function vO(t,r){t&1&&(o(0,"th",46),l(1,"Created By"),a())}function bO(t,r){if(t&1&&(o(0,"td",47)(1,"div",48)(2,"span",54),l(3),a(),o(4,"div",51)(5,"div",52),l(6),a(),o(7,"div",53),l(8),a()()()()),t&2){let e=r.$implicit,n=u();c(3),C(n.getInitials(e.CREATED_BY)),c(3),C(n.getDisplayName(e.CREATED_BY)),c(2),C((e.CREATED_BY==null?null:e.CREATED_BY.EMAIL_ID)||"-")}}function yO(t,r){t&1&&(o(0,"th",57),l(1,"Actions"),a())}function MO(t,r){if(t&1){let e=A();o(0,"td",58)(1,"div",59)(2,"button",60),v("click",function(i){let s=O(e).$implicit,d=u();return P(d.openEditTeam(s,i))}),l(3," Edit "),a(),o(4,"button",61),v("click",function(i){let s=O(e).$implicit,d=u();return P(d.deleteTeam(s,i))}),l(5," Delete "),a()()()}}function SO(t,r){t&1&&h(0,"tr",62)}function OO(t,r){if(t&1){let e=A();o(0,"tr",63),v("click",function(){let i=O(e).$implicit,s=u();return P(s.openTeamBreakdown(i))}),a()}}var Ym=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dialog=n,this.adminService=i,this.notify=s,this.cdr=d,this.loading=!1,this.displayedTeamColumns=["team","teamHead","teamSize","creationDate","createdBy","actions"],this.pageSize=5,this.pageIndex=0,this.totalTeams=0,this.pageSizeOptions=[5,10,25],this.teamStats=[{label:"Cost Center",key:"COST_CENTER_COUNT",subLabel:"Total units",icon:"ri:team-line",iconClass:"stat-icon-blue"},{label:"Teams",key:"TEAM_COUNT",subLabel:"Assigned Teams",icon:"ri:building-2-line",iconClass:"stat-icon-indigo"},{label:"Team Members",key:"TEAM_MEMBER_COUNT",subLabel:"Total Members",icon:"mage:user",iconClass:"stat-icon-green"}],this.teamStatsData={COST_CENTER_COUNT:0,TEAM_COUNT:0,TEAM_MEMBER_COUNT:0},this.teams=[]}ngOnInit(){this.getCostCenterAnalytics(),this.getTeams(this.pageIndex+1,this.pageSize)}getCostCenterAnalytics(){this.adminService.getCostCenterAnalytics().subscribe({next:e=>{let n=e?.object||{};this.teamStatsData={COST_CENTER_COUNT:Number(n.COST_CENTER_COUNT||0),TEAM_COUNT:Number(n.TEAM_COUNT||0),TEAM_MEMBER_COUNT:Number(n.TEAM_MEMBER_COUNT||0)},this.cdr.detectChanges()},error:e=>{this.teamStatsData={COST_CENTER_COUNT:0,TEAM_COUNT:0,TEAM_MEMBER_COUNT:0},this.notify.showNotification(e?.error?.message||"Failed to fetch team analytics","top","error",e?.error?.status),this.cdr.detectChanges()}})}getTeams(e=1,n=this.pageSize){this.loading=!0,this.cdr.detectChanges(),this.adminService.getTeams(e,n).pipe(Xe(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe({next:i=>{let s=Array.isArray(i?.object)?i.object:[];this.teams=s;let d=this.resolveTotalCount(i),m=s.length===n;this.totalTeams=d??(e-1)*n+s.length+(m?1:0),this.cdr.detectChanges()},error:i=>{this.teams=[],this.notify.showNotification(i?.error?.message||"Failed to fetch team
12s","top","error",i?.error?.status),this.cdr.detectChanges()}})}onTeamsPageChange(e){this.loading||(this.pageIndex=e.pageIndex,this.pageSize=e.pageSize,this.getTeams(this.pageIndex+1,this.pageSize))}createTeam(){this.router.navigate(["/admin-dashboard/teams/manage-team"])}openTeamBreakdown(e){this.router.navigate(["/admin-dashboard/teams/team-breakdown"],{queryParams:{id:e.ID},state:{teamId:e.ID,team:e}})}openEditTeam(e,n){n.stopPropagation(),this.router.navigate(["/admin-dashboard/teams/manage-team"],{queryParams:{id:e.ID}})}deleteTeam(e,n){n.stopPropagation(),this.dialog.open(Gm,{data:{team:e}}).afterClosed().subscribe(s=>{s?.state&&(this.getCostCenterAnalytics(),this.getTeams(this.pageIndex+1,this.pageSize))})}getDisplayName(e){let n=e?.FIRST_NAME||"",i=e?.LAST_NAME||"",s=`${n} ${i}`.trim();return s||(e?.ID?`Owner #${e.ID}`:"-")}getInitials(e){return this.getDisplayName(e).split(" ").filter(Boolean).slice(0,2).map(i=>i[0]?.toUpperCase()||"").join("")}resolveTotalCount(e){let n=[e?.total,e?.count,e?.TOTAL_COUNT,e?.COUNT];for(let i of n)if(Number.isFinite(i)&&Number(i)>=0)return Number(i);return null}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Se),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-teams"]],decls:48,vars:10,consts:[[1,"teams-page"],[1,"main-content"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-row"],["class","overlay",4,"ngIf"],[1,"header-content"],[1,"title"],[1,"subtitle"],["type","button",1,"create-team-btn",3,"click"],[1,"stats-grid"],["class","stat-card",4,"ngFor","ngForOf"],[1,"team-details-card"],[1,"section-title"],[1,"table-wrapper"],["mat-table","",1,"teams-table",3,"dataSource"],["matColumnDef","team"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","teamHead"],["matColumnDef","teamSize"],["mat-cell","","class","team-size",4,"matCellDef"],["matColumnDef","creationDate"],["mat-cell","","class","creation-date",4,"matCellDef"],["matColumnDef","createdBy"],["matColumnDef","actions"],["mat-header-cell","","class","action-col",4,"matHeaderCellDef"],["mat-cell","","class","action-col",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],[1,"table-pagination"],[3,"page","length","pageSize","pageIndex","pageSizeOptions","showFirstLastButtons"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"stat-card"],[1,"stat-content"],[1,"stat-label"],[1,"stat-value"],[1,"stat-sub"],[1,"stat-icon",3,"ngClass"],[3,"icon"],["mat-header-cell",""],["mat-cell",""],[1,"detail-cell"],[1,"team-icon","team-icon-blue"],["icon","ri:building-2-line"],[1,"detail-copy"],[1,"primary-text"],[1,"secondary-text"],[1,"member-avatar","avatar-blue"],["mat-cell","",1,"team-size"],["mat-cell","",1,"creation-date"],["mat-header-cell","",1,"action-col"],["mat-cell","",1,"action-col"],[1,"action-buttons"],["type","button",1,"action-btn-edit",3,"click"],["type","button",1,"action-btn-delete",3,"click"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),l(5,"Users Config"),a(),o(6,"span",5),l(7,">"),a(),o(8,"span",6),l(9,"Teams"),a()(),o(10,"div",7),g(11,dO,4,0,"div",8),o(12,"div",9)(13,"div",10),l(14,"Teams"),a(),o(15,"div",11),l(16," Organize and manage Teams for effective cost allocation and budget management across your organization "),a()(),o(17,"button",12),v("click",function(){return i.createTeam()}),l(18," + Create New Team "),a()()(),o(19,"div",13),g(20,pO,10,5,"div",14),a(),o(21,"div",15)(22,"div",16),l(23,"Team Details"),a(),o(24,"div",17)(25,"table",18),I(26,19),g(27,mO,2,0,"th",20)(28,uO,9,2,"td",21),T(),I(29,22),g(30,gO,2,0,"th",20)(31,fO,9,3,"td",21),T(),I(32,23),g(33,hO,2,0,"th",20)(34,_O,2,1,"td",24),T(),I(35,25),g(36,CO,2,0,"th",20)(37,xO,3,4,"td",26),T(),I(38,27),g(39,vO,2,0,"th",20)(40,bO,9,3,"td",21),T(),I(41,28),g(42,yO,2,0,"th",29)(43,MO,6,0,"td",30),T(),g(44,SO,1,0,"tr",31)(45,OO,1,0,"tr",32),a()(),o(46,"div",33)(47,"mat-paginator",34),v("page",function(d){return i.onTeamsPageChange(d)}),a()()()()()),n&2&&(c(11),p("ngIf",i.loading),c(9),p("ngForOf",i.teamStats),c(5
12),p("dataSource",i.teams),c(19),p("matHeaderRowDef",i.displayedTeamColumns),c(),p("matRowDefColumns",i.displayedTeamColumns),c(2),p("length",i.totalTeams)("pageSize",i.pageSize)("pageIndex",i.pageIndex)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",!0))},dependencies:[N,xe,$,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gt,pt],styles:[".teams-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f8fb);min-height:100%}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.header-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.header-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700;color:#111827}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.create-team-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;background:#57b5e7;color:#fff;padding:8px 16px;font-size:16px;line-height:24px;cursor:pointer;white-space:nowrap}.create-team-btn[_ngcontent-%COMP%]:hover{background:#3da5dc}.stats-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:18px}.stat-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:8px;padding:25px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 1px 2px #0000000d}.stat-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.stat-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;font-weight:500}.stat-value[_ngcontent-%COMP%]{font-size:24px;line-height:32px;color:#111827;font-weight:700}.stat-sub[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.stat-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;font-size:20px}.stat-icon-blue[_ngcontent-%COMP%]{color:#57b5e7;background:#57b5e71a}.stat-icon-indigo[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.stat-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#dcfce7}.team-details-card[_ngcontent-%COMP%]{background:#fff;border:none;border-radius:20px;padding:20px;box-shadow:0 1px 2px #0000000d}.section-title[_ngcontent-%COMP%]{color:#111827;font-weight:700;font-size:18px;line-height:28px;margin-bottom:14px}.table-wrapper[_ngcontent-%COMP%]{width:100%;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.table-pagination[_ngcontent-%COMP%]{padding-top:8px}.table-pagination[_ngcontent-%COMP%]   mat-paginator[_ngcontent-%COMP%]{background:transparent}.teams-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{cursor:pointer}.teams-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:hover{background:#f9fafb}.teams-table[_ngcontent-%COMP%]{width:100%;min-width:980px;border-collapse:collapse}.teams-table[_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%]{text-align:left;color:#6b7280;font-size:13px;font-weight:600;padding:16px 18px;background:#f9fafb;white-space:nowrap}.teams-table[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{padding:14px 18px;border-bottom:1px solid #E5E7EB;vertical-align:middle;color:#111827;font-size:14px}.teams-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.detail-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.detail-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.primary-text[_ngcontent-%COMP%]{font-weight:500;color:#111827}.secondary-text[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.team-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.team-icon-blue[_ngcontent-%COMP%]{color:#2f74f6;background:#deebff}.team-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#daf5e4}.team-icon-purple[_ngcontent-%COMP%]{color:#8b5cf6;background:#efe5ff}.team-icon-violet[_ngcontent-%COMP%]{color:#9333ea;background:#f1e3ff}
12.member-avatar[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;color:#fff;font-size:12px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.avatar-blue[_ngcontent-%COMP%]{background:#3b82f6}.avatar-green[_ngcontent-%COMP%]{background:#22c55e}.avatar-purple[_ngcontent-%COMP%]{background:#a855f7}.avatar-violet[_ngcontent-%COMP%]{background:#9333ea}.team-size[_ngcontent-%COMP%], .creation-date[_ngcontent-%COMP%]{font-weight:500;color:#111827}.action-col[_ngcontent-%COMP%]{width:48px;text-align:right;padding-right:10px}.action-buttons[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end}.action-btn-edit[_ngcontent-%COMP%]{border:none;background:transparent;color:#57b5e7;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:20px}.action-btn-delete[_ngcontent-%COMP%]{border:none;background:transparent;color:#ef4444;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:20px}@media(max-width:1200px){.title[_ngcontent-%COMP%]{font-size:34px;line-height:40px}.stat-value[_ngcontent-%COMP%]{font-size:34px;line-height:38px}.section-title[_ngcontent-%COMP%]{font-size:28px;line-height:34px}}@media(max-width:900px){.teams-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:28px;line-height:34px}.subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:22px}.create-team-btn[_ngcontent-%COMP%]{font-size:16px;line-height:20px;padding:10px 14px}.stats-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(1,minmax(0,1fr))}.stat-label[_ngcontent-%COMP%]{font-size:16px}.stat-value[_ngcontent-%COMP%]{font-size:30px;line-height:34px}.stat-sub[_ngcontent-%COMP%]{font-size:14px}.section-title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.team-details-card[_ngcontent-%COMP%]{padding:14px;border-radius:16px}}"]})}}return t})();function PO(t,r){t&1&&(o(0,"span",4),l(1,">"),a())}function EO(t,r){if(t&1){let e=A();o(0,"span",5),v("click",function(){O(e);let i=u();return P(i.navigateToTeamBreakdown())}),l(1,"Team Breakdown"),a()}}function wO(t,r){t&1&&(o(0,"div",36)(1,"div",37)(2,"div",38),h(3,"span",39),a()()())}function IO(t,r){if(t&1&&(o(0,"mat-option",40),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.COST_CENTER_NAME||e.NAME||"Cost Center #"+e.ID," ")}}function TO(t,r){if(t&1&&(o(0,"mat-option",40),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",((e.FIRST_NAME||"")+" "+(e.LAST_NAME||"")).trim()||e.EMAIL_ID||e.USERNAME||"User #"+e.ID," ")}}function AO(t,r){if(t&1&&(o(0,"mat-option",40),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",((e.FIRST_NAME||"")+" "+(e.LAST_NAME||"")).trim()||e.EMAIL_ID||e.USERNAME||"User #"+e.ID," ")}}function DO(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=r.$implicit;c(),C(e)}}function RO(t,r){if(t&1&&(o(0,"div",41)(1,"label"),l(2,"Selected Members"),a(),o(3,"div",42),g(4,DO,2,1,"span",43),a()()),t&2){let e=u();c(4),p("ngForOf",e.selectedMembers)}}var Km=(()=>{class t{constructor(e,n,i,s,d,m){this.fb=e,this.router=n,this.route=i,this.adminService=s,this.notify=d,this.cdr=m,this.isEditMode=!1,this.selectedTeamId=null,this.loading=!1,this.submitting=!1,this.userOptions=[],this.costCenterOptions=[],this.teamMemberOptions=[],this.teamForm=this.fb.group({teamName:["",U.required],costCenter:[null,U.required],owner:[null,U.required],description:[""],member:[[]]})}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("id");this.selectedTeamId=e?Number(e):null,this.isEditMode=!!this.selectedTeamId,this.getMemberOptions(),this.getCostCenterOptions(),this.isEditMode&&this.selectedTeamId&&this.getTeamById(this.selectedTeamId)}get pageTitle(){return this.isEditMode?"Edit Team":"Add New Team"}get pageSubtitle(){return this.isEditMode?"Edit team and assign roles and cost centers":"Create a new team and assign roles and cost centers"}get submitLabel(){return this.isEditMode?"Update Team":"Add Team"}
12get isSubmitDisabled(){return this.teamForm.invalid||this.submitting}get selectedMembers(){return(this.teamForm.get("member")?.value||[]).map(n=>{let i=this.teamMemberOptions.find(d=>Number(d?.ID)===Number(n));return`${i?.FIRST_NAME||""} ${i?.LAST_NAME||""}`.trim()||i?.EMAIL_ID||i?.USERNAME||""}).filter(Boolean)}navigateToTeams(){this.router.navigate(["/admin-dashboard/teams"])}navigateToTeamBreakdown(){this.selectedTeamId&&this.router.navigate(["/admin-dashboard/teams/team-breakdown"],{queryParams:{id:this.selectedTeamId}})}onCancel(){this.router.navigate(["/admin-dashboard/teams"])}onSubmit(){if(this.teamForm.invalid||this.submitting){this.teamForm.markAllAsTouched();return}let e=this.teamForm.value,n={TEAM_NAME:e.teamName?.trim()||"",OWNER_ID:Number(e.owner),TEAM_DESCRIPTION:e.description||"",COST_CENTER_ID:Number(e.costCenter),USER_ID:(e.member||[]).map(i=>Number(i)).filter(i=>!!i)};if(this.submitting=!0,this.cdr.detectChanges(),this.isEditMode&&this.selectedTeamId){n.ID=this.selectedTeamId,n.DELETED=!1,this.adminService.updateTeam(n).subscribe({next:i=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(i?.message||"Team updated successfully","top","success",i?.status),this.router.navigateByUrl("/admin-dashboard/teams")},error:i=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(i?.error?.message||"Failed to update team","top","error",i?.error?.status)}});return}this.adminService.createTeam(n).subscribe({next:i=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(i?.message||"Team created successfully","top","success",i?.status),this.router.navigateByUrl("/admin-dashboard/teams")},error:i=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(i?.error?.message||"Failed to create team","top","error",i?.error?.status)}})}getTeamById(e){this.loading=!0,this.cdr.detectChanges(),this.adminService.getTeamsById(e).subscribe({next:n=>{this.loading=!1;let i=Array.isArray(n?.object)?n.object[0]:n?.object;i&&(this.teamForm.patchValue({teamName:i.TEAM_NAME||"",description:i.TEAM_DESCRIPTION||"",owner:i?.OWNER?.ID||null,costCenter:i?.COST_CENTER?.ID||i?.COST_CENTER_ID||null,member:(i?.TEAM_MEMBER||[]).map(s=>s?.USER?.ID||s?.USER_ID).filter(Boolean)}),this.cdr.detectChanges())},error:n=>{this.loading=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message||"Failed to fetch team details","top","error",n?.error?.status)}})}getMemberOptions(){this.adminService.getClientMembersTrim().subscribe({next:e=>{let n=Array.isArray(e?.object)?e.object:[];this.userOptions=n,this.teamMemberOptions=n,this.cdr.detectChanges()},error:()=>{this.userOptions=[],this.teamMemberOptions=[],this.cdr.detectChanges()}})}getCostCenterOptions(){this.adminService.getCostCentersTrim().subscribe({next:e=>{this.costCenterOptions=Array.isArray(e?.object)?e.object:[],this.cdr.detectChanges()},error:()=>{this.costCenterOptions=[],this.cdr.detectChanges()}})}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(G),y(Le),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-new-team"]],decls:57,vars:14,consts:[[1,"new-team-page"],[1,"main-content"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item",3,"click"],["class","breadcrumb-sep",4,"ngIf"],["class","breadcrumb-item",3,"click",4,"ngIf"],[1,"breadcrumb-item","breadcrumb-current"],[1,"form-card"],[1,"form-header"],["class","overlay",4,"ngIf"],[1,"header-icon"],[3,"icon"],[1,"header-content"],[1,"title"],[1,"subtitle"],[3,"ngSubmit","formGroup"],[1,"form-body"],[1,"form-grid"],[1,"field-group"],["for","team-name"],["id","team-name","type","text","placeholder","Enter Team Name","formControlName","teamName"],["for","assign-cost-center"],["id","assign-cost-center","placeholder","Select Cost Center","formControlName","costCenter"],[3,"value",4,"ngFor","ngForOf"],["for","owner"],["id","owner","placeholder","Select Owner","formControlName","owner"],["for","description"],["id","description","type","text","placeholder","Describe the team purpose and scope","formControlName","description"],["for","team-members"],["id","team-members","placeholder","Select Members","multiple","","panelClass","team-members-panel","formControlName","member"],["class","field-group full-width",4,"ngIf"],[1,"form-footer"],["type","button",1,"cancel-btn",3,"click"],["type","submit",1,"add-btn",3,"disabled"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],[1,"field-group","full-width"],[1,"selected-members-wrap"],["class","member-pill",4,"ngFor","ngForOf"],[1,"member-pill"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),l(4,"Users Config"),a(),o(5,"span",4),l(6,">"),a(),o(7,"span",5),v("click",function(){return i.navigateToTeams()}),l(8,"Teams"),a(),g(9,PO,2,0,"span",6)(10,EO,2,0,"span",7),o(11,"span",4),l(12,">"),a(),o(13,"span",8),l(14),a()(),o(15,"div",9)(16,"div",10),g(17,wO,4,0,"div",11),o(18,"div",12),h(19,"iconify-icon",13),a(),o(20,"div",14)(21,"div",15),l(22),a(),o(23,"div",16),l(24),a()()(),o(25,"form",17),v("ngSubmit",function(){return i.onSubmit()}),o(26,"div",18)(27,"div",19)(28,"div",20)(29,"label",21),l(30,"Team Name"),a(),h(31,"input",22),a(),o(32,"div",20)(33,"label",23),l(34,"Assign Cost Center"),a(),o(35,"mat-select",24),g(36,IO,2,2,"mat-option",25),a()(),o(37,"div",20)(38,"label",26),l(39,"Owner"),a(),o(40,"mat-select",27),g(41,TO,2,2,"mat-option",25),a()(),o(42,"div",20)(43,"label",28),l(44,"Description"),a(),h(45,"input",29),a(),o(4
126,"div",20)(47,"label",30),l(48,"Select Members"),a(),o(49,"mat-select",31),g(50,AO,2,2,"mat-option",25),a()(),g(51,RO,5,1,"div",32),a()(),o(52,"div",33)(53,"button",34),v("click",function(){return i.onCancel()}),l(54,"Cancel"),a(),o(55,"button",35),l(56),a()()()()()()),n&2&&(c(9),p("ngIf",i.isEditMode),c(),p("ngIf",i.isEditMode),c(4),C(i.pageTitle),c(3),p("ngIf",i.loading),c(2),p("icon",i.isEditMode?"ri:user-settings-line":"ri:user-add-line"),c(3),C(i.pageTitle),c(2),C(i.pageSubtitle),c(),p("formGroup",i.teamForm),c(11),p("ngForOf",i.costCenterOptions),c(5),p("ngForOf",i.userOptions),c(9),p("ngForOf",i.teamMemberOptions),c(),p("ngIf",i.selectedMembers.length),c(4),p("disabled",i.isSubmitDisabled),c(),C(i.submitLabel))},dependencies:[N,$,B,z,fe,ue,mn,ve,me,$e,Ge,We],styles:[".new-team-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f8fb);min-height:100%}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-item[_ngcontent-%COMP%]:not(.breadcrumb-current){cursor:pointer}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.form-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 2px #0000000d;overflow:hidden}.form-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:18px 20px;border-bottom:1px solid #e5e7eb}.header-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:16px;background:#57b5e71a;color:#57b5e7;display:inline-flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}.header-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;color:#111827;font-weight:700}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.form-body[_ngcontent-%COMP%]{padding:20px}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:18px 50px}.field-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.field-group.full-width[_ngcontent-%COMP%]{grid-column:1/-1}.field-group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#374151}.field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{height:42px;width:auto;border-radius:14px;border:1px solid #d1d5db;padding:0 14px;font-size:15px;color:#111827;background:#fff;outline:none;display:flex;align-items:center}.field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.selected-members-wrap[_ngcontent-%COMP%]{display:flex;gap:10px;flex-wrap:wrap}.member-pill[_ngcontent-%COMP%]{height:28px;padding:0 14px;border-radius:14px;background:#dbeafe;color:#2563eb;font-size:13px;display:inline-flex;align-items:center}.form-footer[_ngcontent-%COMP%]{border-top:1px solid #e5e7eb;padding:18px 20px;display:flex;align-items:center;gap:10px}.cancel-btn[_ngcontent-%COMP%], .add-btn[_ngcontent-%COMP%]{border:none;height:38px;padding:8px 24px;border-radius:8px;font-size:15px;font-weight:500;cursor:pointer}.cancel-btn[_ngcontent-%COMP%]{background:#e5e7eb;color:#4b5563}.add-btn[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.add-btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}[_nghost-%COMP%]     .team-members-panel .mat-pseudo-checkbox-checked, [_nghost-%COMP%]     .team-members-panel .mat-pseudo-checkbox-indeterminate{background:#57b5e7!important;border-color:#57b5e7!important}[_nghost-%COMP%]     .team-members-panel .mat-pseudo-checkbox-checked:after, [_nghost-%COMP%]     .team-members-panel .mat-pseudo-checkbox-indeterminate:after{color:#fff!important}@media(max-width:980px){.new-team-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:22px}.form-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}.field-group.full-width[_ngcontent-%COMP%]{grid-column:auto}}"]})}}return t})();function kO(t,r){t&1&&(o(0,"div",45)(1,"div",46)(2,"div",47),h(3,"span",48),a()()())}function NO(t,r){if(t&1&&(o(0,"mat-option",49),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),C(e.label)}}function FO(t,r){if(t&1&&(o(0,"mat-option",49),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),C(e.label)}}function zO(t,r){t&1&&(o(0,"th",50),l(1,"Member Profile"),a())}function LO(t,r){if(t&1&&(o(0,"td",51)(1,"div",52)(2,"span",20),l(3),a(),o(4,"div")(5,"div",53),l(6),a(),o(7,"div",54),l(8),a()()()()),t&2){let e=r.$implicit,n=u();c(3),C(n.getMemberInitials(e)),c(3),x("",((e.FIRST_NAME||"")+" "+(e.LAST_NAME||"")).trim()||"-"," "),c(2),C(e.EMAIL_ID||"-")}}function VO(t,r){t&1&&(o(0,"th",50),l(1,"Mobile Number"),a())}function BO(t,r){if(t&1&&(o(0,"td",51)(1,"div",53),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e.PHONE_NUMBER||"-")}}function UO(t,r){t&1&&h(0,"tr",55)}function jO(t,r){t&1&&h(0,"tr",56)}function $O(t,r){if(t&1&&(o(0,"tr",57)(1,"td",58),l(2," No records foun
12d "),a()()),t&2){let e=u();c(),He("colspan",e.displayedMemberColumns.length)}}function qO(t,r){if(t&1){let e=A();o(0,"div",59)(1,"mat-paginator",60),v("page",function(i){O(e);let s=u();return P(s.onMembersPageChange(i))}),a()()}if(t&2){let e=u();c(),p("length",e.totalTeamMembers)("pageSize",e.membersPageSize)("pageIndex",e.membersPageIndex)("pageSizeOptions",e.membersPageSizeOptions)("showFirstLastButtons",!0)}}var Qm=(()=>{class t{constructor(e,n,i,s){this.router=e,this.route=n,this.adminService=i,this.cdr=s,this.selectedTeamId=null,this.selectedTeam="All Teams",this.selectedStatus="All Status",this.displayedMemberColumns=["profile","phoneNember"],this.teamIcon="ri:building-2-line",this.teamIconClass="team-icon-blue",this.loading=!1,this.team=null,this.teamMembers=[],this.membersPageSize=10,this.membersPageIndex=0,this.totalTeamMembers=0,this.membersPageSizeOptions=[5,10,25],this.pendingRequests=0,this.teamOptions=[{label:"All Teams",value:"All Teams"}],this.statusOptions=[{label:"All Status",value:"All Status"},{label:"Active",value:"Active"},{label:"Inactive",value:"Inactive"}]}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("id");this.selectedTeamId=e?Number(e):null,this.selectedTeamId&&(this.getTeamById(this.selectedTeamId),this.getTeamMembers(this.selectedTeamId,this.membersPageIndex,this.membersPageSize))}get filteredMembers(){return this.teamMembers.filter(e=>!this.selectedStatus||this.selectedStatus==="All Status"?!0:(e.STATUS||e.ACCOUNT_STATUS?.NAME||"")===this.selectedStatus)}navigateToTeams(){this.router.navigate(["/admin-dashboard/teams"])}createMember(){this.router.navigate(["/admin-dashboard/teams/manage-team"])}editTeam(){this.router.navigate(["/admin-dashboard/teams/manage-team"],{queryParams:{id:this.selectedTeamId}})}getTeamById(e){this.startLoading(),this.adminService.getTeamsById(e).pipe(Xe(()=>this.stopLoading())).subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object[0]:n?.object;i&&(this.team=i,this.totalTeamMembers=i.TEAM_MEMBER?.length||0,this.selectedTeam=i.TEAM_NAME||"All Teams",this.teamOptions=[{label:"All Teams",value:"All Teams"},{label:i.TEAM_NAME||"Current Team",value:i.TEAM_NAME||"Current Team"}],this.cdr.detectChanges())},error:()=>{this.team=null,this.cdr.detectChanges()}})}getTeamMembers(e,n=0,i=10){this.startLoading(),this.adminService.getTeamMembers(e,n,i).pipe(Xe(()=>this.stopLoading())).subscribe({next:s=>{let d=s?.object??[];this.teamMembers=d;let m=this.resolveTotalCount(s),f=d.length===i;this.totalTeamMembers=m??(this.team?.TEAM_MEMBER?.length||n*i+d.length+(f?1:0)),this.cdr.detectChanges()},error:()=>{this.teamMembers=[],this.cdr.detectChanges()}})}onMembersPageChange(e){this.loading||!this.selectedTeamId||(this.membersPageIndex=e.pageIndex,this.membersPageSize=e.pageSize,this.getTeamMembers(this.selectedTeamId,this.membersPageIndex,this.membersPageSize))}getMemberInitials(e){let n=`${e.FIRST_NAME||""} ${e.LAST_NAME||""}`.trim();return n?n.split(" ").filter(Boolean).slice(0,2).map(i=>i[0]?.toUpperCase()||"").join(""):"NA"}getOwnerInitials(){return this.getMemberInitials({TEAM_MEMBER_ID:0,TEAM_ID:this.team?.ID||0,USER_ID:this.team?.OWNER?.ID||0,FIRST_NAME:this.team?.OWNER?.FIRST_NAME,LAST_NAME:this.team?.OWNER?.LAST_NAME})}resolveTotalCount(e){let n=[e?.total,e?.count,e?.TOTAL_COUNT,e?.COUNT];for(let i of n)if(Number.isFinite(i)&&Number(i)>=0)return Number(i);return null}startLoading(){this.pendingRequests+=1,this.loading=!0,this.cdr.detectChanges()}stopLoading(){this.pendingRequests=Math.max(0,this.pendingRequests-1),this.loading=this.pendingRequests>0,this.cdr.detectChanges()}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(Je),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-team-breakdown"]],decls:70,vars:17,consts:[[1,"team-breakdown-page"],[1,"main-content"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"overview-header"],["class","overlay",4,"ngIf"],[1,"team-icon",3,"ngClass"],[3,"icon"],[1,"header-copy"],[1,"title"],[1,"subtitle"],[1,"summary-grid"],[1,"summary-card"],[1,"summary-label"],[1,"summary-owner"],[1,"owner-name"],[1,"owner-email"],[1,"member-avatar","avatar-blue"],[1,"summary-members"],[1,"member-count"],[1,"member-sub"],[1,"members-icon"],["icon","mage:user"],[1,"top-actions"],["type","button",1,"edit-btn",3,"click"],["icon","ri:edit-line"],[1,"members-card"],[1,"members-header"],[1,"members-title"],[1,"filters"],[3,"selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],[1,"table-wrapper"],["mat-table","",1,"members-table",3,"dataSource"],["matColumnDef","profile"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","phoneNember"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-mdc-row",4,"matNoDataRow"],["class","table-pagination",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],["mat-header-cell",""],["mat-cell",""],[1,"profile-cell"],[1,"name"],[1,"sub-text"],["mat-header-row",""],["mat-row",""],[1,"mat-mdc-row"],[1,"mat-mdc-cell","no-records-cell"],[1,"table-pagination"],[3,"page","length","pageSize","pageIndex","pageSizeOptions","showFirstLastButtons"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),l(4,"Users Config"),a(),o(5,"span",4),l(6,">"),a(),o(7,"span",5),v("click",function(){return i.navigateToTeams()}),l(8,"Teams"),a(),o(9,"span",4),l(10,">"),a(),o(11,"span",6),l(12,"Team Breakdown"),a()(),o(13,"div",7),g(14,kO,4,0,"div",8),o(15,"div",9),h(16,"iconify-icon",10),a(),o(17,"div",11)(18,"div",12),l(19),a(),o(20,"div",13),l(21),a()()(),o(22,"div",14)(23,"div",15)(24,"div",16),l(25,"Team Owner"),a(),o(26,"div",17)(27,"div")(28,"div",18),l(29),a(),o(30,"div",19),l(31),a()(),o(32,"span",20),l(33),a()()(),o(34,"div",15)(35,"div",16),l(36,"Team Members"),a(),o(37,"div",21)(38,"div")(39,"div",22),l(40),a(),o(41,"div",23),l(42,"Total Members"),a()(),o(43,"div",24),h(44,"iconify-icon",25),a()()()(),o(45,"div",26)(46,"button",27),v("click",function(){return i.editTeam()}),h(47,"iconify-icon",28),l(48," Edit Team "),a()(),o(49,"div",29)(50,"div",30)(51,"div",31),l(52,"Team Members"),a(),o(53,"div",32)(54,"mat-select",33),v("selectionChange",function(d){return i.selectedTeam=d.value}),g(55,NO,2,2,"mat-option",34),a(),o(56,"mat-select",33),v("selectionChange",function(d){return i.selectedStatus=d.value}),g(57,FO,2,2,"mat-option",34),a()()(),o(58,"div",35)(59,"table",36),I(60,37),g(61,zO,2,0,"th",38)(62,LO,9,3,"td",39),T(),I(63,40),g(64,VO,2,0,"th",38)(65,BO,3,1,"td",39),T(),g(66,UO,1,0,"tr",41)(67,jO,1,0,"tr",42)(68,$O,3,1,"tr",43),a()(),g(69,qO,2,5,"div",44),a()()()),n&2&&(c(14),p("ngIf",i.loading),c(),p("ngClass",i.teamIconClass),c(),p("icon",i.teamIcon),c(3),x("",(i.team==null?null:i.team.TEAM_NAME)||"Team"," - Team Breakdown"),c(2),C((i.team==null?null:i.team.TEAM_DESCRIPTION)||"Detailed overview of all team members"),c(8),C((((i.team==null||i.team.OWNER==null?null:i.team.OWNER.FIRST_NAME)||"")+" "+((i.team==null||i.team.OWNER==null?null:i.team.OWNER.LAST_NAME)||"")).trim()||"-"),c(2),C((i.team==null||i.team.OWNER==null?null:i.team.OWNER.EMAIL_ID)||"-"),c(2),C(i.getOwnerInitials()),c(7),C((i.team==null||i.team.TEAM_MEMBER==null?null:i.team.TEAM_MEMBER.length)||0),c(14),p("value",i.selectedTeam),c(),p("ngForOf",i.teamOptions),c(),p("value",i.selectedStatus),c(),p("ngForOf",i.statusOptions),c(2),p("dataSource",i.filteredMembers),c(7),p("matHeaderRowDef",i.displayedMemberColumns),c(),p("matRowDefColumns",i.displayedMemberColumns),c(2),p("ngIf",((i.team==null||i.team.TEAM_MEMBER==null?null:i.team.TEAM_MEMBER.length)||0)>0))},dependencies:[N,xe,$,B,z,fe,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,gt],styles:[".team-breakdown-page[_ngcontent-%COMP%]{padding:24px;min-height:100%;background:linear-gradient(180deg,#fbfdff,#f7f8fb)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-item[_ngcontent-%COMP%]:not(.breadcrumb-current){cursor:pointer}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.overview-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding-bottom:6px}.team-icon[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}.team-icon-blue[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.header-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;color:#111827;font-weight:700}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:18px;max-width:900px}.summary-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:20px}.summary-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500;color:#4b5563;margin-bottom:4px}.summary-owner[_ngcontent-%COMP%], .summary-members[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px}
12.owner-name[_ngcontent-%COMP%], .member-count[_ngcontent-%COMP%]{font-size:24px;line-height:32px;color:#111827;font-weight:700;margin-bottom:4px}.owner-email[_ngcontent-%COMP%], .member-sub[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px}.members-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:12px;background:#dcfce7;color:#16a34a;display:inline-flex;align-items:center;justify-content:center;font-size:20px}.member-avatar[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;color:#fff}.avatar-blue[_ngcontent-%COMP%]{background:#3b82f6}.avatar-purple[_ngcontent-%COMP%]{background:#a855f7}.avatar-green[_ngcontent-%COMP%]{background:#22c55e}.avatar-orange[_ngcontent-%COMP%]{background:#f97316}.avatar-indigo[_ngcontent-%COMP%]{background:#6366f1}.avatar-teal[_ngcontent-%COMP%]{background:#14b8a6}.top-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.add-btn[_ngcontent-%COMP%], .edit-btn[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #d1d5db;height:40px;padding:0 16px;font-size:15px;cursor:pointer;display:inline-flex;align-items:center;gap:8px}.add-btn[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff}.edit-btn[_ngcontent-%COMP%]{background:#fff;color:#374151}.members-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden}.members-header[_ngcontent-%COMP%]{padding:14px 18px;display:flex;justify-content:space-between;gap:14px;align-items:center;border-bottom:1px solid #e5e7eb}.members-title[_ngcontent-%COMP%]{color:#111827;font-weight:700;font-size:18px;line-height:28px;margin-bottom:14px}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.filters[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{min-width:150px;height:38px;border:1px solid #d1d5db;border-radius:20px;background:#fff;color:#374151;font-size:14px;padding:0 12px;display:flex;justify-content:center;align-items:center}.table-wrapper[_ngcontent-%COMP%]{overflow-x:auto}.table-pagination[_ngcontent-%COMP%]{padding:8px 10px 10px}.table-pagination[_ngcontent-%COMP%]   mat-paginator[_ngcontent-%COMP%]{background:transparent}.no-records-cell[_ngcontent-%COMP%]{text-align:center;color:#6b7280;padding:22px 18px}.members-table[_ngcontent-%COMP%]{width:100%;min-width:900px;border-collapse:collapse}.members-table[_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%]{text-align:left;font-size:13px;color:#6b7280;font-weight:600;padding:16px 18px;background:#f9fafb}.members-table[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{padding:14px 18px;border-bottom:1px solid #e5e7eb;font-size:14px;color:#111827;vertical-align:middle}.members-table[_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.profile-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.name[_ngcontent-%COMP%]{font-weight:500}.sub-text[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:2px 10px;border-radius:10px;background:#dcfce7;color:#15803d;font-size:12px}.status-pill.inactive[_ngcontent-%COMP%]{background:#fee2e2;color:#b91c1c}.edit-link[_ngcontent-%COMP%]{border:none;background:transparent;color:#57b5e7;font-size:14px;cursor:pointer}@media(max-width:980px){.team-breakdown-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.owner-name[_ngcontent-%COMP%], .member-count[_ngcontent-%COMP%], .members-title[_ngcontent-%COMP%]{font-size:22px;line-height:28px}.summary-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.members-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.filters[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}.filters[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{flex:1 1 160px}}"]})}}return t})();function HO(t,r){t&1&&h(0,"span",7)}var Jm=(()=>{class t{constructor(e,n,i,s,d){this.dialogRef=e,this.data=n,this.adminService=i,this.notify=s,this.cdr=d,this.deleting=!1,this.costCenterId=null,this.costCenterName="",this.costCenterId=n?.costcenter?.ID||null,this.costCenterName=n?.costcenter?.COST_CENTER_NAME||""}onSubmit(){!this.costCenterId||this.deleting||(this.deleting=!0,this.cdr.detectChanges(),this.adminService.updateCostCenter({ID:this.costCenterId,DELETED:!0}).subscribe({next:e=>{this.deleting=!1,this.cdr.detectChanges(),this.notify.showNotification(e?.message||"Cost center deleted successfully","top","success",e?.status),this.dialogRef.close({state:!0,id:this.costCenterId})},error:e=>{this.deleting=!1,this.cdr.detectChanges(),this.notify.showNotification(e?.error?.message||"Failed to delete cost center","top","error",e?.error?.status)}}))}onClose(){this.deleting||this.dialogRef.close({state:!1})}static{this.\u0275fac=function(n){return new(n||t)(y(Et),y(Qt),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-delete-cost-center"]],decls:12,vars:5,consts:[[1,"content"],["mat-dialog-title","",1,"heading"],["mat-dialog-content","",1,"message"],["mat-dialog-actions","",1,"actions"],["mat-stroked-button","",1,"button",3,"click","disabled"],["mat-stroked-button","",1,"save-button",3,"click","disabled"],["class","loader",4,"ngIf"],[1,"loader"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1),l(2,"Delete Confirmation"),a(),o(3,"div",2),l(4),a(),o(5,"div",3)(6,"button",4),v("click",function(){return i.onClose()}),l(7," Cancel "),a(),o(8,"button",5),v("click",function(){return i.onSubmit()}),g(9,HO,1,0,"span",6),o(10,"span"),l(11),a()()()()),n&2&&(c(4),x(" Are you sure you want to delete ",i.costCenterName," cost center? "),c(2),p("disabled",i.deleting),c(2),p("disabled",i.deleting),c(),p("ngIf",i.deleting),c(2),C(i.deleting?"Deleting...":"Confirm"))},dependencies:[N,B,z,ut,Yi,Qi,Ki],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-top:10px}.heading[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:24px;color:#000}.message[_ngcontent-%COMP%]{font-size:16px;font-weight:300;line-height:28px;color:#000c}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
12gap:4%;align-items:center;margin-top:4%}.button[_ngcontent-%COMP%]{width:100px;height:38px;background:#fff;border:1px solid #1A73E9;border-radius:4px;color:#1a73e9!important;font-size:14px;font-weight:600;cursor:pointer}.save-button[_ngcontent-%COMP%]{width:100px;height:38px;color:#f8f8f8;border:1px solid #1A73E9;border-radius:4px;background:#1a73e9!important;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.save-button[_ngcontent-%COMP%]:disabled, .button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.75}.loader[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"]})}}return t})();var Vl=()=>[];function WO(t,r){t&1&&(o(0,"div",46)(1,"div",47)(2,"div",48),h(3,"span",49),a()()())}function GO(t,r){if(t&1&&(o(0,"mat-option",50),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),C(e.label)}}function YO(t,r){if(t&1&&(o(0,"mat-option",50),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),C(e.label)}}function KO(t,r){if(t&1&&(o(0,"mat-option",50),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),C(e.label)}}function QO(t,r){t&1&&(o(0,"th",51),l(1,"Cost Center"),a())}function JO(t,r){if(t&1){let e=A();o(0,"td",52)(1,"div",53)(2,"span",54),h(3,"iconify-icon",55),a(),o(4,"div",56)(5,"button",57),v("click",function(i){let s=O(e).$implicit;return u().openCostCenterBreakdown(s),P(i.stopPropagation())}),l(6),a(),o(7,"div",58),l(8),a()()()()}if(t&2){let e=r.$implicit;c(6),C(e.COST_CENTER_NAME||"-"),c(2),C(e.COST_CENTER_DESCRIPTION||"-")}}function ZO(t,r){t&1&&(o(0,"th",51),l(1,"Teams"),a())}function XO(t,r){t&1&&(o(0,"span"),l(1,", "),a())}function eP(t,r){if(t&1&&(I(0),l(1),g(2,XO,2,0,"span",62),T()),t&2){let e=r.$implicit,n=r.last;c(),x(" ",(e==null?null:e.TEAM_NAME)||"-"),c(),p("ngIf",!n)}}function tP(t,r){if(t&1&&(o(0,"div",58),g(1,eP,3,2,"ng-container",61),a()),t&2){let e=u().$implicit;c(),p("ngForOf",e.TEAMS)}}function nP(t,r){t&1&&(o(0,"div",58),l(1,"-"),a())}function iP(t,r){if(t&1&&(o(0,"td",52)(1,"div",59),l(2),a(),g(3,tP,2,1,"div",60)(4,nP,2,0,"ng-template",null,0,at),a()),t&2){let e=r.$implicit,n=Ce(5);c(2),C((e.TEAMS||J(3,Vl)).length),c(),p("ngIf",(e.TEAMS||J(4,Vl)).length)("ngIfElse",n)}}function oP(t,r){t&1&&(o(0,"th",51),l(1,"Team Members"),a())}function rP(t,r){if(t&1&&(o(0,"td",63),l(1),a()),t&2){let e=r.$implicit;c(),C((e.TEAMS||J(1,Vl)).length)}}function aP(t,r){t&1&&(o(0,"th",51),l(1,"Status"),a())}function lP(t,r){if(t&1&&(o(0,"td",52)(1,"span",64),l(2),a()()),t&2){let e=r.$implicit;c(),p("ngClass",((e==null||e.OWNER==null||e.OWNER.ACCOUNT_STATUS==null?null:e.OWNER.ACCOUNT_STATUS.NAME)||"-").toLowerCase()),c(),x(" ",(e==null||e.OWNER==null||e.OWNER.ACCOUNT_STATUS==null?null:e.OWNER.ACCOUNT_STATUS.NAME)||"-"," ")}}function sP(t,r){t&1&&(o(0,"th",51),l(1,"Actions"),a())}function cP(t,r){if(t&1){let e=A();o(0,"td",52)(1,"div",65)(2,"button",66),v("click",function(i){let s=O(e).$implicit,d=u();return P(d.editCostCenter(s,i))}),l(3,"Edit"),a(),o(4,"button",67),v("click",function(i){let s=O(e).$implicit,d=u();return P(d.deleteCostCenter(s,i))}),l(5,"Delete"),a()()()}}function dP(t,r){t&1&&h(0,"tr",68)}function pP(t,r){if(t&1){let e=A();o(0,"tr",69),v("click",function(){let i=O(e).$implicit,s=u();return P(s.openCostCenterBreakdown(i))}),a()}}function mP(t,r){if(t&1&&(o(0,"tr",70)(1,"td",71),l(2," No records found "),a()()),t&2){let e=u();c(),He("colspan",e.displayedColumns.length)}}function uP(t,r){if(t&1){let e=A();o(0,"div",72)(1,"mat-paginator",73),v("page",function(i){O(e);let s=u();return P(s.onPageChange(i))}),a()()}if(t&2){let e=u();c(),p("length",e.totalCostCenters)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",!0)}}var Zm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.dialog=n,this.adminService=i,this.notify=s,this.cdr=d,this.selectedStatus="All Status",this.selectedTeam
12s="All Teams",this.selectedCostRange="Cost Range",this.loading=!1,this.pageIndex=0,this.pageSize=10,this.pageSizeOptions=[5,10,25],this.totalCostCenters=0,this.stats={},this.rows=[],this.displayedColumns=["costCenter","teams","teamMembers","status","actions"],this.statusOptions=[{label:"All Status",value:"All Status"},{label:"Active",value:"Active"},{label:"Inactive",value:"Inactive"}],this.teamOptions=[{label:"All Teams",value:"All Teams"},{label:"1-2 Teams",value:"1-2 Teams"},{label:"3-4 Teams",value:"3-4 Teams"},{label:"5+ Teams",value:"5+ Teams"}],this.costRangeOptions=[{label:"Cost Range",value:"Cost Range"},{label:"< $10k",value:"< $10k"},{label:"$10k-$50k",value:"$10k-$50k"},{label:"$50k+",value:"$50k+"}],this.rowIcons=[{icon:"ri:code-box-line",iconClass:"row-icon-blue"},{icon:"ri:megaphone-line",iconClass:"row-icon-green"},{icon:"ri:hand-coin-line",iconClass:"row-icon-purple"},{icon:"ri:settings-4-line",iconClass:"row-icon-orange"},{icon:"ri:palette-line",iconClass:"row-icon-indigo"}]}ngOnInit(){this.getCostCenters(),this.getCostCenterStats()}get filteredRows(){return this.rows.filter(e=>this.selectedStatus==="All Status"?!0:(e?.OWNER?.ACCOUNT_STATUS?.NAME||"")===this.selectedStatus)}get ownerName(){let e=this.rows[0]?.OWNER;return`${e?.FIRST_NAME||""} ${e?.LAST_NAME||""}`.trim()||"-"}get ownerEmail(){return this.rows[0]?.OWNER?.EMAIL_ID||"-"}addCostCenter(){this.router.navigate(["/admin-dashboard/cost-center/manage-cost-center"])}openCostCenterBreakdown(e){this.router.navigate(["/admin-dashboard/cost-center/cost-center-breakdown"],{queryParams:{id:e?.ID},state:{costCenter:e}})}editCostCenter(e,n){n.stopPropagation(),this.router.navigate(["/admin-dashboard/cost-center/manage-cost-center"],{queryParams:{id:e?.ID},state:{costCenter:e}})}deleteCostCenter(e,n){n.stopPropagation(),this.dialog.open(Jm,{data:{costcenter:e}}).afterClosed().subscribe(s=>{s?.state&&(this.getCostCenterStats(),this.getCostCenters())})}getRowIcon(e){return this.rowIcons[e%this.rowIcons.length].icon}getRowIconClass(e){return this.rowIcons[e%this.rowIcons.length].iconClass}onPageChange(e){this.loading||(this.pageIndex=e.pageIndex,this.pageSize=e.pageSize,this.getCostCenters())}getCostCenters(){this.loading=!0,this.cdr.detectChanges();let e=this.pageIndex+1;this.adminService.getCostCenters(e,this.pageSize).pipe(Xe(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe({next:n=>{this.rows=Array.isArray(n?.object)?n.object:[];let i=this.resolveTotalCount(n);i!==null?this.totalCostCenters=i:this.totalCostCenters||(this.totalCostCenters=this.rows.length),this.cdr.detectChanges()},error:n=>{this.rows=[],this.notify.showNotification(n?.error?.message||"Failed to fetch cost centers","top","error",n?.error?.status),this.cdr.detectChanges()}})}getCostCenterStats(){this.adminService.getCostCenterAnalytics().subscribe({next:e=>{this.stats=e?.object||{};let n=Number(this.stats?.COST_CENTER_COUNT);Number.isFinite(n)&&n>=0&&(this.totalCostCenters=n),this.cdr.detectChanges()},error:()=>{this.stats={},this.cdr.detectChanges()}})}resolveTotalCount(e){let n=[e?.total,e?.count,e?.TOTAL_COUNT,e?.COUNT];for(let i of n)if(Number.isFinite(i)&&Number(i)>=0)return Number(i);return null}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Se),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cost-center"]],decls:82,vars:14,consts:[["noTeams",""],[1,"cost-center-page"],[1,"main-content"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-content"],["class","overlay",4,"ngIf"],[1,"title"],[1,"subtitle"],[1,"overview-grid"],[1,"stat-card"],[1,"stat-content"],[1,"stat-label"],[1,"stat-value"],[1,"stat-sub"],[1,"stat-icon","stat-icon-blue"],["icon","ri:team-line"],[1,"stat-icon","stat-icon-indigo"],["icon","ri:building-2-line"],[1,"stat-icon","stat-icon-green"],["icon","mage:user"],["type","button",1,"add-cost-btn",3,"click"],["icon","ic:round-plus"],[1,"table-card"],[1,"table-head"],[1,"section-title"],[1,"filters"],[3,"selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],[1,"table-wrapper"],["mat-table","",1,"cost-center-table",3,"dataSource"],["matColumnDef","costCenter"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","teams"],["matColumnDef","teamMembers"],["mat-cell","","class","primary-text",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["class","mat-mdc-row",4,"matNoDataRow"],["class","table-pagination",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],["mat-header-cell",""],["mat-cell",""],[1,"detail-cell"],[1,"row-icon","cost-icon-blue"],["icon","material-symbols:code"],[1,"detail-copy"],["type","button",1,"name-link",3,"click"],[1,"secondary-text"],[1,"primary-text"],["class","secondary-text",4,"ngIf","ngIfElse"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-cell","",1,"primary-text"],[1,"status-pill",3,"ngClass"],[1,"action-buttons"],["type","button",1,"action-edit",3,"click"],["type","button",1,"action-delete",3,"click"],["mat-header-row",""],["mat-row","",3,"click"],[1,"mat-mdc-row"],[1,"mat-mdc-cell","no-records-cell"],[1,"table-pagination"],[3,"page","length","pageSize","pageIndex","pageSizeOptions","showFirstLastButtons"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"span",5),l(5,"User Config"),a(),o(6,"span",6),l(7,">"),a(),o(8,"span",7),l(9,"Cost Center"),a()(),o(10,"div",8),g(11,WO,4,0,"div",9),o(12,"div",10),l(13,"Cost Center"),a(),o(14,"div",11),l(15," Organize and manage Cost Centers for effective cost allocation and budget management across your organization "),a()()(),o(16,"div",12)(17,"div",13)(18,"div",14)(19,"div",15),l(20,"Cost Center"),a(),o(21,"div",16),l(22),a(),o(23,"div",17),l(24,"Total units"),a()(),o(25,"div",18),h(26,"iconify-icon",19),a()(),o(27,"div",13)(28,"div",14)(29,"div",15),l(30,"Teams"),a(),o(31,"div",16),l(32),a(),o(33,"div",17),l(34,"Assigned Teams"),a()(),o(35,"div",20),h(36,"iconify-icon",21),a()(),o(37,"div",13)(38,"div",14)(39,"div",15),l(40,"Team Members"),a(),o(41,"div",16),l(42),a(),o(43,"div",17),l(44,"Total Members"),a()(),o(45,"div",22),h(46,"iconify-icon",23),a()()(),o(47,"button",24),v("click",function(){return i.addCostCenter()}),h(48,"iconify-icon",25),l(49," Add New Cost Center "),a(),o(50,"div",26)(51,"div",27)(52,"div",28),l(53,"Cost Center"),a(),o(54,"div",29)(55,"mat-select",30),v("selectionChange",function(d){return i.selectedStatus=d.value}),g(56,GO,2,2,"mat-option",31),a(),o(57,"mat-select",30),v("selectionChange",function(d){return i.selectedTeam
12s=d.value}),g(58,YO,2,2,"mat-option",31),a(),o(59,"mat-select",30),v("selectionChange",function(d){return i.selectedCostRange=d.value}),g(60,KO,2,2,"mat-option",31),a()()(),o(61,"div",32)(62,"table",33),I(63,34),g(64,QO,2,0,"th",35)(65,JO,9,2,"td",36),T(),I(66,37),g(67,ZO,2,0,"th",35)(68,iP,6,5,"td",36),T(),I(69,38),g(70,oP,2,0,"th",35)(71,rP,2,2,"td",39),T(),I(72,40),g(73,aP,2,0,"th",35)(74,lP,3,2,"td",36),T(),I(75,41),g(76,sP,2,0,"th",35)(77,cP,6,0,"td",36),T(),g(78,dP,1,0,"tr",42)(79,pP,1,0,"tr",43)(80,mP,3,1,"tr",44),a()(),g(81,uP,2,5,"div",45),a()()()),n&2&&(c(11),p("ngIf",i.loading),c(11),C((i.stats==null?null:i.stats.COST_CENTER_COUNT)||0),c(10),C((i.stats==null?null:i.stats.TEAM_COUNT)||0),c(10),C((i.stats==null?null:i.stats.TEAM_MEMBER_COUNT)||0),c(13),p("value",i.selectedStatus),c(),p("ngForOf",i.statusOptions),c(),p("value",i.selectedTeams),c(),p("ngForOf",i.teamOptions),c(),p("value",i.selectedCostRange),c(),p("ngForOf",i.costRangeOptions),c(2),p("dataSource",i.filteredRows),c(16),p("matHeaderRowDef",i.displayedColumns),c(),p("matRowDefColumns",i.displayedColumns),c(2),p("ngIf",i.totalCostCenters>0))},dependencies:[N,xe,$,B,z,fe,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,gt],styles:[".cost-center-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px;min-height:100%;background:linear-gradient(180deg,#fbfdff,#f7f8fb)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.header-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;color:#111827;font-weight:700}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.overview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:18px}.owner-card[_ngcontent-%COMP%], .stat-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:25px;box-shadow:0 1px 2px #0000000d}.owner-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;justify-content:center}.owner-label[_ngcontent-%COMP%]{font-size:14px;color:#374151}.owner-name[_ngcontent-%COMP%]{font-size:24px;line-height:32px;color:#111827;font-weight:700}.owner-email[_ngcontent-%COMP%]{color:#6b7280;font-size:14px}.stat-card[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.stat-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.stat-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;font-weight:500}.stat-value[_ngcontent-%COMP%]{font-size:24px;line-height:32px;color:#111827;font-weight:700}.stat-sub[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.stat-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;font-size:20px}.stat-icon-blue[_ngcontent-%COMP%]{color:#57b5e7;background:#57b5e71a}.stat-icon-indigo[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.stat-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#dcfce7}.add-cost-btn[_ngcontent-%COMP%]{width:fit-content;height:40px;padding:8px 16px;border:none;border-radius:8px;background:#57b5e7;color:#fff;font-size:16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.table-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;box-shadow:0 1px 2px #0000000d}.table-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.section-title[_ngcontent-%COMP%]{color:#111827;font-weight:700;font-size:18px;line-height:28px;margin-bottom:14px}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.filters[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{min-width:138px;height:38px;border:1px solid #d1d5db;border-radius:20px;background:#fff;color:#374151;font-size:14px;padding:0 12px;display:flex;justify-content:center;align-items:center}.table-wrapper[_ngcontent-%COMP%]{overflow-x:auto}.cost-center-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{cursor:pointer}.cost-center-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#f9fafb}.cost-center-table[_ngcontent-%COMP%]{width:100%;min-width:980px;border-collapse:collapse}.cost-center-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left;padding:14px 18px;background:#f9fafb;color:#6b7280;font-size:12px;font-weight:600}.cost-center-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:14px 18px;border-bottom:1px solid #e5e7eb;color:#111827;font-size:14px;vertical-align:middle}.cost-center-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:none}.detail-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.row-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.row-icon-blue[_ngcontent-%COMP%]{color:#3b82f6;background:#dbeafe}.row-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#dcfce7}.row-icon-purple[_ngcontent-%COMP%]{color:#9333ea;background:#efe5ff}.row-icon-orange[_ngcontent-%COMP%]{color:#f97316;background:#ffedd5}.row-icon-indigo[_ngcontent-%COMP%]{color:#6366f1;background:#e0e7ff}.detail-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.name-link[_ngcontent-%COMP%]{border:none;background:transparent;color:#3b82f6;font-size:14px;font-weight:600;text-align:left;padding:0;cursor:pointer;text-decoration:underline}.primary-text[_ngcontent-%COMP%]{color:#111827;font-weight:600}.secondary-text[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:2px 10px;border-radius:10px;font-size:12px}.status-pill.active[_ngcontent-%COMP%]{background:#dcfce7;color:#15803d}.status-pill.inactive[_ngcontent-%COMP%]{background:#fef3c7;color:#92400e}.status-pill.removed[_ngcontent-%COMP%]{background:#fee2e2;color:#b91c1c}.action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}
12.action-edit[_ngcontent-%COMP%], .action-delete[_ngcontent-%COMP%]{border:none;background:transparent;font-size:14px;cursor:pointer;padding:0}.action-edit[_ngcontent-%COMP%]{color:#57b5e7}.action-delete[_ngcontent-%COMP%]{color:#ef4444}.cost-icon-blue[_ngcontent-%COMP%]{color:#2f74f6;background:#deebff}@media(max-width:1180px){.overview-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(220px,1fr))}}@media(max-width:900px){.cost-center-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:30px;line-height:34px}.subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:22px}.overview-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.owner-name[_ngcontent-%COMP%], .stat-value[_ngcontent-%COMP%], .section-title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.table-head[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.filters[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}.filters[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{flex:1 1 150px}}"]})}}return t})();function gP(t,r){t&1&&(o(0,"div",45)(1,"div",46)(2,"div",47),h(3,"span",48),a()()())}function fP(t,r){t&1&&(o(0,"th",49),l(1,"Team"),a())}function hP(t,r){if(t&1&&(o(0,"td",50)(1,"div",51)(2,"span",52),h(3,"iconify-icon",22),a(),o(4,"div",53)(5,"div",54),l(6),a(),o(7,"div",55),l(8),a()()()()),t&2){let e=r.$implicit;c(6),C((e==null||e.TEAM==null?null:e.TEAM.TEAM_NAME)||"-"),c(2),C((e==null||e.TEAM==null?null:e.TEAM.TEAM_DESCRIPTION)||"-")}}function _P(t,r){t&1&&(o(0,"th",49),l(1,"Team Head"),a())}function CP(t,r){if(t&1&&(o(0,"td",50)(1,"div",51)(2,"span",56),l(3),a(),o(4,"div",53)(5,"div",54),l(6),a(),o(7,"div",55),l(8),a()()()()),t&2){let e=r.$implicit,n=u();c(3),C(n.getInitials(e==null||e.TEAM==null?null:e.TEAM.OWNER)),c(3),C(n.getDisplayName(e==null||e.TEAM==null?null:e.TEAM.OWNER)),c(2),C((e==null||e.TEAM==null||e.TEAM.OWNER==null?null:e.TEAM.OWNER.EMAIL_ID)||"-")}}function xP(t,r){t&1&&(o(0,"th",49),l(1,"Team Size"),a())}function vP(t,r){if(t&1&&(o(0,"td",57),l(1),a()),t&2){let e=r.$implicit;c(),C((e==null?null:e.TEAM_MEMBER_COUNT)||0)}}function bP(t,r){t&1&&(o(0,"th",49),l(1,"Creation Date"),a())}function yP(t,r){if(t&1&&(o(0,"td",58),l(1),F(2,"date"),a()),t&2){let e=r.$implicit;c(),C(ie(2,1,e==null?null:e.CREATED_DATE,"dd-MM-yyyy"))}}function MP(t,r){t&1&&(o(0,"th",49),l(1,"Created By"),a())}function SP(t,r){if(t&1&&(o(0,"td",50)(1,"div",51)(2,"span",56),l(3),a(),o(4,"div",53)(5,"div",54),l(6),a(),o(7,"div",55),l(8),a()()()()),t&2){let e=r.$implicit,n=u();c(3),C(n.getInitials(e==null||e.TEAM==null?null:e.TEAM.CREATED_BY)),c(3),C(n.getDisplayName(e==null||e.TEAM==null?null:e.TEAM.CREATED_BY)),c(2),C((e==null||e.TEAM==null||e.TEAM.CREATED_BY==null?null:e.TEAM.CREATED_BY.EMAIL_ID)||"-")}}function OP(t,r){t&1&&h(0,"tr",59)}function PP(t,r){t&1&&h(0,"tr",60)}function EP(t,r){if(t&1&&(o(0,"tr",61)(1,"td",62),l(2," No records found "),a()()),t&2){let e=u();c(),He("colspan",e.displayedTeamColumns.length)}}function wP(t,r){if(t&1){let e=A();o(0,"div",63)(1,"mat-paginator",64),v("page",function(i){O(e);let s=u();return P(s.onPageChange(i))}),a()()}if(t&2){let e=u();c(),p("length",e.totalTeams)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",!0)}}var Xm=(()=>{class t{constructor(e,n,i,s,d){this.router=e,this.route=n,this.adminService=i,this.notify=s,this.cdr=d,this.loading=!1,this.selectedCostCenterId=null,this.costCenter=null,this.teams=[],this.displayedTeamColumns=["team","teamHead","teamSize","creationDate","createdBy"],this.pageIndex=0,this.pageSize=10,this.totalTeams=0,this.pageSizeOptions=[5,10,25],this.teamIcons=[{icon:"mdi:database-outline",iconClass:"team-icon-blue"},{icon:"mdi:monitor-cellphone",iconClass:"team-icon-green"},{icon:"mdi:source-fork",iconClass:"team-icon-purple"},{icon:"mdi:currency-usd",iconClass:"team-icon-violet"}]}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("id");if(this.selectedCostCenterId=e?Number(e):null,!this.selectedCostCenterId){this.notify.showNotification("Cost center id is missing","top","error",400);return}this.getCostCenterById(this.selectedCostCenterId),this.getCostCenterTeams(this.selectedCostCenterId,this.pageIndex,this.pageSize)}get membersCount(){return(Array.isArray(this.teams)?this.teams:[]).reduce((n,i)=>n+Number(i?.TEAM_MEMBER_COUNT||0),0)}navigateToCostCenters(){this.router.navigate(["/admin-dashboard/cost-center"])}addNewTeam(){this.router.navigate(["/admin-dashboard/teams/manage-team"])}editCostCenter(){this.selectedCostCenterId&&this.router.navigate(["/admin-dashboard/cost-center/manage-cost-center"],{queryParams:{id:this.selectedCostCenterId},state:{costCenter:this.costCenter}})}onPageChange(e){this.loading||!this.selectedCostCenterId||(this.pageIndex=e.pageIndex,this.pageSize=e.pageSize,this.getCostCenterTeams(this.selectedCostCenterId,this.pageIndex,this.pageSize))}getTeamIcon(e){return this.teamIcons[e%this.teamIcons.length].icon}getTeamIconClass(e){return this.teamIcons[e%this.teamIcons.length].iconClass}getDisplayName(e){return`${e?.FIRST_NAME||""} ${e?.LAST_NAME||""}`.trim()||"-"}
12getInitials(e){return this.getDisplayName(e).split(" ").filter(Boolean).slice(0,2).map(i=>i[0]?.toUpperCase()||"").join("")||"NA"}getCostCenterById(e){this.loading=!0,this.cdr.detectChanges(),this.adminService.getCostCenterById(e).pipe(Xe(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object[0]:n?.object;this.costCenter=i||null,this.cdr.detectChanges()},error:n=>{this.costCenter=null,this.notify.showNotification(n?.error?.message||"Failed to fetch cost center details","top","error",n?.error?.status),this.cdr.detectChanges()}})}getCostCenterTeams(e,n=0,i=10){this.loading=!0,this.cdr.detectChanges(),this.adminService.getCostCenterTeams(e,n,i).pipe(Xe(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe({next:s=>{let d=Array.isArray(s?.object)?s.object:[];this.teams=d;let m=this.resolveTotalCount(s),f=d.length===i;this.totalTeams=m??n*i+d.length+(f?1:0),this.cdr.detectChanges()},error:s=>{this.teams=[],this.notify.showNotification(s?.error?.message||"Failed to fetch cost center teams","top","error",s?.error?.status),this.cdr.detectChanges()}})}resolveTotalCount(e){let n=[e?.total,e?.count,e?.TOTAL_COUNT,e?.COUNT];for(let i of n)if(Number.isFinite(i)&&Number(i)>=0)return Number(i);return null}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cost-center-breakdown"]],decls:78,vars:12,consts:[[1,"cost-center-breakdown-page"],[1,"main-content"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item",3,"click"],[1,"breadcrumb-item","breadcrumb-current"],[1,"overview-header"],["class","overlay",4,"ngIf"],[1,"summary-icon","summary-icon-blue"],["icon","material-symbols:code"],[1,"header-copy"],[1,"title"],[1,"subtitle"],[1,"summary-grid"],[1,"summary-card"],[1,"summary-label"],[1,"summary-owner"],[1,"summary-sub"],[1,"summary-icon-right","stat-icon-blue"],["icon","ri:team-line"],[1,"summary-icon-right","stat-icon-indigo"],["icon","ri:building-2-line"],[1,"summary-icon-right","stat-icon-green"],["icon","mage:user"],[1,"top-actions"],["type","button",1,"edit-btn",3,"click"],["icon","ri:edit-line"],[1,"team-details-card"],[1,"section-title"],[1,"table-wrapper"],["mat-table","",1,"teams-table",3,"dataSource"],["matColumnDef","team"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","teamHead"],["matColumnDef","teamSize"],["mat-cell","","class","team-size",4,"matCellDef"],["matColumnDef","creationDate"],["mat-cell","","class","creation-date",4,"matCellDef"],["matColumnDef","createdBy"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-mdc-row",4,"matNoDataRow"],["class","table-pagination",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["mat-header-cell",""],["mat-cell",""],[1,"detail-cell"],[1,"team-icon","summary-icon-blue"],[1,"detail-copy"],[1,"primary-text"],[1,"secondary-text"],[1,"member-avatar","avatar-blue"],["mat-cell","",1,"team-size"],["mat-cell","",1,"creation-date"],["mat-header-row",""],["mat-row",""],[1,"mat-mdc-row"],[1,"mat-mdc-cell","no-records-cell"],[1,"table-pagination"],[3,"page","length","pageSize","pageIndex","pageSizeOptions","showFirstLastButtons"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),l(4,"User Config"),a(),o(5,"span",4),l(6,">"),a(),o(7,"span",5),v("click",function(){return i.navigateToCostCenters()}),l(8,"Cost Centers"),a(),o(9,"span",4),l(10,">"),a(),o(11,"span",6),l(12,"Cost Center Breakdown"),a()(),o(13,"div",7),g(14,gP,4,0,"div",8),o(15,"div",9),h(16,"iconify-icon",10),a(),o(17,"div",11)(18,"div",12),l(19),a(),o(20,"div",13),l(21),a()()(),o(22,"div",14)(23,"div",15)(24,"div",16),l(25,"Cost Center Owner"),a(),o(26,"div",17),l(27),a(),o(28,"div",18),l(29),a(),o(30,"div",19),h(31,"iconify-icon",20),a()(),o(32,"div",15)(33,"div",16),l(34,"Teams"),a(),o(35,"div",17),l(36),a(),o(37,"div",18),l(38,"Assigned Teams"),a(),o(39,"div",21),h(40,"iconify-icon",22),a()(),o(41,"div",15)(42,"div",16),l(43,"Team Members"),a(),o(44,"div",17),l(45),a(),o(4
126,"div",18),l(47,"Total Members"),a(),o(48,"div",23),h(49,"iconify-icon",24),a()()(),o(50,"div",25)(51,"button",26),v("click",function(){return i.editCostCenter()}),h(52,"iconify-icon",27),l(53," Edit Cost Center "),a()(),o(54,"div",28)(55,"div",29),l(56,"Team Details"),a(),o(57,"div",30)(58,"table",31),I(59,32),g(60,fP,2,0,"th",33)(61,hP,9,2,"td",34),T(),I(62,35),g(63,_P,2,0,"th",33)(64,CP,9,3,"td",34),T(),I(65,36),g(66,xP,2,0,"th",33)(67,vP,2,1,"td",37),T(),I(68,38),g(69,bP,2,0,"th",33)(70,yP,3,4,"td",39),T(),I(71,40),g(72,MP,2,0,"th",33)(73,SP,9,3,"td",34),T(),g(74,OP,1,0,"tr",41)(75,PP,1,0,"tr",42)(76,EP,3,1,"tr",43),a()(),g(77,wP,2,5,"div",44),a()()()),n&2&&(c(14),p("ngIf",i.loading),c(5),C(i.costCenter==null?null:i.costCenter.COST_CENTER_NAME),c(2),C(i.costCenter==null?null:i.costCenter.COST_CENTER_DESCRIPTION),c(6),rt("",i.costCenter==null||i.costCenter.OWNER==null?null:i.costCenter.OWNER.FIRST_NAME," ",i.costCenter==null||i.costCenter.OWNER==null?null:i.costCenter.OWNER.LAST_NAME),c(2),C(i.costCenter==null||i.costCenter.OWNER==null?null:i.costCenter.OWNER.EMAIL_ID),c(7),C((i.costCenter==null||i.costCenter.TEAMS==null?null:i.costCenter.TEAMS.length)||0),c(9),C(i.membersCount),c(13),p("dataSource",i.teams),c(16),p("matHeaderRowDef",i.displayedTeamColumns),c(),p("matRowDefColumns",i.displayedTeamColumns),c(2),p("ngIf",i.totalTeams>0))},dependencies:[N,B,z,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,gt,us,pt],styles:[".cost-center-breakdown-page[_ngcontent-%COMP%]{padding:24px;min-height:100%;background:linear-gradient(180deg,#fbfdff,#f7f8fb)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-item[_ngcontent-%COMP%]:not(.breadcrumb-current){cursor:pointer}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.overview-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}.summary-icon[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}.summary-icon-blue[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.header-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;color:#111827;font-weight:700}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:18px}.summary-card[_ngcontent-%COMP%]{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:20px;box-shadow:0 1px 2px #0000000d}.summary-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;font-weight:500;margin-bottom:4px}.summary-owner[_ngcontent-%COMP%]{font-size:24px;line-height:32px;font-weight:700;color:#111827;margin-bottom:4px}.summary-sub[_ngcontent-%COMP%]{font-size:12px;line-height:16px;color:#6b7280}.summary-icon-right[_ngcontent-%COMP%]{position:absolute;right:20px;top:32px;width:40px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}.stat-icon-blue[_ngcontent-%COMP%]{color:#57b5e7;background:#57b5e71a}.stat-icon-indigo[_ngcontent-%COMP%]{color:#2563eb;background:#dbeafe}.stat-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#dcfce7}.top-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.add-btn[_ngcontent-%COMP%], .edit-btn[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #d1d5db;height:40px;padding:8px 16px;font-size:16px;cursor:pointer;display:inline-flex;align-items:center;gap:8px}.add-btn[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff}.edit-btn[_ngcontent-%COMP%]{background:#fff;color:#374151}.team-details-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:20px;box-shadow:0 1px 2px #0000000d}.section-title[_ngcontent-%COMP%]{color:#111827;font-weight:700;font-size:18px;line-height:28px;margin-bottom:14px}.table-wrapper[_ngcontent-%COMP%]{overflow-x:auto}.teams-table[_ngcontent-%COMP%]{width:100%;min-width:980px;border-collapse:collapse}.teams-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left;color:#6b7280;font-size:13px;font-weight:600;padding:16px 18px;background:#f9fafb}.teams-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:14px 18px;border-bottom:1px solid #e5e7eb;color:#111827;font-size:14px;vertical-align:middle}.teams-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:none}.detail-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.team-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:16px}.team-icon-blue[_ngcontent-%COMP%]{color:#2f74f6;background:#deebff}.team-icon-green[_ngcontent-%COMP%]{color:#16a34a;background:#daf5e4}.team-icon-purple[_ngcontent-%COMP%]{color:#8b5cf6;background:#efe5ff}.team-icon-violet[_ngcontent-%COMP%]{color:#9333ea;background:#f1e3ff}.detail-copy[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.primary-text[_ngcontent-%COMP%]{font-weight:500;color:#111827}.secondary-text[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}
12.member-avatar[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.avatar-blue[_ngcontent-%COMP%]{background:#3b82f6}.avatar-green[_ngcontent-%COMP%]{background:#22c55e}.avatar-purple[_ngcontent-%COMP%]{background:#a855f7}.avatar-violet[_ngcontent-%COMP%]{background:#9333ea}.team-size[_ngcontent-%COMP%], .creation-date[_ngcontent-%COMP%]{font-weight:500}.no-records-cell[_ngcontent-%COMP%]{text-align:center;color:#6b7280;padding:22px 18px}@media(max-width:980px){.cost-center-breakdown-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.summary-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.summary-owner[_ngcontent-%COMP%]{font-size:24px;line-height:30px}}"]})}}return t})();function IP(t,r){if(t&1){let e=A();o(0,"span",5),v("click",function(){O(e);let i=u();return P(i.navigateToCostCentersBreakdown())}),l(1,"Cost Centers Breakdown"),a()}}function TP(t,r){t&1&&(o(0,"span",4),l(1,">"),a())}function AP(t,r){t&1&&(o(0,"div",33)(1,"div",34)(2,"div",35),h(3,"span",36),a()()())}function DP(t,r){if(t&1&&(o(0,"mat-option",37),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",((e.FIRST_NAME||"")+" "+(e.LAST_NAME||"")).trim()||e.EMAIL_ID||e.USERNAME||"User #"+e.ID," ")}}function RP(t,r){if(t&1){let e=A();o(0,"label",38)(1,"input",39),v("change",function(i){let s=O(e).$implicit,d=u();return P(d.onToggleTeam(s,i.target.checked))}),a(),o(2,"span"),l(3),a()()}if(t&2){let e=r.$implicit,n=u();c(),p("checked",n.isTeamChecked(e.ID)),c(2),C(e.TEAM_NAME||"Team #"+e.ID)}}var eu=(()=>{class t{constructor(e,n,i,s,d,m){this.router=e,this.fb=n,this.route=i,this.adminService=s,this.notify=d,this.cdr=m,this.isEditMode=!1,this.selectedCostCenterId=null,this.loading=!1,this.submitting=!1,this.ownerOptions=[],this.teamOptions=[],this.costCenterForm=this.fb.group({costCenterName:["",U.required],owner:[null,U.required],description:[""],teamIds:[[]]})}ngOnInit(){let e=this.route.snapshot.queryParamMap.get("id");this.selectedCostCenterId=e?Number(e):null,this.isEditMode=!!this.selectedCostCenterId,this.getOwnerOptions(),this.getTeamOptions(),this.isEditMode&&this.selectedCostCenterId&&this.getCostCenterById(this.selectedCostCenterId)}get pageTitle(){return this.isEditMode?"Edit Cost Center":"Add A New Cost Center"}get pageSubtitle(){return this.isEditMode?"Edit Cost Center for cost allocation and management":"Set up a new Cost Center for cost allocation and management"}get submitLabel(){return this.isEditMode?"Save Changes":"Create Cost Center"}get isSubmitDisabled(){return!this.costCenterForm.value.costCenterName?.trim()||!this.costCenterForm.value.owner||!this.costCenterForm.value.description?.trim()||this.submitting}onOwnerChange(e){let n=e?.value??null;this.costCenterForm.patchValue({owner:n})}onToggleTeam(e,n){let i=Number(e?.ID);if(i){if(n){this.costCenterForm.value.teamIds.includes(i)||this.costCenterForm.patchValue({teamIds:[...this.costCenterForm.value.teamIds,i]});return}this.costCenterForm.patchValue({teamIds:this.costCenterForm.value.teamIds.filter(s=>Number(s)!==i)})}}isTeamChecked(e){return this.costCenterForm.value.teamIds.includes(Number(e))}navigateToCostCenters(){this.router.navigate(["/admin-dashboard/cost-center"])}navigateToCostCentersBreakdown(){this.router.navigate(["/admin-dashboard/cost-center/cost-center-breakdown"],{queryParams:{id:this.selectedCostCenterId}})}onCancel(){this.router.navigate(["/admin-dashboard/cost-center"])}onSubmit(){if(this.isSubmitDisabled)return;let e={COST_CENTER_NAME:this.costCenterForm.value.costCenterName?.trim()||"",OWNER_ID:Number(this.costCenterForm.value.owner),COST_CENTER_DESCRIPTION:this.costCenterForm.value.description?.trim()||"",TEAM_ID:(this.costCenterForm.value.teamIds||[]).map(n=>Number(n)).filter(n=>!!n)};if(this.submitting=!0,this.cdr.detectChanges(),this.isEditMode&&this.selectedCostCenterId){e.ID=this.selectedCostCenterId,this.adminService.updateCostCenter(e).subscribe({next:n=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.message||"Cost center updated successfully","top","success",n?.status),this.router.navigateByUrl("/admin-dashboard/cost-center")},error:n=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message||"Failed to update cost center","top","error",n?.error?.status)}});return}this.adminService.createCostCenter(e).subscribe({next:n=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.message||"Cost center created successfully","top","success",n?.status),this.router.navigateByUrl("/admin-dashboard/cost-center")},error:n=>{this.submitting=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message||"Failed to create cost center","top","error",n?.error?.status)}})}getOwnerOptions(){this.adminService.getClientMembersTrim().subscribe({next:e=>{this.ownerOptions=Array.isArray(e?.object)?e.object:[],this.cdr.detectChanges()},error:()=>{this.ownerOptions=[],this.cdr.detectChanges()}})}getTeamOptions(){this.adminService.getTeamsTrim().subscribe({next:e=>{this.teamOptions=Array.isArray(e?.object)?e.object:[],this.cdr.detectChanges()},error:()=>{this.teamOptions=[],this.cdr.detectChanges()}})}getCostCenterById(e){this.loading=!0,this.cdr.detectChanges(),this.adminService.getCostCenterById(e).subscribe({next:n=>{this.loading=!1;let i=Array.isArray(n?.object)?n.object[0]:n?.object;if(!i){this.cdr.detectChanges();return}this.costCenterForm.patchValue({costCenterName:i.COST_CENTER_NAME||"",owner:i?.OWNER?.ID||null,description:i.COST_CENTER_DESCRIPTION||"",teamIds:(Array.isArray(i?.TEAMS)?i.TEAMS:[]).map(s=>Number(s?.ID)).filter(s=>!!s)}),this.cdr.detectChanges()},error:n=>{this.loading=!1,this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message||"Failed to fetch cost center details","top","error",n?.error?.status)}})}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(ze),y(Le),y(Je),y(V),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-manage-cost-center"]],decls:50,vars:13,consts:[[1,"manage-cost-center-page"],[1,"main-content"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item",3,"click"],["class","breadcrumb-item",3,"click",4,"ngIf"],["class","breadcrumb-sep",4,"ngIf"],[1,"breadcrumb-item","breadcrumb-current"],[1,"form-card"],[1,"form-header"],[1,"header-icon"],["icon","ri:team-line"],[1,"header-content"],[1,"title"],[1,"subtitle"],[1,"form-body"],["class","overlay",4,"ngIf"],[1,"form-grid"],[1,"field-group"],["for","cost-center-name"],["id","cost-center-name","type","text","placeholder","Enter Cost Center name",3,"input","value"],["for","owner"],["id","owner","placeholder","Select Owner",3,"selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],[1,"field-group","full-width"],["for","description"],["id","description","rows","4","placeholder","Describe the Cost Center purpose and scope",3,"input","value"],[1,"team
12s-grid"],["class","team-check",4,"ngFor","ngForOf"],[1,"form-footer"],["type","button",1,"cancel-btn",3,"click"],["type","button",1,"submit-btn",3,"click","disabled"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[3,"value"],[1,"team-check"],["type","checkbox",3,"change","checked"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),l(4,"User Config"),a(),o(5,"span",4),l(6,">"),a(),o(7,"span",5),v("click",function(){return i.navigateToCostCenters()}),l(8,"Cost Centers"),a(),o(9,"span",4),l(10,">"),a(),g(11,IP,2,0,"span",6)(12,TP,2,0,"span",7),o(13,"span",8),l(14),a()(),o(15,"div",9)(16,"div",10)(17,"div",11),h(18,"iconify-icon",12),a(),o(19,"div",13)(20,"div",14),l(21),a(),o(22,"div",15),l(23),a()()(),o(24,"div",16),g(25,AP,4,0,"div",17),o(26,"div",18)(27,"div",19)(28,"label",20),l(29,"Cost Center Name"),a(),o(30,"input",21),v("input",function(d){return i.costCenterForm.patchValue({costCenterName:d.target.value})}),a()(),o(31,"div",19)(32,"label",22),l(33,"Owner"),a(),o(34,"mat-select",23),v("selectionChange",function(d){return i.onOwnerChange(d)}),g(35,DP,2,2,"mat-option",24),a()(),o(36,"div",25)(37,"label",26),l(38,"Description"),a(),o(39,"textarea",27),v("input",function(d){return i.costCenterForm.patchValue({description:d.target.value})}),a()(),o(40,"div",25)(41,"label"),l(42,"Assign Teams"),a(),o(43,"div",28),g(44,RP,4,2,"label",29),a()()()(),o(45,"div",30)(46,"button",31),v("click",function(){return i.onCancel()}),l(47,"Cancel"),a(),o(48,"button",32),v("click",function(){return i.onSubmit()}),l(49),a()()()()()),n&2&&(c(11),p("ngIf",i.isEditMode),c(),p("ngIf",i.isEditMode),c(2),C(i.pageTitle),c(7),C(i.pageTitle),c(2),C(i.pageSubtitle),c(2),p("ngIf",i.loading),c(5),p("value",i.costCenterForm.value.costCenterName),c(4),p("value",i.costCenterForm.value.owner),c(),p("ngForOf",i.ownerOptions),c(4),p("value",i.costCenterForm.value.description),c(5),p("ngForOf",i.teamOptions),c(4),p("disabled",i.isSubmitDisabled),c(),C(i.submitLabel))},dependencies:[N,$,B,z,fe,ue],styles:[".manage-cost-center-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px;min-height:100%;background:linear-gradient(180deg,#fbfdff,#f7f8fb)}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.breadcrumb[_ngcontent-%COMP%]{font-size:14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-item[_ngcontent-%COMP%]:not(.breadcrumb-current){cursor:pointer}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.form-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 2px #0000000d;overflow:hidden}.form-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:18px 20px;border-bottom:1px solid #e5e7eb}.header-icon[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:16px;background:#57b5e71a;color:#57b5e7;display:inline-flex;align-items:center;justify-content:center;font-size:20px}.title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;color:#111827;font-weight:700}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.form-body[_ngcontent-%COMP%]{padding:20px}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:18px 24px}.field-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.field-group.full-width[_ngcontent-%COMP%]{grid-column:1/-1}.field-group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#374151}.field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{height:42px;width:auto;border-radius:14px;border:1px solid #d1d5db;padding:0 14px;font-size:15px;color:#111827;background:#fff;outline:none;display:flex;align-items:center}.field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{height:42px;display:flex;align-items:center}.field-group[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{min-height:90px;resize:vertical;padding-top:12px}.field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder, .field-group[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.teams-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px 24px;margin-top:2px}.team-check[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;font-size:14px;color:#111827}.team-check[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{width:18px;height:18px;border-radius:4px;accent-color:#57b5e7}.form-footer[_ngcontent-%COMP%]{border-top:1px solid #e5e7eb;padding:18px 20px;display:flex;align-items:center;gap:10px}.cancel-btn[_ngcontent-%COMP%], .submit-btn[_ngcontent-%COMP%]{border:none;height:38px;padding:8px 24px;border-radius:8px;font-size:15px;font-weight:500;cursor:pointer}.cancel-btn[_ngcontent-%COMP%]{background:#e5e7eb;color:#4b5563}.submit-btn[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.submit-btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}@media(max-width:980px){.manage-cost-center-page[_ngcontent-%COMP%]{padding:14px}.title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:22px}.form-grid[_ngcontent-%COMP%], .teams-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return t})();function kP(t,r){if(t&1&&(o(0,"mat-option",19),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),x(" ",e.label," ")}}var tu=(()=>{class t{constructor(e,n,i,s,d){this.dialogRef=e,this.data=n,this.adminService=i,this.notify=s,this.fb=d,this.loading=!1,this.statusOptions=[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],this.isEditMode=!1,this.selectedTagId=null,this.tagForm=this.fb.group({key:["",U.required],description:["",U.required],example:["",U.required],required:["",U.required]})}ngOnInit(){let e=this.data?.tag;if(!e)return;this.isEditMode=!0,this.selectedTagId=Number(e?.ID)||null;let n=e?.REQUIRED?"Yes":"No";this.tagForm.patchValue({key:e?.TAG_KEY||"",description:e?.TAG_DESCRIPTION||"",example:this.getTagValueText(e?.TAG_VALUE),required:n})}closeDialog(){this.dialogRef?.close()}submit(){if(!this.isFormValid||this.loading)return;let e=this.tagForm.value,n=String(e?.required||"").toLowerCase(),i={TAG_KEY:String(e?.key||"").trim(),TAG_VALUE:this.parseTagValues(String(e?.example||"")),TAG_DESCRIPTION:String(e?.description||"").trim(),REQUIRED:n==="yes"||n==="required"||n==="true"};if(this.loading=!0,this.isEditMode&&this.selectedTagId){i.ID=this.selectedTagId,this.adminService.updateTag(i).subscribe({next:s=>{this.loading=!1,this.notify.showNotification(s?.message,"top",E[s?.status]?E[s?.status]:"success",s?.status),this.dialogRef?.close(!0)},error:s=>{this.loading=!1,this.notify.showNotification(s?.error?.message||"Failed to update tag","top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}});return}this.adminService.createTag(i).subscribe({next:s=>{this.loading=!1,this.notify.showNotification(s?.message,"top",E[s?.status]?E[s?.status]:"success",s?.status),this.dialogRef?.close(!0)},error:s=>{this.loading=!1,this.notify.showNotification(s?.error?.message||"Failed to create tag","top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}})}get isFormValid(){return!!(this.tagForm.valid&&this.parseTagValues(String(this.tagForm.get("example")?.value||"")).length)}get dialogTitle(){return this.isEditMode?"Update Tag":"Add New Tag"}get submitLabel(){return this.isEditMode?"Update Tag":"Add Tag"}parseTagValues(e){if(!e)return[];let n=e.split(/[,|]/g).map(i=>
12i.trim()).filter(Boolean);return Array.from(new Set(n))}getTagValueText(e){return(Array.isArray(e)?e:[]).map(i=>typeof i=="string"?i:i?.TAG_VALUE).filter(Boolean).join(", ")}static{this.\u0275fac=function(n){return new(n||t)(y(Et,8),y(Qt,8),y(Je),y(V),y(ze))}}static{this.\u0275cmp=k({type:t,selectors:[["app-add-tag"]],decls:31,vars:6,consts:[[1,"add-tag-dialog"],[1,"dialog-header"],[1,"dialog-title"],["type","button","aria-label","Close dialog",1,"close-btn",3,"click"],[1,"dialog-body",3,"formGroup"],[1,"form-group"],["for","tag-key",1,"field-label"],["id","tag-key","type","text","placeholder","e.g., Team","formControlName","key",1,"field-input"],["for","tag-description",1,"field-label"],["id","tag-description","maxlength","500","placeholder","Brief description of this tag's purpose","formControlName","description",1,"field-input","field-textarea"],[1,"field-note"],["for","tag-example",1,"field-label"],["id","tag-example","type","text","placeholder","e.g., Dev, Prod","formControlName","example",1,"field-input"],[1,"field-label"],["placeholder","Select","formControlName","required"],[3,"value",4,"ngFor","ngForOf"],[1,"dialog-actions"],["type","button",1,"btn","btn-cancel",3,"click","disabled"],["type","button",1,"btn","btn-submit",3,"click","disabled"],[3,"value"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h2",2),l(3),a(),o(4,"button",3),v("click",function(){return i.closeDialog()}),l(5,"\xD7"),a()(),o(6,"form",4)(7,"div",5)(8,"label",6),l(9,"Tag Key"),a(),h(10,"input",7),a(),o(11,"div",5)(12,"label",8),l(13,"Description"),a(),h(14,"textarea",9),o(15,"div",10),l(16,"Maximum 500 characters"),a()(),o(17,"div",5)(18,"label",11),l(19,"Example Value"),a(),h(20,"input",12),a(),o(21,"div",5)(22,"label",13),l(23,"Required"),a(),o(24,"mat-select",14),g(25,kP,2,2,"mat-option",15),a()()(),o(26,"div",16)(27,"button",17),v("click",function(){return i.closeDialog()}),l(28,"Cancel"),a(),o(29,"button",18),v("click",function(){return i.submit()}),l(30),a()()()),n&2&&(c(3),C(i.dialogTitle),c(3),p("formGroup",i.tagForm),c(19),p("ngForOf",i.statusOptions),c(2),p("disabled",i.loading),c(2),p("disabled",!i.isFormValid||i.loading),c(),x(" ",i.submitLabel," "))},dependencies:[N,$,Yt,mn,ve,me,$e,_r,Ge,We,z,fe,ue],styles:[".add-tag-dialog[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}.add-tag-dialog[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.dialog-title[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:18px;line-height:28px;font-weight:600}.close-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#9ca3af;font-size:34px;line-height:1;cursor:pointer;padding:0}.dialog-body[_ngcontent-%COMP%]{margin-top:14px;display:flex;flex-direction:column;gap:16px}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field-label[_ngcontent-%COMP%]{color:#374151;font-size:14px;line-height:20px;font-weight:500}.field-input[_ngcontent-%COMP%]{width:100%;border:1px solid #c7ced8;border-radius:16px;background:#fff;color:#111827;font-size:14px;line-height:20px;padding:12px 18px;box-sizing:border-box;outline:none}.field-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.field-textarea[_ngcontent-%COMP%]{resize:none;min-height:130px}.field-note[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px}mat-select[_ngcontent-%COMP%]{width:min(230px,100%);border:1px solid #c7ced8;border-radius:16px;background:#fff;color:#111827;font-size:14px;line-height:20px;padding:12px 18px;box-sizing:border-box;outline:none}.dialog-actions[_ngcontent-%COMP%]{margin-top:18px;display:flex;justify-content:flex-end;gap:10px}.btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:10px 18px;font-size:16px;line-height:24px;cursor:pointer}.btn-cancel[_ngcontent-%COMP%]{background:#f3f4f6;color:#374151}.btn-submit[_ngcontent-%COMP%]{background:#35a5db;color:#fff}.btn-submit[_ngcontent-%COMP%]:disabled{background:#9ca3af;cursor:not-allowed}[_nghost-%COMP%]     .add-tag-dialog-panel .mat-mdc-dialog-container{padding:0}[_nghost-%COMP%]     .add-tag-dialog-panel .mat-mdc-dialog-surface{padding:0;border-radius:20px;background:transparent}[_nghost-%COMP%]     .add-tag-dialog-panel .mdc-dialog__surface{border-radius:20px;background:transparent}[_nghost-%COMP%]     .required-select-field .mat-mdc-text-field-wrapper{border-radius:18px;background:#fff}[_nghost-%COMP%]     .required-select-field .mdc-notched-outline__leading, [_nghost-%COMP%]     .required-select-field .mdc-notched-outline__notch, [_nghost-%COMP%]     .required-select-field .mdc-notched-outline__trailing{border-color:#c7ced8!important}[_nghost-%COMP%]     .required-select-field .mat-mdc-form-field-infix{min-height:auto;padding:12px 0}[_nghost-%COMP%]     .required-select-field .mat-mdc-select-value-text, [_nghost-%COMP%]     .required-select-field .mat-mdc-select-placeholder{font-size:14px;line-height:20px}[_nghost-%COMP%]     .required-select-field .mat-mdc-select-arrow{color:#4b5563}
12@media(max-width:900px){.add-tag-dialog[_ngcontent-%COMP%]{border-radius:16px;padding:18px 14px}.dialog-title[_ngcontent-%COMP%]{font-size:24px;line-height:30px}.close-btn[_ngcontent-%COMP%]{font-size:24px}.field-label[_ngcontent-%COMP%]{font-size:18px;line-height:24px}.field-input[_ngcontent-%COMP%]{font-size:24px;line-height:30px;border-radius:14px}.field-note[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.btn[_ngcontent-%COMP%]{font-size:20px;line-height:28px}[_nghost-%COMP%]     .required-select-field .mat-mdc-select-value-text, [_nghost-%COMP%]     .required-select-field .mat-mdc-select-placeholder{font-size:24px;line-height:30px}}"]})}}return t})();function NP(t,r){t&1&&(o(0,"div",68)(1,"div",69)(2,"div",70),h(3,"span",71),a()()())}function FP(t,r){t&1&&h(0,"iconify-icon",72)}function zP(t,r){if(t&1&&(o(0,"div",80),h(1,"div",81),a()),t&2){let e=u().$implicit;c(),pe("width",e.progress,"%")}}function LP(t,r){if(t&1&&(o(0,"article",73)(1,"div",74)(2,"div",75),l(3),a(),o(4,"div"),h(5,"iconify-icon",76),a()(),o(6,"div",77),l(7),a(),g(8,zP,2,2,"div",78),o(9,"div",79),l(10),a()()),t&2){let e=r.$implicit;c(3),C(e.label),c(2),p("icon",e.icon)("ngClass",e.tone||"default"),c(2),C(e.value),c(),p("ngIf",e.progress!==void 0),c(2),C(e.helperText)}}function VP(t,r){if(t&1&&(o(0,"div",82)(1,"div",83)(2,"span",84),l(3),a(),o(4,"span",85),l(5),a()(),o(6,"div",86)(7,"div",87),h(8,"div",88),a()(),o(9,"div",89)(10,"span",90),l(11),a(),o(12,"span",91),l(13),a()()()),t&2){let e=r.$implicit;c(3),C(e.name),c(2),x("",e.resources," resources"),c(3),pe("width",e.share,"%"),c(3),C(e.spend),c(2),x("",e.share,"%")}}function BP(t,r){t&1&&(o(0,"span"),l(1,"Tag Standard"),a())}function UP(t,r){t&1&&(o(0,"th",92),l(1,"Tag Key"),a())}function jP(t,r){if(t&1&&(o(0,"td",93),l(1),a()),t&2){let e=r.$implicit;c(),x("",(e==null?null:e.TAG_KEY)||"-"," ")}}function $P(t,r){t&1&&(o(0,"th",92),l(1,"Description"),a())}function qP(t,r){if(t&1&&(o(0,"td",94),l(1),a()),t&2){let e=r.$implicit;c(),C((e==null?null:e.TAG_DESCRIPTION)||"-")}}function HP(t,r){t&1&&(o(0,"th",92),l(1,"Example"),a())}function WP(t,r){if(t&1&&(o(0,"td",94)(1,"span",95),l(2),a()()),t&2){let e=r.$implicit,n=u();c(2),C(n.getTagExample(e)||"-")}}function GP(t,r){t&1&&(o(0,"th",92),l(1,"Required"),a())}function YP(t,r){if(t&1&&(o(0,"td",94)(1,"span",96),l(2),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e!=null&&e.REQUIRED?"required":"optional"),c(),x(" ",e!=null&&e.REQUIRED?"Required":"Optional"," ")}}function KP(t,r){t&1&&h(0,"tr",97)}function QP(t,r){if(t&1){let e=A();o(0,"tr",98),v("click",function(){let i=O(e).$implicit,s=u();return P(s.editTag(i))}),a()}}function JP(t,r){if(t&1&&(o(0,"tr",99)(1,"td",100),l(2," No records found"),a()()),t&2){let e=u();c(),He("colspan",e.displayedTagColumns.length)}}function ZP(t,r){if(t&1){let e=A();o(0,"div",101)(1,"mat-paginator",102,0),v("page",function(i){O(e);let s=u();return P(s.onTagPageChange(i))}),a()()}if(t&2){let e=u();c(),p("pageSize",e.pageSize)("pageIndex",e.tagPageIndex)("hidePageSize",!0)}}function XP(t,r){t&1&&(o(0,"span"),l(1,"Resources & Validation"),a())}function eE(t,r){if(t&1&&(o(0,"mat-option",103),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),x(" ",e.label," ")}}function tE(t,r){if(t&1&&(o(0,"mat-option",103),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),x(" ",e.label," ")}}function nE(t,r){t&1&&(o(0,"th",92),l(1,"Resource"),a())}function iE(t,r){if(t&1&&(o(0,"td",104),l(1),a()),t&2){let e=r.$implicit;c(),x("",e.name," ")}}function oE(t,r){t&1&&(o(0,"th",92),l(1,"Source"),a())}function rE(t,r){if(t&1&&(o(0,"td",94),l(1),a()),t&2){let e=r.$implicit;c(),C(e.source)}}function aE(t,r){t&1&&(o(0,"th",92),l(1,"Environment"),a())}function lE(t,r){if(t&1&&(o(0,"td",94)(1,"span",105),l(2),a()()),t&2){let e=r.$implicit,n=u();c(),p("ngClass",n.getEnvClass(e.environment)),c(),x(" ",e.environment)}}function sE(t,r){t&1&&(o(0,"th",92),l(1,"Tags Present"),a())}function cE(t,r){if(t&1&&(o(0,"span",109),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e)}}function dE(t,r){t&1&&(o(0,"span",110),l(1,"No tags"),a())}function pE(t,r){if(t&1&&(o(0,"td",94)(1,"div",106),g(2,cE,2,1,"span",107)(3,dE,2,0,"span",108),a()()),t&2){let e=r.$implicit;c(2),p("ngForOf",e.tagsPresent),c(),p("ngIf",!e.tagsPresent.length)}}function mE(t,r){t&1&&(o(0,"th",92),l(1,"Missing Required"),a())}function uE(t,r){if(t&1&&(o(0,"span",113),l(1),a()),t&2){let e=r.$implicit;c(),C(e)}}function gE(t,r){t&1&&(o(0,"span",114),l(1,"None"),a())}function fE(t,r){if(t&1&&(o(0,"td",94)(1,"div",106),g(2,uE,2,1,"span",111)(3,gE,2,0,"span",112),a()()),t&2){let e=r.$implicit;c(2),p("ngForOf",e.missingRequired),c(),p("ngIf",!e.missingRequired.length)}}function hE(t,r){t&1&&(o(0,"th",92),l(1,"Monthly Cost"),a())}function _E(t,r){if(t&1&&(o(0,"td",93),l(1),a()),t&2){let e=r.$implicit;c(),C(e.monthlyCost)}}function CE(t,r){t&1&&(o(0,"th",92),l(1,"Status"),a())}
12function xE(t,r){if(t&1&&(o(0,"td",94)(1,"span",96),l(2),a()()),t&2){let e=r.$implicit,n=u();c(),p("ngClass",n.getStatusClass(e)),c(),x(" ",e.status)}}function vE(t,r){t&1&&h(0,"tr",97)}function bE(t,r){t&1&&h(0,"tr",115)}function yE(t,r){if(t&1&&(o(0,"tr",99)(1,"td",116),l(2," No records found "),a()()),t&2){let e=u();c(),He("colspan",e.displayedValidationColumns.length)}}function ME(t,r){if(t&1){let e=A();o(0,"div",101)(1,"mat-paginator",102),v("page",function(i){O(e);let s=u();return P(s.onValidationPageChange(i))}),a()()}if(t&2){let e=u();c(),p("pageSize",e.pageSize)("pageIndex",e.validationPageIndex)("hidePageSize",!0)}}function SE(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function OE(t,r){t&1&&(o(0,"span",124),l(1,"Requesting... "),h(2,"iconify-icon",125),a())}function PE(t,r){if(t&1){let e=A();o(0,"section",117)(1,"div",118)(2,"div",119),h(3,"iconify-icon",120),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",121),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,SE,2,0,"span",122)(10,OE,3,0,"span",123),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var nu=(()=>{class t{constructor(e,n,i,s,d){this.dialog=e,this.adminService=n,this.notify=i,this.cdr=s,this.dashboardService=d,this.paginators=new Kl,this.loading=!1,this.summaryLoading=!0,this.complianceStatus=[],this.pageSize=5,this.tagFetchLimit=10,this.validationFetchLimit=10,this.displayedTagColumns=["tagKey","description","example","required"],this.displayedValidationColumns=["resource","source","environment","tagsPresent","missingRequired","monthlyCost","status"],this.tagPageIndex=0,this.validationPageIndex=0,this.providerFilterOptions=[{label:"All Providers",value:"ALL"},{label:"VMware",value:"VMWARE"},{label:"AWS",value:"AWS"},{label:"Azure",value:"AZURE"}],this.complianceFilterOptions=[{label:"All Compliance",value:"ALL"}],this.selectedProviderFilter="ALL",this.selectedComplianceFilter="ALL",this.tagAnalytics=[],this.providerCoverage=[],this.aiSummary={},this.mandatoryTags=[],this.mandatoryTagsDataSource=new fn([]),this.tagPageNumber=-1,this.hasMoreTags=!0,this.validationRows=[],this.validationDataSource=new fn([]),this.validationPageNumber=-1,this.validationHasMore=!1,this.pendingRequests=0,this.isTagManagementEnabled=!0,this.isAccessLoading=!1}ngOnInit(){this.isTagManagementEnabled=this.isFeatureEnabled(9),this.isTagManagementEnabled&&(this.complianceStatus=JSON.parse(window.localStorage.getItem("TAG_COMPLIANCE_STATUS")||"[]"),this.complianceFilterOptions=[{label:"All Compliance",value:"ALL"},...this.complianceStatus.filter(e=>!!e?.NAME).map(e=>({label:String(e.NAME),value:String(e.NAME)}))],this.getTagAISummary(),this.getTagAnalytics(),this.getTagCoverageDistribution(),this.getTags(!0))}ngAfterViewInit(){this.bindPaginators(),this.paginators.changes.subscribe(()=>this.bindPaginators())}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:9}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onTabChange(e){e===0&&this.getTags(!0),e===1&&this.getTagCompliances(!0)}getTags(e=!1){e&&(this.tagPageNumber=-1,this.hasMoreTags=!0,this.tagPageIndex=0,this.mandatoryTags=[],this.mandatoryTagsDataSource.data=[],this.paginators.toArray()[0]?.firstPage(),this.bindPaginators()),this.hasMoreTags&&(this.startLoading(),this.tagPageNumber+=1,this.adminService.getTags(this.tagPageNumber+1,this.tagFetchLimit).pipe(Xe(()=>this.stopLoading())).subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object:[];this.mandatoryTags=e?i:this.mandatoryTags.concat(i),this.hasMoreTags=i.length===this.tagFetchLimit,this.mandatoryTagsDataSource.data=this.mandatoryTags,this.bindPaginators(),this.cdr.detectChanges()},error:n=>{this.tagPageNumber=Math.max(-1,this.tagPageNumber-1),this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}}))}getTagAnalytics(){this.startLoading(),this.adminService.getTagAnalytics().pipe(Xe(()=>this.stopLoading())).subscribe({next:e=>{let n=e?.object;this.tagAnalytics=this.buildMetrics(n),this.cdr.detectChanges()},error:e=>{this.cdr.detectChanges(),this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status)}})}getTagAISummary(){this.summaryLoading=!0,this.adminService.getTagAISummary().pipe(Xe(()=>{this.summaryLoading=!1,this.cdr.detectChanges()})).subscribe({next:e=>{this.aiSummary=e?.object||{},this.cdr.detectChanges()},error:e=>{this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status)}})}getTagCoverageDistribution(){this.startLoading(),this.adminService.getTagCoverageDistribution().pipe(Xe(()=>this.stopLoading())).subscribe({next:e=>{let n=e?.object;this.providerCoverage=n.map(i=>({name:String(i?.CLOUD_PROVIDER||"-").toUpperCase(),resources:Number(i?.RESOURCE_COUNT||0),spend:this.formatCompactCurrency(i?.UNALLOCATED_SPEND),share:Number(i?.SPEND_PERCENTAGE||0)})),this.cdr.detectChanges()},error:e=>{this.cdr.detectChanges(),this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status)}})}onTagPageChange(e){this.tagPageIndex=e.pageIndex;let n=Math.ceil(this.mandatoryTags.length/e.pageSize),i=e.pageIndex>e.previousPageIndex,s=e.pageIndex+1>=n;i&&s&&this.hasMoreTags&&!this.loading&&this.getTags()}get filteredValidationRows(){return this.validationDataSource.filteredData}get selectedProviderLabel(){return this.providerFilterOptions.find(e=>e.value===this.selectedProviderFilter)?.label??"All Providers"}get selectedComplianceLabel(){return this.complianceFilterOptions.find(e=>e.value===this.selectedComplianceFilter)?.label??"All Compliance"}onProviderFilterChange(e){this.selectedProviderFilter=e,this.validationPageIndex=0,this.paginators.toArray()[1]?.firstPage(),this.applyValidationFilters()}
12onComplianceFilterChange(e){this.selectedComplianceFilter=e,this.validationPageIndex=0,this.paginators.toArray()[1]?.firstPage(),this.applyValidationFilters()}getStatusClass(e){return e.statusTone==="green"?"status-compliant":e.statusTone==="amber"?"status-partial":"status-non-compliant"}getEnvClass(e){return e.toLowerCase()==="production"?"production":e.toLowerCase()==="staging"?"staging":e.toLowerCase()==="development"?"development":e.toLowerCase()==="untagged"?"untagged":"unknown"}onValidationPageChange(e){this.validationPageIndex=e.pageIndex;let n=Math.ceil(this.validationDataSource.filteredData.length/e.pageSize),i=e.pageIndex>e.previousPageIndex,s=e.pageIndex+1>=n;i&&s&&this.validationHasMore&&!this.loading&&this.getTagCompliances()}getTagCompliances(e=!1){e&&(this.validationPageNumber=-1,this.validationHasMore=!0,this.validationPageIndex=0,this.validationRows=[],this.validationDataSource.data=[],this.paginators.toArray()[1]?.firstPage(),this.bindPaginators()),!(!this.validationHasMore&&!e)&&(this.startLoading(),this.validationPageNumber+=1,this.adminService.getTagCompliances(this.validationPageNumber+1,this.validationFetchLimit).pipe(Xe(()=>this.stopLoading())).subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object:[],s=i.map(d=>this.mapValidationRow(d));this.validationRows=e?s:this.validationRows.concat(s),this.validationHasMore=i.length===this.validationFetchLimit,this.updateValidationDataSource(),this.bindPaginators(),this.cdr.detectChanges()},error:n=>{this.validationPageNumber=Math.max(-1,this.validationPageNumber-1),this.cdr.detectChanges(),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}}))}addTag(){this.openTagDialog()}editTag(e){let n=Number(e?.ID);n&&(this.startLoading(),this.adminService.getTagById(n).pipe(Xe(()=>{this.stopLoading()})).subscribe({next:i=>{let s=Array.isArray(i?.object)?i.object[0]:i?.object;if(!s){this.notify.showNotification("Tag details not found","top","error",i?.status);return}this.openTagDialog(s)},error:i=>{this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]?E[i?.error?.status]:"error",i?.error?.status)}}))}openTagDialog(e){this.dialog.open(tu,{width:"600px",maxWidth:"95vw",height:"560px",panelClass:"add-tag-dialog-panel",autoFocus:!1,restoreFocus:!1,data:e?{tag:e}:void 0,disableClose:!0}).afterClosed().subscribe(i=>{i&&this.getTags(!0)})}getTagExample(e){return(Array.isArray(e?.TAG_VALUE)?e.TAG_VALUE:[]).map(i=>i?.TAG_VALUE).filter(i=>!!i).join(" | ")}updateValidationDataSource(){this.validationDataSource.data=this.validationRows,this.applyValidationFilters()}bindPaginators(){let e=this.paginators.toArray();e[0]&&(this.mandatoryTagsDataSource.paginator=e[0]),e[1]&&(this.validationDataSource.paginator=e[1])}applyValidationFilters(){let e=JSON.stringify({provider:this.selectedProviderFilter,compliance:this.selectedComplianceFilter});this.validationDataSource.filterPredicate=(n,i)=>{let s={provider:"ALL",compliance:"ALL"};try{s=JSON.parse(i||'{"provider":"ALL","compliance":"ALL"}')}catch(f){s={provider:"ALL",compliance:"ALL"}}let d=s.provider==="ALL"||n.source===s.provider,m=s.compliance==="ALL"||n.status===s.compliance;return d&&m},this.validationDataSource.filter=e}startLoading(){this.pendingRequests+=1,this.loading=!0,this.cdr.detectChanges()}stopLoading(){this.pendingRequests=Math.max(0,this.pendingRequests-1),this.loading=this.pendingRequests>0,this.cdr.detectChanges()}mapValidationRow(e){let n=this.getComplianceStatusMeta(e?.STATUS);return{name:e?.RESOURCE_NAME||"NA",source:String(e?.SOURCE||"-").toUpperCase(),environment:this.formatEnvironment(e?.ENVIRONMENT),tagsPresent:Array.isArray(e?.TAGS_PRESENT)?e.TAGS_PRESENT:[],missingRequired:Array.isArray(e?.MISSING_REQUIRED_TAGS)?e.MISSING_REQUIRED_TAGS:[],monthlyCost:this.formatCurrency(e?.MONTHLY_COST),status:n.status,statusTone:n.tone}}getComplianceStatusMeta(e){let n=this.complianceStatus.find(d=>Number(d?.ID)===Number(e)),i=String(n?.NAME||"").trim(),s=i.toLowerCase();return s==="partial"?{status:i,tone:"amber"}:s==="compliant"?{status:i,tone:"green"}:i?{status:i,tone:"red"}:{status:String(e??"-"),tone:"red"}}formatEnvironment(e){let n=String(e||"").trim();return n?n.toLowerCase()==="untagged"?"Untagged":n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():"Unknown"}formatCurrency(e){let n=Number(e);return Number.isFinite(n)?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(n):"-"}formatCompactCurrency(e){let n=Number(e);return Number.isFinite(n)?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2}).format(n):"$0.00"}formatPercentage(e){let n=Number(e);return Number.isFinite(n)?`${Number(n.toFixed(2))}%`:"0%"}buildMetrics(e){let n=Number(e?.TOTAL_RESOURCES||0),i=Number(e?.TAGGED_RESOURCES||0),s=Number(e?.TAGGED_PERCENTAGE||0),d=Number(e?.TOTAL_SPEND||0),m=Number(e?.TAGGED_SPEND||0),f=Number(e?.TAGGED_SPEND_PERCENTAGE||0),_=Number(e?.MISSING_TAG_COUNT||0),b=Number(e?.UNTAGGED_SPEND_IMPACT||0);return[{label:"Resources Tagged",value:this.formatPercentage(s),helperText:`${i} of ${n} resources`,progress:s,icon:"ri:server-line"},{label:"Spend Tagged",value:this.formatPercentage(f),helperText:`${this.formatCompactCurrency(m)} / ${this.formatCompactCurrency(d)}`,progress:f,icon:"ph:currency-circle-dollar-bold"},{label:"Missing Tag Count",value:String(_),tone:"warning",icon:"mdi:alert-circle-outline"},{label:"Untagged Spend Impact",value:this.formatCompactCurrency(b),helperText:"unallocatable to chargeback",tone:"danger",icon:"material-symbols:warning-outline"}]}static{this.\u0275fac=function(n){return new(n||t)(y(Se),y(Je),y(V),y(Z),y(re))}}static{this.\u0275cmp=k({type:t,selectors:[["app-tag-allocations"]],viewQuery:function(n,i){if
vendor: 4,781 bytes, line 12
12(n&1&&bt(gt,5),n&2){let s;ht(s=_t())&&(i.paginators=s)}},decls:123,vars:22,consts:[["tagPaginator",""],[1,"tag-allocation-page"],[1,"main-content"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item"],[1,"breadcrumb-sep"],[1,"breadcrumb-item","breadcrumb-current"],[1,"header-content"],["class","overlay",4,"ngIf"],[1,"title"],[1,"subtitle"],[1,"panel","ai-summary-panel"],[1,"panel-header","ai-header"],[1,"ai-badge"],["icon","ri:sparkling-2-line"],[1,"panel-title"],[1,"ai-summary-body"],["icon","eos-icons:bubble-loading","class","summary-spin",4,"ngIf"],[1,"metrics-grid"],["class","metric-card",4,"ngFor","ngForOf"],[1,"provider-card"],[1,"provider-title"],[1,"provider-subtitle"],["class","provider-row",4,"ngFor","ngForOf"],[1,"tabs-card"],["mat-stretch-tabs","false",3,"selectedIndexChange"],["mat-tab-label",""],[1,"tab-panel"],[1,"section-head"],[1,"section-left"],[1,"check-icon"],["icon","mdi:check"],[1,"panel-subtitle"],["type","button",1,"add-tag-btn",3,"click"],[1,"table-wrapper"],["mat-table","",1,"allocation-table",3,"dataSource"],["matColumnDef","tagKey"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","key-cell",4,"matCellDef"],["matColumnDef","description"],["mat-cell","",4,"matCellDef"],["matColumnDef","example"],["matColumnDef","required"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","clickable-row",3,"click",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],["class","paginator-wrap",4,"ngIf"],[1,"section-head","resource-head"],[1,"check-icon","info"],["icon","mdi:information-outline"],[1,"filters"],[3,"selectionChange","value"],[1,"filter-trigger"],["icon","mdi:filter-variant"],[3,"value",4,"ngFor","ngForOf"],["icon","mdi:check-circle-outline"],["mat-table","",1,"allocation-table","validation-table",3,"dataSource"],["matColumnDef","resource"],["mat-cell","","class","key-cell resource-cell",4,"matCellDef"],["matColumnDef","source"],["matColumnDef","environment"],["matColumnDef","tagsPresent"],["matColumnDef","missingRequired"],["matColumnDef","monthlyCost"],["matColumnDef","status"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","feature-lock-overlay",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["icon","eos-icons:bubble-loading",1,"summary-spin"],[1,"metric-card"],[1,"metric-row"],[1,"metric-label"],[1,"metric-icon",3,"icon","ngClass"],[1,"metric-value"],["class","progress-track",4,"ngIf"],[1,"metric-helper"],[1,"progress-track"],[1,"progress-fill"],[1,"provider-row"],[1,"provider-meta"],[1,"provider-name"],[1,"provider-resources"],[1,"provider-bar"],[1,"bar-track"],[1,"bar-fill"],[1,"provider-values"],[1,"provider-spend"],[1,"provider-share"],["mat-header-cell",""],["mat-cell","",1,"key-cell"],["mat-cell",""],[1,"code-chip"],[1,"status-pill",3,"ngClass"],["mat-header-row",""],["mat-row","",1,"clickable-row",3,"click"],[1,"mat-row"],[1,"mat-cell"],[1,"paginator-wrap"],[1,"paginator",3,"page","pageSize","pageIndex","hidePageSize"],[3,"value"],["mat-cell","",1,"key-cell","resource-cell"],[1,"env-pill",3,"ngClass"],[1,"chip-list"],["class","table-chip",4,"ngFor","ngForOf"],["class","empty-text",4,"ngIf"],[1,"table-chip"],[1,"empty-text"],["class","table-chip missing",4,"ngFor","ngForOf"],["class","good-text",4,"ngIf"],[1,"table-chip","missing"],[1,"good-text"],["mat-row",""],[1,"mat-cell","empty-validation-cell"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],[4,"ngIf"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"span",5),l(5,"Budget"),a(),o(6,"span",6),l(7,">"),a(),o(8,"span",7),l(9,"Tag Allocation"),a()(),o(10,"div",8),g(11,NP,4,0,"div",9),o(12,"div",10),l(13,"Tag Management"),a(),o(14,"div",11),l(15," Monitor spending, set limits, and optimize cloud costs across all your services and Teams "),a()(),o(16,"section",12)(17,"div",13)(18,"div",14),h(19,"iconify-icon",15),a(),o(20,"div")(21,"div",16),l(22,"AI Tag Summary"),a()()(),o(23,"div",17),g(24,FP,1,0,"iconify-icon",18),l(25),a()(),o(26,"section",19),g(27,LP,11,6,"article",20),a(),o(28,"section",21)(29,"div",22),l(30,"Tagging Coverage by Cloud Providers"),a(),o(31,"div",23),l(32," Where unallocatable spend is concentrated across VMware, On-Prem and public cloud sources. "),a(),g(33,VP,14,6,"div",24),a(),o(34,"section",25)(35,"mat-tab-group",26),v("selectedIndexChange",function(d){return i.onTabChange(d)}),o(36,"mat-tab"),g(37,BP,2,0,"ng-template",27),o(38,"div",28)(39,"div",29)(40,"div",30)(41,"span",31),h(42,"iconify-icon",32),a(),o(43,"div")(44,"div",16),l(45,"Mandatory Tag Standard"),a(),o(4
126,"div",33),l(47," Cost Center - Application - Environment - Owner - drives chargeback & showback allocation. "),a()()(),o(48,"button",34),v("click",function(){return i.addTag()}),l(49,"+ Add Tag"),a()(),o(50,"div",35)(51,"table",36),I(52,37),g(53,UP,2,0,"th",38)(54,jP,2,1,"td",39),T(),I(55,40),g(56,$P,2,0,"th",38)(57,qP,2,1,"td",41),T(),I(58,42),g(59,HP,2,0,"th",38)(60,WP,3,1,"td",41),T(),I(61,43),g(62,GP,2,0,"th",38)(63,YP,3,2,"td",41),T(),g(64,KP,1,0,"tr",44)(65,QP,1,0,"tr",45)(66,JP,3,1,"tr",46),a()(),g(67,ZP,3,3,"div",47),a()(),o(68,"mat-tab"),g(69,XP,2,0,"ng-template",27),o(70,"div",28)(71,"div",48)(72,"div",30)(73,"span",49),h(74,"iconify-icon",50),a(),o(75,"div")(76,"div",16),l(77,"Resource Tag Validation"),a(),o(78,"div",33),l(79,"Validate required tags and compliance."),a()()(),o(80,"div",51)(81,"mat-select",52),v("selectionChange",function(d){return i.onProviderFilterChange(d.value)}),o(82,"mat-select-trigger")(83,"span",53),h(84,"iconify-icon",54),o(85,"span"),l(86),a()()(),g(87,eE,2,2,"mat-option",55),a(),o(88,"mat-select",52),v("selectionChange",function(d){return i.onComplianceFilterChange(d.value)}),o(89,"mat-select-trigger")(90,"span",53),h(91,"iconify-icon",56),o(92,"span"),l(93),a()()(),g(94,tE,2,2,"mat-option",55),a()()(),o(95,"div",35)(96,"table",57),I(97,58),g(98,nE,2,0,"th",38)(99,iE,2,1,"td",59),T(),I(100,60),g(101,oE,2,0,"th",38)(102,rE,2,1,"td",41),T(),I(103,61),g(104,aE,2,0,"th",38)(105,lE,3,2,"td",41),T(),I(106,62),g(107,sE,2,0,"th",38)(108,pE,4,2,"td",41),T(),I(109,63),g(110,mE,2,0,"th",38)(111,fE,4,2,"td",41),T(),I(112,64),g(113,hE,2,0,"th",38)(114,_E,2,1,"td",39),T(),I(115,65),g(116,CE,2,0,"th",38)(117,xE,3,2,"td",41),T(),g(118,vE,1,0,"tr",44)(119,bE,1,0,"tr",66)(120,yE,3,1,"tr",46),a()(),g(121,ME,2,3,"div",47),a()()()()()(),g(122,PE,11,3,"section",67),a()),n&2&&(Y("is-locked",!i.isTagManagementEnabled),c(11),p("ngIf",i.loading),c(13),p("ngIf",i.summaryLoading),c(),x(" ",i.aiSummary.SUMMARY," "),c(2),p("ngForOf",i.tagAnalytics),c(6),p("ngForOf",i.providerCoverage),c(18),p("dataSource",i.mandatoryTagsDataSource),c(13),p("matHeaderRowDef",i.displayedTagColumns),c(),p("matRowDefColumns",i.displayedTagColumns),c(2),p("ngIf",i.mandatoryTags.length>0),c(14),p("value",i.selectedProviderFilter),c(5),C(i.selectedProviderLabel),c(),p("ngForOf",i.providerFilterOptions),c(),p("value",i.selectedComplianceFilter),c(5),C(i.selectedComplianceLabel),c(),p("ngForOf",i.complianceFilterOptions),c(2),p("dataSource",i.validationDataSource),c(22),p("matHeaderRowDef",i.displayedValidationColumns),c(),p("matRowDefColumns",i.displayedValidationColumns),c(2),p("ngIf",i.validationRows.length>0),c(),p("ngIf",!i.isTagManagementEnabled))},dependencies:[N,xe,$,B,z,fe,ls,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,Xi,ti,ni,gt],styles:[".tag-allocation-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f8fb);min-height:100%}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.page-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.breadcrumb-item[_ngcontent-%COMP%]{color:#6b7280}.breadcrumb-sep[_ngcontent-%COMP%]{color:#9ca3af}.breadcrumb-current[_ngcontent-%COMP%]{color:#111827}.header-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700;color:#111827}.subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:15px;line-height:24px}.provider-card[_ngcontent-%COMP%], .tabs-card[_ngcontent-%COMP%]{background:#fff;border:1.04px solid #F3F4F6;border-radius:13px;box-shadow:0 1.04px 2.09px #0000000d}.panel[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:20px;background:#fff;overflow:hidden;padding:26px}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid #e7eef5}.ai-summary-panel[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]{color:#111827;font-size:20px;line-height:28px;font-weight:600}.ai-summary-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{border-bottom:none;padding:0 0 24px}.ai-header[_ngcontent-%COMP%]{justify-content:flex-start}.ai-badge[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:8px;background:linear-gradient(135deg,#35a5db,#2188bb);color:#fff;display:inline-flex;align-items:center;justify-content:center}.ai-badge[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.summary-spin[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#57b5e7;font-size:32px}.ai-summary-body[_ngcontent-%COMP%]{border:1px solid #FECACA;border-radius:12px;background:#fffefe;padding:16px;font-size:14px;line-height:24px;color:#4b5563}.metrics-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:16px}.metric-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:20px;box-shadow:0 1px 2px #0000000d;padding:25px;display:flex;flex-direction:column;gap:10px}.metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.metric-label[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;font-weight:600;line-height:20px}.metric-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:18px}.metric-value[_ngcontent-%COMP%]{color:#111827;font-size:30px;font-weight:700;line-height:36px}.metric-helper[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;line-height:20px}.progress-track[_ngcontent-%COMP%]{width:100%;height:10px;border-radius:999px;background:#e5e7eb;overflow:hidden}.progress-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:#35a5db}.metric-icon.warning[_ngcontent-%COMP%]{color:#fbbf24}.metric-icon.danger[_ngcontent-%COMP%]{color:#ef4444}.provider-card[_ngcontent-%COMP%]{padding:24px}.provider-title[_ngcontent-%COMP%]{color:#111827;font-size:20px;font-weight:600;line-height:28px}.provider-subtitle[_ngcontent-%COMP%]{margin-top:8px;color:#4b5563;font-size:16px;line-height:24px}.provider-row[_ngcontent-%COMP%]{margin-top:18px;display:grid;grid-template-columns:minmax(230px,1fr) minmax(250px,2fr) minmax(130px,auto);align-items:center;gap:16px}.provider-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}
12.provider-name[_ngcontent-%COMP%]{color:#111827;font-size:16px;line-height:24px;font-weight:500}.provider-resources[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;line-height:20px}.bar-track[_ngcontent-%COMP%]{width:100%;height:10px;border-radius:999px;background:#e5e7eb;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:#35a5db}.provider-values[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;justify-content:flex-end}.provider-spend[_ngcontent-%COMP%]{color:#111827;font-weight:500;font-size:14px;line-height:20px}.provider-share[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;line-height:20px}.tabs-card[_ngcontent-%COMP%]{overflow:hidden}.tab-panel[_ngcontent-%COMP%]{padding:24px}.section-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}.section-left[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px}.check-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:8px;background:#35a5db;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}.check-icon.info[_ngcontent-%COMP%]{background:#dbeafe;color:#2563eb}.panel-subtitle[_ngcontent-%COMP%]{margin-top:4px;color:#4b5563;font-size:14px;line-height:20px}.add-tag-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;background:#35a5db;color:#fff;padding:8px 16px;font-size:16px;line-height:24px;cursor:pointer}.add-tag-btn[_ngcontent-%COMP%]:hover{background:#3ca7df}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.filter-select-field[_ngcontent-%COMP%]{width:190px}.filter-trigger[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px}.filter-trigger[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:16px}.table-wrapper[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.paginator-wrap[_ngcontent-%COMP%]{padding:8px 24px 14px}.paginator[_ngcontent-%COMP%]{background:#f6f7f8}[_nghost-%COMP%]     .paginator .mat-mdc-paginator-container{min-height:46px;justify-content:flex-end}[_nghost-%COMP%]     .paginator .mat-mdc-paginator-range-label{color:#5f6b7d;font-size:13px}.allocation-table[_ngcontent-%COMP%]{width:100%;min-width:880px;border-collapse:collapse}.allocation-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left;color:#4b5563;font-size:13px;font-weight:500;padding:14px 16px;border-bottom:1px solid #E5E7EB;white-space:nowrap}.allocation-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:14px 16px;border-bottom:1px solid #E5E7EB;color:#4b5563;font-size:15px;vertical-align:top}.allocation-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:none}.clickable-row[_ngcontent-%COMP%]{cursor:pointer}.clickable-row[_ngcontent-%COMP%]:hover{background:#f9fafb}.key-cell[_ngcontent-%COMP%]{font-weight:500;color:#111827!important}.code-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border-radius:8px;background:#f3f4f6;color:#111827;font-size:12px;padding:4px 8px}
12.chip-list[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.table-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border-radius:8px;background:#35a5db1a;color:#35a5db;font-size:12px;padding:4px 8px}.table-chip.missing[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.resource-cell[_ngcontent-%COMP%]{max-width:280px;word-break:break-word;overflow-wrap:anywhere}.empty-validation-cell[_ngcontent-%COMP%]{text-align:center;color:#6b7280}.status-pill[_ngcontent-%COMP%], .env-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1}.env-pill.staging[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af}.env-pill.unknown[_ngcontent-%COMP%], .env-pill.untagged[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.env-pill.development[_ngcontent-%COMP%]{background:#f3e8ff;color:#6b21a8}.env-pill.production[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.status-pill.required[_ngcontent-%COMP%], .status-compliant[_ngcontent-%COMP%]{background:#35a5db;color:#fff}.status-pill.optional[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.status-partial[_ngcontent-%COMP%]{background:#ffedd5;color:#9a3412}.status-non-compliant[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.empty-text[_ngcontent-%COMP%]{color:#6b7280;font-size:12px}.good-text[_ngcontent-%COMP%]{color:#16a34a;font-size:12px;font-weight:500}mat-select[_ngcontent-%COMP%]{border:1px solid #c7ced8;border-radius:16px;background:#fff;color:#111827;font-size:14px;line-height:20px;padding:9px 18px;box-sizing:border-box;outline:none;width:165px}.tag-allocation-page.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}@media(max-width:1200px){.title[_ngcontent-%COMP%]{font-size:34px;line-height:38px}.metric-label[_ngcontent-%COMP%]{font-size:16px;line-height:24px}.metric-value[_ngcontent-%COMP%]{font-size:38px;line-height:42px}.provider-title[_ngcontent-%COMP%]{font-size:30px;line-height:34px}.panel-title[_ngcontent-%COMP%]{font-size:24px;line-height:28px}}@media(max-width:960px){.tag-allocation-page[_ngcontent-%COMP%]{padding:14px}.metrics-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.provider-row[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:8px}.provider-values[_ngcontent-%COMP%]{justify-content:flex-start}.provider-card[_ngcontent-%COMP%], .tab-panel[_ngcontent-%COMP%]{padding:14px}.filters[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}.filter-select-field[_ngcontent-%COMP%]{width:min(220px,100%)}.feature-lock-card[_ngcontent-%COMP%]{padding:28px 20px}}"]})}}return t})();var EE=["distributionChart"],wE=["budgetPaginator"];function IE(t,r){t&1&&(o(0,"div",11)(1,"div",12)(2,"div",13),h(3,"span",14),a()()())}function TE(t,r){if(t&1&&(o(0,"article",68)(1,"div",69),h(2,"iconify-icon",70),a(),o(3,"div",71),l(4),a(),o(5,"div",72),l(6),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e.iconClass),c(),p("icon",e.icon),c(2),C(e.title),c(2),C(e.amount)}}function AE(t,r){t&1&&h(0,"iconify-icon",73)}function DE(t,r){if(t&1&&(o(0,"span",74),h(1,"span",75),l(2),a()),t&2){let e=r.$implicit;c(),pe("background",e.color),c(),x(" ",e.label," ")}}function RE(t,r){if(t&1&&(o(0,"mat-option",76),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),C(e)}}function kE(t,r){t&1&&(o(0,"th",77),l(1,"Budget Name"),a())}function NE(t,r){if(t&1&&(o(0,"td",78)(1,"div",79)(2,"span",80),h(3,"iconify-icon",81),a(),o(4,"div")(5,"div",82),l(6),a(),o(7,"div",83),l(8),a()()()()),t&2){let e=r.$implicit;c(6),C(e.budgetName),c(2),C(e.costCenter)}}function FE(t,r){t&1&&(o(0,"th",77),l(1,"Owner"),a())}function zE(t,r){if(t&1&&(o(0,"td",78)(1,"div",82),l(2),a(),o(3,"div",83),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.ownerName),c(2),C(e.ownerEmail)}}function LE(t,r){t&1&&(o(0,"th",77),l(1,"Allocated"),a())}function VE(t,r){if(t&1&&(o(0,"td",78)(1,"div",82),l(2),a(),o(3,"div",83),l(4,"Per month"),a()()),t&2){let e=r.$implicit,n=u(2);c(2),C(n.formatCurrency(e.allocatedAmount))}}function BE(t,r){t&1&&(o(0,"th",77),l(1,"Current Spend"),a())}function UE(t,r){if(t&1&&(o(0,"td",78)(1,"div",82),l(2),a(),o(3,"div",83),l(4,"Per month"),a()()),t&2){let e=r.$implicit,n=u(2);c(2),C(n.formatCurrency(e.currentSpendAmount))}}function jE(t,r){t&1&&(o(0,"th",77),l(1,"Utilization"),a())}function $E(t,r){if(t&1&&(o(0,"td",78)(1,"div",84)(2,"div",85),h(3,"span",86),a(),o(4,"span",87),l(5),a()()()),t&2){let e=r.$implicit,n=u(2);c(3),pe("width",e.utilization>100?100:e.utilization,"%"),p("ngClass",n.getUtilizationClass(e)),c(2),x("",e.utilization,"%")}}function qE(t,r){t&1&&(o(0,"th",77),l(1,"Status"),a())}function HE(t,r){if(t&1&&(o(0,"td",78)(1,"span",88),l(2),a()()),t&2){let e=r.$implicit,n=u(2);c(),p("ngClass",n.getStatusClass(e)),c(),C(e.status)}}function WE(t,r){t&1&&(o(0,"th",77),l(1,"Actions"),a())}function GE(t,r){if(t&1){let e=A();o(0,"td",78)(1,"div",89)(2,"button",90),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.onEditClick(i))}),l(3,"Edit"),a()()()}}function YE(t,r){t&1&&h(0,"tr",91)}function KE(t,r){t&1&&h(0,"tr",92)}function QE(t,r){if(t&1&&(o(0,"tr",93)(1,"td",94),l(2," No budgets found "),a()()),t&2){let e=u(2);c(),He("colspan",e.compactTableColumns.length)}}function JE(t,r){if(t&1){let e=A();I(0),o(1,"div",15)(2,"div")(3,"div",16),l(4,"Budget Management"),a(),o(5,"div",17),l(6,"Monitor spending, set limits, and optimize cloud costs across all your services and Teams"),a()(),o(7,"div",18)(8,"button",19),v("click",function(){O(e);let i=u();return P(i.onExportCsv())}),h(9,"iconify-icon",20),l(10," Export CSV "),a(),o(11,"button",21),v("click",function(){O(e);let i=u();return P(i.onCreateBudget())}),h(12,"iconify-icon",22),l(13," Create Budget "),a()()(),o(14,"div",23),h(15,"iconify-icon",24),o(16,"span",25),l(17,"Dimensions:"),a(),o(18,"button",26),l(19,"All"),a()(),o(20,"section",27),g(21,TE,7,4,"article",28),a(),o(22,"section",29)(23,"div",30)(24,"div",31),h(25,"iconify-icon",32),a(),o(26,"div")(27,"div",33),l(28,"AI Budget Summary"),a()()(),o(29,"div",34),g(30,AE,1,0,"iconify-icon",35),l(31),a()(),o(32,"section",36)(33,"div",37)(34,"div",33),l(35,"Budget Distribution Overview"),a()(),h(36,"div",38,1),o(38,"div",39),g(39,DE,3,3,"span",40),a()(),o(40,"section",41)(41,"div",42)(42,"div",43)(43,"div",33),l(44,"Active Budgets"),a()(),o(45,"div",44)(46,"div",45)(47,"span",46),h(48,"iconify-icon",47),a(),o(49,"input",48),se("ngModelChange",function(i){O(e);let s=u();return le(s.searchTerm,i)||(s.searchTerm=i),P(i)}),v("ngModelChange",function(){O(e);let i=u();return P(i.onFilterChanged())}),a()(),o(50,"div",49)(51,"mat-select",50),se("ngModelChange",function(i){O(e);let s=u();return le(s.selectedStatus,i)||(s.selectedStatus=i),P(i)}),v("ngModelChange",function(){O(e);let i=u();return P(i.onFilterChanged())}),g(52,RE,2,2,"mat-option",51),a()()()(),o(53,"div",52)(54,"table",53),I(55,54),g(56,kE,2,0,"th",55)(57,NE,9,2,"td",56),T(),I(58,57),g(59,FE,2,0,"th",55)(60,zE,5,2,"td",56),T(),I(61,58),g(62,LE,2,0,"th",55)(63,VE,5,1,"td",56),T(),I(64,59),g(65,BE,2,0,"th",55)(66,UE,5,1,"td",56),T(),I(67,60),g(68,jE,2,0,"th",55)(69,$E,6,4,"td",56),T(),I(70,61),g(71,qE,2,0,"th",55)(72,HE,3,2,"td",56),T(),I(73,62),g(74,WE,2,0,"th",55)(75,GE,4,0,"td",56),T(),g(76,YE,1,0,"tr",63)(77,KE,1,0,"tr",64)(78,QE,3,1,"tr",65),a()(),o(79,"div",66)(80,"mat-paginator",67,2),v("page",function(i){O(e);let s=u();return P(s.onBudgetPageChange(i))}),a()()(),T()}if(t&2){let e=u();c(21),p("ngForOf",e.summaryCards)("ngForTrackBy",e.trackBySummary),c(9),p("ngIf",e.summaryLoading),c(),x(" ",e.aiSummary.SUMMARY," "),c(8),p("ngForOf",e.budgetDistribution)("ngForTrackBy",e.trackBySlice),c(10),ae("ngModel",e.searchTerm),c(2),ae("ngModel",e.selectedStatus),c(),p("ngForOf",e.statusOptions),c(2),p("dataSource",e.displayedBudgets),c(22),p("matHeaderRowDef",e.compactTableColumns),c(),p("matRowDefColumns",e.compactTableColumns),c(3),p("length",e.filteredBudgetCount)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("disabled",e.filteredBudgetCount<=e.pageSize)("hidePageSize",!0)}}function ZE(t,r){if(t&1){let e=A();o(0,"section",95)(1,"div",96)(2,"div")(3,"div",97),l(4,"Budget Overview"),a(),o(5,"div",98),l(6,"Manage your AWS account connections and monitor their health status."),a()(),o(7,"button",21),v("click",function(){O(e);let i=u();return P(i.onCreateBudget())}),h(8,"iconify-icon",22),l(9," Create Budget "),a()(),o(10,"div",99)(11,"div",100),h(12,"iconify-icon",101),a(),o(13,"div",102),l(14,"No Budget is configured"),a(),o(15,"div",103),l(16," Get started by adding your first budget connection "),h(17,"br"),l(18," You need to create a budget "),a(),o(19,"div",104)(20,"button",105),v("click",function(){O(e);let i=u();return P(i.onCreateBudget())}),h(21,"iconify-icon",22),l(22," Create Budget "),a(),o(23,"button",106),v("click",function(){O(e);let i=u();return P(i.onCreateTag())}),l(24," Create Tag "),a()()()()}}function XE(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function ew(t,r){t&1&&(o(0,"span",114),l(1,"Requesting... "),h(2,"iconify-icon",115),a())}function tw(t,r){if(t&1){let e=A();o(0,"section",107)(1,"div",108)(2,"div",109),h(3,"iconify-icon",110),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",111),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,XE,2,0,"span",112)(10,ew,3,0,"span",113),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var iu=(()=>{class t{constructor(e,n,i,s,d,m,f,_,b){this.router=e,this.route=n,this.adminService=i,this.dashboardService=s,this.notify=d,this.dialog=m,this.ngZone=f,this.cdr=_,this.elementRef=b,this.aiSummary={},this.budgetDistribution=[],this.distributionColors=["#58AEDD","#7FC9BF","#EEB668","#F38C5C","#79B8D9","#A1D4CF","#EFC98D","#F0A483","#C084FC","#38BDF8"],this.summaryCards=[],this.activeBudgets=[],this.displayedBudgets=new fn([]),this.searchTerm="",this.budgetStatus=[],this.selectedStatus="All Status",this.statusOptions=["All Status"],this.compactTableColumns=["budgetName","owner","allocatedAmount","currentSpend","utilization","status","actions"],this.pageSize=5,this.pageIndex=0,this.filteredBudgetCount=0,this.loading=!1,this.summaryLoading=!0,this.isBudgetManagementEnabled=!0,this.isAccessLoading=!1}ngOnInit(){this.isBudgetManagementEnabled=this.isFeatureEnabled(8),this.isBudgetManagementEnabled&&(this.scrollToTop(),this.budgetStatus=JSON.parse(window.localStorage.getItem("BUDGET_STATUS")||"[]"),this.statusOptions=["All Status",...this.budgetStatus.map(e=>e.NAME)],this.getBudgets(),this.getAISummary())}ngAfterViewInit(){this.scrollToTop(),this.renderDistributionChart(),this.displayedBudgets.paginator=this.budgetPaginator}onWindowResize(){this.renderDistributionChart()}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:8}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}onFilterChanged(){this.applyUiFilters()}onBudgetPageChange(e){this.pageIndex=e.pageIndex}get showBudgetEmptyState(){return!this.loading&&this.activeBudgets.length===0}onCreateBudget(){this.router.navigate(["/admin-dashboard/budget/setup"])}onCreateTag(){this.pushPendingAction("create-tag")}onExportCsv(){this.pushPendingAction("export-csv")}onEditClick(e){this.router.navigate(["/admin-dashboard/budget/alerts"],{queryParams:{budgetId:e.id}})}onResourcesClick(e){this.router.navigate(["/admin-dashboard/budget/resources"],{queryParams:{budgetId:e.id}})}trackBySummary(e,n){return n.key}trackBySlice(e,n){return n.label}trackByBudget(e,n){return n.id}formatCurrency(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}setSummaryCards(e){this.summaryCards=e}setBudgetDistribution(e){this.budgetDistribution=e,this.renderDistributionChart()}setActiveBudgetList(e){this.activeBudgets=e,this.refreshDisplayedBudgets()}getAISummary(){this.summaryLoading=!0,this.adminService.getBudgetAISummary().pipe(Xe(()=>{this.summaryLoading=!1,this.refreshView()})).subscribe({next:e=>{this.aiSummary=e?.object||{},this.refreshView()},error:e=>{this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status),this.refreshView()}})}getBudgets(){this.loading=!0,this.adminService.getBudgets().pipe(Xe(()=>{this.loading=!1,this.refreshView()})).subscribe({next:e=>{let n=Array.isArray(e?.object)?e.object:[];this.activeBudgets=n.map(i=>this.mapBudgetResponse(i)),this.setBudgetDistribution(this.buildBudgetDistribution(n)),this.setSummaryCards(this.buildSummaryCards(n)),this.refreshDisplayedBudgets(),this.refreshView()},error:e=>{this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status),this.refreshView()}})}refreshDisplayedBudgets(){this.displayedBudgets=new fn(this.activeBudgets),this.filteredBudgetCount=this.activeBudgets.length,this.pageIndex=0,this.budgetPaginator&&(this.displayedBudgets.paginator=this.budgetPaginator),this.applyUiFilters()}applyUiFilters(){let e=JSON.stringify({keyword:this.searchTerm.trim().toLowerCase(),status:this.selectedStatus});this.displayedBudgets.filterPredicate=(n,i)=>{let s={keyword:"",status:"All Status"};try{s=JSON.parse(i||'{"keyword":"","status":"All Status"}')}catch(f){s={keyword:"",status:"All Status"}}if(!s.keyword)return s.status==="All Status"||n.status===s.status;let d=n.budgetName.toLowerCase().includes(s.keyword)||n.ownerName.toLowerCase().includes(s.keyword)||n.ownerEmail.toLowerCase().includes(s.keyword)||n.costCenter.toLowerCase().includes(s.keyword),m=s.status==="All Status"||n.status===s.status;return d&&m},this.displayedBudgets.filter=e,this.filteredBudgetCount=this.displayedBudgets.filteredData.length,this.displayedBudgets.paginator&&(this.displayedBudgets.paginator.length=this.filteredBudgetCount,this.displayedBudgets.paginator.firstPage()),this.pageIndex=0,this.refreshView()}refreshView(){this.ngZone.run(()=>this.cdr.detectChanges())}scrollToTop(){typeof window>
12"u"||[0,100].forEach(e=>{setTimeout(()=>requestAnimationFrame(()=>{window.scrollTo({top:0,left:0,behavior:"auto"}),document.documentElement.scrollTop=0,document.body.scrollTop=0,[...this.getScrollableParents(),document.querySelector(".right-container"),document.querySelector(".main-container"),document.querySelector(".container")].filter(i=>i instanceof HTMLElement).forEach(i=>{i.scrollTop=0,i.scrollLeft=0,i.scrollTo?.({top:0,left:0,behavior:"auto"})})}),e)})}getScrollableParents(){let e=[],n=this.elementRef.nativeElement.parentElement;for(;n;){let i=window.getComputedStyle(n),s=`${i.overflow}${i.overflowY}${i.overflowX}`;/(auto|scroll)/.test(s)&&e.push(n),n=n.parentElement}return e}mapBudgetResponse(e){let n=Number(e?.AMOUNT||0),i=Number(e?.UTILIZATION_PERCENTAGE||0),s=this.getBudgetStatusMeta(e?.STATUS),d=String(e?.OWNER?.FIRST_NAME||"").trim(),m=String(e?.OWNER?.LAST_NAME||"").trim();return{id:String(e?.ID),budgetName:String(e?.BUDGET_NAME),costCenter:String(e?.COST_CENTER?.COST_CENTER_NAME),ownerName:`${d} ${m}`.trim(),ownerEmail:String(e?.OWNER?.EMAIL_ID),allocatedAmount:n,currentSpendAmount:Number(e?.CURRENT_SPEND||0),utilization:i,utilizationTone:s.tone,status:s.status,statusTone:s.tone}}getBudgetStatusMeta(e){let i=this.budgetStatus.find(s=>s.ID===Number(e))?.NAME;return i==="Exceeded"?{status:i,tone:"red"}:i==="Warning"?{status:i,tone:"amber"}:{status:i,tone:"green"}}buildBudgetDistribution(e){return e.filter(n=>n?.BUDGET_NAME&&n?.AMOUNT!=null).map((n,i)=>({label:String(n.BUDGET_NAME),amount:Number(n.AMOUNT||0),color:this.distributionColors[i%this.distributionColors.length]}))}buildSummaryCards(e){let n=e.reduce((m,f)=>m+Number(f?.AMOUNT||0),0),i=e.reduce((m,f)=>m+Number(f?.CURRENT_SPEND||0),0),s=n-i,d=e.filter(m=>Number(m?.UTILIZATION_PERCENTAGE||0)>Number(m?.SOFT_WARNING||0)).length;return[{key:"total-allocated",icon:"uil:usd-circle",iconClass:"summary-icon-blue",title:"Total Budget Allocated",amount:this.formatCurrency(n)},{key:"budget-used",icon:"ri:exchange-dollar-line",iconClass:"summary-icon-green",title:"Budget Used",amount:this.formatCurrency(i)},{key:"remaining-budget",icon:"ri:wallet-3-line",iconClass:"summary-icon-amber",title:s<0?"Exceeding Budget":"Remaining Budget",amount:this.formatCurrency(s)},{key:"alerts",icon:"fe:warning",iconClass:"summary-icon-red",title:"Alerts",amount:String(d)}]}pushPendingAction(e,n){this.router.navigate([],{relativeTo:this.route,queryParams:{budgetAction:e,budgetId:n||null},queryParamsHandling:"merge"})}renderDistributionChart(){if(!this.distributionChartRef?.nativeElement)return;let e=this.distributionChartRef.nativeElement;if(Sn(e).selectAll("*").remove(),!this.budgetDistribution.length)return;let n=Math.max(e.clientWidth,300),i=n<640?350:410,s=Math.min(n*.22,120),d=Math.max(s*.58,50),f=Sn(e).append("svg").attr("width",n).attr("height",i).attr("viewBox",`0 0 ${n} ${i}`).append("g").attr("transform",`translate(${n/2}, ${i/2-12})`),_=al().sort(null).value(D=>D.amount).padAngle(.017),b=Gr().innerRadius(d).outerRadius(s).cornerRadius(8),M=Gr().innerRadius(s+6).outerRadius(s+6),S=_(this.budgetDistribution);f.selectAll("path.budget-distribution-slice").data(S).enter().append("path").attr("class","budget-distribution-slice").attr("d",b).attr("fill",D=>D.data.color).attr("stroke","#ffffff").attr("stroke-width",2);let w=Un("d");S.forEach(D=>{let R=b.centroid(D),W=M.centroid(D),L=(D.startAngle+D.endAngle)/2<Math.PI,q=L?W[0]+26:W[0]-26,ne=W[1];f.append("polyline").attr("points",`${R[0]},${R[1]} ${W[0]},${W[1]} ${q},${ne}`).attr("fill","none").attr("stroke",D.data.color).attr("stroke-width",1.4).attr("opacity",.95);let _e=f.append("text").attr("x",q+(L?4:-4)).attr("y",ne-3).attr("text-anchor",L?"start":"end").attr("class","distribution-label");_e.append("tspan").attr("x",q+(L?4:-4)).text(D.data.label),_e.append("tspan").attr("x",q+(L?4:-4)).attr("dy",14).text(`$${w(D.data.amount)}`)})}getStatusClass(e){return e.statusTone==="green"?"status-on-track":e.statusTone==="amber"?"status-warning":"status-hard-warning"}getUtilizationClass(e){return e.utilizationTone==="amber"?"utilization-warning":e.utilizationTone==="red"?"utilization-exceeded":"utilization-on-track"}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(Je),y(re),y(V),y(Se),y(be),y(Z),y(lr))}}static{this.\u0275cmp=k({type:t,selectors:[["app-budget-management"]],viewQuery:function(n,i){if
vendor: 5,033 bytes, line 12
12(n&1&&bt(EE,5)(wE,5),n&2){let s;ht(s=_t())&&(i.distributionChartRef=s.first),ht(s=_t())&&(i.budgetPaginator=s.first)}},hostBindings:function(n,i){n&1&&v("resize",function(){return i.onWindowResize()},sr)},decls:13,vars:6,consts:[["budgetEmptyStateView",""],["distributionChart",""],["budgetPaginator",""],[1,"budget-management"],[1,"main-content"],["class","overlay",4,"ngIf"],[1,"breadcrumb-row"],["icon","mdi:chevron-right","width","18","height","18"],[1,"active"],[4,"ngIf","ngIfElse"],["class","feature-lock-overlay",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"budget-header"],[1,"page-title"],[1,"page-subtitle"],[1,"header-actions"],["type","button",1,"btn","btn-outline",3,"click"],["icon","flowbite:download-solid"],["type","button",1,"btn","btn-primary",3,"click"],["icon","ri:add-line"],[1,"dimension-row"],["icon","fa6-solid:layer-group"],[1,"dimension-label"],["type","button",1,"dimension-pill"],[1,"summary-grid"],["class","summary-card",4,"ngFor","ngForOf","ngForTrackBy"],[1,"panel","ai-summary-panel"],[1,"panel-header","ai-header"],[1,"ai-badge"],["icon","ri:sparkling-2-line"],[1,"panel-title"],[1,"ai-summary-body"],["icon","eos-icons:bubble-loading","class","summary-spin",4,"ngIf"],[1,"panel","chart-panel"],[1,"panel-header"],[1,"chart-shell"],[1,"chart-legend"],["class","legend-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"panel"],[1,"panel-header","budgets-header"],[1,"budgets-header-left"],[1,"budgets-filters"],[1,"search-box"],[1,"search-icon"],["icon","ri:search-line"],["type","text","placeholder","Search budgets...",3,"ngModelChange","ngModel"],[1,"status-select"],[3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"table-wrap"],["mat-table","",3,"dataSource"],["matColumnDef","budgetName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","owner"],["matColumnDef","allocatedAmount"],["matColumnDef","currentSpend"],["matColumnDef","utilization"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-mdc-row",4,"matNoDataRow"],[1,"paginator-wrap"],[1,"paginator",3,"page","length","pageSize","pageIndex","disabled","hidePageSize"],[1,"summary-card"],[1,"summary-icon",3,"ngClass"],[3,"icon"],[1,"summary-title"],[1,"summary-amount"],["icon","eos-icons:bubble-loading",1,"summary-spin"],[1,"legend-item"],[1,"legend-dot"],[3,"value"],["mat-header-cell",""],["mat-cell",""],[1,"budget-name-cell"],[1,"row-icon"],["icon","ri:briefcase-4-line"],[1,"primary-text"],[1,"secondary-text"],[1,"utilization-cell"],[1,"utilization-track"],[1,"utilization-fill",3,"ngClass"],[1,"utilization-value"],[1,"status-pill",3,"ngClass"],[1,"actions-cell"],["type","button",1,"table-link",3,"click"],["mat-header-row",""],["mat-row",""],[1,"mat-mdc-row"],[1,"mat-mdc-cell","empty-cell"],[1,"panel","empty-budget-panel"],[1,"empty-budget-head"],[1,"empty-budget-title"],[1,"empty-budget-subtitle"],[1,"empty-budget-body"],[1,"empty-budget-icon"],["icon","fa6-solid:plug","width","18","height","24"],[1,"empty-budget-state-title"],[1,"empty-budget-state-text"],[1,"empty-budget-actions"],["type","button",1,"btn","btn-primary","empty-action-btn",3,"click"],["type","button",1,"btn","btn-outline","empty-action-btn","empty-tag-btn",3,"click"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],[4,"ngIf"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){if(n&1&&(o(0,"div",3)(1,"div",4),g(2,IE,4,0,"div",5),o(3,"div",6)(4,"span"),l(5,"Governance"),a(),h(6,"iconify-icon",7),o(7,"span",8),l(8,"Budget Management"),a()(),g(9,JE,82,17,"ng-container",9)(10,ZE,25,0,"ng-template",null,0,at),a(),g(12,tw,11,3,"section",10),a()),n&2){let s=Ce(11);Y("is-locked",!i.isBudgetManagementEnabled),c(2),p("ngIf",i.loading),c(7),p("ngIf",!i.showBudgetEmptyState)("ngIfElse",s),c(3),p("ngIf",!i.isBudgetManagementEnabled)}},dependencies:[N,xe,$,B,z,fe,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,ve,me,mt,gt],styles:["[_nghost-%COMP%]{display:block}.budget-management[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px;padding:24px;background:linear-gradient(180deg,#fbfdff,#f7f8fb);color:#0f172a;min-height:100%}.main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.breadcrumb-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:14px;line-height:20px}.breadcrumb-row[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.budget-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:20px}.page-title[_ngcontent-%COMP%]{margin:0 0 8px;font-size:30px;line-height:36px;font-weight:700}.page-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}
12.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;border:1px solid transparent;padding:8px 16px;font-size:14px;line-height:20px;cursor:pointer}.btn-outline[_ngcontent-%COMP%]{background:transparent;border-color:#d1d5db;color:#374151}.btn-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.dimension-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.dimension-row[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:14px}.dimension-label[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:20px}.dimension-pill[_ngcontent-%COMP%]{border:none;background:#57b5e7;color:#fff;border-radius:8px;padding:4px 12px;font-size:14px;line-height:20px;cursor:pointer}.summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.summary-card[_ngcontent-%COMP%]{border-radius:12px;border:1px solid #F3F4F6;background:#fff;padding:18px;box-shadow:0 1px 2px #0000000d;display:flex;flex-direction:column;gap:8px}.summary-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}.summary-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.summary-icon-blue[_ngcontent-%COMP%]{background:#6366f11a;color:#6366f1}.summary-icon-green[_ngcontent-%COMP%]{background:#10b9811a;color:#10b981}.summary-icon-amber[_ngcontent-%COMP%]{background:#f59e0b1a;color:#f59e0b}.summary-icon-red[_ngcontent-%COMP%]{background:#f43f5e1a;color:#f43f5e}.summary-title[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px}.summary-amount[_ngcontent-%COMP%]{color:#111827;font-size:20px;line-height:28px;font-weight:700}.panel[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:20px;background:#fff;overflow:hidden}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid #e7eef5}.panel-title[_ngcontent-%COMP%]{color:#111827;font-size:20px;line-height:28px;font-weight:600}.panel-subtitle[_ngcontent-%COMP%]{margin-top:3px;color:#9ca3af;font-size:13px;line-height:18px}.summary-spin[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#57b5e7;font-size:32px}.ai-summary-panel[_ngcontent-%COMP%]{padding:26px}.ai-summary-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{border-bottom:none;padding:0 0 24px}.ai-header[_ngcontent-%COMP%]{justify-content:flex-start}.ai-badge[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:8px;background:linear-gradient(135deg,#35a5db,#2188bb);color:#fff;display:inline-flex;align-items:center;justify-content:center}.ai-badge[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.ai-summary-body[_ngcontent-%COMP%]{border:1px solid #FECACA;border-radius:12px;background:#fffefe;padding:16px;font-size:14px;line-height:24px;color:#4b5563}.chart-shell[_ngcontent-%COMP%]{min-height:420px;padding:10px 12px 0}.chart-legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:18px;align-items:center;padding:0 24px 24px}.legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;color:#4b5563;font-size:12px;line-height:16px}.legend-dot[_ngcontent-%COMP%]{width:14px;height:10px;border-radius:2px;flex-shrink:0}.budgets-header-left[_ngcontent-%COMP%], .budgets-filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px}.search-box[_ngcontent-%COMP%]{width:260px;height:40px;border:1px solid #D1D5DB;border-radius:16px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 14px}.search-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border:none;outline:none;width:100%;background:transparent;color:#334155;font-size:14px}.search-icon[_ngcontent-%COMP%]{color:#94a3b8;display:inline-flex;align-items:center}.search-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:16px}.status-select[_ngcontent-%COMP%]{height:40px;width:120px;border:1px solid #D1D5DB;border-radius:16px;background:#fff;padding:0 14px;display:flex;align-items:center}.status-select[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{width:100%}.table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table[mat-table][_ngcontent-%COMP%]{width:100%;min-width:1100px;background:transparent}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%], table[mat-table][_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{height:auto}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%]{text-align:left;padding:20px 24px;background:#f9fafb;color:#6b7280;font-size:12px;line-height:16px;font-weight:500;letter-spacing:.6px}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{padding:16px 24px;border-bottom:1px solid #edf2f7}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.budget-name-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.row-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;background:#dbeafe;color:#2563eb}.row-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.primary-text[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:500}.secondary-text[_ngcontent-%COMP%]{margin-top:2px;color:#6b7280;font-size:14px;line-height:20px}.forecast-muted[_ngcontent-%COMP%]{color:#6b7280}.forecast-over-budget[_ngcontent-%COMP%]{color:#ef4444}.utilization-cell[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}.utilization-track[_ngcontent-%COMP%]{width:64px;
12height:8px;border-radius:999px;background:#e5e7eb;overflow:hidden}.utilization-fill[_ngcontent-%COMP%]{display:block;height:100%;border-radius:999px}.utilization-on-track[_ngcontent-%COMP%]{background:#22c55e}.utilization-warning[_ngcontent-%COMP%]{background:#eab308}.utilization-exceeded[_ngcontent-%COMP%]{background:#ef4444}.utilization-value[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px}.status-pill[_ngcontent-%COMP%]{border-radius:999px;padding:2px 10px;font-size:12px;line-height:16px;font-weight:500;display:inline-flex;align-items:center}.status-on-track[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.status-warning[_ngcontent-%COMP%]{background:#fef9c3;color:#854d0e}.status-hard-warning[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.actions-cell[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:12px}.table-link[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;padding:0;font-size:14px;line-height:20px;color:#57b5e7}.empty-cell[_ngcontent-%COMP%]{text-align:center;color:#6b7280;font-size:14px;line-height:20px;padding:24px}.paginator-wrap[_ngcontent-%COMP%]{border-top:1px solid #e7eef5;padding:8px 16px}.empty-budget-panel[_ngcontent-%COMP%]{padding:0;overflow:hidden}.empty-budget-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:25px;border-bottom:1px solid #E5E7EB}.empty-budget-title[_ngcontent-%COMP%]{color:#111827;font-size:20px;line-height:28px;font-weight:600}.empty-budget-subtitle[_ngcontent-%COMP%]{margin-top:8px;color:#4b5563;font-size:16px;line-height:24px}.empty-budget-body[_ngcontent-%COMP%]{padding:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.empty-budget-icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:999px;background:#f3f4f6;color:#9ca3af;display:inline-flex;align-items:center;justify-content:center;margin-bottom:20px}.empty-budget-state-title[_ngcontent-%COMP%]{color:#111827;font-size:18px;line-height:28px;font-weight:600}.empty-budget-state-text[_ngcontent-%COMP%]{margin-top:14px;color:#4b5563;font-size:16px;line-height:24px}.empty-budget-actions[_ngcontent-%COMP%]{margin-top:26px;display:flex;align-items:center;gap:16px}.empty-action-btn[_ngcontent-%COMP%]{min-width:240px;padding:12px 24px;border-radius:8px}.empty-tag-btn[_ngcontent-%COMP%]{border-color:#57b5e7;color:#57b5e7;background:#fff}[_nghost-%COMP%]     .paginator-wrap .mat-mdc-paginator{background:#fff}[_nghost-%COMP%]     .paginator-wrap .mat-mdc-paginator .mat-mdc-paginator-navigation-next.mat-mdc-button-disabled, [_nghost-%COMP%]     .paginator-wrap .mat-mdc-paginator .mat-mdc-paginator-navigation-previous.mat-mdc-button-disabled{opacity:.5;cursor:not-allowed}[_nghost-%COMP%]     .status-select .mat-mdc-select-trigger{height:100%}[_nghost-%COMP%]     .status-select .mat-mdc-select-value-text{color:#000;font-size:14px;line-height:20px}[_nghost-%COMP%]     .status-select .mat-mdc-select-placeholder{color:#334155;font-size:14px;line-height:20px}[_nghost-%COMP%]     .status-select .mat-mdc-select-arrow{color:#94a3b8}[_nghost-%COMP%]     .distribution-label{fill:#374151;font-size:12px;line-height:16px}.budget-management.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}"]})}}return t})();var ou=(()=>{class t{constructor(e){this.dialogRef=e}ngOnInit(){this.autoCloseTimer=setTimeout(()=>{this.dialogRef?.close(!0)},2e3)}ngOnDestroy(){this.autoCloseTimer&&clearTimeout(this.autoCloseTimer)}static{this.\u0275fac=function(n){return new(n||t)(y(Et))}}static{this.\u0275cmp=k({type:t,selectors:[["app-budget-success-popup"]],decls:9,vars:0,consts:[[1,"budget-success-popup"],[1,"success-icon-wrap"],[1,"success-icon-circle"],["icon","ri:shield-check-fill","width","38","height","38"],[1,"success-title"],[1,"success-subtitle"]],template:function(n,i){n&1&&(vn(0,"div",0)(1,"div",1)(2,"div",2),wn(3,"iconify-icon",3),bn()(),vn(4,"div")(5,"div",4),l(6,"Budget Created Successfully!"),bn(),vn(7,"div",5),l(8,"Your budget created successfully"),bn()()())},dependencies:[N],styles:[".budget-success-popup[_ngcontent-%COMP%]{background:#fff;padding:24px;display:flex;flex-direction:column;gap:20px;align-items:center;justify-content:center;text-align:center;box-sizing:border-box}
12.success-icon-circle[_ngcontent-%COMP%]{width:80px;height:80px;border-radius:999px;background:#d1fae5;color:#10b981;display:inline-flex;align-items:center;justify-content:center}.success-title[_ngcontent-%COMP%]{color:#11181c;font-size:26px;line-height:36px;font-weight:700;margin-bottom:8px}.success-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:20px;line-height:32px}  .budget-success-popup-dialog .mat-mdc-dialog-container{padding:0;border-radius:20px}  .budget-success-popup-dialog .mdc-dialog__surface{border-radius:20px;box-shadow:0 24px 64px #0f172a2e;overflow:hidden}"]})}}return t})();function nw(t,r){if(t&1&&(o(0,"button",24),h(1,"iconify-icon",25),l(2),a()),t&2){let e=r.$implicit,n=u();Y("active",e.id===n.currentStep),p("disabled",e.id!==n.currentStep),c(2),x(" ",e.label," ")}}function iw(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.COST_CENTER_NAME)}}function ow(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),rt(" ",e.FIRST_NAME," ",e.LAST_NAME)}}function rw(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),C(e.NAME)}}function aw(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.TAG_KEY)}}function lw(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.TAG_VALUE," ")}}function sw(t,r){if(t&1){let e=A();o(0,"div",44)(1,"div",45)(2,"div",46)(3,"label",47),l(4,"Tag Key"),a(),o(5,"div",33)(6,"mat-select",48),v("selectionChange",function(){let i=O(e).index,s=u(2);return P(s.onTagKeySelectionChange(i))}),g(7,aw,2,2,"mat-option",35),a()()(),o(8,"div",46)(9,"label",47),l(10,"Tag Value"),a(),o(11,"div",33)(12,"mat-select",49),g(13,lw,2,2,"mat-option",35),a()()(),o(14,"button",50),v("click",function(){let i=O(e).index,s=u(2);return P(s.removeTagPair(i))}),h(15,"iconify-icon",51),a()()()}if(t&2){let e=r.index,n=u(2);p("formGroupName",e),c(7),p("ngForOf",n.tagValues),c(6),p("ngForOf",n.getTagValueOptionsByPair(e)),c(),p("disabled",!n.canRemoveTagPair())}}function cw(t,r){if(t&1){let e=A();o(0,"div",26)(1,"div",27),l(2,"Step 1: Scope & Dimension"),a(),o(3,"div",28),l(4,"Define the budget scope, select dimensions and assign ownership."),a(),o(5,"div",29)(6,"label",30),l(7,"Budget Name "),o(8,"span",31),l(9,"*"),a()(),h(10,"input",32),a(),o(11,"div",29)(12,"label",30),l(13,"Cost Center "),o(14,"span",31),l(15,"*"),a()(),o(16,"div",33)(17,"mat-select",34),g(18,iw,2,2,"mat-option",35),a()()(),o(19,"div",29)(20,"label",30),l(21,"Owner "),o(22,"span",31),l(23,"*"),a()(),o(24,"div",33)(25,"mat-select",36),g(26,ow,2,3,"mat-option",35),a()()(),o(27,"div",29)(28,"label",30),l(29,"Scope "),o(30,"span",31),l(31,"*"),a()(),o(32,"div",33)(33,"mat-select",37),g(34,rw,2,2,"mat-option",35),a()()(),o(35,"div",38)(36,"div",30),l(37,"Tag Key-Value Pairs"),a(),o(38,"button",39),v("click",function(){O(e);let i=u();return P(i.addTagPair())}),h(39,"iconify-icon",40),l(40," Add Tag Pair "),a()(),o(41,"div",41),g(42,sw,16,4,"div",42),a()()}if(t&2){let e=u();c(18),p("ngForOf",e.costCenters),c(8),p("ngForOf",e.budgetOwners),c(8),p("ngForOf",e.cloudProviders),c(8),p("ngForOf",e.tagPairs.controls)}}function dw(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.TEAM_NAME)}}function pw(t,r){if(t&1){let e=A();o(0,"div",71)(1,"div",72)(2,"div",73),l(3),a(),o(4,"button",74),v("click",function(){let i=O(e).index,s=u(2);return P(s.removeTeamAllocation(i))}),h(5,"iconify-icon",75),a()(),o(6,"div",76)(7,"div")(8,"label",47),l(9,"Team Name "),o(10,"span",31),l(11,"*"),a()(),o(12,"div",33)(13,"mat-select",77),g(14,dw,2,2,"mat-option",35),a()()(),o(15,"div")(16,"label",47),l(17,"Amount "),o(18,"span",31),l(19,"*"),a()(),o(20,"div",54)(21,"span",55),l(22,"$"),a(),o(23,"input",78),v("input",function(i){let s=O(e).index,d=u(2);return P(d.onAmountInput(i,"amount",s))}),a()()()()()}if(t&2){let e=r.index,n=u(2);p("formGroupName",e),c(3),x("Team ",e+1),c(),p("disabled",!n.canRemoveTeamAllocation()),c(10),p("ngForOf",n.teamNames)}}function mw(t,r){if(t&1&&(o(0,"div",79),l(1),F(2,"number"),F(3,"number"),a()),t&2){let e=u(2);c(),rt(" Total team allocation amount must be equal to total allocated amount. (Allocated: ",ie(2,2,e.totalAllocatedNumber,"1.2-2"),", Team Total: ",ie(3,5,e.teamAllocatedTotal,"1.2-2"),") ")}}function uw(t,r){if(t&1){let e=A();
12o(0,"div",52)(1,"div",27),l(2,"Step 2: Amount & Period"),a(),o(3,"div",28),l(4,"Set the total budget amount, define the period and configure team allocations. "),a(),o(5,"div",29)(6,"label",30),l(7,"Amount Type "),o(8,"span",31),l(9,"*"),a()(),o(10,"button",53),l(11,"Fixed Amount"),a()(),o(12,"div",29)(13,"label",30),l(14,"Total Allocated To Cost Center "),o(15,"span",31),l(16,"*"),a()(),o(17,"div",54)(18,"span",55),l(19,"$"),a(),o(20,"input",56),v("input",function(i){O(e);let s=u();return P(s.onAmountInput(i,"totalAllocated"))}),a()()(),o(21,"div",29)(22,"label",30),l(23,"Budget Timeline "),o(24,"span",31),l(25,"*"),a()(),o(26,"div",57)(27,"div",58)(28,"label",59),l(29,"Start Date"),a(),o(30,"div",60),h(31,"input",61),o(32,"iconify-icon",62),v("click",function(){O(e);let i=Ce(34);return P(i.open())}),a(),h(33,"mat-datepicker",null,0),a()(),o(35,"div",58)(36,"label",59),l(37,"End Date"),a(),o(38,"div",60),h(39,"input",63),o(40,"iconify-icon",62),v("click",function(){O(e);let i=Ce(42);return P(i.open())}),a(),h(41,"mat-datepicker",null,1),a()()(),o(43,"div",64),h(44,"iconify-icon",65),l(45," Please select start and end dates to see budget duration "),a()(),h(46,"div",66),o(47,"div",30),l(48,"Team Allocations"),a(),o(49,"div",67),g(50,pw,24,4,"div",68),a(),o(51,"button",69),v("click",function(){O(e);let i=u();return P(i.addTeamAllocation())}),h(52,"iconify-icon",40),l(53," Add New Team "),a(),g(54,mw,4,8,"div",70),a()}if(t&2){let e=Ce(34),n=Ce(42),i=u();c(31),p("matDatepicker",e),c(8),p("matDatepicker",n)("min",i.minEndDate),c(11),p("ngForOf",i.teamAllocations.controls),c(4),p("ngIf",i.allocationMismatch)}}function gw(t,r){if(t&1){let e=A();o(0,"button",82),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.setAllocationMethod(i.ID))}),o(1,"div",83),l(2),a(),o(3,"div",84),l(4),a()()}if(t&2){let e=r.$implicit,n=u(2);Y("active",n.selectedAllocationMethodId===e.ID),c(2),C(e.NAME),c(2),C(e.DESCRIPTION)}}function fw(t,r){if(t&1&&(o(0,"div",80)(1,"div",27),l(2,"Step 3: Allocation Method"),a(),o(3,"div",28),l(4,"Choose allocation method and distribute budget across dimensions."),a(),o(5,"div",29)(6,"label",30),l(7,"Select Allocation Method "),o(8,"span",31),l(9,"*"),a()(),g(10,gw,5,4,"button",81),a()()),t&2){let e=u();c(10),p("ngForOf",e.allocationMethods)}}function hw(t,r){if(t&1&&(o(0,"label",104),h(1,"input",105),o(2,"span",106),h(3,"iconify-icon",107),a(),o(4,"span",108),l(5),a()()),t&2){let e=r.$implicit,n=u(2);c(),p("value",e.ID),c(2),p("icon",n.getNotificationChannelIcon(e.NAME)),c(2),C(e.NAME)}}function _w(t,r){if(t&1&&(o(0,"mat-option",43),l(1),a()),t&2){let e=r.$implicit,n=u(2);p("value",e),c(),x(" ",n.getRecipientFullName(e)," ")}}function Cw(t,r){t&1&&(o(0,"div",109),l(1,"Searching users..."),a())}function xw(t,r){if(t&1){let e=A();o(0,"div",112)(1,"span",113),l(2),a(),o(3,"button",114),v("click",function(){let i=O(e).index,s=u(3);return P(s.removeRecipient(i))}),h(4,"iconify-icon",115),a()()}if(t&2){let e=r.$implicit;c(2),C(e.EMAIL_ID)}}function vw(t,r){if(t&1&&(o(0,"div",110),g(1,xw,5,1,"div",111),a()),t&2){let e=u(2);c(),p("ngForOf",e.recipients)}}function bw(t,r){t&1&&(o(0,"div",116),l(1,"No recipients added yet"),a())}function yw(t,r){if(t&1&&(o(0,"div",79),l(1),a()),t&2){let e=u(2);c(),C(e.recipientError)}}function Mw(t,r){if(t&1){let e=A();o(0,"div",85)(1,"div",27),l(2,"Step 4: Thresholds & Alerts"),a(),o(3,"div",28),l(4,"Configure spending thresholds and alert notifications."),a(),o(5,"div",86)(6,"div",87)(7,"label",30),l(8,"Soft Warning"),a(),o(9,"div",88),h(10,"input",89),o(11,"div",90),l(12),a()()(),o(13,"div",87)(14,"label",30),l(15,"Hard Warning"),a(),o(16,"div",88),h(17,"input",91),o(18,"div",90),l(19),a()()(),o(20,"div",87)(21,"label",30),l(22,"Forecast Breach"),a(),o(23,"div",88),h(24,"input",92),o(25,"div",90),l(26),a()()(),o(27,"div",64),h(28,"iconify-icon",93),l(29," Threshold order should be Soft Warning < Hard Warning < Forecast Breach. "),a()(),o(30,"div",94)(31,"label",30),l(32,"Notification Channels"),a(),o(33,"div",95),g(34,hw,6,3,"label",96),a()(),o(35,"div",94)(36,"label",30),l(37,"Recipients"),a(),o(38,"div",97)(39,"input",98),v("input",function(i){O(e);let s=u();return P(s.onRecipientInput(i.target.value))}),a(),o(40,"mat-autocomplete",99,2),v("optionSelected",function(i){O(e);let s=u();return P(s.onRecipientOptionSelected(i))}),g(42,_w,2,2,"mat-option",35),a(),o(43,"button",100),v("click",function(){O(e);let i=u();return P(i.addRecipient())}),h(44,"iconify-icon",40),l(45," Add Recipient "),a()(),g(46,Cw,2,0,"div",101),a(),o(47,"div",102)(48,"label",30),l(49,"Recipients List"),a(),g(50,vw,2,1,"div",103)(51,bw,2,0,"ng-template",null,3,at),a(),g(53,yw,2,1,"div",70),a()}if(t&2){let e=Ce(41),n=Ce(52),i=u();c(12),x("",i.softWarningValue,"%"),c(7),x("",i.hardWarningValue,"%"),c(7),x("",i.forecastBreachValue,"%"),c(8),p("ngForOf",i.notificationChannels),c(5),p("value",i.recipientInput)("matAutocomplete",e),c(3),p("ngForOf",i.recipientOptions),c(),p("disabled",!i.selectedRecipientOption),c(3),p("ngIf",i.isRecipientSearchLoading),c(4),p("ngIf",i.recipients.length>0)("ngIfElse",n),c(3),p("ngIf",i.recipientError)}}function Sw(t,r){if(t&1&&(o(0,"div",123),l(1),a()),t&2){let e=u(2);c(),C(e.getRecipientEmailsText())}}function Ow(t,r){t&1&&(o(0,"div",134),l(1,"No recipients configured"),a())}function Pw(t,r){if(t&1&&(o(0,"div",117)(1,"div",27),l(2,"Step 5: Review"),a(),o(3,"div",28),l(4,"Review all settings before creating the budget."),a(),o(5,"div",118)(6,"div",119),l(7,"Budget Overview"),a(),o(8,"div",120)(9,"div",121)(10,"div",122),l(11,"Budget Name"),a(),o(12,"div",123),l(13),a()(),o(14,"div",121)(15,"div",122),l(16,"Owner"),a(),o(17,"div",123),l(18),a()(),o(19,"div",121)(20,"div",122),l(21,"Total Amount"),a(),o(22,"div",123),l(23),a()()()(),o(24,"div",124)(25,"div",119),l(26,"Scope & Dimensions"),a(),o(27,"div",121)(28,"div",122),l(29,"Dimension Type"),a(),o(30,"div",123),l(31),a()(),o(32,"div",125)(33,"div",122),l(34,"Selected Dimensions"),a(),o(35,"div",123),l(36),a()()(),o(37,"div",124)(38,"div",119),l(39,"Thresholds & Alerts"),a(),o(40,"div",126)(41,"div",121)(42,"div",122),l(43,"Soft Warning"),a(),o(44,"div",127),l(45),a()(),o(46,"div",121)(47,"div",122),l(48,"Hard Warning"),a(),o(49,"div",128),l(50),a()(),o(51,"div",121)(52,"div",122),l(53,"Forecast Breach"),a(),o(54,"div",129),l(55),a()()(),o(56,"div",125)(57,"div",122),l(58),a(),g(59,Sw,2,1,"div",130)(60,Ow,2,0,"div",131),a()(),o(61,"div",132),h(62,"iconify-icon",133),o(63,"span"),l(64),a()()()),t&2){let e=u();c(13),C(e.reviewBudgetName),c(5),C(e.reviewOwnerName),c(5),C(e.reviewTotalAmountText),c(8),C(e.reviewDimensionType),c(5),C(e.reviewSelectedDimensions),c(9),x("",e.softWarningValue,"%"),c(5),x("",e.hardWarningValue,"%"),c(5),x("",e.forecastBreachValue,"%"),c(3),x("Alert Recipients (",e.recipients.length,")"),c(),p("ngIf",e.re
12cipients.length>0),c(),p("ngIf",e.recipients.length===0),c(),Y("error",!e.isReviewComplete),c(),p("icon",e.isReviewComplete?"mdi:check-circle":"mdi:alert-circle"),c(2),C(e.isReviewComplete?"All required fields completed":"Some required fields are incomplete")}}var ru=(()=>{class t{constructor(e,n,i,s,d){this.fb=e,this.router=n,this.dialog=i,this.adminService=s,this.notify=d,this.currentStep=1,this.totalSteps=5,this.stepItems=[{id:1,label:"Scope & Dimension"},{id:2,label:"Amount & Period"},{id:3,label:"Allocation Method"},{id:4,label:"Threshold & Alerts"},{id:5,label:"Review"}],this.cloudProviders=[],this.costCenters=[],this.budgetOwners=[],this.tagValues=[],this.teamNames=[],this.allocationMethods=[],this.notificationChannels=[],this.recipientInput="",this.recipients=[],this.recipientOptions=[],this.selectedRecipientOption=null,this.isRecipientSearchLoading=!1,this.recipientError="",this.allocationMismatch=!1,this.destroy$=new Rt,this.recipientSearch$=new Rt,this.budgetForm=this.fb.group({budgetName:["",[U.required]],costCenter:["",[U.required]],owner:["",[U.required]],scope:["",[U.required]],tagPairs:this.fb.array([this.createTagPair()]),amountType:["Fixed Amount",[U.required]],totalAllocated:["",[U.required,U.pattern("^\\d+(\\.\\d{1,2})?$")]],startDate:[null,[U.required]],endDate:[null,[U.required]],teamAllocations:this.fb.array([this.createTeamAllocation()]),allocationMethod:[null,[U.required]],softWarning:[80,[U.required]],hardWarning:[95,[U.required]],forecastBreach:[110,[U.required]],notificationChannelId:[null,[U.required]]})}ngOnInit(){this.cloudProviders=kn(JSON.parse(window.localStorage.getItem("CLOUD_PROVIDER")||"[]")),this.allocationMethods=JSON.parse(window.localStorage.getItem("ALLOCATION_METHOD")||"[]"),this.allocationMethods.length>0&&this.budgetForm.get("allocationMethod")?.setValue(this.allocationMethods[0].ID),this.notificationChannels=JSON.parse(window.localStorage.getItem("NOTIFICATION_CHANNEL")||"[]"),this.budgetForm.get("notificationChannelId")?.setValue(this.notificationChannels[0]?.ID??null),this.getCostCenters(),this.getBudgetOwners(),this.getTagValues(),this.getTeams(),this.budgetForm.get("totalAllocated")?.valueChanges.subscribe(()=>this.refreshAllocationValidation()),this.teamAllocations.valueChanges.subscribe(()=>this.refreshAllocationValidation()),this.budgetForm.get("startDate")?.valueChanges.subscribe(e=>this.handleStartDateChange(e)),this.setupRecipientSearch()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getCostCenters(){this.adminService.getCostCentersTrim().subscribe({next:e=>{this.costCenters=e?.object},error:e=>{this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getBudgetOwners(){this.adminService.getClientMembersTrim().subscribe({next:e=>{this.budgetOwners=e?.object},error:e=>{this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getTagValues(){this.adminService.getTagsTrim().subscribe({next:e=>{this.tagValues=e?.object},error:e=>{this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}getTeams(){this.adminService.getTeamsTrim().subscribe({next:e=>{this.teamNames=e?.object},error:e=>{this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}get isFirstStep(){return this.currentStep===1}get isLastStep(){return this.currentStep===this.totalSteps}get primaryCtaLabel(){return this.isLastStep?"Create Budget":"Continue"}get tagPairs(){return this.budgetForm.get("tagPairs")}get teamAllocations(){return this.budgetForm.get("teamAllocations")}get totalAllocatedNumber(){return this.toNumber(this.budgetForm.get("totalAllocated")?.value)}get teamAllocatedTotal(){return this.teamAllocations.controls.reduce((e,n)=>e+this.toNumber(n.get("amount")?.value),0)}get allocationDifference(){return this.totalAllocatedNumber-this.teamAllocatedTotal}get selectedAllocationMethodId(){let e=this.budgetForm.get("allocationMethod")?.value;return e==null?null:Number(e)}get softWarningValue(){return Number(this.budgetForm.get("softWarning")?.value||0)}get hardWarningValue(){return Number(this.budgetForm.get("hardWarning")?.value||0)}get forecastBreachValue(){return Number(this.budgetForm.get("forecastBreach")?.value||0)}get isTeamAllocationBalanced(){return this.totalAllocatedNumber?Math.abs(this.allocationDifference)<1e-4:!1}get minEndDate(){let e=this.budgetForm.get("startDate")?.value;return e?new Date(e):null}get reviewBudgetName(){return String(this.budgetForm.get("budgetName")?.value||"").trim()||"Not specified"}get reviewOwnerName(){let e=Number(this.budgetForm.get("owner")?.value);if(!e)return"Not specified";let n=this.budgetOwners.find(i=>Number(i?.ID)===e);return n&&`${String(n?.FIRST_NAME||"").trim()} ${String(n?.LAST_NAME||"").trim()}`.trim()||"Not specified"}get reviewTotalAmountText(){return this.totalAllocatedNumber?`$${this.totalAllocatedNumber.toLocaleStr
12ing(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}`:"$0"}get reviewDimensionType(){let e=Number(this.budgetForm.get("scope")?.value);if(!e)return"Not specified";let n=this.cloudProviders.find(i=>Number(i?.ID)===e);return String(n?.NAME||"").trim()||"Not specified"}get reviewSelectedDimensions(){let e=this.tagPairs.controls.map(n=>{let i=n.get("tagKey")?.value,s=n.get("tagValue")?.value;if(!i||!s)return"";let d=this.getTagKeyNameById(i),m=this.getTagValueNameById(i,s);return!d||!m?"":`${d}: ${m}`}).filter(n=>!!n);return e.length?e.join(", "):"Not specified"}get isReviewComplete(){let e=this.isControlSatisfied("budgetName")&&this.isControlSatisfied("costCenter")&&this.isControlSatisfied("owner")&&this.isControlSatisfied("scope")&&this.isFormArraySatisfied(this.tagPairs),n=this.isControlSatisfied("amountType")&&this.isControlSatisfied("totalAllocated")&&this.isControlSatisfied("startDate")&&this.isControlSatisfied("endDate")&&this.isFormArraySatisfied(this.teamAllocations)&&this.isTeamAllocationBalanced,i=this.isControlSatisfied("allocationMethod"),s=this.softWarningValue<this.hardWarningValue&&this.hardWarningValue<this.forecastBreachValue,d=!!this.budgetForm.get("notificationChannelId")?.valid,m=this.recipients.length>0;return!!(e&&n&&i&&s&&d&&m)}canProceedToNextStep(){if(this.currentStep===1)return!!(this.isControlSatisfied("budgetName")&&this.isControlSatisfied("costCenter")&&this.isControlSatisfied("owner")&&this.isControlSatisfied("scope")&&this.isFormArraySatisfied(this.tagPairs));if(this.currentStep===2)return!!(this.isControlSatisfied("amountType")&&this.isControlSatisfied("totalAllocated")&&this.isControlSatisfied("startDate")&&this.isControlSatisfied("endDate")&&this.isFormArraySatisfied(this.teamAllocations))&&this.isTeamAllocationBalanced;if(this.currentStep===3)return!!this.isControlSatisfied("allocationMethod");if(this.currentStep===4){let e=this.softWarningValue<this.hardWarningValue&&this.hardWarningValue<this.forecastBreachValue,n=!!this.budgetForm.get("notificationChannelId")?.valid,i=this.recipients.length>0;return e&&n&&i}return this.isReviewComplete}navigateToBudgetManagement(){this.router.navigate(["/admin-dashboard/budget"])}addTagPair(){this.tagPairs.push(this.createTagPair())}removeTagPair(e){this.tagPairs.length<=1||this.tagPairs.removeAt(e)}canRemoveTagPair(){return this.tagPairs.length>1}onTagKeySelectionChange(e){let n=this.tagPairs.at(e);n&&(n.get("tagValue")?.setValue(""),n.get("tagValue")?.markAsUntouched())}getTagValueOptionsByPair(e){let i=this.tagPairs.at(e)?.get("tagKey")?.value;if(!i)return[];let s=this.tagValues.find(d=>d?.ID===i);return Array.isArray(s?.TAG_VALUE)?s.TAG_VALUE:[]}addTeamAllocation(){this.teamAllocations.push(this.createTeamAllocation()),this.refreshAllocationValidation()}removeTeamAllocation(e){this.teamAllocations.length<=1||(this.teamAllocations.removeAt(e),this.refreshAllocationValidation())}canRemoveTeamAllocation(){return this.teamAllocations.length>1}setAllocationMethod(e){this.budgetForm.get("allocationMethod")?.setValue(e)}onAmountInput(e,n,i){let s=e.target;if(!s)return;let d=this.sanitizeAmountInput(s.value);if(s.value!==d&&(s.value=d),n==="totalAllocated"){this.budgetForm.get("totalAllocated")?.setValue(d,{emitEvent:!0});return}if(typeof i!="number")return;this.teamAllocations.at(i)?.get("amount")?.setValue(d,{emitEvent:!0})}onRecipientInput(e){this.recipientInput=e,this.selectedRecipientOption=null,this.recipientError="",this.recipientSearch$.next(e)}onRecipientOptionSelected(e){let n=e.option.value;this.selectedRecipientOption=n,this.recipientInput=this.getRecipientFullName(n),this.recipientError=""}addRecipient(){if(!this.selectedRecipientOption){this.recipientError="Please select a recipient from the suggestions.";return}let e=Number(this.selectedRecipientOption.ID);if(this.recipients.some(n=>Number(n.ID)===e)){this.recipientError="Recipient already added.";return}this.recipients.push(this.selectedRecipientOption),this.recipientInput="",this.selectedRecipientOption=null,this.recipientOptions=[],this.recipientError=""}removeRecipient(e){e<0||e>=this.recipients.length||(this.recipients.splice(e,1),this.recipientError="")}onBack(){this.currentStep!==1&&(this.currentStep=this.currentStep-1)}onPrimaryAction(){if(this.isLastStep){this.onCreateBudget();return}this.onContinue()}onContinue(){if(this.currentStep===1){if(!this.validateStepOne())return;this.currentStep=2;return}if(this.currentStep===2){if(!this.validateStepTwo())return;this.currentStep=3;return}if(this.currentStep===3){if(!this.validateStepThree())return;this.currentStep=4;return}if(this.currentStep===4){if(!this.validateStepFour())return;this.currentStep=5;return}if(this.currentStep<5){this.currentStep=this.currentStep+1;return}this.onCreateBudget()}onCreateBudget(){if(!this.isReviewComplete)return;let e=Number(this.budgetForm.get("notificationChannelId")?.value),n=this.recipients.map(s=>({CHANNEL_ID:e,USER_ID:Number(s.ID)})),i={BUDGET_NAME:String(this.budgetForm.get("budgetName")?.value||"").trim(),COST_CENTER_ID:Number(this.budgetForm.get("costCenter")?.value),OWNER_ID:Number(this.budgetForm.get("owner")?.value),CLOUD_PROVIDER_ID:Number(this.budgetForm.get("scope")?.value),AMOUNT:this.totalAllocatedNumber,START_DATE:this.formatDateForApi(this.budgetForm.get("startDate")?.value),END_DATE:this.formatDateForApi(this.budgetForm.get("endDate")?.value),ALLOCATION_METHOD_ID:Number(this.budgetForm.get("allocationMethod")?.value),SOFT_WARNING:this.softWarningValue,HARD_WARNING:this.hardWarningValue,FORECAST_BREACH:this.forecastBreachValue,TAG:this.tagPairs.controls.map(s=>({KEY_ID:Number(s.get("tagKey")?.value),VALUE_ID:Number(s.get("tagValue")?.value)})),TEAM:this.teamAllocations.controls.map(s=>({TEAM_ID:Number(s.get("teamName")?.value),ALLOCATED_AMOUNT:this.toNumber(s.get("amount")?.value)})),NOTIFICATION:n};this.adminService.createBudget(i).subscribe({next:s=>{this.notify.showNotification(s?.message,"top",E[s?.status]?E[s?.status]:"success",s?.status),this.openBudgetSuccessPopup(),this.router.navigate(["/admin-dashboard/budget"])},error:s=>{this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}})}openBudgetSuccessPopup(){this.dialog.open(ou,{panelClass:"budget-success-popup-dialog",width:"600px",disableClose:!0})}validateStepOne(){let e=["budgetName","costCenter","owner","scope"];return e.forEach(n=>this.budgetForm.get(n)?.markAsTouched()),this.tagPairs.controls.forEac
12h(n=>n.markAllAsTouched()),e.every(n=>this.isControlSatisfied(n))&&this.isFormArraySatisfied(this.tagPairs)}validateStepTwo(){let e=["amountType","totalAllocated","startDate","endDate"];if(e.forEach(d=>this.budgetForm.get(d)?.markAsTouched()),this.teamAllocations.controls.forEach(d=>d.markAllAsTouched()),this.refreshAllocationValidation(),!(e.every(d=>this.isControlSatisfied(d))&&this.isFormArraySatisfied(this.teamAllocations)))return!1;let i=this.budgetForm.get("startDate")?.value,s=this.budgetForm.get("endDate")?.value;return!i||!s||this.normalizeDate(s).getTime()<=this.normalizeDate(i).getTime()?!1:(this.allocationMismatch=!this.isTeamAllocationBalanced,!this.allocationMismatch)}validateStepThree(){let e=["allocationMethod"];return e.forEach(n=>this.budgetForm.get(n)?.markAsTouched()),e.every(n=>this.isControlSatisfied(n))}validateStepFour(){return["softWarning","hardWarning","forecastBreach","notificationChannelId"].forEach(n=>this.budgetForm.get(n)?.markAsTouched()),this.budgetForm.get("notificationChannelId")?.value?this.recipients.length===0?(this.recipientError="At least one recipient is required for alerts.",!1):(this.recipientError="",!0):(this.recipientError="Please select a notification channel.",!1)}refreshAllocationValidation(){if(!this.budgetForm.get("totalAllocated")?.value&&this.teamAllocatedTotal===0){this.allocationMismatch=!1;return}this.allocationMismatch=!this.isTeamAllocationBalanced}createTagPair(){return this.fb.group({tagKey:["",[U.required]],tagValue:["",[U.required]]})}createTeamAllocation(){return this.fb.group({teamName:["",[U.required]],amount:["",[U.required,U.pattern("^\\d+(\\.\\d{1,2})?$")]]})}toNumber(e){let n=Number(String(e??"").replace(/,/g,"").trim());return Number.isFinite(n)?n:0}sanitizeAmountInput(e){let n=String(e??"").replace(/[^\d.]/g,""),i=n.indexOf(".");if(i===-1)return n;let s=n.slice(0,i),d=n.slice(i+1).replace(/\./g,"").slice(0,2);return`${s}.${d}`}handleStartDateChange(e){let n=this.budgetForm.get("endDate");if(!e||!n?.value)return;let i=this.normalizeDate(e);this.normalizeDate(n.value).getTime()<=i.getTime()&&(n.setValue(null),n.markAsTouched())}normalizeDate(e){let n=new Date(e);return new Date(n.getFullYear(),n.getMonth(),n.getDate())}formatDateForApi(e){let n=this.normalizeDate(e),i=String(n.getDate()).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),d=n.getFullYear();return`${i}-${s}-${d}`}setupRecipientSearch(){this.recipientSearch$.pipe(ir(300),or(),rr(e=>{let n=String(e||"").trim();return n.length<2?(this.isRecipientSearchLoading=!1,ji([])):(this.isRecipientSearchLoading=!0,this.adminService.getClientMembersBySearchKey(n).pipe(tr(i=>Array.isArray(i?.object)?i.object:[]),nr(()=>ji([])),Xe(()=>{this.isRecipientSearchLoading=!1})))}),Tt(this.destroy$)).subscribe(e=>{let n=new Set(this.recipients.map(i=>Number(i.ID)));this.recipientOptions=e.filter(i=>!n.has(Number(i.ID)))})}isControlSatisfied(e){let n=this.budgetForm.get(e);return n?n.disabled?this.hasValue(n.value):n.valid:!1}isFormArraySatisfied(e){return e.disabled?e.length===0?!1:e.controls.every(n=>n instanceof Oo?Object.keys(n.controls).every(i=>this.hasValue(n.get(i)?.value)):this.hasValue(n.value)):e.valid}hasValue(e){return e==null?!1:e instanceof Date?!Number.isNaN(e.getTime()):Array.isArray(e)?e.length>0:typeof e=="number"?Number.isFinite(e):String(e).trim().length>0}getRecipientFullName(e){let n=String(e?.FIRST_NAME||"").trim(),i=String(e?.LAST_NAME||"").trim();return`${n} ${i}`.trim()}getRecipientEmailsText(){return this.recipients.map(e=>String(e?.EMAIL_ID||"").trim()).filter(e=>!!e).join(", ")}getNotificationChannelIcon(e){return String(e||"").trim().toLowerCase().includes("slack")?"mdi:slack":"mdi:email-outline"}getTagKeyNameById(e){let n=Number(e),i=this.tagValues.find(s=>Number(s?.ID)===n);return String(i?.TAG_KEY||"").trim()}getTagValueNameById(e,n){let i=Number(e),s=Number(n),d=this.tagValues.find(_=>Number(_?.ID)===i),f=(Array.isArray(d?.TAG_VALUE)?d.TAG_VALUE:[]).find(_=>Number(_?.ID)===s);return String(f?.TAG_VALUE||"").trim()}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(G),y(Se),y(Je),y(V))}}static{this.\u0275cmp=k({type:t,selectors:[["app-budget-setup"]],decls:30,vars:10,consts:[["startDatePicker",""],["endDatePicker",""],["recipientAuto","matAutocomplete"],["noRecipientsState",""],[1,"budget-setup-page"],[1,"top-breadcrumb"],["icon","mdi:chevron-right","width","18","height","18"],[1,"breadcrumb-link",3,"click"],[1,"active"],[1,"page-title"],[1,"page-subtitle"],[1,"setup-steps-tabs"],["type","button","class","tab-item",3,"active","disabled",4,"ngFor","ngForOf"],[3,"formGroup"],["class","setup-step-card",4,"ngIf"],["class","setup-step-card step-two-card",4,"ngIf"],["class","setup-step-card step-three-card",4,"ngIf"],["class","setup-step-card step-four-card",4,"ngIf"],["class","setup-step-card step-five-card",4,"ngIf"],[1,"wizard-footer"],["type","button",1,"footer-secondary",3,"click","disabled"],["icon","mdi:arrow-left","width","18","height","18"],["type","button",1,"footer-primary",3,"click","disabled"],["icon","mdi:arrow-right","width","18","height","18"],["type","button",1,"tab-item",3,"disabled"],["icon","ri:brain-line","width","18","height","18"],[1,"setup-step-card"],[1,"section-title"],[1,"section-subtitle"],[1,"form-group"],[1,"field-label"],[1,"required"],["type","text","formControlName","budgetName","placeholder","Enter budget name","autocomplete","off",1,"form-input"],[1,"select-wrap"],["formControlName","costCenter","placeholder","Select cost center",1,"form-select"],[3,"value",4,"ngFor","ngForOf"],["formControlName","owner","placeholder","Select budget owner",1,"form-select"],["formControlName","scope","placeholder","Select scope",1,"form-select"],[1,"tag-header"],["type","button",1,"add-tag-btn",3,"click"],["icon","mdi:plus","width","18","height","18"],["formArrayName","tagPairs",1,"tag-pairs-wrap"],["class","tag-pair-card",3,"formGroupName",4,"ngFor","ngForOf"],[3,"value"],[1,"tag-pair-card",3,"formGroupName"],[1,"tag-pair-grid"],[1,"tag-field"],[1,"tag-label"],["formControlName","tagKey","placeholder","Select tag key",1,"form-select",3,"selectionChange"],["formControlName","tagValue","placeholder","Select value",1,"form-select"],["type","button","aria-label","Remove tag pair",1,"delete-tag-btn",3,"click","disabled"],["icon","mdi:close","width","20","height","20"],[1,"setup-step-card","step-two-card"],["type","button",1,"amount-type-pill"],[1,"currency-input-wrap"],[1,"currency-prefix"],["type","text","formControlName","totalAllocated","placeholder","0.00","autocomplete","off","inputmode","decimal",1,"form-input","currency-input","step2-total-input",3,"input"],[1,"date-grid"],[1,"date-field"],[1,"mini-label"],[1,"date-input-wrap"],["matInput","","formControlName","startDate","placeholder","Select start date","autocomplete","off","readonly","",1,"form-input","step2-date-input",3,"matDatepicker"],["icon","mdi:calendar-month-outline","width","20","height","20",3,"click"],["matInput","","formControlName","endDate","placeholder","Select end date","autocomplete","off","readonly","",1,"form-input","step2-date-input",3,"matDatepicker","min"],[1,"info-banner"],["icon","mdi:information","width","18","height","18"],[1,"team-alloc-divider"],["formArrayName","teamAllocations",1,"team-allocations-wrap"],["class","team-card",3,"formGroupName",4,"ngFor","ngForOf"],["type","button",1,"add-team-btn",3,"click"],["class","allocation-error",4,"ngIf"],[1,"team-card",3,"formGroupName"],[1,"team-card-head"],[1,"team-title"],["type","button",1,"delete-team-btn",3,"click","disabled"],["icon","mdi:close","width","18","height","18"],[1,"team-grid"],["formControlName","teamName","placeholder","Select Team",1,"form-select"],["type","text","formControlName","amount","placeholder","0.00","autocomplete","off","inputmode","decimal",1,"form-input","currency-input","step2-team-amount-input",3,"input"],[1,"allocation-error"],[1,"setup-step-card","step-three-card"],["type","button","class","allocation-method-card",3,"active","click",4,"ngFor","ngForOf"],["type","button",1,"allocation-method-card",3,"click"],[1,"allocation-method-title"],[1,"allocation-method-subtitle"],[1,"setup-step-card","step-four-card"],[1,"thresholds-wrap"],[1,"threshold-item"],[1,"threshold-row"],["type","range","min","0","max","150","step","1","formControlName","softWarning",1,"threshold-slider"],[1,"threshold-value"],["type","range","min","0","max","100","step","1","formControlName","hardWarning",1,"threshold-slider"],["type","range","min","0","max","150","step","1","formControlName","forecastBreach",1,"threshold-slider"],["icon","mdi:alert-circle-outline","width","18","height","18"],[1,"form-group","step-four-group"],[1,"channel-wrap"],["class","channel-option",4,"ngFor","ngForOf"],[1,"recipient-entry-row"],["type","text","placeholder","Search recipient by name","autocomplete","off",1,"form-input","recipient-input",3,"input","value","matAutocomplete"],[3,"optionSelected"],["type","button",1,"add-recipient-btn",3,"click","disabled"],["class","recipient-hint",4,"ngIf"],[1,"form-group","step-four-group","recipients-list-group"],["class","recipient-list-box",4,"ngIf","ngIfElse"],[1,"channel-option"],["type","radio","formControlName","notificationChannelId",1,"channel-radio",3,"value"],[1,"channel-icon-wrap"],["width","20","height","20",3,"icon"],[1,"channel-label"],[1,"recipient-hint"],[1,"recipient-list-box"],["class","recipient-pill",4,"ngFor","ngForOf"],[1,"recipient-pill"],[1,"recipient-pill-text"],["type","button","aria-label","Remove recipient",1,"delete-recipient-btn",3,"click"],["icon","mdi:close","width","16","height","16"],[1,"recipient-list-box","empty"],[1,"setup-step-card","step-five-card"],[1,"review-panel","review-panel-blue"],[1,"review-panel-title"],[1,"review-overview-grid"],[1,"review-item"],[1,"review-label"],[1,"review-value"],[1,"review-panel"],[1,"review-item","review-item-spaced"],[1,"threshold-review-grid"],[1,"review-value","threshold-soft"],[1,"review-value","threshold-hard"],[1,"review-value","threshold-breach"],["class","review-value",4,"ngIf"],["class","review-empty",4,"ngIf"],[1,"review-status-banner"],["width","22","height","22",3,"icon"],[1,"review-empty"]],template:function(n,i){n&1&&(o(0,"div",4)(1,"div",5)(2,"span"),l(3,"Governance"),a(),h(4,"iconify-icon",6),o(5,"span",7),v("click",function(){return i.navigateToBudgetManagement()}),l(6,"Budget Management"),a(),h(7,"iconify-icon",6),o(8,"span",8),l(9,"Setup"),a()(),o(10,"div")(11,"div",9),l(12,"Budget Management"),a(),o(13,"div",10),l(14,"Monitor spending, set limits, and optimize cloud costs across all your services and Teams"),a()(),o(15,"div",11),g(16,nw,3,4,"button",12),a(),o(17,"div",13),g(18,cw,43,4,"div",14)(19,uw,55,5,"div",15)(20,fw,11,1,"div",16)(21,Mw,54,12,"div",17)(22,Pw,65,15,"div",18),o(23,"div",19)(24,"button",20),v("click",function(){return i.onBack()}),h(25,"iconify-icon",21),l(26," Back "),a(),o(27,"button",22),v("click",function(){return i.onPrimaryAction()}),l(28),h(29,"iconify-icon",23),a()()()()),n&2&&(c(16),p("ngForOf",i.stepItems),c(),p("formGroup",i.budgetForm),c(),p("ngIf",i.currentStep===1),c(),p("ngIf",i.currentStep===2),c(),p("ngIf",i.currentStep===3),c(),p("ngIf",i.currentStep===4),c(),p("ngIf",i.currentStep===5),c(2),p("disabled",i.isFirstStep),c(3),p("disabled",!i.canProceedToNextStep()),c(),x(" ",i.primaryCtaLabel," "))},dependencies:[N,$,B,Yt,ve,gr,ur,me,$e,Ge,We,fr,hr,z,An,fe,ue,ps,ms,vr,br,Wt],styles:[".budget-setup-page[_ngcontent-%COMP%]{color:#111827;padding:24px;background:#f8fafc;min-height:100%;display:flex;flex-direction:column;gap:25px}.top-breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:14px;line-height:20px}.top-breadcrumb[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.breadcrumb-link[_ngcontent-%COMP%]{color:#6b7280;cursor:pointer}.page-title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700;margin-bottom:8px}.page-subtitle[_ngcontent-%COMP%]{color:#4b5563;font-size:16px;line-height:24px}.setup-steps-tabs[_ngcontent-%COMP%]{border-bottom:1px solid #E5E7EB;background:#fff;display:flex;overflow-x:auto}.tab-item[_ngcontent-%COMP%]{border:none;border-bottom:2px solid transparent;background:transparent;color:#374151;display:inline-flex;align-items:center;gap:10px;font-size:14px;line-height:20px;font-weight:500;padding:16px 24px;white-space:nowrap}.tab-item.active[_ngcontent-%COMP%]{color:#35a5db;border-bottom-color:#35a5db}.tab-item[_ngcontent-%COMP%]:disabled{opacity:1}.setup-step-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;border-radius:8px;padding:32px}.section-title[_ngcontent-%COMP%]{font-size:20px;line-height:28px;font-weight:600;color:#111827;margin-bottom:8px}.section-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#4b5563;margin-bottom:28px}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-bottom:24px;max-width:980px}.field-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#374151;font-weight:500}.required[_ngcontent-%COMP%]{color:#ef4444}.form-input[_ngcontent-%COMP%], .form-select[_ngcontent-%COMP%]{height:48px;font-size:14px;line-height:20px;color:#111827;outline:none;background:#fff}.form-select[_ngcontent-%COMP%]{width:100%}.form-input[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #D1D5DB;padding:0 16px}.form-input[_ngcontent-%COMP%]::placeholder{color:#6b7280}.form-input[_ngcontent-%COMP%]:focus, .select-wrap[_ngcontent-%COMP%]:focus-within{border-color:#57b5e7;box-shadow:0 0 0 2px #57b5e733}.select-wrap[_ngcontent-%COMP%]{position:relative;max-width:980px;height:48px;border-radius:8px;border:1px solid #D1D5DB;background:#fff;padding:0 16px;display:flex;align-items:center}.tag-header[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:12px;max-width:980px;
12display:flex;align-items:center;justify-content:space-between}.add-tag-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#2563eb;display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;padding:0}.add-tag-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.tag-pairs-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;max-width:980px}.tag-pair-card[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:8px;padding:14px 16px}.tag-pair-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:16px;align-items:center}.tag-label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;font-size:12px;line-height:16px;color:#4b5563;font-weight:500}.delete-tag-btn[_ngcontent-%COMP%]{height:36px;width:36px;border:none;background:transparent;color:#ef4444;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.delete-tag-btn[_ngcontent-%COMP%]:disabled{color:#cbd5e1;cursor:not-allowed}.amount-type-pill[_ngcontent-%COMP%]{max-width:250px;padding:14px 18px;border:none;border-radius:8px;background:#35a5db;color:#fff;font-size:14px;line-height:20px;font-weight:500;cursor:default}.currency-input-wrap[_ngcontent-%COMP%]{position:relative;max-width:980px}.step-two-card[_ngcontent-%COMP%]   .step2-total-input[_ngcontent-%COMP%]{width:93%}.step-two-card[_ngcontent-%COMP%]   .step2-team-amount-input[_ngcontent-%COMP%]{width:72%}.step-two-card[_ngcontent-%COMP%]   .step2-date-input[_ngcontent-%COMP%]{width:87%}.currency-prefix[_ngcontent-%COMP%]{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#6b7280;font-size:14px;line-height:20px;pointer-events:none}.currency-input[_ngcontent-%COMP%]{padding-left:40px}.date-grid[_ngcontent-%COMP%]{max-width:980px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.mini-label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;color:#4b5563;font-size:12px;line-height:16px;font-weight:500}.date-input-wrap[_ngcontent-%COMP%]{position:relative}.date-input-wrap[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#6b7280;pointer-events:auto;cursor:pointer}.date-input-wrap[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]{padding-right:42px}.step-two-card[_ngcontent-%COMP%]   .step2-date-input[_ngcontent-%COMP%]::placeholder{color:#111827}.info-banner[_ngcontent-%COMP%]{margin-top:12px;max-width:980px;padding:12px;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:12px;line-height:16px;display:inline-flex;align-items:center;gap:8px}.team-alloc-divider[_ngcontent-%COMP%]{max-width:980px;border-top:1px solid #E5E7EB;margin:12px 0 22px}.team-allocations-wrap[_ngcontent-%COMP%]{max-width:980px;display:flex;flex-direction:column;gap:12px;margin-top:12px}.team-card[_ngcontent-%COMP%]{border-radius:8px;background:#f9fafb;padding:16px}.team-card-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.team-title[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:500}.delete-team-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#ef4444;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.delete-team-btn[_ngcontent-%COMP%]:disabled{color:#cbd5e1;cursor:not-allowed}.team-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.add-team-btn[_ngcontent-%COMP%]{margin-top:16px;border:1px solid #BFDBFE;background:#fff;color:#35a5db;border-radius:8px;padding:8px 16px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.add-team-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.allocation-error[_ngcontent-%COMP%]{margin-top:12px;max-width:980px;color:#dc2626;font-size:12px;line-height:16px}.step-three-card[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{max-width:980px}.allocation-method-card[_ngcontent-%COMP%]{border:2px solid #D1D5DB;border-radius:8px;background:#fff;padding:18px;text-align:left;cursor:pointer}.allocation-method-card[_ngcontent-%COMP%] + .allocation-method-card[_ngcontent-%COMP%]{margin-top:10px}.allocation-method-card.active[_ngcontent-%COMP%]{border-color:#35a5db;background:#eff6ff}.allocation-method-title[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:500}.allocation-method-subtitle[_ngcontent-%COMP%]{margin-top:4px;color:#6b7280;font-size:12px;line-height:16px}.step-four-card[_ngcontent-%COMP%]   .section-subtitle[_ngcontent-%COMP%]{margin-bottom:32px}.thresholds-wrap[_ngcontent-%COMP%]{max-width:980px;margin-bottom:24px}.threshold-item[_ngcontent-%COMP%] + .threshold-item[_ngcontent-%COMP%]{margin-top:20px}.threshold-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;margin-top:8px}.threshold-slider[_ngcontent-%COMP%]{width:100%;height:8px;border-radius:999px;background:#e5e7eb;appearance:none;outline:none}.threshold-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;width:22px;height:22px;border-radius:50%;background:#007bff;border:2px solid #007BFF;cursor:pointer}.threshold-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:#007bff;border:2px solid #007BFF;cursor:pointer}.threshold-slider[_ngcontent-%COMP%]::-moz-range-track{height:8px;border-radius:999px;background:#e5e7eb}.threshold-value[_ngcontent-%COMP%]{min-width:56px;text-align:left;color:#111827;font-size:14px;line-height:20px;font-weight:500}.step-four-group[_ngcontent-%COMP%]{max-width:980px}.channel-wrap[_ngcontent-%COMP%]{border-radius:8px;background:#f9fafb;padding:16px;display:flex;flex-direction:column;gap:10px}.channel-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:12px;width:min(920px,100%);border:1px solid #E5E7EB;border-radius:8px;background:#fff;padding:13px;
12cursor:pointer}.channel-radio[_ngcontent-%COMP%]{width:18px;height:18px;accent-color:#3B82F6;margin:0;cursor:pointer}.channel-icon-wrap[_ngcontent-%COMP%]{color:#9ca3af;display:inline-flex;align-items:center;justify-content:center}.channel-label[_ngcontent-%COMP%]{color:#374151;font-size:14px;line-height:20px}.recipient-entry-row[_ngcontent-%COMP%]{display:flex;gap:12px;max-width:980px;align-items:center}.recipient-input[_ngcontent-%COMP%]{flex:1;min-width:0}.add-recipient-btn[_ngcontent-%COMP%]{border:2px solid #3B82F6;background:#fff;color:#2563eb;border-radius:8px;min-width:190px;padding:14px 18px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.add-recipient-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.recipient-hint[_ngcontent-%COMP%]{margin-top:8px;color:#6b7280;font-size:12px;line-height:16px}.recipients-list-group[_ngcontent-%COMP%]{margin-bottom:0}.recipient-list-box[_ngcontent-%COMP%]{border-radius:8px;background:#f9fafb;padding:12px;display:flex;flex-wrap:wrap;gap:8px}.recipient-list-box.empty[_ngcontent-%COMP%]{align-items:center;color:#6b7280;font-size:14px;line-height:20px;font-style:italic}.recipient-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:#fff;border:1px solid #d1d5db;padding:6px 8px}.recipient-pill-text[_ngcontent-%COMP%]{color:#374151;font-size:13px;line-height:18px}.delete-recipient-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#ef4444;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.step-five-card[_ngcontent-%COMP%]   .section-subtitle[_ngcontent-%COMP%]{margin-bottom:32px}.review-panel[_ngcontent-%COMP%]{width:980px;border-radius:8px;background:#f9fafb;padding:24px}.review-panel[_ngcontent-%COMP%] + .review-panel[_ngcontent-%COMP%]{margin-top:24px}.review-panel-blue[_ngcontent-%COMP%]{background:#eff6ff}.review-panel-title[_ngcontent-%COMP%]{color:#111827;font-size:18px;line-height:28px;font-weight:600;margin-bottom:20px}.review-overview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:32px 24px}.review-item[_ngcontent-%COMP%]{min-width:0}.review-label[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:20px}.review-value[_ngcontent-%COMP%]{margin-top:4px;color:#111827;font-size:16px;line-height:24px;font-weight:500;word-break:break-word}.review-item-spaced[_ngcontent-%COMP%]{margin-top:24px}.threshold-review-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.threshold-soft[_ngcontent-%COMP%]{color:#ea580c}.threshold-hard[_ngcontent-%COMP%]{color:#dc2626}.threshold-breach[_ngcontent-%COMP%]{color:#b91c1c}.review-empty[_ngcontent-%COMP%]{margin-top:4px;color:#6b7280;font-size:12px;line-height:16px;font-style:italic}.review-status-banner[_ngcontent-%COMP%]{margin-top:24px;width:980px;border-radius:8px;border:1px solid #BBF7D0;background:#f0fdf4;color:#166534;display:inline-flex;align-items:center;gap:10px;padding:17px;font-size:14px;line-height:20px;font-weight:500}.review-status-banner.error[_ngcontent-%COMP%]{border-color:#fecaca;background:#fee2e2;color:#b91c1c}.wizard-footer[_ngcontent-%COMP%]{margin-top:24px;border-top:1px solid #E5E7EB;padding:18px 32px;display:flex;align-items:center;justify-content:space-between;background:#fff}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{border:none;border-radius:8px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;gap:8px;cursor:pointer;padding:10px 24px;justify-content:center}.footer-secondary[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;color:#374151}.footer-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.footer-secondary[_ngcontent-%COMP%]:disabled, .footer-primary[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-trigger{height:46px;align-items:center}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-value-text, [_nghost-%COMP%]     .select-wrap .mat-mdc-select-placeholder{font-size:14px;line-height:20px}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-value-text{color:#111827}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-placeholder{color:#6b7280}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-arrow{color:#9ca3af}[_nghost-%COMP%]     .mat-mdc-autocomplete-panel .mat-mdc-option{min-height:40px;font-size:14px;line-height:20px}.edit-mode[_ngcontent-%COMP%]   .form-input[readonly][_ngcontent-%COMP%], .edit-mode[_ngcontent-%COMP%]   .form-input[_ngcontent-%COMP%]:disabled{opacity:.65}[_nghost-%COMP%]     .edit-mode .mat-mdc-select.mat-mdc-select-disabled{opacity:.65}[_nghost-%COMP%]     .edit-mode .mat-mdc-form-field-disabled{opacity:.65}"]})}}return t})();function Ew(t,r){if(t&1&&(o(0,"div",38)(1,"div",39)(2,"div",40),l(3),a(),o(4,"div",41),h(5,"iconify-icon",42),a()(),o(6,"div",43),l(7),a(),o(8,"div",44),l(9),a()()),t&2){let e=r.$implicit;c(3),C(e.title),c(),p("ngClass",e.iconClass),c(),p("icon",e.icon),c(),p("ngClass",e.valueClass),c(),C(e.value),c(2),C(e.note)}}function ww(t,r){if(t&1&&(o(0,"mat-option",45),l(1),a()),t&2){let e=r.$implicit;p("value",e.value),c(),x(" ",e.label," ")}}function Iw(t,r){t&1&&(o(0,"th",46),l(1,"Resource Name"),a())}function Tw(t,r){if(t&1&&(o(0,"td",47)(1,"div",48)(2,"div",49),h(3,"iconify-icon",50),a(),o(4,"div")(5,"div",51),l(6),a(),o(7,"div",52),l(8),a()()()()),t&2){let e=r.$implicit;c(2),p("ngClass",e.iconClass),c(4),C(e.name),c(2),C(e.utilization)}}function Aw(t,r){t&1&&(o(0,"th",46),l(1,"Type"),a())}function Dw(t,r){if(t&1&&(o(0,"td",47)(1,"span",53),l(2),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e.typeClass),c(),C(e.type)}}function Rw(t,r){t&1&&(o(0,"th",46),l(1,"Configuration"),a())}function kw(t,r){if(t&1&&(o(0,"td",54),l(1),a()),t&2){let e=r.$implicit;c(),C(e.configuration)}}function Nw(t,r){t&1&&(o(0,"th",46),l(1,"Provider"),a())}function Fw(t,r){if(t&1&&(o(0,"td",54),l(1),a()),t&2){let e=r.$implicit;c(),C(e.provider)}}function zw(t,r){t&1&&(o(0,"th",46),l(1,"Cluster"),a())}function Lw(t,r){if(t&1&&(o(0,"td",54),l(1),a()),t&2){let e=r.$implicit;c(),C(e.cluster)}}function Vw(t,r){t&1&&(o(0,"th",46),l(1,"Environment"),a())}function Bw(t,r){if(t&1&&(o(0,"td",47)(1,"span",55),l(2),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e.environmentClass),c(),C(e.environment)}}function Uw(t,r){t&1&&(o(0,"th",46),l(1,"Application"),a())}function jw(t,r){if(t&1&&(o(0,"td",47)(1,"span",55),l(2),a()()),t&2){let e=r.$implicit;c(),p("ngClass",e.applicationClass),c(),C(e.application)}}function $w(t,r){t&1&&(o(0,"th",46),l(1,"Monthly Cost"),a())}function qw(t,r){if(t&1&&(o(0,"td",47)(1,"div",56),l(2),a(),o(3,"div",57),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e.monthlyCost),c(),p("ngClass",e.healthClass),c(),C(e.health)}}function Hw(t,r){t&1&&h(0,"tr",58)}function Ww(t,r){t&1&&h(0,"tr",59)}function Gw(t,r){if(t&1){let e=A();o(0,"tr",60)(1,"td",61)(2,"div",62)(3,"div",63),h(4,"iconify-icon",64),a(),o(5,"div",65),l(6,"No Resource is configured"),a(),o(7,"div",66),l(8," you need to attach the resources to the budget"),h(9,"br"),l(10," which can be tracked for better understanding "),a(),o(11,"button",67),v("click",function(){O(e);let i=u();return P(i.onAddResource())}),h(12,"iconify-icon",68),l(13," Add a resource "),a()()()()}if(t&2){let e=u();c(),He("colspan",e.resourceColumns.length)}}var au=(()=>{class t{constructor(e){this.router=e,this.selectedResourceType="all",this.resourceColumns=["resourceName","type","configuration","provider","cluster","environment","application","monthlyCost"],this.resourceTypeOptions=[{label:"All Resources",value:"all"},{label:"VM Pool",value:"vm-pool"},{label:"Storage",value:"storage"},{label:"VM",value:"vm"}],this.summaryCards=[{title:"Total Resources",value:"5",note:"VMs, Storage & Pools",icon:"fa7-solid:server",iconClass:"summary-icon-blue"},{title:"Monthly Cost",value:"$31.4K",note:"Current period",icon:"mdi:currency-usd",iconClass:"summary-icon-green"},{title:"Budget Utilization",value:"79%",note:"Of allocated budget",icon:"fa6-solid:chart-pie",iconClass:"summary-icon-amber",valueClass:"value-amber"},{title:"Remaining Budget",value:"$8.2K",note:"Available this period",icon:"fa6-solid:wallet",iconClass:"summary-icon-indigo",valueClass:"value-blue"}],this.resources=[{name:"web-pool-01",utilization:"Utilization: 85%",type:"VM Pool",typeClass:"type-blue",configuration:"16 vCPU, 64GB RAM",provider:"VMware",cluster:"vsphere-prod-01",environment:"Production",environmentClass:"tag-red",application:"Web Frontend",applicationClass:"tag-purple",monthlyCost:"$12,400",health:"Healthy",healthClass:"health-green"},{name:"storage-tier-1",utilization:"Utilization: 72%",type:"Storage",typeClass:"type-blue",configuration:"2TB SSD",provider:"VMware",cluster:"vsphere-prod-01",environment:"Production",environmentClass:"tag-red",application:"Database",applicationClass:"tag-green",monthlyCost:"$8,900",health:"Warning",healthClass:"health-amber"},{name:"db-cluster-01",utilization:"Utilization: 68%",type:"VM Pool",typeClass:"type-blue",configuration:"32 vCPU, 128GB RAM",provider:"VMware",cluster:"vsphere-prod-02",environment:"Production",environmentClass:"tag-red",application:"Database",applicationClass:"tag-green",monthlyCost:"$6,800",health:"Healthy",healthClass:"health-green"},{name:"analytics-vm",utilization:"Utilization: 45%",type:"VM",typeClass:"type-blue",configuration:"8 vCPU, 32GB RAM",provider:"VMware",cluster:"vsphere-dev-01",environment:"Development",environmentClass:"tag-blue",application:"Analytics",applicationClass:"tag-amber",monthlyCost:"$2,100",health:"Underutilized",healthClass:"health-blue"},{name:"backup-storage",utilization:"Utilization: 90%",type:"Storage",typeClass:"type-blue",configuration:"5TB HDD",provider:"VMware",cluster:"vsphere-backup",environment:"Production",environmentClass:"tag-red",application:"Backup",applicationClass:"tag-gray",monthlyCost:"$1,200",health:"Healthy",healthClass:"health-green"}]}get filteredResources(){return this.selectedResourceType==="all"?this.resources:this.resources.filter(e=>this.selectedResourceType==="vm-pool"?e.type==="VM Pool":this.selectedResourceType==="storage"?e.type==="Storage":e.type==="VM")}navigateToBudgetManagement(){this.router.navigate(["/admin-dashboard/budget"])}onAddResource(){}static{this.\u0275fac=function(n){return new(n||t)(y(G))}}static{this.\u0275cmp=k({type:t,selectors:[["app-budget-resources"]],decls:61,vars:6,consts:[[1,"budget-resources-page"],[1,"breadcrumb-row"],["icon","mdi:chevron-right","width","18","height","18"],[1,"breadcrumb-link",3,"click"],[1,"active"],[1,"page-header"],[1,"header-left"],[1,"page-title"],[1,"page-subtitle"],["type","button",1,"btn","btn-outline"],["icon","flowbite:download-solid"],[1,"summary-grid"],["class","summary-card",4,"ngFor","ngForOf"],[1,"resources-panel"],[1,"panel-header"],[1,"panel-title"],[1,"panel-control
12s"],[1,"select-wrap"],[3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["type","button",1,"filter-btn"],["icon","mdi:filter","width","18","height","18"],[1,"table-wrap"],["mat-table","",3,"dataSource"],["matColumnDef","resourceName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","configuration"],["mat-cell","","class","cell-text",4,"matCellDef"],["matColumnDef","provider"],["matColumnDef","cluster"],["matColumnDef","environment"],["matColumnDef","application"],["matColumnDef","monthlyCost"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","empty-row",4,"matNoDataRow"],[1,"summary-card"],[1,"summary-row"],[1,"summary-title"],[1,"summary-icon",3,"ngClass"],["width","18","height","18",3,"icon"],[1,"summary-value",3,"ngClass"],[1,"summary-note"],[3,"value"],["mat-header-cell",""],["mat-cell",""],[1,"resource-name-cell"],[1,"row-icon",3,"ngClass"],["icon","fa7-solid:server","width","18","height","18"],[1,"row-primary"],[1,"row-secondary"],[1,"type-pill",3,"ngClass"],["mat-cell","",1,"cell-text"],[1,"tag-pill",3,"ngClass"],[1,"cost-value"],[1,"cost-status",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"empty-row"],[1,"empty-cell"],[1,"empty-state-wrap"],[1,"empty-state-icon"],["icon","fa6-solid:plug","width","18","height","24"],[1,"empty-state-title"],[1,"empty-state-text"],["type","button",1,"btn","btn-primary","add-resource-btn",3,"click"],["icon","ri:add-line"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"span"),l(3,"Governance"),a(),h(4,"iconify-icon",2),o(5,"span",3),v("click",function(){return i.navigateToBudgetManagement()}),l(6,"Budget Management"),a(),h(7,"iconify-icon",2),o(8,"span",4),l(9,"Resources"),a()(),o(10,"div",5)(11,"div",6)(12,"div",7),l(13,"Resource Details"),a(),o(14,"div",8),l(15,"Platform Engineering team infrastructure cost monitoring and resource tracking dashboard"),a()(),o(16,"button",9),h(17,"iconify-icon",10),l(18," Export Report "),a()(),o(19,"div",11),g(20,Ew,10,6,"div",12),a(),o(21,"div",13)(22,"div",14)(23,"div",15),l(24,"Infrastructure Resources"),a(),o(25,"div",16)(26,"div",17)(27,"mat-select",18),se("ngModelChange",function(d){return le(i.selectedResourceType,d)||(i.selectedResourceType=d),d}),g(28,ww,2,2,"mat-option",19),a()(),o(29,"button",20),h(30,"iconify-icon",21),l(31," Filter "),a()()(),o(32,"div",22)(33,"table",23),I(34,24),g(35,Iw,2,0,"th",25)(36,Tw,9,3,"td",26),T(),I(37,27),g(38,Aw,2,0,"th",25)(39,Dw,3,2,"td",26),T(),I(40,28),g(41,Rw,2,0,"th",25)(42,kw,2,1,"td",29),T(),I(43,30),g(44,Nw,2,0,"th",25)(45,Fw,2,1,"td",29),T(),I(46,31),g(47,zw,2,0,"th",25)(48,Lw,2,1,"td",29),T(),I(49,32),g(50,Vw,2,0,"th",25)(51,Bw,3,2,"td",26),T(),I(52,33),g(53,Uw,2,0,"th",25)(54,jw,3,2,"td",26),T(),I(55,34),g(56,$w,2,0,"th",25)(57,qw,5,3,"td",26),T(),g(58,Hw,1,0,"tr",35)(59,Ww,1,0,"tr",36)(60,Gw,14,1,"tr",37),a()()()()),n&2&&(c(20),p("ngForOf",i.summaryCards),c(7),ae("ngModel",i.selectedResourceType),c(),p("ngForOf",i.resourceTypeOptions),c(5),p("dataSource",i.filteredResources),c(25),p("matHeaderRowDef",i.resourceColumns),c(),p("matRowDefColumns",i.resourceColumns))},dependencies:[N,xe,$,z,fe,ue,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,gn,me,mt],styles:["[_nghost-%COMP%]{display:block}.budget-resources-page[_ngcontent-%COMP%]{background:#f8fafc;min-height:100%;padding:24px;color:#111827;display:flex;flex-direction:column;gap:25px}.breadcrumb-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:14px;line-height:20px}.breadcrumb-link[_ngcontent-%COMP%]{color:#6b7280;cursor:pointer}.breadcrumb-row[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.page-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:24px}.page-title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700}.page-subtitle[_ngcontent-%COMP%]{margin-top:8px;color:#4b5563;font-size:16px;line-height:24px;max-width:980px}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;border:1px solid transparent;padding:8px 16px;font-size:14px;line-height:20px;cursor:pointer}.btn-outline[_ngcontent-%COMP%]{background:transparent;border-color:#d1d5db;color:#374151}.btn-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:18px}.summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.summary-card[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #E5E7EB;background:#fff;padding:25px}.summary-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:14px}.summary-title[_ngcontent-%COMP%]{color:#4b5563;font-size:14px;line-height:20px}.summary-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}.summary-icon-blue[_ngcontent-%COMP%]{background:#e8f4fd;color:#57b5e7}.summary-icon-green[_ngcontent-%COMP%]{background:#f0fdf4;color:#10b981}.summary-icon-amber[_ngcontent-%COMP%]{background:#fff7ed;color:#ea580c}.summary-icon-indigo[_ngcontent-%COMP%]{background:#eff6ff;color:#2563eb}.summary-value[_ngcontent-%COMP%]{margin-top:12px;color:#111827;font-size:24px;line-height:32px;font-weight:700}.value-amber[_ngcontent-%COMP%]{color:#ea580c}.value-blue[_ngcontent-%COMP%]{color:#2563eb}.summary-note[_ngcontent-%COMP%]{margin-top:8px;color:#6b7280;font-size:12px;line-height:16px}.resources-panel[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:8px;background:#fff;overflow:hidden}.panel-header[_ngcontent-%COMP%]{border-bottom:1px solid #E5E7EB;padding:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.panel-title[_ngcontent-%COMP%]{color:#111827;font-size:18px;line-height:28px;font-weight:600}
12.panel-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.select-wrap[_ngcontent-%COMP%]{position:relative;min-width:180px;height:40px;border:1px solid #D1D5DB;border-radius:8px;background:#fff;padding:0 14px;display:flex;align-items:center}.select-wrap[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{width:100%}.select-wrap[_ngcontent-%COMP%]:focus-within{border-color:#57b5e7;box-shadow:0 0 0 2px #57b5e733}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-trigger{height:100%}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-value-text{color:#000;font-size:14px;line-height:20px}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-placeholder{color:#334155;font-size:14px;line-height:20px}[_nghost-%COMP%]     .select-wrap .mat-mdc-select-arrow{color:#98a2b3}.filter-btn[_ngcontent-%COMP%]{height:40px;padding:10px 18px;border-radius:8px;border:1px solid #c7d0db;background:#fff;color:#374151;font-size:14px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table[mat-table][_ngcontent-%COMP%]{width:100%;min-width:1240px;background:transparent}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-header-row[_ngcontent-%COMP%], table[mat-table][_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]{height:auto}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%]{text-align:left;padding:20px 24px;color:#374151;font-size:14px;line-height:20px;font-weight:500}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-header-cell[_ngcontent-%COMP%]:first-child, table[mat-table][_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]:first-child{padding-left:20px}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{padding:16px 24px;border-bottom:1px solid #edf2f7;vertical-align:middle}table[mat-table][_ngcontent-%COMP%]   .mat-mdc-row[_ngcontent-%COMP%]:last-child   .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:none}.empty-row[_ngcontent-%COMP%]{border-bottom:none}.empty-cell[_ngcontent-%COMP%]{padding:0}.empty-state-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 32px}.empty-state-icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;background:#f3f4f6;color:#9ca3af;display:inline-flex;align-items:center;justify-content:center}.empty-state-title[_ngcontent-%COMP%]{margin-top:20px;color:#111827;font-size:18px;line-height:28px;font-weight:600}.empty-state-text[_ngcontent-%COMP%]{margin-top:12px;color:#4b5563;font-size:16px;line-height:24px}.add-resource-btn[_ngcontent-%COMP%]{margin-top:24px;min-width:240px;border:none;border-radius:8px;padding:12px 24px;font-size:14px;line-height:20px;font-weight:500;box-shadow:0 1px 2px #0000000d}.resource-name-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.row-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#57b5e7;background:#e8f4fd}.row-primary[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:500}.row-secondary[_ngcontent-%COMP%]{margin-top:2px;color:#6b7280;font-size:12px;line-height:16px}.type-pill[_ngcontent-%COMP%], .tag-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;border-radius:6px;padding:4px 8px;font-size:12px;line-height:16px;font-weight:500;white-space:nowrap}.type-blue[_ngcontent-%COMP%]{background:#e8f4fd;color:#57b5e7}.tag-red[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.tag-purple[_ngcontent-%COMP%]{background:#f3e8ff;color:#6b21a8}.tag-green[_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.tag-blue[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af}.tag-amber[_ngcontent-%COMP%]{background:#ffedd5;color:#9a3412}.tag-gray[_ngcontent-%COMP%]{background:#f3f4f6;color:#1f2937}.cell-text[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px}.cost-value[_ngcontent-%COMP%]{color:#111827;font-size:14px;line-height:20px;font-weight:500}.cost-status[_ngcontent-%COMP%]{margin-top:2px;font-size:12px;line-height:16px}.health-green[_ngcontent-%COMP%]{color:#16a34a}.health-amber[_ngcontent-%COMP%]{color:#ca8a04}.health-blue[_ngcontent-%COMP%]{color:#2563eb}"]})}}return t})();function Yw(t,r){t&1&&(o(0,"div",46)(1,"div",47)(2,"div",48),h(3,"span",49),a()()())}function Kw(t,r){if(t&1){let e=A();o(0,"div",50)(1,"div",51)(2,"div",52),h(3,"iconify-icon",53),a(),o(4,"div",54)(5,"div",55),l(6),a(),o(7,"div",56),l(8),a(),o(9,"div",57)(10,"span",58),l(11),a(),o(12,"span",59),l(13),a()()()(),o(14,"div",60)(15,"button",61),l(16,"View Details"),a(),o(17,"button",62),v("click",function(){let i=O(e).$implicit,s=u();return P(s.onDismissAlert(i.id))}),h(18,"iconify-icon",63),a()()()}if(t&2){let e=r.$implicit,n=u();p("ngClass",n.getToneClass(e)),c(3),p("icon",e.icon),c(3),C(e.title),c(2),C(e.description),c(3),C(e.timeAgo),c(),p("ngClass",n.getBadgeClass(e)),c(),C(e.badgeLabel)}}function Qw(t,r){if(t&1&&(o(0,"label",64),h(1,"input",65),o(2,"span",66),h(3,"iconify-icon",67),a(),o(4,"span",68),l(5),a()()),t&2){let e=r.$implicit,n=u();c(),p("value",e.ID),c(2),p("icon",n.getNotificationChannelIcon(e.NAME)),c(2),C(e.NAME)}}function Jw(t,r){if(t&1&&(o(0,"mat-option",69),l(1),a()),t&2){let e=r.$implicit,n=u();p("value",e),c(),x(" ",n.getRecipientFullName(e)," ")}}function Zw(t,r){t&1&&(o(0,"div",70),l(1,"Searching users..."),a())}function Xw(t,r){if(t&1){let e=A();o(0,"div",73)(1,"span",74),l(2),a(),o(3,"button",75),v("click",function(){let i=O(e).index,s=u(2);return P(s.removeRecipient(i))}),h(4,"iconify-icon",76),a()()}if(t&2){let e=r.$implicit;c(2),C(e.EMAIL_ID)}}function e4(t,r){if(t&1&&(o(0,"div",71),g(1,Xw,5,1,"div",72),a()),t&2){let e=u();c(),p("ngForOf",e.recipients)}}function t4(t,r){t&1&&(o(0,"div",77),l(1,"No recipients added yet"),a())}function n4(t,r){if(t&1&&(o(0,"div",78),l(1),a()),t&2){let e=u();c(),C(e.recipientError)}}var lu=(()=>{class t{constructor(e,n,i,s,d,m,f){this.fb=e,this.router=n,this.route=i,this.adminService=s,this.notify=d,this.ngZone=m,this.cdr=f,this.showAllRecentAlerts=!1,this.recipientInput="",this.recipientError="",this.recentAlerts=[{id:"alert-1",title:"Budget Threshold Exceeded",description:"Marketing Q2 budget has reached 85% of allocated amount ($42,500 of $50,000)",timeAgo:"2 minutes ago",badgeLabel:"Forecast Breach",tone:"forecast",icon:"mdi:alert-circle"},{id:"alert-2",title:"Critical Budget Alert",description:"Engineering Infrastru
12cture budget forecasted to exceed 110% by month end",timeAgo:"15 minutes ago",badgeLabel:"Hard Warning",tone:"hard",icon:"mdi:information"},{id:"alert-3",title:"Budget Allocation Updated",description:"Alice Johnson updated the Product Development budget allocation",timeAgo:"1 hour ago",badgeLabel:"Soft Warning",tone:"soft",icon:"mdi:information"}],this.notificationChannels=[],this.recipients=[],this.recipientOptions=[],this.selectedRecipientOption=null,this.budgetId=null,this.budgetName=null,this.loading=!1,this.isRecipientSearchLoading=!1,this.destroy$=new Rt,this.recipientSearch$=new Rt,this.form=this.fb.group({softWarning:[80,[U.required]],hardWarning:[95,[U.required]],forecastBreach:[110,[U.required]],notificationChannelId:[null,[U.required]]})}ngOnInit(){this.scrollToTop();let e=this.route.snapshot.queryParamMap.get("budgetId"),n=Number(e);this.notificationChannels=JSON.parse(window.localStorage.getItem("NOTIFICATION_CHANNEL")||"[]"),this.form.get("notificationChannelId")?.setValue(this.notificationChannels[0]?.ID??null),this.setupRecipientSearch(),e&&Number.isFinite(n)&&n>0&&(this.budgetId=n,this.loadBudgetDetails(n))}ngAfterViewInit(){this.scrollToTop()}get softWarningValue(){return Number(this.form.get("softWarning")?.value||0)}get hardWarningValue(){return Number(this.form.get("hardWarning")?.value||0)}get forecastBreachValue(){return Number(this.form.get("forecastBreach")?.value||0)}get displayedRecentAlerts(){return this.showAllRecentAlerts?this.recentAlerts:this.recentAlerts.slice(0,3)}get canSaveChanges(){return!!(this.budgetId&&!this.loading&&this.form.valid&&this.recipients.length>0)}onViewAllAlerts(){this.showAllRecentAlerts=!this.showAllRecentAlerts}onDismissAlert(e){let n=this.recentAlerts.findIndex(i=>i.id===e);n!==-1&&this.recentAlerts.splice(n,1)}onRecipientInput(e){this.recipientInput=e,this.selectedRecipientOption=null,this.recipientError="",this.recipientSearch$.next(e)}onRecipientOptionSelected(e){let n=e.option.value;this.selectedRecipientOption=n,this.recipientInput=this.getRecipientFullName(n),this.recipientError=""}addRecipient(){if(!this.selectedRecipientOption){this.recipientError="Please select a recipient from the suggestions.";return}let e=Number(this.selectedRecipientOption.ID);if(this.recipients.some(n=>Number(n.ID)===e)){this.recipientError="Recipient already added.";return}this.recipients.push(this.selectedRecipientOption),this.recipientInput="",this.selectedRecipientOption=null,this.recipientOptions=[],this.recipientError=""}removeRecipient(e){e<0||e>=this.recipients.length||(this.recipients.splice(e,1),this.recipientError="")}navigateToBudgetManagement(){this.router.navigate(["/admin-dashboard/budget"])}onBack(){this.router.navigate(["/admin-dashboard/budget"])}onSaveChanges(){if(!this.validateAlertSettings())return;if(!this.budgetId){this.notify.showNotification("Budget not selected for alert update.","top","error",400);return}let e=Number(this.form.get("notificationChannelId")?.value),n=this.recipients.map(s=>({CHANNEL_ID:e,USER_ID:Number(s.ID)})),i={ID:this.budgetId,BUDGET_NAME:String(this.budgetName||""),SOFT_WARNING:this.softWarningValue,HARD_WARNING:this.hardWarningValue,FORECAST_BREACH:this.forecastBreachValue,NOTIFICATION:n};this.adminService.updateBudget(i).subscribe({next:s=>{this.notify.showNotification(s?.message,"top",E[s?.status]?E[s?.status]:"success",s?.status),this.router.navigate(["/admin-dashboard/budget"])},error:s=>{this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}})}getToneClass(e){return e.tone==="forecast"?"alert-forecast":e.tone==="hard"?"alert-hard":"alert-soft"}getBadgeClass(e){return e.tone==="forecast"?"badge-forecast":e.tone==="hard"?"badge-hard":"badge-soft"}loadBudgetDetails(e){this.loading=!0,this.refreshView(),this.adminService.getBudgetById(e).pipe(Xe(()=>{this.loading=!1,this.refreshView()})).subscribe({next:n=>{let i=n?.object;if(!i){this.refreshView();return}this.prefillBudgetAlerts(i),this.refreshView()},error:n=>{this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status),this.refreshView()}})}prefillBudgetAlerts(e){this.budgetName=String(e?.BUDGET_NAME||"").trim(),this.form.patchValue({softWarning:Number(e?.SOFT_WARNING??80),hardWarning:Number(e?.HARD_WARNING??95),forecastBreach:Number(e?.FORECAST_BREACH??110),notificationChannelId:e?.NOTIFICATION?.[0]?.CHANNEL_ID??this.notificationChannels[0]?.ID??null});let n=Array.isArray(e?.NOTIFICATION)?e.NOTIFICATION:[];this.recipients=n.map(i=>{let s=i?.USER,d=String(s?.EMAIL_ID||"").trim();return d?{ID:Number(s?.ID||0),USERNAME:String(s?.USERNAME||""),FIRST_NAME:String(s?.FIRST_NAME||""),LAST_NAME:String(s?.LAST_NAME||""),EMAIL_ID:d,PHONE_NUMBER:String(s?.PHONE_NUMBER||"")}:null}).filter(i=>i!==null),this.recipientInput="",this.recipientOptions=[],this.selectedRecipientOption=null,this.recipientError=""}
12validateAlertSettings(){return["softWarning","hardWarning","forecastBreach","notificationChannelId"].forEach(n=>this.form.get(n)?.markAsTouched()),this.form.get("notificationChannelId")?.value?this.recipients.length===0?(this.recipientError="At least one recipient is required for alerts.",!1):(this.recipientError="",!0):(this.recipientError="Please select a notification channel.",!1)}setupRecipientSearch(){this.recipientSearch$.pipe(ir(300),or(),rr(e=>{let n=String(e||"").trim();return n.length<2?(this.isRecipientSearchLoading=!1,ji([])):(this.isRecipientSearchLoading=!0,this.refreshView(),this.adminService.getClientMembersBySearchKey(n).pipe(tr(i=>Array.isArray(i?.object)?i.object:[]),nr(()=>ji([])),Xe(()=>{this.isRecipientSearchLoading=!1,this.refreshView()})))}),Tt(this.destroy$)).subscribe(e=>{let n=new Set(this.recipients.map(i=>Number(i.ID)));this.recipientOptions=e.filter(i=>!n.has(Number(i.ID))),this.refreshView()})}getRecipientFullName(e){let n=String(e?.FIRST_NAME||"").trim(),i=String(e?.LAST_NAME||"").trim();return`${n} ${i}`.trim()}getNotificationChannelIcon(e){return String(e||"").trim().toLowerCase().includes("slack")?"mdi:slack":"mdi:email-outline"}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}refreshView(){this.ngZone.run(()=>this.cdr.detectChanges())}scrollToTop(){typeof window>"u"||[0,100].forEach(e=>{setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"auto"}),document.documentElement.scrollTop=0,document.body.scrollTop=0,[document.querySelector(".right-container"),document.querySelector(".main-container"),document.querySelector(".container")].forEach(i=>{i&&(i.scrollTop=0,i.scrollLeft=0,i.scrollTo?.({top:0,left:0,behavior:"auto"}))})},e)})}static{this.\u0275fac=function(n){return new(n||t)(y(ze),y(G),y(Le),y(Je),y(V),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-budget-alerts"]],decls:85,vars:16,consts:[["recipientAuto","matAutocomplete"],["noRecipientsState",""],[1,"budget-alerts-page",3,"formGroup"],["class","overlay",4,"ngIf"],[1,"breadcrumb-row"],["icon","mdi:chevron-right","width","18","height","18"],[1,"breadcrumb-link",3,"click"],[1,"active"],[1,"page-title"],[1,"page-subtitle"],[1,"alert-panel"],[1,"alert-panel-header"],[1,"alert-panel-title"],["type","button",1,"view-all-link",3,"click"],[1,"recent-alerts-wrap"],["class","recent-alert-card",3,"ngClass",4,"ngFor","ngForOf"],[1,"threshold-panel"],[1,"threshold-panel-title"],[1,"threshold-panel-subtitle"],[1,"thresholds-wrap"],[1,"threshold-item"],[1,"field-label"],[1,"threshold-row"],["type","range","min","0","max","150","step","1","formControlName","softWarning",1,"threshold-slider"],[1,"threshold-value"],["type","range","min","0","max","100","step","1","formControlName","hardWarning",1,"threshold-slider"],["type","range","min","0","max","150","step","1","formControlName","forecastBreach",1,"threshold-slider"],[1,"info-banner"],["icon","mdi:alert-circle-outline","width","18","height","18"],[1,"form-group"],[1,"channel-wrap"],["class","channel-option",4,"ngFor","ngForOf"],[1,"recipient-entry-row"],["type","text","placeholder","Search recipient by name","autocomplete","off",1,"form-input","recipient-input",3,"input","value","matAutocomplete"],[3,"optionSelected"],[3,"value",4,"ngFor","ngForOf"],["type","button",1,"add-recipient-btn",3,"click","disabled"],["icon","mdi:plus","width","18","height","18"],["class","recipient-hint",4,"ngIf"],["class","recipient-list-box",4,"ngIf","ngIfElse"],["class","error-text",4,"ngIf"],[1,"footer-bar"],["type","button",1,"footer-secondary",3,"click"],["icon","mdi:arrow-left","width","18","height","18"],["type","button",1,"footer-primary",3,"click","disabled"],["icon","mdi:arrow-right","width","18","height","18"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"recent-alert-card",3,"ngClass"],[1,"recent-alert-left"],[1,"recent-alert-icon"],["width","18","height","18",3,"icon"],[1,"recent-alert-content"],[1,"recent-alert-title"],[1,"recent-alert-description"],[1,"recent-alert-meta"],[1,"recent-alert-time"],[1,"alert-badge",3,"ngClass"],[1,"recent-alert-right"],["type","button",1,"details-link"],["type","button","aria-label","Dismiss alert",1,"dismiss-btn",3,"click"],["icon","mdi:close","width","12","height","12"],[1,"channel-option"],["type","radio","formControlName","notificationChannelId",1,"channel-radio",3,"value"],[1,"channel-icon-wrap"],["width","20","height","20",3,"icon"],[1,"channel-label"],[3,"value"],[1,"recipient-hint"],[1,"recipient-list-box"],["class","recipient-pill",4,"ngFor","ngForOf"],[1,"recipient-pill"],[1,"recipient-pill-text"],["type","button","aria-label","Remove recipient",1,"delete-recipient-btn",3,"click"],["icon","mdi:close","width","16","height","16"],[1,"recipient-list-box","empty"],[1,"error-text"]],template:function(n,i){if
12(n&1&&(o(0,"div",2),g(1,Yw,4,0,"div",3),o(2,"div",4)(3,"span"),l(4,"Governance"),a(),h(5,"iconify-icon",5),o(6,"span",6),v("click",function(){return i.navigateToBudgetManagement()}),l(7,"Budget Management"),a(),h(8,"iconify-icon",5),o(9,"span",7),l(10,"Alerts"),a()(),o(11,"div")(12,"div",8),l(13,"Alert Management"),a(),o(14,"div",9),l(15,"Monitor spending, set limits, and optimize cloud costs across all your services and Teams"),a()(),o(16,"div",10)(17,"div",11)(18,"div",12),l(19,"Recent Alerts"),a(),o(20,"button",13),v("click",function(){return i.onViewAllAlerts()}),l(21,"View All"),a()(),o(22,"div",14),g(23,Kw,19,7,"div",15),a()(),o(24,"div",16)(25,"div",17),l(26,"Thresholds & Alerts"),a(),o(27,"div",18),l(28,"Configure spending thresholds and alert notifications."),a(),o(29,"div",19)(30,"div",20)(31,"label",21),l(32,"Soft Warning"),a(),o(33,"div",22),h(34,"input",23),o(35,"div",24),l(36),a()()(),o(37,"div",20)(38,"label",21),l(39,"Hard Warning"),a(),o(40,"div",22),h(41,"input",25),o(42,"div",24),l(43),a()()(),o(44,"div",20)(45,"label",21),l(46,"Forecast Breach"),a(),o(47,"div",22),h(48,"input",26),o(49,"div",24),l(50),a()()(),o(51,"div",27),h(52,"iconify-icon",28),l(53," Threshold order should be Soft Warning < Hard Warning < Forecast Breach. "),a(),o(54,"div",29)(55,"label",21),l(56,"Notification Channels"),a(),o(57,"div",30),g(58,Qw,6,3,"label",31),a()(),o(59,"div",29)(60,"label",21),l(61,"Recipients"),a(),o(62,"div",32)(63,"input",33),v("input",function(d){return i.onRecipientInput(d.target.value)}),a(),o(64,"mat-autocomplete",34,0),v("optionSelected",function(d){return i.onRecipientOptionSelected(d)}),g(66,Jw,2,2,"mat-option",35),a(),o(67,"button",36),v("click",function(){return i.addRecipient()}),h(68,"iconify-icon",37),l(69," Add Recipient "),a()(),g(70,Zw,2,0,"div",38),a(),o(71,"div",29)(72,"label",21),l(73,"Recipients List"),a(),g(74,e4,2,1,"div",39)(75,t4,2,0,"ng-template",null,1,at),a(),g(77,n4,2,1,"div",40),a()(),o(78,"div",41)(79,"button",42),v("click",function(){return i.onBack()}),h(80,"iconify-icon",43),l(81," Back "),a(),o(82,"button",44),v("click",function(){return i.onSaveChanges()}),l(83," Save changes "),h(84,"iconify-icon",45),a()()()),n&2){let s=Ce(65),d=Ce(76);p("formGroup",i.form),c(),p("ngIf",i.loading),c(22),p("ngForOf",i.displayedRecentAlerts),c(13),x("",i.softWarningValue,"%"),c(7),x("",i.hardWarningValue,"%"),c(7),x("",i.forecastBreachValue,"%"),c(8),p("ngForOf",i.notificationChannels),c(5),p("value",i.recipientInput)("matAutocomplete",s),c(3),p("ngForOf",i.recipientOptions),c(),p("disabled",!i.selectedRecipientOption),c(3),p("ngIf",i.isRecipientSearchLoading),c(4),p("ngIf",i.recipients.length>0)("ngIfElse",d),c(3),p("ngIf",i.recipientError),c(5),p("disabled",!i.canSaveChanges)}},dependencies:[N,xe,$,B,Yt,ve,gr,ur,me,$e,Ge,We,z,ue,vr,br],styles:["[_nghost-%COMP%]{display:block}.budget-alerts-page[_ngcontent-%COMP%]{background:#f8fafc;min-height:100%;padding:24px;color:#111827;display:flex;flex-direction:column;gap:25px}.breadcrumb-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:14px;line-height:20px}.breadcrumb-link[_ngcontent-%COMP%]{color:#6b7280;cursor:pointer}.breadcrumb-row[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{color:#111827;font-weight:500}.page-title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700}.page-subtitle[_ngcontent-%COMP%]{margin-top:8px;color:#4b5563;font-size:16px;line-height:24px}.alert-panel[_ngcontent-%COMP%], .threshold-panel[_ngcontent-%COMP%]{border:1px solid #E5E7EB;border-radius:8px;background:#fff;padding:25px}.alert-panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.alert-panel-title[_ngcontent-%COMP%]{color:#111827;font-size:18px;line-height:28px;font-weight:600}.view-all-link[_ngcontent-%COMP%]{border:none;background:transparent;color:#2563eb;font-size:14px;line-height:20px;cursor:pointer}.recent-alerts-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.recent-alert-card[_ngcontent-%COMP%]{border-radius:8px;background:#eff6ff;padding:16px 16px 16px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-left:4px solid #3B82F6}.recent-alert-card.alert-forecast[_ngcontent-%COMP%]{background:#fff7ed;border-left-color:#f97316}.recent-alert-card.alert-hard[_ngcontent-%COMP%], .recent-alert-card.alert-soft[_ngcontent-%COMP%]{background:#eff6ff;border-left-color:#3b82f6}.recent-alert-left[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px;min-width:0}.recent-alert-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:999px;background:#dbeafe;color:#2563eb;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.alert-forecast[_ngcontent-%COMP%]   .recent-alert-icon[_ngcontent-%COMP%]{background:#ffedd5;color:#ea580c}.recent-alert-content[_ngcontent-%COMP%]{min-width:0}.recent-alert-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500}.recent-alert-description[_ngcontent-%COMP%]{margin-top:4px;color:#4b5563;font-size:12px;line-height:16px}.recent-alert-meta[_ngcontent-%COMP%]{margin-top:12px;display:flex;align-items:center;gap:14px}
12.recent-alert-time[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;line-height:16px}.alert-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:12px;line-height:16px;font-weight:500}.badge-forecast[_ngcontent-%COMP%]{background:#ffedd5;color:#9a3412}.badge-hard[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.badge-soft[_ngcontent-%COMP%]{background:#f3f4f6;color:#1f2937}.recent-alert-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.details-link[_ngcontent-%COMP%]{border:none;background:transparent;color:#2563eb;font-size:12px;line-height:16px;cursor:pointer;padding:0}.dismiss-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#9ca3af;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.threshold-panel-title[_ngcontent-%COMP%]{color:#111827;font-size:20px;line-height:28px;font-weight:600}.threshold-panel-subtitle[_ngcontent-%COMP%]{margin-top:8px;color:#4b5563;font-size:14px;line-height:20px}.threshold-item[_ngcontent-%COMP%]{margin-top:24px}.field-label[_ngcontent-%COMP%]{color:#374151;font-size:14px;line-height:20px;font-weight:500}.thresholds-wrap[_ngcontent-%COMP%]{max-width:980px}.threshold-row[_ngcontent-%COMP%]{margin-top:10px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:18px}.threshold-slider[_ngcontent-%COMP%]{width:100%;height:8px;border-radius:999px;background:#e6e6e6;appearance:none;outline:none}.threshold-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border-radius:50%;background:#007bff;border:2px solid #007BFF;cursor:pointer}.threshold-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#007bff;border:2px solid #007BFF;cursor:pointer}.threshold-slider[_ngcontent-%COMP%]::-moz-range-track{height:8px;border-radius:999px;background:#007bff}.threshold-value[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500;min-width:48px}.form-group[_ngcontent-%COMP%]{margin-top:24px}.channel-wrap[_ngcontent-%COMP%]{margin-top:8px;border-radius:8px;background:#f9fafb;padding:16px;display:flex;flex-direction:column;gap:10px}.info-banner[_ngcontent-%COMP%]{margin-top:12px;max-width:980px;padding:12px;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:12px;line-height:16px;display:inline-flex;align-items:center;gap:8px}.channel-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:12px;width:min(920px,100%);border:1px solid #E5E7EB;border-radius:8px;background:#fff;padding:13px;cursor:pointer}.channel-radio[_ngcontent-%COMP%]{width:18px;height:18px;accent-color:#3B82F6;margin:0;cursor:pointer}.channel-icon-wrap[_ngcontent-%COMP%]{color:#9ca3af;display:inline-flex;align-items:center;justify-content:center}.channel-label[_ngcontent-%COMP%]{color:#374151;font-size:14px;line-height:20px}.recipient-entry-row[_ngcontent-%COMP%]{margin-top:8px;display:flex;gap:12px;max-width:980px;align-items:center}.recipient-input[_ngcontent-%COMP%]{flex:1;min-width:0;border-radius:8px;border:1px solid #D1D5DB;background:#fff;padding:13px 17px;color:#111827;font-size:14px;line-height:20px;outline:none}.recipient-input[_ngcontent-%COMP%]::placeholder{color:#6b7280}.add-recipient-btn[_ngcontent-%COMP%]{border:2px solid #3B82F6;background:#fff;color:#2563eb;border-radius:8px;height:48px;padding:0 18px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.add-recipient-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.recipient-list-box[_ngcontent-%COMP%]{margin-top:8px;border-radius:8px;background:#f9fafb;padding:12px;display:flex;flex-wrap:wrap;gap:8px}.recipient-list-box.empty[_ngcontent-%COMP%]{align-items:center;color:#6b7280;font-size:14px;line-height:20px;font-style:italic}.recipient-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:#fff;border:1px solid #d1d5db;padding:6px 8px}.recipient-pill-text[_ngcontent-%COMP%]{color:#374151;font-size:13px;line-height:18px}.delete-recipient-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:#ef4444;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.error-text[_ngcontent-%COMP%]{margin-top:10px;color:#dc2626;font-size:12px;line-height:18px}.footer-bar[_ngcontent-%COMP%]{border-top:1px solid #E5E7EB;background:#fff;padding:16px 32px;display:flex;align-items:center;justify-content:space-between}.footer-secondary[_ngcontent-%COMP%], .footer-primary[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:10px 24px;font-size:14px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;gap:8px;
12cursor:pointer;justify-content:center}.footer-secondary[_ngcontent-%COMP%]{background:#fff;border:1px solid #E5E7EB;color:#374151}.footer-primary[_ngcontent-%COMP%]{background:#57b5e7;color:#fff}.footer-primary[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}"]})}}return t})();var su={service_provider:"Service Provider",service_type:"Service Type",product_name:"Product Name",instance_family:"Instance Family",vcpu_cores:"VCPU",ram_gb:"Memory",cs_region:"Region",cs_city:"City",host_type:"Host Type",os_type:"OS Type",payment_plan:"Payment Plans",payment_option:"Payment Options",access_tier:"Access Tier",access_tier_option:"Access Tier Option",redundancy:"Redundancy",storage_option:"Storage Option",term:"Term",storage_type:"Storage Type",serverless_architecture:"Serverless Architecture"},Wn={aws:"aws-provider.png",azure:"azure-provider.png",gcp:"gcp-provider.png",oci:"oracle-provider.png",oracle:"oracle-provider.png","digital ocean":"digitalocean-provider.png"},cu={aws:"Amazon Web Service",azure:"Microsoft Azure",gcp:"Google Cloud Platform",oracle:"Oracle","digital ocean":"Digital Ocean"},EB=ye.HOURS_IN_A_MONTH;function vi(t){return String(t??"").toLowerCase().trim().replace(/[\/\s]+/g,"-").replace(/[^\w-]+/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function i4(t){return String(t??"").trim().toLowerCase()}function du(t){return`assets/images/${Wn[i4(t)]||"aws-provider.png"}`}function pu(t){return`${vi(t?.service_provider)}-${vi(t?.product_name)}--${t?.record_id}`}var Cn=(()=>{class t{constructor(){this.searchKeyword="",this.searchFormState=null,this.categoryProductsMapState={},this.categoryInstancesMapState={},this.vCPUMapState={},this.RAMMapState={},this.regionsMapState={},this.citiesMapState={},this.operatingSystemsMapState={},this.hostTypesMapState={},this.formArrayState=[],this.completeFormArrayState=[],this.showMoreFiltersIndices=[],this.currentSearchResults=[],this.showFilterState=!1,this.bestDealRequestedSubject=ne
12w Wl(1),this.bestDealRequested$=this.bestDealRequestedSubject.asObservable(),this.clearFiltersRequestedSubject=new Rt,this.clearFiltersRequested$=this.clearFiltersRequestedSubject.asObservable(),this.formArraySubject=new Oi([]),this.formArray$=this.formArraySubject.asObservable(),this.completeFormArraySubject=new Oi([]),this.completeFormArray$=this.completeFormArraySubject.asObservable(),this.searchKeywordSubject=new Oi(""),this.searchKeyword$=this.searchKeywordSubject.asObservable(),this.filterSidebarVisible$=new Oi(!1),this.cartSidebarVisible$=new Oi(!1),this.showFilterCard$=new Oi(!1)}saveSearchState(e,n,i,s,d,m,f,_,b,M,S){this.searchKeyword=e,this.searchFormState=n,this.categoryProductsMapState=Ke({},i),this.categoryInstancesMapState=Ke({},s),this.vCPUMapState=Ke({},d),this.RAMMapState=Ke({},m),this.regionsMapState=Ke({},f),this.citiesMapState=Ke({},_),this.operatingSystemsMapState=Ke({},b),this.hostTypesMapState=Ke({},M),S!==void 0&&(this.showFilterState=S,this.showFilterCard$.next(S))}getSearchKeyword(){return this.searchKeyword}getSearchFormState(){return this.searchFormState}getCategoryProductsMap(){return this.categoryProductsMapState}getCategoryInstancesMap(){return this.categoryInstancesMapState}getvCPUMap(){return this.vCPUMapState}getRAMMap(){return this.RAMMapState}getRegionsMap(){return this.regionsMapState}getCitiesMap(){return this.citiesMapState}getOperatingSystemsMap(){return this.operatingSystemsMapState}getHostTypesMap(){return this.hostTypesMapState}hasState(){return this.searchFormState!==null||this.searchKeyword!==""}clearState(){this.searchKeyword="",this.searchFormState=null,this.categoryProductsMapState={},this.categoryInstancesMapState={},this.vCPUMapState={},this.RAMMapState={},this.regionsMapState={},this.citiesMapState={},this.operatingSystemsMapState={},this.hostTypesMapState={},this.currentSearchResults=[],this.showFilterState=!1,this.showFilterCard$.next(!1)}setFormArray(e){JSON.stringify(this.formArrayState)!==JSON.stringify(e)&&(this.formArrayState=JSON.parse(JSON.stringify(e)),this.formArraySubject.next(e))}getFormArray(){return this.formArrayState}setCompleteFormArray(e){JSON.stringify(this.completeFormArrayState)!==JSON.stringify(e)&&(this.completeFormArrayState=JSON.parse(JSON.stringify(e)),this.completeFormArraySubject.next(e))}getCompleteFormArray(){return this.completeFormArrayState}setSearchKeyword(e){this.searchKeyword=e,this.searchKeywordSubject.next(e)}setShowMoreFiltersIndices(e){this.showMoreFiltersIndices=[...e]}getShowMoreFiltersIndices(){return this.showMoreFiltersIndices}clearShowMoreFiltersIndices(){this.showMoreFiltersIndices=[]}requestBestDeal(){this.bestDealRequestedSubject.next()}requestFilterClear(){this.clearFiltersRequestedSubject.next()}showFilterSidebar(){this.filterSidebarVisible$.next(!0),this.cartSidebarVisible$.next(!1)}hideFilterSidebar(){this.filterSidebarVisible$.next(!1)}showCartSidebar(){this.cartSidebarVisible$.next(!0),this.filterSidebarVisible$.next(!1)}hideCartSidebar(){this.cartSidebarVisible$.next(!1)}setShowFilterCard(e){this.showFilterState=e,this.showFilterCard$.next(e)}getShowFilterCard(){return this.showFilterState}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Gl({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mu=()=>[];function o4(t,r){if(t&1&&(o(0,"mat-option",9),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),C(e.NAME)}}function r4(t,r){t&1&&(o(0,"div",10),h(1,"iconify-icon",11),o(2,"span"),l(3,"No matching results found."),a()())}function a4(t,r){if(t&1){let e=A();I(0),o(1,"button",50),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.addToCart(i==null?null:i.document))}),h(2,"iconify-icon",53),a(),T()}}function l4(t,r){if(t&1){let e=A();o(0,"div",54)(1,"div",55)(2,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.decreaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(3,"\u2212"),a(),h(4,"input",57),o(5,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.increaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(6,"+"),a()()()}if(t&2){let e=u(2).$implicit,n=u(2);c(4),p("value",n.selectedCartQuantities[e==null||e.document==null||e.document.record_id==null?null:e.document.record_id.toString()])}}function s4(t,r){if(t&1){let e=A();o(0,"div",25)(1,"div",26)(2,"div",27),h(3,"img",28),F(4,"lowercase"),o(5,"div",29)(6,"div",30),l(7),F(8,"uppercase"),o(9,"span"),l(10),a()(),o(11,"div",31),l(12),a()()(),o(13,"div",32)(14,"div",33)(15,"div",34),h(16,"iconify-icon",35),a(),o(17,"div",36),l(18,"Avg."),a(),o(19,"div"),l(20),a(),o(21,"div",36),l(22,"/mo"),a()(),o(23,"div",37),l(24),a()()(),h(25,"mat-divider"),o(26,"div",38)(27,"div",39)(28,"div",40),l(29,"Product Name"),a(),o(30,"div",41),l(31),a()(),o(32,"div",39)(33,"div",40),l(34,"Instance Type"),a(),o(35,"div",41),l(36),a()(),o(37,"div",39)(38,"div",40),l(39,"Processor Type"),a(),o(40,"div",42),l(41),a()(),o(42,"div",39)(43,"div",40),l(44,"Network"),a(),o(45,"div",41),l(46),a()()(),o(47,"div",43)(48,"div",44)(49,"div",45),h(50,"iconify-icon",46),l(51),a(),o(52,"div",45),h(53,"iconify-icon",47),l(54),a()(),o(55,"div",48)(56,"button",49),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.addToCompare(i==null?null:i.document))}),l(57,"Compare"),a(),o(58,"button",50),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.viewInstanceDetails(i==null?null:i.document))}),h(59,"iconify-icon",51),a(),g(60,a4,3,0,"ng-container",52)(61,l4,7,1,"ng-template",null,0,at),a()()()}if(t&2){let e=Ce(62),n=u().$implicit,i=u(2);c(3),p("src","assets/images/"+i.providerIconMap[X(4,21,n==null||n.document==null?null:n.document.service_provider)],Qe),c(4),x("",X(8,23,n==null||n.document==null?null:n.document.service_provider)," "),c(3),x("- ",n==null||n.document==null?null:n.document.product_type),c(2),In("",n==null||n.document==null?null:n.document.vcpu_
12cores," vCPU \u2022 ",n==null||n.document==null?null:n.document.ram_gb," GB RAM \u2022 ",n==null||n.document==null?null:n.document.storage_spec," "),c(8),x("$",i.getVMMonthlyPrice(n==null||n.document==null?null:n.document.hourly_rate_usd,n==null||n.document==null?null:n.document.service_provider)),c(4),x(" ",n==null||n.document==null?null:n.document.instance_family," "),c(7),C(n==null||n.document==null?null:n.document.product_name),c(5),C(n==null||n.document==null?null:n.document.vm_name),c(5),x("",n==null||n.document==null?null:n.document.cpu_model," "),c(5),x("",n==null||n.document==null?null:n.document.network_performance," "),c(5),Pi(" ",n==null||n.document==null?null:n.document.cs_global_region," - ",n==null||n.document==null?null:n.document.cs_geo_region," - ",n==null||n.document==null?null:n.document.cs_region," - ",n==null||n.document==null?null:n.document.cs_city," "),c(3),rt(" ",n==null||n.document==null?null:n.document.os_type," - ",n==null||n.document==null?null:n.document.os," "),c(2),p("disabled",i.compareInstances.length>=3),c(4),p("ngIf",!(i.selectedCartIds!=null&&i.selectedCartIds.includes(n==null||n.document==null||n.document.record_id==null?null:n.document.record_id.toString())))("ngIfElse",e)}}function c4(t,r){if(t&1){let e=A();I(0),o(1,"button",50),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.addToCart(i==null?null:i.document))}),h(2,"iconify-icon",53),a(),T()}}function d4(t,r){if(t&1){let e=A();o(0,"div",54)(1,"div",55)(2,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.decreaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(3,"\u2212"),a(),h(4,"input",57),o(5,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.increaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(6,"+"),a()()()}if(t&2){let e=u(2).$implicit,n=u(2);c(4),p("value",n.selectedCartQuantities[e==null||e.document==null||e.document.record_id==null?null:e.document.record_id.toString()])}}function p4(t,r){if(t&1){let e=A();o(0,"div",25)(1,"div",26)(2,"div",27),h(3,"img",28),F(4,"lowercase"),o(5,"div",29)(6,"div",30),l(7),F(8,"uppercase"),o(9,"span"),l(10),a()(),o(11,"div",31),l(12),a()()(),o(13,"div",32)(14,"div",33)(15,"div",34),h(16,"iconify-icon",35),a(),o(17,"div",36),l(18,"Avg."),a(),o(19,"div"),l(20),a(),o(21,"div",36),l(22,"/mo"),a()(),o(23,"div",37),l(24),a()()(),h(25,"mat-divider"),o(26,"div",38)(27,"div",39)(28,"div",40),l(29,"Access Tier"),a(),o(30,"div",41),l(31),a()(),o(32,"div",39)(33,"div",40),l(34,"Redundancy"),a(),o(35,"div",41),l(36),a()()(),o(37,"div",43)(38,"div",44)(39,"div",45),h(40,"iconify-icon",46),l(41),a()(),o(42,"div",48)(43,"button",49),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.addToCompare(i==null?null:i.document))}),l(44,"Compare"),a(),o(45,"button",50),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.viewInstanceDetails(i==null?null:i.document))}),h(46,"iconify-icon",51),a(),g(47,c4,3,0,"ng-container",52)(48,d4,7,1,"ng-template",null,0,at),a()()()}if(t&2){let e=Ce(49),n=u().$implicit,i=u(2);c(3),p("src","assets/images/"+i.providerIconMap[X(4,16,n==null||n.document==null?null:n.document.service_provider)],Qe),c(4),x("",X(8,18,n==null||n.document==null?null:n.document.service_provider)," "),c(3),x("- ",n==null||n.document==null?null:n.document.product_type),c(2),x("",n==null||n.document==null?null:n.document.product_name," "),c(8),x("$",i.getStorageMonthlyPrice(n==null||n.document==null?null:n.document.storage_price_per_gb,n==null||n.document==null?null:n.document.retrieval_price_per_gb,n==null||n.document==null?null:n.document.read_price_per_request,n==null||n.document==null?null:n.document.write_price_per_request,n==null||n.document==null?null:n.document.storage_tier_available,n==null||n.document==null?null:n.document.storage_tier_gb)),c(4),x(" ",n==null||n.document==null?null:n.document.storage_type," "),c(7),rt("",n==null||n.document==null?null:n.document.access_tier," - ",n==null||n.document==null?null:n.document.access_tier_option),c(5),C(n==null||n.document==null?null:n.document.redundancy),c(5),Pi(" ",n==null||n.document==null?null:n.document.cs_global_region," - ",n==null||n.document==null?null:n.document.cs_geo_region," - ",n==null||n.document==null?null:n.document.cs_regi
12on," - ",n==null||n.document==null?null:n.document.cs_city," "),c(2),p("disabled",i.compareInstances.length>=3),c(4),p("ngIf",!(i.selectedCartIds!=null&&i.selectedCartIds.includes(n==null||n.document==null||n.document.record_id==null?null:n.document.record_id.toString())))("ngIfElse",e)}}function m4(t,r){t&1&&(o(0,"div",41),l(1," 128 MB - 10,008 MB"),a())}function u4(t,r){t&1&&(o(0,"div",41),l(1," 128 MB - 1.5 GB (Consumption), 3.5 GB (Premium)"),a())}function g4(t,r){t&1&&(o(0,"div",41),l(1," 128 MB - 8 GB"),a())}function f4(t,r){t&1&&(o(0,"div",41),l(1," 128 MB - 1 GB"),a())}function h4(t,r){if(t&1){let e=A();I(0),o(1,"button",50),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.addToCart(i==null?null:i.document))}),h(2,"iconify-icon",53),a(),T()}}function _4(t,r){if(t&1){let e=A();o(0,"div",54)(1,"div",55)(2,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.decreaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(3,"\u2212"),a(),h(4,"input",57),o(5,"button",56),v("click",function(){O(e);let i=u(2).$implicit,s=u(2);return P(s.increaseQuantity(i==null||i.document==null?null:i.document.record_id,i==null?null:i.document))}),l(6,"+"),a()()()}if(t&2){let e=u(2).$implicit,n=u(2);c(4),p("value",n.selectedCartQuantities[e==null||e.document==null||e.document.record_id==null?null:e.document.record_id.toString()])}}function C4(t,r){if(t&1){let e=A();o(0,"div",25)(1,"div",26)(2,"div",27),h(3,"img",28),F(4,"lowercase"),o(5,"div",29)(6,"div",30),l(7),F(8,"uppercase"),o(9,"span"),l(10),a()(),o(11,"div",31),l(12),a()()(),o(13,"div",32)(14,"div",33)(15,"div",34),h(16,"iconify-icon",35),a(),o(17,"div",36),l(18,"Avg."),a(),o(19,"div"),l(20),a(),o(21,"div",36),l(22,"/mo"),a()()()(),h(23,"mat-divider"),o(24,"div",38)(25,"div",39)(26,"div",40),l(27,"Architecture"),a(),o(28,"div",41),l(29),a()(),o(30,"div",39)(31,"div",40),l(32,"Max Duration"),a(),o(33,"div",41),l(34,"15 Minutes"),a()(),o(35,"div",39)(36,"div",40),l(37,"Memory Limit"),a(),g(38,m4,2,0,"div",58)(39,u4,2,0,"div",58)(40,g4,2,0,"div",58)(41,f4,2,0,"div",58),a()(),o(42,"div",59)(43,"div",60)(44,"div",40),l(45,"Supported Runtimes"),a(),o(46,"div",61)(47,"div",62),l(48,"Node.js"),a(),o(49,"div",62),l(50,"Python"),a(),o(51,"div",62),l(52,"Java"),a(),o(53,"div",62),l(54,".NET"),a(),o(55,"div",62),l(56,"Go"),a(),o(57,"div",62),l(58,"Ruby"),a()()()(),o(59,"div",43)(60,"div",44)(61,"div",45),h(62,"iconify-icon",46),l(63),a()(),o(64,"div",48)(65,"button",49),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.addToCompare(i==null?null:i.document))}),l(66,"Compare"),a(),o(67,"button",50),v("click",function(){O(e);let i=u().$implicit,s=u(2);return P(s.viewInstanceDetails(i==null?null:i.document))}),h(68,"iconify-icon",51),a(),g(69,h4,3,0,"ng-container",52)(70,_4,7,1,"ng-template",null,0,at),a()()()}if(t&2){let e=Ce(71),n=u().$implicit,i=u(2);c(3),p("src","assets/images/"+i.providerIconMap[X(4,17,n==null||n.document==null?null:n.document.service_provider)],Qe),c(4),x("",X(8,19,n==null||n.document==null?null:n.document.service_provider)," "),c(3),x("- ",n==null||n.document==null?null:n.document.product_type),c(2),C(n==null||n.document==null?null:n.document.product_name),c(8),x("$",i.getFunctionMonthlyPrice(n==null||n.document==null?null:n.document.memory_duration_price_per_gb_s,n==null||n.document==null?null:n.document.price_per_request,n==null||n.document==null?null:n.document.duration_price_per_s,n==null||n.document==null?null:n.document.service_provider,n==null||n.document==null?null:n.document.memory_duration_tier_available,n==null||n.document==null?null:n.document.memory_duration_tier_gb_s)),c(9),C(n==null||n.document==null?null:n.document.serverless_architecture),c(9),p("ngIf",(n==null||n.document==null?null:n.document.service_provider)==="aws"),c(),p("ngIf",(n==null||n.document==null?null:n.document.service_provider)==="azure"),c(),p("ngIf",(n==null||n.document==null?null:n.document.service_provider)==="gcp"),c(),p("ngIf",(n==null||n.document==null?null:n.document.service_provider)==="oci"),c(22),Pi(" ",n==null||n.document==null?null:n.document.cs_global_region," - ",n==null||n.document==null?null:n.document.cs_geo_region," - ",n==null||n.document==null?null:n.document.cs_regi
12on," - ",n==null||n.document==null?null:n.document.cs_city," "),c(2),p("disabled",i.compareInstances.length>=3),c(4),p("ngIf",!(i.selectedCartIds!=null&&i.selectedCartIds.includes(n==null||n.document==null||n.document.record_id==null?null:n.document.record_id.toString())))("ngIfElse",e)}}function x4(t,r){if(t&1&&(o(0,"div",63)(1,"div",64)(2,"div",65),l(3),a()(),o(4,"div",64)(5,"div",40),l(6),a(),o(7,"div",41),l(8),a()(),o(9,"div",64)(10,"div",65),l(11),a()()()),t&2){let e=u().$implicit,n=u(2);c(3),C(n.formatText(e==null||e.document==null?null:e.document.payment_option)),c(3),C(n.formatText(e==null||e.document==null?null:e.document.term)),c(2),x("$",!(e==null||e.document==null)&&e.document.upfront_amount_usd?(e==null||e.document==null?null:e.document.upfront_amount_usd)==null?null:(e==null||e.document==null?null:e.document.upfront_amount_usd).toFixed(2):"0.00"),c(3),C(n.formatText(e==null||e.document==null?null:e.document.payment_plan))}}function v4(t,r){if(t&1&&(o(0,"div",22),g(1,s4,63,25,"div",23)(2,p4,50,20,"div",23)(3,C4,72,21,"div",23)(4,x4,12,4,"div",24),a()),t&2){let e=r.$implicit;c(),p("ngIf",(e==null||e.document==null?null:e.document.service_type)==="compute"&&(e==null||e.document==null?null:e.document.product_name)==="Virtual Machine"),c(),p("ngIf",(e==null||e.document==null?null:e.document.service_type)==="storage"&&(e==null||e.document==null?null:e.document.product_name)==="object-storage"),c(),p("ngIf",(e==null||e.document==null?null:e.document.service_type)==="serverless"&&(e==null||e.document==null?null:e.document.product_name)==="Serverless Function"),c(),p("ngIf",(e==null||e.document==null?null:e.document.service_type)!=="serverless"&&(e==null||e.document==null?null:e.document.product_name)!=="Serverless Function")}}function b4(t,r){if(t&1){let e=A();o(0,"div",12)(1,"div",13)(2,"div",14),l(3),a(),o(4,"div",15),g(5,v4,5,4,"div",16),a(),o(6,"div",17)(7,"div",18)(8,"button",19),v("click",function(){O(e);let i=u();return P(i.setCurrentPage(i.currentPage-1))}),h(9,"iconify-icon",20),a(),o(10,"button",19),v("click",function(){O(e);let i=u();return P(i.setCurrentPage(i.currentPage+1))}),h(11,"iconify-icon",21),a()()()()()}if(t&2){let e=u();c(3),x(" ",e.getRecordRangeText()," "),c(2),p("ngForOf",e.pricingData||J(4,mu)),c(3),p("disabled",e.currentPage===1),c(2),p("disabled",!e.hasNextPage())}}var Bl=(()=>{class t{get providerIconMap(){return Wn}constructor(e,n,i,s,d,m,f){this.platformId=e,this.cartService=n,this.router=i,this.searchStateService=s,this.notify=d,this.dialog=m,this.cdr=f,this.apiResponseTime=0,this.orderBy=1,this.currentPage=1,this.compareInstances=[],this.completeFormArray=[],this.sortChanged=new kt,this.pageChanged=new kt,this.compareStateChanged=new kt,this.loadingChange=new kt,this.priceFilters=[],this.priceFilter=new Vt(1),this.pricingData=[],this.totalPages=1,this.totalRecords=0,this.matchingRecords=0,this.APIResponseTime=0,this.searchResponseTime=0,this.pageLimit=ye.PER_PAGE,this.maxGroupedLimit=ye.MAX_GROUPED_LIMIT,this.noResults=!0,this.selectedCartIds=[],this.selectedCartQuantities={},this.resourceIdToCartId={},this.monthlyHours=ye.HOURS_IN_A_MONTH,this.prodEnvironment=ye.production,this.completeSearchCriteria={},this.destroy$=new Rt,this.providerConfirmationMessage="You are about to add the product which is from different cloud providers than the one you have in your cart. Are you sure you want to add?",this.defaultPriceFilters=[{ID:1,NAME:"Relevant"},{ID:2,NAME:"Price: Low to High"},{ID:3,NAME:"Price: High to Low"}],this.cartService.cartUpdated$.pipe(Tt(this.destroy$)).subscribe(()=>this.refreshCartState())}ngOnInit(){this.loadSortingFilters(),this.loadCompareInstances(),this.refreshCartState(),this.priceFilter.setValue(this.orderBy||1,{emitEvent:!1})}ngOnChanges(e){e.orderBy&&this.orderBy&&this.priceFilter.setValue(this.orderBy,{emitEvent:!1}),e.completeFormArray&&this.updateCompleteFormArray(this.completeFormArray||[]),(e.pricingObject||e.currentPage||e.apiResponseTime)&&this.setPricingData(this.pricingObject,this.currentPage||1,this.apiResponseTime||0)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}resetPagination(){this.currentPage=1,this.totalPages=1,this.totalRecords=0,this.APIResponseTime=0,this.searchResponseTime=0,this.matchingRecords=0,this.noResults=!0,this.pricingData=[]}onPriceFilterChange(e){this.sortChanged.emit(e),this.resetPagination()}setCurrentPage(e){e>=1&&e<=this.totalPages&&e!==this.currentPage&&this.pageChanged.emit(e)}setPricingData(e,n,i){if(!e){this.resetPagination();return}this.currentPage=n;let s=e?.RESULT?.[0]||e?.results?.[0]||{},d=[],m=(this.currentPage-1)*this.pageLimit;if(Array.isArray(s.grouped_hits)){for(let f of s.grouped_hits){let _=Array.isArray(f?.hits)?[...f.hits]:[];_.splice(0,m),d.push(..._)}this.matchingRecords=s?.found_docs||0}else d.push(...s?.hits||[]),this.matchingRecords=s?.found||0;this.pricingData=d,this.totalRecords=s?.out_of||0,this.APIResponseTime=i/1e3,this.searchResponseTime=(s?.search_time_ms||0)/1e3,this.totalPages=this.matchingRecords>0?Math.ceil((Array.isArray(s.grouped_hits)?this.maxGroupedLimit:this.matchingRecords)/this.pageLimit):1,this.noResults=this.matchingRecords===0}hasNextPage(){return this.currentPage<this.totalPages}
12getRecordRangeText(){return this.matchingRecords===0?"No results found":this.prodEnvironment===!0?`Showing ${this.matchingRecords} results out of ${this.totalRecords} in total ${this.APIResponseTime} seconds`:`Showing ${this.matchingRecords} results out of ${this.totalRecords} in total ${this.APIResponseTime} seconds (TS Time - ${this.searchResponseTime} seconds)`}viewInstanceDetails(e){let n=`${vi(e?.service_provider)}-${vi(e?.product_name)}--${e?.record_id}`;this.router.navigate(["/admin-dashboard/cloud-atler/service",n])}addToCart(e){if(!e)return;let n=String(e?.record_id),i=()=>{this.selectedCartQuantities[n]=1,this.selectedCartIds?.includes(n)||(this.selectedCartIds.push(n),this.selectedCartIds=[...this.selectedCartIds])};this.verifyCartBeforeAdding(e,1,i)}updateItemQuantity(e,n){let i={};e?.product_name==="object-storage"?i={storage_amount_per_month:this.getCompleteSearchCriteria()?.storageAmount||500,retieval_amount_per_month:this.getCompleteSearchCriteria()?.retrievalAmount||500,read_requests_per_month:this.getCompleteSearchCriteria()?.readRequests||1e4,write_requests_per_month:this.getCompleteSearchCriteria()?.writeRequests||1e4}:e?.product_name==="Serverless Function"&&(i={number_of_requests:this.getCompleteSearchCriteria()?.noOfRequest||1e6,duration_of_request:this.getCompleteSearchCriteria()?.durationOfRequest||300,amount_of_memory:this.getCompleteSearchCriteria()?.amountOfMemory||256});let s={RESOURCE:[{RESOURCE_TYPE:"external",RESOURCE_ID:e?.record_id,QUANTITY:n,SERVICE_DETAILS:e,USER_INPUT:i}]};this.loadingChange.emit(!0),this.cartService.addItemToCart(s).subscribe({next:d=>{d?.status===200&&Array.isArray(d.object)&&d.object.length>0&&(this.selectedCartQuantities[e?.record_id]=d.object[0]?.QUANTITY,this.cartService.cartUpdated$.next()),this.loadingChange.emit(!1)},error:d=>{this.loadingChange.emit(!1),this.notify.showNotification(d?.error?.message,"top",E[d?.error?.status]||"error",d?.error?.status)}})}verifyCartBeforeAdding(e,n,i){this.loadingChange.emit(!0),this.cartService.getCartItems().subscribe({next:s=>{let d=Array.isArray(s?.object)?s.object:[],m=()=>{i?.(),this.updateItemQuantity(e,n)};this.shouldConfirmProviderChange(d,e?.service_provider)?(this.loadingChange.emit(!1),this.promptProviderConfirmation(m)):m()},error:s=>{this.loadingChange.emit(!1),this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]||"error",s?.error?.status)}})}promptProviderConfirmation(e,n){this.dialog.open(eo,{width:"558px",height:"auto",data:{title:this.providerConfirmationMessage},disableClose:!0}).afterClosed().subscribe(s=>{s?.state===!0?e():n?.()})}shouldConfirmProviderChange(e,n){if(!Array.isArray(e)||e.length===0)return!1;let i=this.normalizeProvider(n);return i?!e.some(s=>this.normalizeProvider(s?.SERVICE_DETAILS?.service_provider||s?.SERVICE_DETAILS?.selection?.service_provider)===i):!1}normalizeProvider(e){return String(e||"").trim().toLowerCase()}increaseQuantity(e,n){let i=String(e);this.selectedCartQuantities[i]!=null&&this.updateItemQuantity(n,this.selectedCartQuantities[i]+1)}decreaseQuantity(e,n){let i=String(e);if(this.selectedCartQuantities[i]>1)this.updateItemQuantity(n,this.selectedCartQuantities[i]-1);else{let s=this.resourceIdToCartId[i];s&&this.removeItemFromCart(s)}}removeItemFromCart(e){this.cartService.removeCartItem({ID:[e]}).subscribe({next:n=>{n?.status===200&&Array.isArray(n.object)&&this.cartService.cartUpdated$.next(),this.loadingChange.emit(!1)},error:n=>{this.loadingChange.emit(!1),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]||"error",n?.error?.status)}})}formatText(e){return e?.replace(/-/g," ")?.replace(/\b\w/g,n=>n?.toUpperCase())}isScientificNotation(e){let n=e,i=String(n);return i.includes("e")||i.includes("E")?n=Number(n).toFixed(10):n=Number(n),Number(n||0)}getVMMonthlyPrice(e,n){let i=this.monthlyHours[n?n.toLowerCase():""]||730;return(this.isScientificNotation(e)*i).toFixed(2)}getStorageMonthlyPrice(e,n,i,s,d,m){let f=0,_=0,b=0,M=0,S=Array.isArray(m)?m:[],w=[],D=0,R=0,W=0,H=this.isStructuredSearchContext()&&this.getCurrentServiceType()==="storage"&&this.getCurrentProductName()==="object-storage"&&this.hasValidStorageInputs();if(d===!1)H?(f=this.getCompleteSearchCriteria()?.storageAmount*this.isScientificNotation(e?.[0])||0,_=this.getCompleteSearchCriteria()?.retrievalAmount*this.isScientificNotation(n)||0,b=this.getCompleteSearchCriteria()?.readRequests*this.isScientificNotation(i)||0,M=this.getCompleteSearchCriteria()?.writeRequests*this.isScientificNotation(s)||0):(f=500*this.isScientificNotation(e?.[0])||0,_=500*this.isScientificNotation(n)||0,b=1e4*this.isScientificNotation(i)||0,M=1e4*this.isScientificNotation(s)||0),W=f+_+b+M;else if(d===!0){f=H?this.getCompleteSearchCriteria()?.storageAmount:500,H?(_=this.getCompleteSearchCriteria()?.retrievalAmount*this.isScientificNotation(n)||0,b=this.getCompleteSearchCriteria()?.readRequests*this.isScientificNotation(i)||0,M=this.getCompleteSearchCriteria()?.writeRequests*this.isScientificNotation(s)||0):(_=500*this.isScientificNotation(n)||0,b=1e4*this.isScientificNotation(i)||0,M=1e4*this.isScientificNotation(s)||0);for(let L=0;L<S.length;L++)w=S[L].split("-"),w[1]==="~"?f>parseInt(w[0],10)&&(D=L):f>parseInt(w[0],10)&&f<=parseInt(w[1],10)&&(D=L);for(let L=D;L>=0;L--)w=S[L].split("-"),D===L?R+=(f-parseInt(w[0],10))*this.isScientificNotation(e?.[L]):R+=(parseInt(w[1],10)-parseInt(w[0],10))*this.isScientificNotation(e?.[L]);W=R+_+b+M}return W?.toFixed(2)||"0.00"}getFunctionMonthlyPrice(e,n,i,s,d,m){let f=0,_=0,b=0,M=0,S=0,w=Array.isArray(m)?m:[],D=[],R=0,W=0,H=0,L=this.isStru
12cturedSearchContext()&&this.getCurrentServiceType()==="serverless"&&this.getCurrentProductName()==="Serverless Function"&&this.hasValidFunctionInputs();if(d===!1)L?(f=this.getCompleteSearchCriteria()?.noOfRequest*(this.getCompleteSearchCriteria()?.durationOfRequest/1e3),_=this.getCompleteSearchCriteria()?.amountOfMemory/1024*f,b=_*this.isScientificNotation(e?.[0]),M=this.getCompleteSearchCriteria()?.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))):(f=1e6*(300/1e3),_=256/1024*f,b=_*this.isScientificNotation(e?.[0]),M=1e6*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))),H=b+M+S;else if(d===!0){L?(f=this.getCompleteSearchCriteria()?.noOfRequest*(this.getCompleteSearchCriteria()?.durationOfRequest/1e3),_=this.getCompleteSearchCriteria()?.amountOfMemory/1024*f,M=this.getCompleteSearchCriteria()?.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))):(f=1e6*(300/1e3),_=256/1024*f,M=1e6*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i)));for(let q=0;q<w.length;q++)D=w[q].split("-"),D[1]==="~"?_>parseInt(D[0],10)&&(R=q):_>parseInt(D[0],10)&&_<=parseInt(D[1],10)&&(R=q);for(let q=R;q>=0;q--)D=w[q].split("-"),R===q?W+=(_-parseInt(D[0],10))*this.isScientificNotation(e?.[q]):W+=(parseInt(D[1],10)-parseInt(D[0],10))*this.isScientificNotation(e?.[q]);H=W+M+S}return H?.toFixed(2)||"0.00"}loadCompareInstances(){if(pn(this.platformId)){let e=window.localStorage.getItem("COMPARE_INSTANCES")||"[]",n=e?JSON.parse(e):[];this.compareInstances=Array.isArray(n)?[...n]:[]}this.cdr.detectChanges()}addToCompare(e){if(this.loadCompareInstances(),!(this.compareInstances.length>=3)){if(this.compareInstances.length>0){let n=this.compareInstances[0]?.DOCUMENT?.product_name,i=e?.product_name;if(n&&i&&n!==i){this.notify.showNotification("Cannot compare different product types.","top","warning",400);return}}this.compareInstances.some(n=>n.RECORD_ID===e.record_id)||(this.compareInstances.push({RECORD_ID:e.record_id,DOCUMENT:e}),pn(this.platformId)&&window.localStorage.setItem("COMPARE_INSTANCES",JSON.stringify(this.compareInstances)),this.loadCompareInstances(),this.compareStateChanged.emit())}}updateCompleteFormArray(e){this.completeFormArray=[...e],this.extractCompleteSearchCriteria()}getCompleteFormArrayValues(){return this.completeFormArray}getCompleteSearchCriteria(){return this.completeSearchCriteria}getCurrentServiceType(){return this.getCompleteSearchCriteria()?.selectedService||null}getCurrentProductName(){return this.getCompleteSearchCriteria()?.selectedProduct||null}refreshCartState(){this.cartService.getCartItems().subscribe({next:e=>{this.selectedCartIds=[],this.resourceIdToCartId={},this.selectedCartQuantities={}
12,(Array.isArray(e?.object)?e.object:[]).forEach(i=>{let s=String(i?.RESOURCE_ID),d=String(i?.ID);this.selectedCartIds.push(s),this.selectedCartQuantities[s]=i?.QUANTITY,this.resourceIdToCartId[s]=d}),this.selectedCartIds=[...this.selectedCartIds],this.cdr.detectChanges()},error:()=>{this.selectedCartIds=[]}})}extractCompleteSearchCriteria(){if(this.completeFormArray&&this.completeFormArray.length>0){let e=this.completeFormArray[0];this.completeSearchCriteria={selectedService:e?.service_type?.[0]||e?.selectedService||null,selectedProduct:e?.product_name?.[0]||e?.selectedProduct||null,selectedInstance:e?.instance_family?.[0]||e?.selectedInstance||null,vCPU:e?.vcpu_cores?.[0]||e?.vCPU||null,RAM:e?.ram_gb?.[0]||e?.RAM||null,selectedRegion:e?.cs_region?.[0]||e?.selectedRegion||null,selectedCity:e?.cs_city?.[0]||e?.selectedCity||null,selectedOS:e?.os_type?.[0]||e?.selectedOS||null,selectedHost:e?.host_type?.[0]||e?.selectedHost||null,storageAmount:e?.storage_amount?.[0]||e?.storageAmount||null,retrievalAmount:e?.retrieval_amount?.[0]||e?.retrievalAmount||null,readRequests:e?.read_requests?.[0]||e?.readRequests||null,writeRequests:e?.write_requests?.[0]||e?.writeRequests||null,noOfRequest:e?.no_of_request?.[0]||e?.noOfRequest||null,durationOfRequest:e?.duration_of_request?.[0]||e?.durationOfRequest||null,amountOfMemory:e?.amount_of_memory?.[0]||e?.amountOfMemory||null}}}isStructuredSearchContext(){return this.searchStateService.getSearchKeyword()&&this.searchStateService.getSearchKeyword().trim().length>0?!1:!!(this.completeFormArray&&this.completeFormArray.length>0&&this.completeFormArray.some(s=>s?.service_type||s?.product_name))}hasValidStorageInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.storageAmount&&e?.retrievalAmount&&e?.readRequests&&e?.writeRequests)}hasValidFunctionInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.noOfRequest&&e?.durationOfRequest&&e?.amountOfMemory)}loadSortingFilters(){if(pn(this.platformId)){let e=window.localStorage.getItem("SORTING_FILTERS")||"[]",n=e?JSON.parse(e):[];this.priceFilters=Array.isArray(n)&&n.length?n:this.defaultPriceFilters}else this.priceFilters=this.defaultPriceFilters}static{this.\u0275fac=function(n){return new(n||t)(y(Jn),y(Rn),y(G),y(Cn),y(V),y(Se),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-cost-compare-results"]],inputs:{pricingObject:"pricingObject",apiResponseTime:"apiResponseTime",orderBy:"orderBy",currentPage:"currentPage",compareInstances:"compareInstances",completeFormArray:"completeFormArray"},outputs:{sortChanged:"sortChanged",pageChanged:"pageChanged",compareStateChanged:"compareStateChanged",loadingChange:"loadingChange"},features:[En],decls:9,vars:5,consts:[["showQty",""],[1,"results"],[1,"results-header"],[1,"price-filter"],["appearance","outline",1,"filter-select"],[3,"selectionChange","formControl"],[3,"value",4,"ngFor","ngForOf"],["class","no-results-message",4,"ngIf"],["class","instance-wrapper",4,"ngIf"],[3,"value"],[1,"no-results-message"],["icon","material-symbols:info-outline","width","24","height","24"],[1,"instance-wrapper"],[1,"desktop-view"],[1,"record-range"],[1,"instance-cards"],["class","instance-card-container",4,"ngFor","ngForOf"],[1,"pagination"],[1,"pagination-controls"],["mat-button","",3,"click","disabled"],["icon","material-symbols:chevron-left"],["icon","material-symbols:chevron-right"],[1,"instance-card-container"],["class","instance-card",4,"ngIf"],["class","instance-card instance-price-specs instance-card-price",4,"ngIf"],[1,"instance-card"],[1,"instance-header"],[1,"provider-type"],[1,"provider-logo",3,"src"],[1,"provider-details"],[1,"provider-name"],[1,"instance-details"],[1,"instance-price"],[1,"price"],["matTooltip","This is an approximate price, actual price may vary.",1,"price-period-icon"],["icon","material-symbols:info-outline-rounded"],[1,"price-period"],[1,"instance-family"],[1,"instance-specs"],[1,"spec-item"],[1,"spec-label"],[1,"spec-value"],[1,"spec-value","processor-type-value"],[1,"instance-action"],[1,"location"],[1,"location-div"],["icon","material-symbols:location-on-outline-rounded"],["icon","material-symbols:settings-outline-rounded"],[1,"action-buttons"],["mat-button","",1,"compare-btn",3,"click","disabled"],["mat-icon-button","",1,"action-icons",3,"click"],["icon","lsicon:view-filled"],[4,"ngIf","ngIfElse"],["icon","mdi:cart-outline"],[1,"quantity-selector"],[1,"quantity-controls"],[1,"qty-btn",3,"click"],["type","text","readonly","",1,"qty-input",3,"value"],["class","spec-value",4,"ngIf"],[1,"function-specs"],[1,"func-item"],[1,"func-values"],[1,"func-value"],[1,"instance-card","instance-price-specs","instance-card-price"],[1,"price-item"],[1,"payment-option"]],template:function(n,i){n&1&&(o(0,"div",1)(1,"div",2)(2,"div",3),l(3,"Sort by :"),a(),o(4,"mat-form-field",4)(5,"mat-select",5),v("selectionChange",function(d){return i.onPriceFilterChange(d.value)}),g(6,o4,2,2,"mat-option",6),a()()(),g(7,r4,4,0,"div",7)(8,b4,12,5,"div",8),a()),n&2&&(c(5),p("formControl",i.priceFilter),c(),p("ngForOf",i.priceFilters||J(4,mu)),c(),p("ngIf",i.noResults),c(),p("ngIf",!i.noResults))},dependencies:[N,$,B,z,ei,ut,Gi,fe,ue,Ji,Zi,me,Hi,Xn,Zn],styles:["[_nghost-%COMP%]     .mat-mdc-form-field-flex>.mat-mdc-form-field-infix{padding:5px 0 .4em!important;min-height:0px!important}  .mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative!important}[_nghost-%COMP%]     .mat-mdc-select-value-text{font-size:15px!important}.results[_ngcontent-%COMP%]{width:100%;background:transparent;display:flex;flex-direction:column;gap:45px}.results[_ngcontent-%COMP%]   .results-header[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 3px 10px #00000012;padding:20px;
12display:flex;justify-content:start;align-items:center;gap:20px}.results[_ngcontent-%COMP%]   .results-header[_ngcontent-%COMP%]   .price-filter[_ngcontent-%COMP%]{font-size:16px;color:#374151}.results[_ngcontent-%COMP%]   .results-header[_ngcontent-%COMP%]   .filter-select[_ngcontent-%COMP%]{width:25%;height:35px;border-radius:8px;border:none;outline:none}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]{background-color:#ebf6fb;border:1px solid #C0E3F4;border-radius:8px;padding:20px;display:flex;flex-direction:column;gap:15px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:10px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-head[_ngcontent-%COMP%]   .saving-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-head[_ngcontent-%COMP%]   .saving-title[_ngcontent-%COMP%]   .saving-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-head[_ngcontent-%COMP%]   .saving-title[_ngcontent-%COMP%]   .saving-text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#133a4d;line-height:28px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-head[_ngcontent-%COMP%]   .calculate-btn[_ngcontent-%COMP%]{background-color:#35a5db;color:#fff;font-size:14px;padding:10px 20px;min-width:auto;height:auto;border-radius:8px}.results[_ngcontent-%COMP%]   .calculate-savings[_ngcontent-%COMP%]   .saving-desc[_ngcontent-%COMP%]{font-size:14px;color:#133a4d;line-height:20px}.results[_ngcontent-%COMP%]   .no-results-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:10px;font-size:14px;color:#133a4d;line-height:20px}.results[_ngcontent-%COMP%]   .instance-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:30px}.results[_ngcontent-%COMP%]   .desktop-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:25px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 calc(50% - 15px);max-width:calc(50% - 10px);border-radius:16px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:16px;border:2px solid #FFFFFF;overflow:hidden;background-color:#fff;gap:15px;box-shadow:0 2px 8px #0000001a;z-index:2}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:20px 20px 0}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-logo[_ngcontent-%COMP%]{width:40px;height:40px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#1f2937}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-name[_ng
12content-%COMP%]   span[_ngcontent-%COMP%]{font-size:13px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .instance-details[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-family[_ngcontent-%COMP%]{font-size:11px;color:#047857;background-color:#d1fae5;padding:5px 10px;border-radius:20px;text-align:center}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{display:flex;align-items:center;gap:3px;font-size:15px;font-weight:700;color:#1f2937}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price-period-icon[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price-period[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]{display:flex;padding:0 20px;justify-content:start;flex-wrap:wrap;gap:19px;align-items:start}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-price-specs[_ngcontent-%COMP%]{display:flex;padding:0 20px;justify-content:space-between;align-items:start}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .spec-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;max-width:22%}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .function-specs[_ngcontent-%COMP%]{display:flex;padding:0 20px;justify-content:space-between;align-items:start}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .spec-label[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#1f2937}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .processor-type-value[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-height:16px;min-height:32px;max-height:32px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .func-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .func-values[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .func-values[_ngcontent-%COMP%]   .func-value[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;background-color:#b0bac366;padding:5px 10px;border-radius:20px;text-align:center}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-card-price[_ngcontent-%COMP%]{flex-direction:row;align-items:center;padding:30px 20px 10px;top:-20px;position:relative;z-index:1}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .payment-option[_ngcontent-%COMP%]{font-size:11px;color:#1f2937;background-color:#dcdcdc;padding:5px 10px;border-radius:20px;text-align:center}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:5px;align-items:center;padding:0 20px 20px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{display:flex;gap:10px;width:50%}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]   .location-div[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12px;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center;width:45%}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .compare-btn[_ngcontent-%COMP%]{background-color:#fff;color:#35a5db;font-size:13px;height:27px;padding:7px;border-radius:8px;border:1px solid #35A5DB}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .compare-btn[_ngcontent-%COMP%]:disabled{opacity:.5}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-icons[_ngcontent-%COMP%]{color:#35a5db}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-icons[_ngcontent-%COMP%]:disabled{opacity:.5}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]{display:flex;justify-content:center}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]{display:flex;align-items:center;border:1px solid #E5E7EB;border-radius:8px;overflow:hidden;width:auto;height:30px}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:#f9fafb;border:none;font-size:16px;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;color:#6b7280}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]:active{background:#e5e7eb}.results[_ngcontent-%COMP%]   .instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-input[_ngcontent-%COMP%]{width:34px;height:30px;border:none;text-align:center;font-size:14px;outline:none;padding:0;background:#fff}.results[_ngcontent-%COMP%]   .record-range[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#4b5563}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center;gap:20px;flex-wrap:wrap}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .page-info[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .pagination-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .pagination-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:12px;border:1px solid #D1D5DB;background:#fff;color:#6b7280;display:flex;align-items:center;justify-content:center}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .pagination-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .pagination-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px}.results[_ngcontent-%COMP%]   .pagination[_ngcontent-%COMP%]   .pagination-controls[_ngcontent-%COMP%]   .current-page[_ngcontent-%COMP%]{font-size:15px;color:#4b5563;font-weight:500;width:40px;height:40px;border-radius:12px;border:1px solid #35A5DB;background:#fff;color:#35a5db;display:flex;align-items:center;justify-content:center}@media only screen and (max-width:1250px){.filter-select[_ngcontent-%COMP%]{width:50%!important}.instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]{flex:1 1 100%!important;max-width:100%!important}.instance-header[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px;justify-content:center;align-items:center}.instance-specs[_ngcontent-%COMP%], .instance-price-specs[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px}.spec-item[_ngcontent-%COMP%]{max-width:100%!important;flex-direction:row;gap:25px;justify-content:space-between}.instance-action[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px}.instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{width:fit-content!important;flex-wrap:wrap}.instance-action[_ngcontent-%COMP%]   .action-buttons[_ngcontent-%COMP%]{width:fit-content!important}}"]})}}return t})();var Ul=()=>[];function y4(t,r){if(t&1){let e=A();o(0,"mat-icon",17),v("click",function(){O(e);let i=u(3).$implicit,s=u(2);return P(s.clearSearch(i==null?null:i.field_name))}),l(1,"close"),a()}}function M4(t,r){if(t&1){let e=A();o(0,"div",12)(1,"div",13)(2,"mat-icon",14),l(3,"search"),a(),o(4,"input",15),v("input",function(i){O(e);let s=u(2).$implicit,d=u(2);return P(d.onSearchInput(s==null?null:s.field_name,i))}),a(),g(5,y4,2,0,"mat-icon",16),a()()}if(t&2){let e=u(2).$implicit,n=u(2);c(4),p("placeholder",n.getSearchPlaceholder(e==null?null:e.field_name))("value",n.searchInputs[e==null?null:e.field_name]||""),c(),p("ngIf",n.searchInputs[e==null?null:e.field_name])}}function S4(t,r){if(t&1){let e=A();o(0,"mat-checkbox",18),v("change",function(i){let s=O(e).$implicit,d=u(2).$implicit,m=u(2);return P(m.changeFilter(i,d==null?null:d.field_name,s==null?null:s.value))}),o(1,"span",19),l(2),a()()}if(t&2){let e=r.$implicit,n=u(2).$implicit,i=u(2);p("checked",i.isFilterSelected(n==null?null:n.field_name,e==null?null:e.value)),c(2),x(" ",i.formatText(e==null?null:e.value,n==null?null:n.field_name)," ")}}function O4(t,r){if(t&1&&(o(0,"div",7),g(1,M4,6,3,"div",8),o(2,"div",9),l(3),a(),o(4,"div",10),g(5,S4,3,2,"mat-checkbox",11),a()()),t&2){let e=u().$implicit,n=u(2);c(),p("ngIf",n.isSearchableField(e==null?null:e.field_name)),c(2),C(n.filterHeaders[e==null?null:e.field_name]||n.formatTitle(e==null?null:e.field_name)),c(2),p("ngForOf",n.getFilteredCounts(e==null?null:e.field_name,e==null?null:e.counts)||J(3,Ul))}}function P4(t,r){if(t&1&&(I(0),g(1,O4,6,4,"div",6),T()),t&2){let e=r.$implicit,n=u(2);c(),p("ngIf",(e==null?null:e.counts.length)>0&&n.isFieldVisible(e==null?null:e.field_name))}}function E4(t,r){if(t&1){let e=A();o(0,"div",1),g(1,P4,2,1,"ng-container",2),o(2,"div",3)(3,"button",4),v("click",function(){O(e);let i=u();return P(i.emitFilters())}),l(4,"Apply"),a(),o(5,"button",5),v("click",function(){O(e);let i=u();return P(i.clearFilters())}),l(6,"Clear"),a()()()}if(t&2){let e=r.$implicit,n=u();c(),p("ngForOf",(e==null?null:e.facet_counts)||J(2,Ul)),c(2),p("disabled",n.selectedFilters.length===0)}}var jl=(()=>{class t{get filterHeaders(){return su}onResize(e){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.emitFilters()},0)}constructor(e,n,i){this.authService=e,this.notify=n,this.searchStateService=i,this.pricingData=[],this.facets=[],this.selectedFilters=[],this.loadingChange=new kt,this.filtersChanged=new kt,this.searchableFields=["vcpu_cores","ram_gb","cs_regi
12on","cs_city"],this.searchInputs={},this.filteredCounts={},this.currentSearchKeyword="",this.currentSearchFormState=null,this.hasActiveKeywordSearch=!1,this.hasActiveFormState=!1,this.isSyncing=!1,this.currentProductName=null,this._onDestroy=new Rt}ngOnInit(){this.initializeSearchStateMonitoring(),this.initializeFilteredCounts(),this.searchStateService.clearFiltersRequested$.pipe(Tt(this._onDestroy)).subscribe(()=>{this.clearFilters()})}ngOnChanges(e){e.facets&&Array.isArray(this.facets)&&this.facets.length&&(this.pricingData=[{facet_counts:this.facets}],this.initializeFilteredCounts()),e.pricingData&&this.initializeFilteredCounts()}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}updateServiceContext(e){this.currentProductName=e?.productName||[]}getVisibleFilterFields(){let e=[],n=[],i=[],s=[],d=["service_provider","cs_region","cs_city","payment_plan","payment_option","term"],m=this.currentProductName||[];m.includes("Virtual Machine")&&(n=["instance_family","vcpu_cores","ram_gb","host_type","os_type"]),m.includes("object-storage")&&(i=["access_tier","access_tier_option","redundancy","storage_option","storage_type"]),m.includes("Serverless Function")&&(s=["serverless_architecture"]),e=[...n,...i,...s];let f=Array.from(new Set(e));return[...d,...f]}isFieldVisible(e){return this.getVisibleFilterFields().includes(e)}initializeSearchStateMonitoring(){this.currentSearchKeyword=this.searchStateService.getSearchKeyword(),this.hasActiveKeywordSearch=!!(this.currentSearchKeyword&&this.currentSearchKeyword.trim().length>0),this.currentSearchFormState=this.searchStateService.getSearchFormState(),this.hasActiveFormState=!!(this.currentSearchFormState&&this.currentSearchFormState.compareArray&&this.currentSearchFormState.compareArray.length>0&&this.currentSearchFormState.compareArray.some(e=>e.selectedService||e.selectedProduct||e.selectedInstance||e.vCPU||e.RAM||e.selectedRegion||e.selectedCity||e.selectedOS||e.selectedHost))}initializeFilteredCounts(){this.filteredCounts={},this.pricingData&&this.pricingData.length>0&&this.pricingData.forEach(e=>{e?.facet_counts?.forEach(n=>{this.searchableFields?.includes(n?.field_name)&&(this.filteredCounts[n.field_name]=this.sortFilterValues(n.counts,n.field_name))})})}isSearchableField(e){return this.searchableFields?.includes(e)}getSearchPlaceholder(e){return{vcpu_cores:"Search vCPUs",ram_gb:"Search RAM",cs_region:"Search regions",cs_city:"Search cities"}[e]||"Search"}onSearchInput(e,n){this.searchInputs[e]=n.target.value,this.filterFieldValues(e)}filterFieldValues(e){let i=this.pricingData[0]?.facet_counts?.find(d=>d.field_name===e);if(!i)return;let s=this.searchInputs[e]?this.searchInputs[e]?.toLowerCase():"";if(!s)this.filteredCounts[e]=this.sortFilterValues(i.counts,e);else{let d=i.counts.filter(m=>this.formatText(m.value,e)?.toLowerCase()?.includes(s));this.filteredCounts[e]=this.sortFilterValues(d,e)}}sortFilterValues(e,n){return e?n==="vcpu_cores"||n==="ram_gb"?[...e].sort((i,s)=>{let d=parseFloat(i.value)||0,m=parseFloat(s.value)||0;return d-m}):[...e].sort((i,s)=>this.formatText(i.value,n).localeCompare(this.formatText(s.value,n))):[]}getFilteredCounts(e,n){return this.searchableFields?.includes(e)?this.filteredCounts[e]||this.sortFilterValues(n,e):n}clearSearch(e){this.searchInputs[e]="",this.filterFieldValues(e)}getPricingFilters(e){this.loadingChange.emit(!0);let n=e||{};this.authService.getFilters(n).subscribe({next:i=>{this.pricingData=i.object?.results||[],this.initializeFilteredCounts(),this.loadingChange.emit(!1)},error:i=>{this.loadingChange.emit(!1),this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]||"error",i?.error?.status)}})}changeFilter(e,n,i){if(e.checked){let s=this.selectedFilters.findIndex(d=>Object.prototype.hasOwnProperty.call(d,n));if(s!==-1){let d=this.selectedFilters[s][n];d?.includes(i)||d.push(i)}else this.selectedFilters.push({[n]:[i]})}else{let s=this.selectedFilters.findIndex(d=>Object.prototype.hasOwnProperty.call(d,n));if(s!==-1){let d=this.selectedFilters[s][n],m=d.indexOf(i);m!==-1&&(d.splice(m,1),d.length===0&&this.selectedFilters.splice(s,1))}}}isFilterSelected(e,n){let i=this.selectedFilters.find(s=>Object.prototype.hasOwnProperty.call(s,e));return i?i[e]?.includes(n):!1}formatTitle(e){return e?.replace(/_/g," ")?.toUpperCase()}formatText(e,n){return n==="service_provider"||n==="service_type"?e?.toUpperCase():e?.replace(/-/g," ")?.replace(/\b\w/g,i=>i?.toUpperCase())}emitFilters(){setTimeout(()=>{let e={selectedFilters:[...this.selectedFilters]};this.filtersChanged.emit(e)},100)}clearFilters(){this.selectedFilters=[],this.searchInputs={},this.initializeFilteredCounts(),this.emitFilters()}static{this.\u0275fac=function(n){return new(n||t)(y(Kt),y(V),y(Cn))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-filters-sidebar"]],hostBindings:function(n,i){n&1&&v("resize",function(d){return i.onResize(d)},sr)},inputs:{pricingData:"pricingData",facets:"facets",selectedFilters:"selectedFilters"},outputs:{loadingChange:"loadingChange",filtersChanged:"filtersChanged"},features:[En],decls:1,vars:2,consts:[["class","filters-sidebar",4,"ngFor","ngForOf"],[1,"filters-sidebar"],[4,"ngFor","ngForOf"],[1,"action-section"],["mat-button","",1,"apply-btn",3,"click","disabled"],["mat-button","",1,"clear-btn",3,"click"],["class","filter-section",4,"ngIf"],[1,"filter-section"],["class","search-container",4,"ngIf"],[1,"filter-head"],[1,"filter-body"],[3,"checked","change",4,"ngFor","ngForOf"],[1,"search-container"],[1,"search-input-wrapper"],[1,"search-icon"],["type","text",1,"search-input",3,"input","placeholder","value"],["class","clear-icon",3,"click",4,"ngIf"],[1,"clear-icon",3,"click"],[3,"change","checked"],[1,"filter-option"]],template:function(n,i){n&1&&g(0,E4,7,3,"div",0),n&2&&p("ngForOf",i.pricingData||J(1,Ul))},dependencies:[N,$,B,z,ut,Dn,xr],styles:["[_nghost-%COMP%]     .mat-mdc-form-field-flex>.mat-mdc-form-field-infix{padding:5px 0 .4em!important;min-height:0px!important}  .mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative!important}mat-checkbox[_ngcontent-%COMP%]{display:block;--mdc-checkbox-selected-icon-color: #35A5DB !important;--mdc-checkbox-selected-hover-icon-color: #35A5DB !important;--mdc-checkbox-selected-pressed-icon-color: #35A5DB !important;--mdc-checkbox-selected-focused-icon-color: #35A5DB !important}.filters-sidebar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:30px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:20px;box-shadow:0 1px 2px #0000000d;display:flex;flex-direction:column;gap:15px;min-height:auto;max-height:400px;overflow-y:scroll;overflow-x:hidden;-ms-overflow-style:none;scrollbar-width:none}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]{margin-bottom:10px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;background-color:#f9fafb;border:1px solid #E5E7EB;border-radius:8px;padding:8px 12px;transition:border-color .2s ease;min-height:25px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]:focus-within{border-color:#06c;box-shadow:0 0 0 1px #06c}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:18px;margin-right:8px;flex-shrink:0}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]   .search-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;font-size:14px;color:#374151;min-width:0}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]   .search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]   .clear-icon[_ngcontent-%COMP%]{color:#9ca3af;font-size:18px;
12cursor:pointer;margin-left:8px;transition:color .2s ease;flex-shrink:0}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]   .search-input-wrapper[_ngcontent-%COMP%]   .clear-icon[_ngcontent-%COMP%]:hover{color:#374151}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .filter-head[_ngcontent-%COMP%]{font-weight:500;font-size:16px;color:#111827;line-height:24px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .filter-body[_ngcontent-%COMP%]{display:flex;flex-direction:column}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .filter-body[_ngcontent-%COMP%]   .filter-option[_ngcontent-%COMP%]{font-weight:400;font-size:14px;color:#374151;line-height:24px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   .filter-body[_ngcontent-%COMP%]   .see-more[_ngcontent-%COMP%]{color:#06c;cursor:pointer;font-size:14px;padding-top:10px}.filters-sidebar[_ngcontent-%COMP%]   .filter-section[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.filters-sidebar[_ngcontent-%COMP%]   .action-section[_ngcontent-%COMP%]{position:sticky;bottom:0;background:#fff;border-radius:8px;padding:20px;box-shadow:0 1px 2px #0000000d;display:flex;justify-content:space-between;gap:20px;align-items:center}.filters-sidebar[_ngcontent-%COMP%]   .apply-btn[_ngcontent-%COMP%]{width:45%;background:#35a5db;border-radius:8px;color:#fff;font-size:14px;padding:10px 20px;border:none}.filters-sidebar[_ngcontent-%COMP%]   .apply-btn[_ngcontent-%COMP%]:disabled{opacity:.5}.filters-sidebar[_ngcontent-%COMP%]   .clear-btn[_ngcontent-%COMP%]{width:45%;background:#f3f4f6;border-radius:8px;color:#374151;font-size:14px;padding:10px 20px;border:none}"]})}}return t})();function w4(t,r){t&1&&(o(0,"div",2)(1,"div",3)(2,"div",4),h(3,"span",5),a()()())}function I4(t,r){if(t&1){let e=A();o(0,"button",17),v("click",function(){let i=O(e).index,s=u(3);return P(s.onTabSelect(i))}),l(1),a()}if(t&2){let e=r.$implicit,n=r.index,i=u(3);Y("cloud-results-shell__tab--active",i.selectedTabIndex===n),c(),x(" ",e," ")}}function T4(t,r){if(t&1&&(o(0,"div",15),g(1,I4,2,3,"button",16),a()),t&2){let e=u(2);c(),p("ngForOf",e.serviceTabs)}}function A4(t,r){if(t&1){let e=A();o(0,"div",18)(1,"app-cloud-atler-filters-sidebar",19),v("filtersChanged",function(i){O(e);let s=u(2);return P(s.onFiltersChanged(i))})("loadingChange",function(i){O(e);let s=u(2);return P(s.loading=i)}),a(),o(2,"app-cloud-atler-cost-compare-results",20),v("sortChanged",function(i){O(e);let s=u(2);return P(s.onSortChange(i))})("pageChanged",function(i){O(e);let s=u(2);return P(s.onPageChange(i))})("compareStateChanged",function(){O(e);let i=u(2);return P(i.refreshComparePanel())})("loadingChange",function(i){O(e);let s=u(2);return P(s.loading=i)}),a()()}if(t&2){let e=u(2);c(),p("facets",e.facets)("selectedFilters",e.selectedFilters),c(),p("pricingObject",e.pricingObject)("apiResponseTime",e.apiResponseTime)("orderBy",e.orderBy)("currentPage",e.currentPage)("compareInstances",e.compareInstances)("completeFormArray",e.activeCompleteFormArray)}}function D4(t,r){if(t&1){let e=A();o(0,"div",25),h(1,"img",26),o(2,"div")(3,"div",27),l(4),a(),o(5,"div",28),l(6),a()(),o(7,"button",29),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.removeCompare(i))}),h(8,"iconify-icon",30),a()()}if(t&2){let e=r.$implicit,n=u(3);c(),p("src",n.providerIcon(e),Qe),c(3),x("",(e==null||e.DOCUMENT==null?null:e.DOCUMENT.product_name)||(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)||"Cloud Resource"," "),c(2),C((e==null||e.DOCUMENT==null?null:e.DOCUMENT.vm_name)||(e==null||e.DOCUMENT==null?null:e.DOCUMENT.instance_family)||(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vm_name)||(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.instance_family)||(e==null?null:e.RESOURCE_ID)||(e==null?null:e.RECORD_ID))}}function R4(t,r){if(t&1){let e=A();o(0,"div",21)(1,"div",22),g(2,D4,9,3,"div",23),a(),o(3,"button",24),v("click",function(){O(e);let i=u(2);return P(i.goToComparison())}),l(4,"Go to Comparison"),a()()}if(t&2){let e=u(2);c(2),p("ngForOf",e.compareInstances)}}function k4(t,r){if(t&1){let e=A();o(0,"section",6)(1,"div",7)(2,"button",8),v("click",function(){O(e);let i=u();return P(i.backToSearch())}),h(3,"iconify-icon",9),o(4,"span"),l(5,"Back"),a()(),o(6,"div",10),l(7,"Cloud Comparison"),a(),h(8,"div",11),a(),g(9,T4,2,1,"div",12)(10,A4,3,8,"div",13)(11,R4,5,1,"div",14),a()}if(t&2){let e=u();c(9),p("ngIf",e.serviceTabs.length>1),c(),p("ngIf",e.pricingObject),c(),p("ngIf",e.compareInstances.length>0)}}var uu=(()=>{class t{constructor(e,n,i,s,d,m,f){this.authService=e,this.searchStateService=n,this.cartService=i,this.notify=s,this.router=d,this.ngZone=m,this.cdr=f,this.loading=!1,this.pricingObject=null,this.facets=[],this.formArray=[],this.completeFormArray=[],this.activeCompleteFormArray=[],this.searchKeyword="",this.serviceTabs=[],this.selectedTabIndex=0,this.selectedFilters=[],this.compareInstances=[],this.currentPage=1,this.orderBy=1,this.apiResponseTime=0,this.fallback=null,this.destroy$=new Rt,this.isApiCallInProgress=!1,this.limit=ye.PER_PAGE}ngOnInit(){this.formArray=this.searchStateService.getFormArray(),this.completeFormArray=this.searchStateService.getCompleteFormArray(),this.searchKeyword=this.searchStateService.getSearchKeyword(),this.buildServiceTabs(),this.syncActiveCompleteFormArray(),this.searchStateService.searchKeyword$.pipe(Tt(this.destroy$)).subscribe(e=>{this.searchKeyword=e||"",this.searchKeyword.trim()&&(this.selectedTabIndex=0,this.formArray=[],this.completeFormArray=[],this.buildServiceTabs()),this.syncActiveCompleteFormArray()}),this.searchStateService.formArray$.pipe(Tt(this.destroy$)).subscribe(e=>{this.formArray=Array.isArray(e)?e:[],this.selectedTabIndex=0,this.buildServiceTabs(),this.syncActiveCompleteFormArray()}),this.searchStateService.completeFormArray$.pipe(Tt(this.destroy$)).subscribe(e=>{this.completeFormArray=Array.isArray(e)?e:[],this.syncActiveCompleteFormArray()}),this.searchStateService.clearFiltersRequested$.pipe(Tt(this.destroy$)).subscribe(()=>{this.selectedFilters=[]}),this.searchStateService.bestDealRequested$.pipe(Tt(this.destroy$)).subscribe(()=>this.fetchPricingData(1,this.selectedTabIndex)),this.cartService.refreshComparisonPanel$.pipe(Tt(this.destroy$)).subscribe(()=>this.refreshComparePanel()),this.refreshComparePanel()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onTabSelect(e){e===this.selectedTabIndex||this.isApiCallInProgress||(this.selectedTabIndex=e,this.selectedFilters=[],this.syncActiveCompleteFormArray(e),this.fetchPricingData(1,e))}onSortChange(e){this.orderBy=e,this.fetchPricingData(1,this.selectedTabIndex)}onPageChange(e){this.fetchPricingData(e,this.selectedTabIndex)}onFiltersChanged(e){this.selectedFilters=Array.isArray(e)?e:e?.selectedFilters||[],this.fetchPricingData(1,this.selectedTabIndex)}fetchPricingData(e=1,n=0){if(this.isApiCallInProgress)return;this.syncActiveCompleteFormArray(n);let i=this.buildPricingPayload(e,n);this.currentPage=e,this.isApiCallInProgress=!0,this.loading=!0;let s=Date.now();this.authService.getPricingData(i).subscribe({next:d=>{this.apiResponseTime=Date.now()-s,this.pricingObject=d?.object,this.facets=this.extractFacets(d?.object),this.fallback=d?.object?.IS_FALLBACK??null,this.refreshSidebarFilters(d?.object),this.loading=!1,this.isApiCallInProgress=!1,this.scrollToPricing(),this.refreshView()},error:d=>{this.loading=!1,this.isApiCallInProgress=!1,this.notify.showNotification(d?.error?.message,"top",E[d?.error?.status]||"error",d?.error?.status),this.refreshView()}})}addToCart(e){let n={RESOURCE:[{RESOURCE_TYPE:"external",RESOURCE_ID:e?.record_id,QUANTITY:1,SERVICE_DETAILS:e,USER_INPUT:this.getUserInputs(e)}]};this.loading=!0,this.cartService.addItemToCart(n).subscribe({next:i=>{this.loading=!1,i?.status===200&&(this.cartService.cartUpdated$.next(),this.router.navigate(["/admin-dashboard/cloud-atler/order-billing"])),this.refreshView()},error:i=>{this.loading=!1,this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]||"error",i?.error?.status),this.refreshView()}})}viewDetails(e){this.router.navigate(["/admin-dashboard/cloud-atler/service",pu(e)])}toggleCompare(e){let n=this.compareInstances.find(s=>s?.RESOURCE_ID===e?.record_id||s?.record_id===e?.record_id);if(n){this.removeCompare(n);return}if(this.compareInstances.length>=3){this.notify.showNotification("You can compare up to 3 resources.","top","warning",400);return}let i={RESOURCE:[{RESOURCE_TYPE:"external",RESOURCE_ID:e?.record_id,SERVICE_DETAILS:e,USER_INPUT:this.getUserInputs(e)}]};this.loading=!0,this.cartService.addToComparison(i).subscribe({next:s=>{this.loading=!1,s?.status===200&&(this.refreshComparePanel(),this.cartService.triggerComparisonRefresh()),this.refreshView()},error:s=>{this.loading=!1,this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]||"error",s?.error?.status),this.refreshView()}})}
12removeCompare(e){if(e?.ID){this.cartService.removeComparison({ID:[e.ID]}).subscribe({next:i=>{Array.isArray(i?.object)&&(this.compareInstances=[...i.object],this.saveCompareInstances(this.compareInstances),this.resultsComponent?.loadCompareInstances(),this.refreshView())},error:i=>{this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]||"error",i?.error?.status)}});return}let n=this.getCompareRecordId(e);this.compareInstances=this.compareInstances.filter(i=>this.getCompareRecordId(i)!==n),this.saveCompareInstances(this.compareInstances),this.resultsComponent?.loadCompareInstances(),this.refreshView()}goToComparison(){if(this.compareInstances.length<2){this.notify.showNotification("Select at least 2 resources to compare.","top","warning",400);return}let e=this.compareInstances.map(n=>{let i=this.getCompareDocument(n),s=vi(i?.service_provider||""),d=vi(i?.product_name||""),m=i?.id||n?.ID||"",f=i?.record_id||this.getCompareRecordId(n);return`${s}-${d}--${m}--${f}`}).filter(Boolean).join("--vs--");this.router.navigate(["/admin-dashboard/cloud-atler/compare",e||"selected"])}backToSearch(){this.searchStateService.clearState(),this.pricingObject=null,this.facets=[],this.selectedFilters=[],this.activeCompleteFormArray=[]}isCompareSelected(e){return this.compareInstances.some(n=>this.getCompareRecordId(n)===e?.record_id)}providerIcon(e){return du(this.getCompareDocument(e)?.service_provider)}buildPricingPayload(e,n){let s=!!!this.searchKeyword?.trim()&&this.formArray?.length?[this.formArray[n]||this.formArray[0]].filter(Boolean):[],d=this.transformFiltersForAPI(this.selectedFilters);return{QUERY:this.searchKeyword||"",FILTERS:s.length?[...s,...d]:d,PRICE_RANGE:{FROM:null,TO:null},ORDER_BY:this.orderBy,PAGE:1,LIMIT:this.limit*e,FALLBACK:this.fallback}}transformFiltersForAPI(e){let n=[];return e.forEach(i=>
12{Object.keys(i).forEach(s=>{let d=i[s];if(!d?.length)return;let m=n.find(f=>f[s]);m?m[s]=[...new Set([...m[s],...d])]:n.push({[s]:[...d]})})}),n}extractFacets(e){return Array.isArray(e?.RESULT?.[0]?.facet_counts)?e.RESULT[0].facet_counts:Array.isArray(e?.facet_counts)?e.facet_counts:Array.isArray(e?.results?.[0]?.facet_counts)?e.results[0].facet_counts:[]}refreshSidebarFilters(e){setTimeout(()=>{this.filtersSidebar&&(this.filtersSidebar.updateServiceContext(this.extractServiceContext(e)),this.filtersSidebar.getPricingFilters())},0)}extractServiceContext(e){let n=e?.RESULT?.[0]?.facet_counts||e?.results?.[0]?.facet_counts;if(Array.isArray(n)){let s=(n.find(d=>d?.field_name==="product_name")?.counts||[]).map(d=>d?.value).filter(Boolean);return{productName:s.length?s:null}}if(Array.isArray(e?.facet_counts)){let s=(e.facet_counts.find(d=>d?.field_name==="product_name")?.counts||[]).map(d=>d?.value).filter(Boolean);return{productName:s.length?s:null}}return{productName:null}}buildServiceTabs(){this.serviceTabs=(this.formArray||[]).map((e,n)=>{let i=e?.service_type?.[0]||e?.SERVICE_TYPE?.[0]||e?.selectedService;return i?this.formatText(i):`Search ${n+1}`})}syncActiveCompleteFormArray(e=this.selectedTabIndex){if(this.searchKeyword?.trim()){this.activeCompleteFormArray=[];return}let n=Array.isArray(this.completeFormArray)?this.completeFormArray:[];if(!n.length){this.activeCompleteFormArray=[];return}let i=Number.isInteger(e)&&e>=0&&e<n.length?e:0,s=n[i];this.activeCompleteFormArray=s?[s]:[]}refreshComparePanel(){let e=this.getStoredCompareInstances();e.length>0?this.cartService.getComparisonData().subscribe({next:n=>{Array.isArray(n?.object)&&this.addResourceToComparison(e)},error:n=>{this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]||"error",n?.error?.status)}}):this.cartService.getComparisonData().subscribe({next:n=>{Array.isArray(n?.object)&&(this.compareInstances=[...n.object],this.saveCompareInstances(this.compareInstances),this.resultsComponent?.loadCompareInstances(),this.refreshView())},error:n=>{this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]||"error",n?.error?.status)}})}addResourceToComparison(e){let n=e.map(i=>({RECORD_ID:this.getCompareRecordId(i),DOCUMENT:this.getCompareDocument(i)})).filter(i=>i.RECORD_ID&&i.DOCUMENT);if(!n.length){this.compareInstances=[],this.saveCompareInstances([]),this.refreshView();return}this.cartService.addToComparison({RESOURCE:n}).subscribe({next:i=>{Array.isArray(i?.object)&&(this.compareInstances=[...i.object],this.saveCompareInstances(this.compareInstances),this.resultsComponent?.loadCompareInstances(),this.refreshView())},error:i=>{this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]||"error",i?.error?.status)}})}getStoredCompareInstances(){if(typeof window>"u")return[];try{let e=window.localStorage.getItem("COMPARE_INSTANCES")||"[]",n=e?JSON.parse(e):[];return Array.isArray(n)?n:[]}catch(e){return[]}}saveCompareInstances(e){typeof window<"u"&&window.localStorage.setItem("COMPARE_INSTANCES",JSON.stringify(e||[]))}getCompareRecordId(e){return e?.RECORD_ID||e?.RESOURCE_ID||e?.DOCUMENT?.record_id||e?.SERVICE_DETAILS?.record_id||e?.record_id}getCompareDocument(e){return e?.DOCUMENT||e?.SERVICE_DETAILS||e}getUserInputs(e){let n=this.activeCompleteFormArray?.[0]||{};return e?.product_name==="object-storage"?{storage_amount_per_month:n.storageAmount||500,retieval_amount_per_month:n.retrievalAmount||500,read_requests_per_month:n.readRequests||1e4,write_requests_per_month:n.writeRequests||1e4}:e?.product_name==="Serverless Function"?{number_of_requests:n.noOfRequest||1e6,duration_of_request:n.durationOfRequest||300,amount_of_memory:n.amountOfMemory||256}:{}}scrollToPricing(){setTimeout(()=>document.getElementById("cloudAtlerPricingContent")?.scrollIntoView({behavior:"smooth",block:"start"}),100)}refreshView(){this.ngZone.run(()=>this.cdr.detectChanges())}formatText(e){return e?e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase()):""}static{this.\u0275fac=function(n){return new(n||t)(y(Kt),y(Cn),y(Rn),y(V),y(G),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-cost-analysis"]],viewQuery:function(n,i){if
vendor: 4,305 bytes, line 12
12(n&1&&bt(Bl,5)(jl,5),n&2){let s;ht(s=_t())&&(i.resultsComponent=s.first),ht(s=_t())&&(i.filtersSidebar=s.first)}},decls:2,vars:2,consts:[["class","overlay",4,"ngIf"],["class","cloud-results-shell","id","cloudAtlerPricingContent",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["id","cloudAtlerPricingContent",1,"cloud-results-shell"],[1,"cloud-results-shell__header"],["type","button",1,"cloud-results-shell__back",3,"click"],["icon","material-symbols:arrow-back-rounded"],[1,"cloud-results-shell__title"],[1,"cloud-results-shell__spacer"],["class","cloud-results-shell__tabs",4,"ngIf"],["class","cloud-results-shell__body",4,"ngIf"],["class","cloud-results-shell__compare-panel",4,"ngIf"],[1,"cloud-results-shell__tabs"],["type","button","class","cloud-results-shell__tab",3,"cloud-results-shell__tab--active","click",4,"ngFor","ngForOf"],["type","button",1,"cloud-results-shell__tab",3,"click"],[1,"cloud-results-shell__body"],[3,"filtersChanged","loadingChange","facets","selectedFilters"],[3,"sortChanged","pageChanged","compareStateChanged","loadingChange","pricingObject","apiResponseTime","orderBy","currentPage","compareInstances","completeFormArray"],[1,"cloud-results-shell__compare-panel"],[1,"cloud-results-shell__compare-list"],["class","cloud-results-shell__compare-card",4,"ngFor","ngForOf"],["type","button",1,"cloud-results-shell__compare-action",3,"click"],[1,"cloud-results-shell__compare-card"],["alt","provider",3,"src"],[1,"cloud-results-shell__compare-title"],[1,"cloud-results-shell__compare-subtitle"],["type","button",3,"click"],["icon","material-symbols:close"]],template:function(n,i){n&1&&g(0,w4,4,0,"div",0)(1,k4,12,3,"section",1),n&2&&(p("ngIf",i.loading),c(),p("ngIf",i.pricingObject))},dependencies:[N,$,B,z,jl,Bl],styles:[".cloud-results-shell[_ngcontent-%COMP%]{position:relative;width:100%;background:#f8fafc;color:#0f172a;border-top:1px solid #e2e8f0}.cloud-results-shell__header[_ngcontent-%COMP%]{height:64px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 34px;border-bottom:1px solid #e2e8f0;background:#fff}.cloud-results-shell__back[_ngcontent-%COMP%]{width:fit-content;display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:#334155;font-size:14px;cursor:pointer}.cloud-results-shell__title[_ngcontent-%COMP%]{font-size:18px;font-weight:700;text-align:center}.cloud-results-shell__tabs[_ngcontent-%COMP%]{display:flex;gap:10px;padding:18px 34px 0}.cloud-results-shell__tab[_ngcontent-%COMP%]{border:1px solid #d8e6ef;border-radius:999px;padding:8px 18px;background:#fff;color:#475569;font-size:13px;font-weight:600;cursor:pointer}.cloud-results-shell__tab--active[_ngcontent-%COMP%]{border-color:#1698c7;background:#1698c7;color:#fff}.cloud-results-shell__body[_ngcontent-%COMP%]{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;padding:32px 24px}.cloud-results-shell__compare-panel[_ngcontent-%COMP%]{position:sticky;bottom:0;z-index:7;place-self:end;width:75%;display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:78px;padding:10px 22px;border:1px solid #d6dce3;border-radius:28px 28px 0 0;background:#fff;box-shadow:0 -8px 24px #0f172a1a}.cloud-results-shell__compare-list[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;overflow:auto}.cloud-results-shell__compare-card[_ngcontent-%COMP%]{min-width:190px;display:grid;grid-template-columns:28px 1fr 18px;align-items:center;gap:10px;padding:14px 12px;border-radius:8px;background:#f8fafc}.cloud-results-shell__compare-card[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:26px;height:26px;object-fit:contain}.cloud-results-shell__compare-card[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border:0;background:transparent;color:#64748b;font-size:16px;cursor:pointer}.cloud-results-shell__compare-title[_ngcontent-%COMP%]{font-size:13px;font-weight:700}.cloud-results-shell__compare-subtitle[_ngcontent-%COMP%]{color:#64748b;font-size:12px;font-weight:600}.cloud-results-shell__compare-action[_ngcontent-%COMP%]{min-width:145px;height:38px;border:0;border-radius:6px;background:#2ea7df;color:#fff;font-size:14px;font-weight:700;cursor:pointer}"]})}}return t})();var dn=()=>[];function N4(t,r){t&1&&(o(0,"div",16)(1,"div",17)(2,"div",18),h(3,"span",19),a()()())}
12function F4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("value",e),c(),x(" ",n.formatText(e)," ")}}function z4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("value",e),c(),x(" ",n.formatText(e)," ")}}function L4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function V4(t,r){if(t&1){let e=A();o(0,"mat-form-field",45)(1,"mat-label"),l(2,"Instance Family"),a(),o(3,"mat-select",46),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectInstance(i.value,s))}),g(4,L4,2,2,"mat-option",35),a()()}if(t&2){let e=u().index,n=u(2);c(4),p("ngForOf",n.categoryInstancesMap[e]||J(1,dn))}}function B4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),C(e)}}function U4(t,r){if(t&1){let e=A();o(0,"mat-form-field",47)(1,"mat-label"),l(2,"vCPUs"),a(),o(3,"mat-select",48),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectvCPU(i.value,s))}),g(4,B4,2,2,"mat-option",35),a()()}if(t&2){let e=u().index,n=u(2);c(4),p("ngForOf",n.vCPUMap[e]||J(1,dn))}}function j4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),C(e)}}function $4(t,r){if(t&1){let e=A();o(0,"mat-form-field",47)(1,"mat-label"),l(2,"RAM"),a(),o(3,"mat-select",49),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectRAM(i.value,s))}),g(4,j4,2,2,"mat-option",35),a()()}if(t&2){let e=u().index,n=u(2);c(4),p("ngForOf",n.RAMMap[e]||J(1,dn))}}function q4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function H4(t,r){if(t&1){let e=A();o(0,"mat-form-field",45)(1,"mat-label"),l(2,"Region"),a(),o(3,"mat-select",50),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectRegion(i.value,s))}),o(4,"mat-option",51)(5,"input",52),v("click",function(i){return i.stopPropagation()})("keydown",function(i){return i.stopPropagation()})("input",function(i){O(e);let s=u().index,d=u(2);return P(d.filterRegion(s,i))}),a(),o(6,"mat-icon",53),v("click",function(){O(e);let i=u().index,s=u(2);return P(s.onRegionSearchClear(i))}),l(7,"close"),a()(),g(8,q4,2,2,"mat-option",35),a()()}if(t&2){let e=u().index,n=u(2);c(8),p("ngForOf",n.filteredRegionsMap[e]||J(1,dn))}}function W4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function G4(t,r){if(t&1){let e=A();o(0,"mat-form-field",45)(1,"mat-label"),l(2,"City"),a(),o(3,"mat-select",54),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectCity(i.value,s))}),o(4,"mat-option",51)(5,"input",52),v("click",function(i){return i.stopPropagation()})("keydown",function(i){return i.stopPropagation()})("input",function(i){O(e);let s=u().index,d=u(2);return P(d.filterCity(s,i))}),a(),o(6,"mat-icon",53),v("click",function(){O(e);let i=u().index,s=u(2);return P(s.onCitySearchClear(i))}),l(7,"close"),a()(),g(8,W4,2,2,"mat-option",35),a()()}if(t&2){let e=u().index,n=u(2);c(8),p("ngForOf",n.filteredCitiesMap[e]||J(1,dn))}}function Y4(t,r){if(t&1){let e=A();o(0,"button",40),v("click",function(){O(e);let i=u().index,s=u(2);return P(s.removeCompare(i))}),h(1,"iconify-icon",55),a()}}function K4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function Q4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function J4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),x(" ",e," ")}}function Z4(t,r){if(t&1&&(o(0,"mat-option",44),l(1),a()),t&2){let e=r.$implicit;p("value",e),c(),C(e)}}function X4(t,r){if(t&1){let e=A();o(0,"div",32)(1,"mat-form-field",45)(2,"mat-label"),l(3,"Region"),a(),o(4,"mat-select",50),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectRegion(i.value,s))}),o(5,"mat-option",51)(6,"input",52),v("click",function(i){return i.stopPropagation()})("keydown",function(i){return i.stopPropagation()})("input",function(i){O(e);let s=u().index,d=u(2);return P(d.filterRegion(s,i))}),a(),o(7,"mat-icon",53),v("click",function(){O(e);let i=u().index,s=u(2);return P(s.onRegionSearchClear(i))}),l(8,"close"),a()(),g(9,K4,2,2,"mat-option",35),a()(),o(10,"mat-form-field",45)(11,"mat-label"),l(12,"City"),a(),o(13,"mat-select",54),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectCity(i.value,s))}),o(14,"mat-option",51)(15,"input",52),v("click",function(i){return i.stopPropagation()})("keydown",function(i){return i.stopPropagation()})("input",function(i){O(e);let s=u().index,d=u(2);return P(d.filterCity(s,i))}),a(),o(16,"mat-icon",53),v("click",function(){O(e);let i=u().index,s=u(2);return P(s.onCitySearchClear(i))}),l(17,"close"),a()(),g(18,Q4,2,2,"mat-option",35),a()(),o(19,"mat-form-field",45)(20,"mat-label"),l(21,"Operating System"),a(),o(22,"mat-select",56),v("selectionChange",function(i){O(e);let s=u().index,d=u(2);return P(d.selectOS(i.value,s))}),g(23,J4,2,2,"mat-option",35),a()(),o(24,"mat-form-field",45)(25,"mat-label"),l(26,"Host Type"),a(),o(27,"mat-select",57),g(28,Z4,2,2,"mat-option",35),a()()()}if(t&2){let e=u().index,n=u(2);c(9),p("ngForOf",n.filteredRegionsMap[e]||J(4,dn)),c(9),p("ngForOf",n.filteredCitiesMap[e]||J(5,dn)),c(5
12),p("ngForOf",n.operatingSystemsMap[e]||J(6,dn)),c(5),p("ngForOf",n.hostTypesMap[e]||J(7,dn))}}function e3(t,r){t&1&&(o(0,"div",32)(1,"mat-form-field",45)(2,"mat-label"),l(3,"Storage Amount/Mo"),a(),h(4,"input",58),a(),o(5,"mat-form-field",45)(6,"mat-label"),l(7,"Retrieval Amount/Mo"),a(),h(8,"input",59),a(),o(9,"mat-form-field",45)(10,"mat-label"),l(11,"Read Request/Mo"),a(),h(12,"input",60),a(),o(13,"mat-form-field",45)(14,"mat-label"),l(15,"Write Request/Mo"),a(),h(16,"input",61),a()())}function t3(t,r){t&1&&(o(0,"div",32)(1,"mat-form-field",45)(2,"mat-label"),l(3,"No. of Request"),a(),h(4,"input",62),a(),o(5,"mat-form-field",45)(6,"mat-label"),l(7,"Duration of Request (ms)"),a(),h(8,"input",63),a(),o(9,"mat-form-field",45)(10,"mat-label"),l(11,"Amount of Memory/MB"),a(),h(12,"input",64),a()())}function n3(t,r){if(t&1){let e=A();o(0,"div",29)(1,"div",30)(2,"div",31)(3,"div",32)(4,"mat-form-field",33)(5,"mat-label"),l(6,"Service Type"),a(),o(7,"mat-select",34),v("selectionChange",function(i){let s=O(e).index,d=u(2);return P(d.selectServiceType(i.value,s))}),g(8,F4,2,2,"mat-option",35),a()(),o(9,"mat-form-field",33)(10,"mat-label"),l(11,"Product Name"),a(),o(12,"mat-select",36),v("selectionChange",function(i){let s=O(e).index,d=u(2);return P(d.selectProductName(i.value,s))}),g(13,z4,2,2,"mat-option",35),a()(),g(14,V4,5,2,"mat-form-field",37)(15,U4,5,2,"mat-form-field",38)(16,$4,5,2,"mat-form-field",38)(17,H4,9,2,"mat-form-field",37)(18,G4,9,2,"mat-form-field",37),a(),o(19,"div",39)(20,"button",40),v("click",function(){let i=O(e).index,s=u(2);return P(s.resetCompare(i))}),h(21,"iconify-icon",41),a(),g(22,Y4,2,0,"button",42),a()(),g(23,X4,29,8,"div",43)(24,e3,17,0,"div",43)(25,t3,13,0,"div",43),a()()}if(t&2){let e,n,i,s,d,m,f,_,b,M,S=r.index,w=u(2);p("formGroupName",S),c(4),p("ngClass",((e=w.getCompare()[S])==null||(e=e.get("selectedService"))==null?null:e.value)==="compute"?"cloud-search__field--service":"cloud-search__field"),c(4),p("ngForOf",w.serviceTypes||J(14,dn)),c(),p("ngClass",((n=w.getCompare()[S])==null||(n=n.get("selectedService"))==null?null:n.value)==="compute"?"cloud-search__field--service":"cloud-search__field"),c(4),p("ngForOf",w.categoryProductsMap[S]||J(15,dn)),c(),p("ngIf",((i=w.getCompare()[S])==null||(i=i.get("selectedService"))==null?null:i.value)==="compute"),c(),p("ngIf",((s=w.getCompare()[S])==null||(s=s.get("selectedService"))==null?null:s.value)==="compute"),c(),p("ngIf",((d=w.getCompare()[S])==null||(d=d.get("selectedService"))==null?null:d.value)==="compute"),c(),p("ngIf",((m=w.getCompare()[S])==null||(m=m.get("selectedService"))==null?null:m.value)!=="compute"),c(),p("ngIf",((f=w.getCompare()[S])==null||(f=f.get("selectedService"))==null?null:f.value)!=="compute"),c(4),p("ngIf",!w.isRemoveDisabled(S)),c(),p("ngIf",((_=w.getCompare()[S])==null||(_=_.get("selectedService"))==null?null:_.value)==="compute"),c(),p("ngIf",((b=w.getCompare()[S])==null||(b=b.get("selectedService"))==null?null:b.value)==="storage"&&((b=w.getCompare()[S])==null||(b=b.get("selectedProduct"))==null?null:b.value)==="object-storage"),c(),p("ngIf",((M=w.getCompare()[S])==null||(M=M.get("selectedService"))==null?null:M.value)==="serverless"&&((M=w.getCompare()[S])==null||(M=M.get("selectedProduct"))==null?null:M.value)==="Serverless Function")}}function i3(t,r){if(t&1){let e=A();o(0,"div",20)(1,"div",21),h(2,"iconify-icon",22),o(3,"label"),l(4,"Search for your cloud services"),a()(),o(5,"form",23)(6,"div",24),g(7,n3,26,16,"div",25),a()(),o(8,"div",26)(9,"div")(10,"button",27),v("click",function(){O(e);let i=u();return P(i.compareServices())}),l(11," Get Best Deal "),a()(),o(12,"div")(13,"button",28),v("click",function(){O(e);let i=u();return P(i.addCompare())}),o(14,"mat-icon"),l(15,"add"),a(),l(16," Add More "),a()()()()}if(t&2){let e=u();c(5),p("formGroup",e.compareForm),c(2),p("ngForOf",e.getCompare()||J(4,dn)),c(3),p("disabled",!e.compareForm.valid),c(3),p("disabled",e.compareArrayLength>=5)}}function o3(t,r){if(t&1){let e=A();o(0,"div",69),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.selectSuggestion(i))}),l(1),a()}if(t&2){let e=r.$implicit;c(),x(" ",e," ")}}function r3(t,r){if(t&1&&(o(0,"div",65)(1,"div",66),l(2,"Popular Searches: "),a(),o(3,"div",67),g(4,o3,2,1,"div",68),a()()),t&2){let e=u();c(4),p("ngForOf",e.searchSuggestions||J(1,dn))}}function a3(t,r){t&1&&h(0,"app-cloud-atler-cost-analysis")}function l3(t,r){t&1&&(o(0,"span"),l(1,"Request for Access"),a())}function s3(t,r){t&1&&(o(0,"span",76),l(1,"Requesting... "),h(2,"iconify-icon",77),a())}function c3(t,r){if(t&1){let e=A();o(0,"section",70)(1,"div",71)(2,"div",72),h(3,"iconify-icon",73),a(),o(4,"h2"),l(5,"Premium Feature Required"),a(),o(6,"p"),l(7,"To access this feature, upgrade to Premium Plan and unlock all advanced capabilities."),a(),o(8,"button",74),v("click",function(){O(e);let i=u();return P(i.requestAccess())}),g(9,l3,2,0,"span",14)(10,s3,3,0,"span",75),a()()()}if(t&2){let e=u();c(8),p("disabled",e.isAccessLoading),c(),p("ngIf",!e.isAccessLoading),c(),p("ngIf",e.isAccessLoading)}}var gu=(()=>{class t{constructor(e,n,i,s,d,m,f,_,b){this.router=e,this.notify=n,this.fb=i,this.authService=s,this.dashboardService=d,this.searchStateService=m,this.dialog=f,this.ngZone=_,this.cdr=b,this.showResults=!0,this.searchKeyword=new Vt(""),this.autoFillList=[],this.loading=!1,this.show
12Filter=!1,this.filterData=[],this.serviceTypes=[],this.categoryProductsMap={},this.categoryInstancesMap={},this.vCPUMap={},this.RAMMap={},this.regionsMap={},this.filteredRegionsMap={},this.citiesMap={},this.filteredCitiesMap={},this.operatingSystemsMap={},this.hostTypesMap={},this.showMoreFiltersIndices=[],this.searchSuggestions=["Virtual Machine with 4 VCPU and 8 GB RAM","Virtual Machine with 8 VCPU and 16 GB RAM"],this.scrollToPricing=new kt,this.isCloudSaverEnabled=!0,this.isAccessLoading=!1,this.compareForm=this.fb.group({compareArray:this.fb.array([])})}ngOnInit(){this.isCloudSaverEnabled=this.isFeatureEnabled(10),this.isCloudSaverEnabled&&(this.restoreState(),this.getPricingFilters(),this.showMoreFiltersIndices=this.searchStateService.getShowMoreFiltersIndices(),this.searchStateService.showFilterCard$.subscribe(e=>{this.showFilter=e,this.ensureServiceValidation(),this.refreshView()}),this.searchStateService.hasState()||this.addCompare(),this.ensureServiceValidation(),this.searchKeyword.valueChanges.subscribe(e=>{e&&e.length>0&&this.resetCompareFormArrayOnTyping()}))}isFeatureEnabled(e){try{let n=JSON.parse(window.localStorage.getItem("client_info")||"{}"),i=Array.isArray(n?.SERVICE)?n.SERVICE:[];if(!i.length)return!0;let s=i.find(d=>Number(d?.SERVICE?.ID)===Number(e));return!s||s?.SERVICE?.ENABLED_DEFAULT===!0?!0:!!s?.ENABLED}catch(n){return!0}}requestAccess(){this.isAccessLoading=!0,this.dashboardService.requestForService({SERVICE_ID:10}).subscribe({next:e=>{this.isAccessLoading=!1;let n=this.dialog.open(Ft,{width:"500px",disableClose:!0,data:{hideActionButton:!0}});setTimeout(()=>{n.close()},1e4)},error:e=>{this.isAccessLoading=!1,this.notify.showNotification(e.error.message,"top",E[e.error.status]?E[e.error.status]:"error",e.error.status)}})}get compareArrayLength(){return this.compareForm?this.compareForm.get("compareArray").length:0}isRemoveDisabled(e){return this.compareArrayLength<=1}getCompare(){return this.compareForm.get("compareArray").controls}resetCompare(e){let i=this.compareForm.get("compareArray").at(e);["selectedService","selectedProduct","selectedInstance","vCPU","RAM","selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(m=>{let f=i.get(m);f&&(f.reset(),f.setValue(""),f.markAsUntouched(),f.markAsPristine())}),this.resetStorageAndFunctionFieldsToDefaults(e),["storageAmount","retrievalAmount","readRequests","writeRequests","noOfRequest","durationOfRequest","amountOfMemory"].forEach(m=>{let f=i.get(m);f&&(f.clearValidators(),f.updateValueAndValidity())}),i.get("selectedService")?.setValidators([U.required]),i.get("selectedService")?.updateValueAndValidity(),i.get("selectedProduct")?.setValidators([U.required]),i.get("selectedProduct")?.updateValueAndValidity(),this.categoryProductsMap[e]=[],this.categoryInstancesMap[e]=[],this.vCPUMap[e]=[],this.RAMMap[e]=[],this.regionsMap[e]=[],this.filteredRegionsMap[e]=[],this.citiesMap[e]=[],this.filteredCitiesMap[e]=[],this.operatingSystemsMap[e]=[],this.hostTypesMap[e]=[],i.markAsUntouched(),i.markAsPristine(),i.updateValueAndValidity()}
12removeCompare(e){this.compareForm.get("compareArray").removeAt(e),this.reorganizeMaps(e)}addCompare(){this.compareForm.get("compareArray").length<5&&(this.compareForm.get("compareArray").push(this.createCompareGroup()),this.ensureServiceValidation())}getPricingFilters(e,n){let i=e||{SERVICE_TYPE:[],PRODUCT_NAME:[],INSTANCE_FAMILY:[],VCPU_CORES:[],RAM_GB:[],CS_REGION:[],CS_CITY:[],OS_TYPE:[],HOST_TYPE:[]};this.authService.getFilters(i).subscribe({next:s=>{this.loading=!1,this.filterData=s.object?.results?.[0]?.facet_counts||[],e?n!==void 0&&this.populateDropdownFromResponse(e,n):this.serviceTypes=this.filterData.find(d=>d.field_name==="service_type")?.counts.map(d=>d.value)||[],this.refreshView()},error:s=>{this.loading=!1,this.showError(s),this.refreshView()}})}populateDropdownFromResponse(e,n){if(e.SERVICE_TYPE.length>0&&e.PRODUCT_NAME.length===0)this.categoryProductsMap[n]=this.filterData.find(i=>i.field_name==="product_name")?.counts.map(i=>i.value)||[];else if(e.SERVICE_TYPE[0]==="compute"&&e.PRODUCT_NAME.length>0&&e.INSTANCE_FAMILY.length===0)this.categoryInstancesMap[n]=this.filterData.find(i=>i.field_name==="instance_family")?.counts.map(i=>i.value)||[];else if(e.SERVICE_TYPE[0]!=="compute"&&e.PRODUCT_NAME.length>0&&e.CS_REGION.length===0)this.regionsMap[n]=this.filterData.find(i=>i.field_name==="cs_region")?.counts.map(i=>i.value)||[],this.filteredRegionsMap[n]=[...this.regionsMap[n]];else if(e.INSTANCE_FAMILY.length>0&&e.VCPU_CORES.length===0){let i=this.filterData.find(s=>s.field_name==="vcpu_cores")?.counts.map(s=>s.value)||[];this.vCPUMap[n]=[...i].sort((s,d)=>(parseFloat(String(s))||0)-(parseFloat(String(d))||0))}else if(e.VCPU_CORES.length>0&&e.RAM_GB.length===0){let i=this.filterData.find(s=>s.field_name==="ram_gb")?.counts.map(s=>s.value)||[];this.RAMMap[n]=[...i].sort((s,d)=>(parseFloat(String(s))||0)-(parseFloat(String(d))||0))}else if(e.RAM_GB.length>0&&e.CS_REGION.length===0)this.regionsMap[n]=this.filterData.find(i=>i.field_name==="cs_region")?.counts.map(i=>i.value)||[],this.filteredRegionsMap[n]=[...this.regionsMap[n]];else if(e.CS_REGION.length>0&&e.CS_CITY.length===0)this.citiesMap[n]=this.filterData.find(i=>i.field_name==="cs_city")?.counts.map(i=>i.value)||[],this.filteredCitiesMap[n]=[...this.citiesMap[n]];else if(e.CS_CITY.length>0&&e.OS_TYPE.length===0)this.operatingSystemsMap[n]=this.filterData.find(i=>i.field_name==="os_type")?.counts.map(i=>i.value)||[];else if(e.OS_TYPE.length>0&&e.HOST_TYPE.length===0){let i=this.filterData.find(s=>s.field_name==="host_type")?.counts.map(s=>s.value)||[];this.hostTypesMap[n]=i.map(s=>this.formatText(String(s)))}}selectServiceType(e,n){this.searchKeyword.setValue(""),this.resetDependentFields(n),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:[e]}),n),this.updateConditionalValidation(n)}resetDependentFields(e){let i=this.compareForm.get("compareArray").at(e);["selectedProduct","selectedInstance","vCPU","RAM","selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(s=>i.get(s)?.reset()),this.resetStorageAndFunctionFieldsToDefaults(e),this.categoryProductsMap[e]=[],this.categoryInstancesMap[e]=[],this.vCPUMap[e]=[],this.RAMMap[e]=[],this.regionsMap[e]=[],this.filteredRegionsMap[e]=[],this.citiesMap[e]=[],this.filteredCitiesMap[e]=[],this.operatingSystemsMap[e]=[],this.hostTypesMap[e]=[]}selectProductName(e,n){let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value;["selectedInstance","vCPU","RAM","selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(d=>i.at(n).get(d)?.reset()),this.resetStorageAndFunctionFieldsToDefaults(n),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:[e]}),n),this.updateConditionalValidation(n)}selectInstance(e,n){let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value;["vCPU","RAM","selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(m=>i.at(n).get(m)?.reset()),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:[e]}),n)}
12selectvCPU(e,n){let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value,m=i.at(n).get("selectedInstance")?.value;["RAM","selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(f=>i.at(n).get(f)?.reset()),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:m?[m]:[],VCPU_CORES:[e]}),n)}selectRAM(e,n){let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value,m=i.at(n).get("selectedInstance")?.value,f=i.at(n).get("vCPU")?.value;["selectedRegion","selectedCity","selectedOS","selectedHost"].forEach(_=>i.at(n).get(_)?.reset()),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:m?[m]:[],VCPU_CORES:f?[f]:[],RAM_GB:[e]}),n)}selectRegion(e,n){this.filteredRegionsMap[n]=[...this.regionsMap[n]||[]];let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value,m=i.at(n).get("selectedInstance")?.value,f=i.at(n).get("vCPU")?.value,_=i.at(n).get("RAM")?.value;["selectedCity","selectedOS","selectedHost"].forEach(b=>i.at(n).get(b)?.reset()),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:m?[m]:[],VCPU_CORES:f?[f]:[],RAM_GB:_?[_]:[],CS_REGION:[e]}),n)}selectCity(e,n){this.filteredCitiesMap[n]=[...this.citiesMap[n]||[]];let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value,m=i.at(n).get("selectedInstance")?.value,f=i.at(n).get("vCPU")?.value,_=i.at(n).get("RAM")?.value,b=i.at(n).get("selectedRegion")?.value;["selectedOS","selectedHost"].forEach(M=>i.at(n).get(M)?.reset()),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:m?[m]:[],VCPU_CORES:f?[f]:[],RAM_GB:_?[_]:[],CS_REGION:b?[b]:[],CS_CITY:[e]}),n)}selectOS(e,n){let i=this.compareForm.get("compareArray"),s=i.at(n).get("selectedService")?.value,d=i.at(n).get("selectedProduct")?.value,m=i.at(n).get("selectedInstance")?.value,f=i.at(n).get("vCPU")?.value,_=i.at(n).get("RAM")?.value,b=i.at(n).get("selectedRegion")?.value,M=i.at(n).get("selectedCity")?.value;i.at(n).get("selectedHost")?.reset(),this.loading=!0,this.getPricingFilters(this.createFilterParams({SERVICE_TYPE:s?[s]:[],PRODUCT_NAME:d?[d]:[],INSTANCE_FAMILY:m?[m]:[],VCPU_CORES:f?[f]:[],RAM_GB:_?[_]:[],CS_REGION:b?[b]:[],CS_CITY:M?[M]:[],OS_TYPE:[e]}),n)}showMoreFilters(e){this.showMoreFiltersIndices?.includes(e)?this.showMoreFiltersIndices=this.showMoreFiltersIndices.filter(n=>n!==e):this.showMoreFiltersIndices.push(e),this.searchStateService.setShowMoreFiltersIndices(this.showMoreFiltersIndices)}filterRegion(e,n){let i=n.target.value,s=this.regionsMap[e]||[];if(!i){this.filteredRegionsMap[e]=[...s];return}this.filteredRegionsMap[e]=s.filter(d=>String(d).toLowerCase().includes(i.toLowerCase()))}filterCity(e,n){let i=n.target.value,s=this.citiesMap[e]||[];if(!i){this.filteredCitiesMap[e]=[...s];return}this.filteredCitiesMap[e]=s.filter(d=>String(d).toLowerCase().includes(i.toLowerCase()))}onRegionSearchClear(e){this.filteredRegionsMap[e]=[...this.regionsMap[e]||[]]}onCitySearchClear(e){this.filteredCitiesMap[e]=[...this.citiesMap[e]||[]]}getAutofillList(e){this.authService.getAutofillList(e).subscribe({next:n=>{this.autoFillList=n.object?.results?.[0]?.hits||[],this.refreshView()},error:n=>{this.showError(n),this.refreshView()}})}onSelectionChange(e){this.searchKeyword.setValue(e.option.value),this.resetCompareFormArrayOnTyping(),this.compareServices()}selectSuggestion(e){this.searchKeyword.setValue(e),this.resetCompareFormArrayOnTyping(),this.compareServices()}onSearchEnter(){(this.searchKeyword.value||"").length>=2&&(this.resetCompareFormArrayOnTyping(),this.compareServices())}resetCompareFormArrayOnTyping(){this.compareForm.get("compareArray").controls.forEach((n,i)=>{this.resetCompare(i)}),this.searchStateService.setCompleteFormArray([])}
12showFilterCard(){this.showFilter=!this.showFilter,this.searchStateService.setShowFilterCard(this.showFilter),this.ensureServiceValidation(),this.saveState()}compareServices(){this.ensureServiceValidation();let e=[],n=[];if(!this.isKeywordSearchMode()){let i=this.compareForm.value.compareArray;i&&i.length>0&&i.forEach(s=>{if(!s.selectedService)return;let d={};s.selectedService&&(d.service_type=[s.selectedService]),s.selectedProduct&&(d.product_name=[s.selectedProduct]),s.selectedInstance&&(d.instance_family=[s.selectedInstance]),s.vCPU&&(d.vcpu_cores=[s.vCPU]),s.RAM&&(d.ram_gb=[s.RAM]),s.selectedRegion&&(d.cs_region=[s.selectedRegion]),s.selectedCity&&(d.cs_city=[s.selectedCity]),s.selectedOS&&(d.os_type=[s.selectedOS]),s.selectedHost&&(d.host_type=[s.selectedHost]);let m=Ke({},d);s.storageAmount&&(m.storage_amount=[s.storageAmount]),s.retrievalAmount&&(m.retrieval_amount=[s.retrievalAmount]),s.readRequests&&(m.read_requests=[s.readRequests]),s.writeRequests&&(m.write_requests=[s.writeRequests]),s.noOfRequest&&(m.no_of_request=[s.noOfRequest]),s.durationOfRequest&&(m.duration_of_request=[s.durationOfRequest]),s.amountOfMemory&&(m.amount_of_memory=[s.amountOfMemory]),e.push(d),n.push(m)})}this.saveState(),this.searchStateService.requestFilterClear(),this.searchStateService.setFormArray(e),this.searchStateService.setCompleteFormArray(n),this.searchStateService.setSearchKeyword(this.searchKeyword.value||""),this.scrollToPricing.emit(),this.router.url!=="/admin-dashboard/cloud-atler"&&this.router.navigate(["/admin-dashboard/cloud-atler"]),this.searchStateService.requestBestDeal()}formatText(e){return e?e.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase()):""}saveState(){this.searchStateService.saveSearchState(this.searchKeyword.value||"",this.compareForm.value,this.categoryProductsMap,this.categoryInstancesMap,this.vCPUMap,this.RAMMap,this.regionsMap,this.citiesMap,this.operatingSystemsMap,this.hostTypesMap,this.showFilter)}restoreState(){this.searchKeyword.setValue(this.searchStateService.getSearchKeyword()),this.showFilter=this.searchStateService.getShowFilterCard();let e=this.searchStateService.getSearchFormState();if(e&&e.compareArray){let n=this.compareForm.get("compareArray");for(;n.length;)n.removeAt(0);e.compareArray.forEach((i,s)=>{n.push(this.createCompareGroup(i)),this.updateConditionalValidation(s)}),this.categoryProductsMap=this.searchStateService.getCategoryProductsMap(),this.categoryInstancesMap=this.searchStateService.getCategoryInstancesMap(),this.vCPUMap=this.searchStateService.getvCPUMap(),this.RAMMap=this.searchStateService.getRAMMap(),this.regionsMap=this.searchStateService.getRegionsMap(),this.filteredRegionsMap=Ke({},this.regionsMap),this.citiesMap=this.searchStateService.getCitiesMap(),this.filteredCitiesMap=Ke({},this.citiesMap),this.operatingSystemsMap=this.searchStateService.getOperatingSystemsMap(),this.hostTypesMap=this.searchStateService.getHostTypesMap(),this.ensureServiceValidation()}}createCompareGroup(e={}){return this.fb.group({selectedService:this.fb.control(e.selectedService||"",[U.required]),selectedProduct:this.fb.control(e.selectedProduct||"",[U.required]),selectedInstance:this.fb.control(e.selectedInstance||""),vCPU:this.fb.control(e.vCPU||""),RAM:this.fb.control(e.RAM||""),selectedRegion:this.fb.control(e.selectedRegion||""),selectedCity:this.fb.control(e.selectedCity||""),selectedOS:this.fb.control(e.selectedOS||""),selectedHost:this.fb.control(e.selectedHost||""),storageAmount:this.fb.control(e.storageAmount||""),retrievalAmount:this.fb.control(e.retrievalAmount||""),readRequests:this.fb.control(e.readRequests||""),writeRequests:this.fb.control(e.writeRequests||""),noOfRequest:this.fb.control(e.noOfRequest||""),durationOfRequest:this.fb.control(e.durationOfRequest||""),amountOfMemory:this.fb.control(e.amountOfMemory||"")})}shouldStorageFieldsBeRequired(e){let i=this.compareForm.get("compareArray").at(e),s=i?.get("selectedService")?.value,d=i?.get("selectedProduct")?.value;return s==="storage"&&d==="object-storage"}shouldFunctionFieldsBeRequired(e){let i=this.compareForm.get("compareArray").at(e),s=i?.get("selectedService")?.value,d=i?.get("selectedProduct")?.value;return s==="serverless"&&d==="Serverless Function"}updateConditionalValidation(e){let i=this.compareForm.get("compareArray").at(e);if(!i)return;let s=this.shouldStorageFieldsBeRequired(e);["storageAmount","retrievalAmount","readRequests","writeRequests"].forEach(m=>{let f=i.get(m);f&&(s?f.setValidators([U.required]):f.clearValidators(),f.updateValueAndValidity())});let d=this.shouldFunctionFieldsBeRequired(e);["noOfRequest","durationOfRequest","amountOfMemory"].forEach(m=>{let f=i.get(m);f&&(d?f.setValidators([U.required]):f.clearValidators(),f.updateValueAndValidity())})}resetStorageAndFunctionFieldsToDefaults(e){let n=this.compareForm.get("compareArray");n.at(e).get("storageAmount")?.setValue("500"),n.at(e).get("retrievalAmount")?.setValue("500"),n.at(e).get("readRequests")?.setValue("10000"),n.at(e).get("writeRequests")?.setValue("10000"),n.at(e).get("noOfRequest")?.setValue("1000000"),n.at(e).get("durationOfRequest")?.setValue("300"),n.at(e).get("amountOfMemory")?.setValue("256")}ensureServiceValidation(){let e=this.compareForm.get("compareArray");
12e&&e.controls&&e.controls.forEach((n,i)=>{let s=n.get("selectedService");s&&(s.setValidators([U.required]),s.updateValueAndValidity());let d=n.get("selectedProduct");d&&(d.setValidators([U.required]),d.updateValueAndValidity()),this.updateConditionalValidation(i)})}isKeywordSearchMode(){return(this.searchKeyword.value||"").trim().length>0}createFilterParams(e){return Ke({SERVICE_TYPE:[],PRODUCT_NAME:[],INSTANCE_FAMILY:[],VCPU_CORES:[],RAM_GB:[],CS_REGION:[],CS_CITY:[],OS_TYPE:[],HOST_TYPE:[]},e)}reorganizeMaps(e){this.categoryProductsMap=this.shiftMapAfterRemoval(this.categoryProductsMap,e),this.categoryInstancesMap=this.shiftMapAfterRemoval(this.categoryInstancesMap,e),this.vCPUMap=this.shiftMapAfterRemoval(this.vCPUMap,e),this.RAMMap=this.shiftMapAfterRemoval(this.RAMMap,e),this.regionsMap=this.shiftMapAfterRemoval(this.regionsMap,e),this.filteredRegionsMap=this.shiftMapAfterRemoval(this.filteredRegionsMap,e),this.citiesMap=this.shiftMapAfterRemoval(this.citiesMap,e),this.filteredCitiesMap=this.shiftMapAfterRemoval(this.filteredCitiesMap,e),this.operatingSystemsMap=this.shiftMapAfterRemoval(this.operatingSystemsMap,e),this.hostTypesMap=this.shiftMapAfterRemoval(this.hostTypesMap,e)}shiftMapAfterRemoval(e,n){let i={};return Object.keys(e).forEach(s=>{let d=parseInt(s,10);d>n?i[d-1]=e[d]:d<n&&(i[d]=e[d])}),i}refreshView(){this.ngZone.run(()=>{this.cdr.detectChanges()})}showError(e){this.notify.showNotification(e?.error?.message||"Unable to load data","top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status)}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(V),y(ze),y(Kt),y(re),y(Cn),y(Se),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-search-panel"]],inputs:{showResults:"showResults"},outputs:{scrollToPricing:"scrollToPricing"},decls:21,vars:9,consts:[[1,"cloud-atler"],[1,"main-content"],["class","overlay",4,"ngIf"],[1,"cloud-search"],[1,"cloud-search__head"],[1,"cloud-search__title"],[1,"cloud-search__lead"],[1,"cloud-search__bar"],["type","text","placeholder","Search for cloud services.... eg: Virtual Machine with 4 VCPU and 8 GB RAM",1,"cloud-search__input",3,"keydown.enter","formControl"],[1,"cloud-search__filter-btn",3,"click"],["icon","bx:filter"],["mat-button","",1,"cloud-search__submit",3,"click","disabled"],["class","cloud-search__filters",4,"ngIf"],["class","cloud-search__suggestions",4,"ngIf"],[4,"ngIf"],["class","feature-lock-overlay",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"cloud-search__filters"],[1,"cloud-search__filters-head"],["icon","tdesign:swap"],[3,"formGroup"],["formArrayName","compareArray",1,"cloud-search__filters-list"],[3,"formGroupName",4,"ngFor","ngForOf"],[1,"cloud-search__filter-actions"],["mat-button","",1,"cloud-search__compare-btn",3,"click","disabled"],["mat-button","",1,"cloud-search__add-btn",3,"click","disabled"],[3,"formGroupName"],[1,"cloud-search__filter-card"],[1,"cloud-search__filter-row"],[1,"cloud-search__product-row"],["appearance","outline",1,"cloud-search__field","cloud-search__mat-field",3,"ngClass"],["formControlName","selectedService",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["formControlName","selectedProduct",3,"selectionChange"],["appearance","outline","class","cloud-search__field cloud-search__mat-field",4,"ngIf"],["appearance","outline","class","cloud-search__field cloud-search__field--number cloud-search__mat-field",4,"ngIf"],[1,"cloud-search__actions"],["mat-icon-button","","type","button",1,"cloud-search__icon-btn",3,"click"],["icon","material-symbols:autorenew-rounded"],["mat-icon-button","","class","cloud-search__icon-btn","type","button",3,"click",4,"ngIf"],["class","cloud-search__product-row",4,"ngIf"],[3,"value"],["appearance","outline",1,"cloud-search__field","cloud-search__mat-field"],["formControlName","selectedInstance",3,"selectionChange"],["appearance","outline",1,"cloud-search__field","cloud-search__field--number","cloud-search__mat-field"],["formControlName","vCPU",3,"selectionChange"],["formControlName","RAM",3,"selectionChange"],["formControlName","selectedRegion",3,"selectionChange"],[1,"cloud-search__select-search-option"],["matInput","","placeholder","Search",1,"cloud-search__select-search-input",3,"click","keydown","input"],[1,"cloud-search__select-clear",3,"click"],["formControlName","selectedCity",3,"selectionChange"],["icon","material-symbols:delete-outline-rounded"],["formControlName","selectedOS",3,"selectionChange"],["formControlName","selectedHost"],["matInput","","type","number","formControlName","storageAmount","min","0"],["matInput","","type","number","formControlName","retrievalAmount","min","0"],["matInput","","type","number","formControlName","readRequests","min","0"],["matInput","","type","number","formControlName","writeRequests","min","0"],["matInput","","type","number","formControlName","noOfRequest","min","0"],["matInput","","type","number","formControlName","durationOfRequest","min","0"],["matInput","","type","number","formControlName","amountOfMemory","min","0"],[1,"cloud-search__suggestions"],[1,"cloud-search__suggestions-title"],[1,"suggestion-list"],["class","suggestion-chip",3,"click",4,"ngFor","ngForOf"],[1,"suggestion-chip",3,"click"],[1,"feature-lock-overlay"],[1,"feature-lock-card"],[1,"feature-lock-icon"],["icon","mdi:crown"],["type","button",1,"feature-lock-btn",3,"click","disabled"],["class","loading-spinner",4,"ngIf"],[1,"loading-spinner"],["icon","mdi:loading",1,"spin"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1),g(2,N4,4,0,"div",2),o(3,"section",3)(4,"div",4)(5,"div",5),l(6,"Best Cloud Deals by Cloud Atler"),a(),o(7,"div",6),l(8," Compare cloud providers, features and pricing to make informed decisions for your business needs "),a(),o(9,"div",7)(10,"input",8),v("keydown.enter",function(){return i.onSearchEnter()}),a(),o(11,"div",9),v("click",function(){return i.showFilterCard()}),h(12,"iconify-icon",10),l(13," Advance Search "),a(),o(14,"button",11),v("click",function(){return i.compareServices()}),o(15,"mat-icon"),l(16,"search"),a()()()(),g(17,i3,17,5,"div",12)(18,r3,5,2,"div",13),a()(),g(19,a3,1,0,"app-cloud-atler-cost-analysis",14)(20,c3,11,3,"
12section",15),a()),n&2&&(Y("is-locked",!i.isCloudSaverEnabled),c(2),p("ngIf",i.loading),c(8),p("formControl",i.searchKeyword),c(4),p("disabled",(i.searchKeyword.value||"").length<2),c(3),p("ngIf",i.showFilter),c(),p("ngIf",i.searchSuggestions.length>0),c(),p("ngIf",i.showResults),c(),p("ngIf",!i.isCloudSaverEnabled))},dependencies:[N,xe,$,B,z,An,ei,rs,ut,Gi,Dn,fe,ue,mn,ve,qi,me,$e,ts,Hi,Ge,We,fr,hr,uu],styles:["[_nghost-%COMP%]{display:block;min-height:100%;background:#f8fafc;color:#475569}[_nghost-%COMP%]     .cloud-search__mat-field .mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative!important}[_nghost-%COMP%]     .cloud-search__mat-field .mat-mdc-floating-label{top:22px!important}[_nghost-%COMP%]     .cloud-search__mat-field .mat-mdc-form-field-flex>.mat-mdc-form-field-infix{padding:10px 0 .4em!important;min-height:45px!important}[_nghost-%COMP%]     .cloud-search__mat-field .mat-mdc-select-value-text{font-size:15px!important}[_nghost-%COMP%]     .cloud-search__mat-field .mdc-text-field--outlined .mdc-floating-label{color:var(--cloud-search-muted-light);font-size:15px}.cloud-search[_ngcontent-%COMP%]{--cloud-search-bg: #f8fafc;--cloud-search-panel: #ffffff;--cloud-search-heading: #0f172a;--cloud-search-text: #475569;--cloud-search-muted: #64748b;--cloud-search-muted-light: #94a3b8;--cloud-search-border: #e2e8f0;--cloud-search-panel-muted: #f1f5f9;--cloud-search-primary: #1a1f3d;--cloud-search-primary-dark: #11152b;--cloud-search-blue: #2563eb;--cloud-search-shadow-sm: 0 10px 30px rgba(15, 23, 42, .08);--cloud-search-shadow-md: 0 20px 50px rgba(15, 23, 42, .1);min-height:100%;padding:80px 40px;background:var(--cloud-search-bg);display:flex;flex-direction:column;align-items:center;gap:25px}.cloud-search[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}.cloud-search[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{cursor:pointer}.cloud-search[_ngcontent-%COMP%]   button[disabled][_ngcontent-%COMP%]{cursor:not-allowed;opacity:.5}.cloud-search[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{display:inline-flex;width:1em;height:1em;vertical-align:middle}.cloud-search__head[_ngcontent-%COMP%]{width:100%;max-width:1180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px}.cloud-search__title[_ngcontent-%COMP%]{color:var(--cloud-search-heading);font-size:32px;font-weight:700;line-height:40px;letter-spacing:-.3px;text-align:center}.cloud-search__lead[_ngcontent-%COMP%]{color:var(--cloud-search-muted);font-size:18px;font-weight:500;line-height:28px;text-align:center}.cloud-search__bar[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;border-radius:16px;box-shadow:var(--cloud-search-shadow-sm)}.cloud-search__input[_ngcontent-%COMP%]{width:100%;height:52px;padding:0 14px;border:1px solid var(--cloud-search-border);border-right:0;border-radius:16px 0 0 16px;background:var(--cloud-search-panel);color:var(--cloud-search-heading);outline:none}.cloud-search__input[_ngcontent-%COMP%]::placeholder{color:var(--cloud-search-muted-light);font-size:15px;font-weight:500}.cloud-search__filter-btn[_ngcontent-%COMP%]{width:200px;height:52px;display:flex;align-items:center;justify-content:center;gap:6px;border-top:1px solid var(--cloud-search-border);border-bottom:1px solid var(--cloud-search-border);background:var(--cloud-search-panel);color:var(--cloud-search-primary);font-size:15px;font-weight:500;cursor:pointer}.cloud-search__filter-btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px}.cloud-search__submit[_ngcontent-%COMP%]{width:52px;height:52px;min-width:52px;border-radius:0 16px 16px 0;background:var(--cloud-search-primary)}.cloud-search__submit[_ngcontent-%COMP%]:hover:not([disabled]){background:var(--cloud-search-primary-dark)}.cloud-search__submit[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#fff;font-size:22px}.cloud-search__suggestions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.cloud-search__suggestions-title[_ngcontent-%COMP%]{color:var(--cloud-search-primary);font-size:14px;font-weight:600}.suggestion-list[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px}.suggestion-chip[_ngcontent-%COMP%]{border-radius:999px;background-color:var(--cloud-search-blue);color:var(--cloud-search-panel);font-size:13px;font-weight:500;padding:6px 14px;cursor:pointer}
12.cloud-search__filters[_ngcontent-%COMP%]{width:min(100%,1180px);padding:20px 25px;border:1px solid var(--cloud-search-border);border-radius:16px;background:var(--cloud-search-panel);box-shadow:var(--cloud-search-shadow-sm);display:flex;flex-direction:column;gap:20px}.cloud-search__filters-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:10px;color:var(--cloud-search-heading);font-size:16px}.cloud-search__filters-head[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:var(--cloud-search-primary);font-size:18px}.cloud-search__filters-head[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-weight:600}.cloud-search__filters-head[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.cloud-search__filters-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.cloud-search__filter-card[_ngcontent-%COMP%]{padding:20px;border:1px solid var(--cloud-search-border);border-radius:14px;background:var(--cloud-search-panel);display:flex;flex-direction:column;gap:20px}.cloud-search__filter-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.cloud-search__product-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:25px}.cloud-search__field[_ngcontent-%COMP%]{width:200px;height:45px}.cloud-search__field--service[_ngcontent-%COMP%]{width:170px}.cloud-search__field--number[_ngcontent-%COMP%]{width:117px}.cloud-search__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.cloud-search__icon-btn[_ngcontent-%COMP%]{color:var(--cloud-search-text)}.cloud-search__icon-btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:22px}.cloud-search__filter-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}.cloud-search__filter-actions[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;flex-direction:row}.cloud-search__compare-btn[_ngcontent-%COMP%]{padding:10px 50px;border-radius:10px;background-color:var(--cloud-search-heading);color:#fff;font-size:14px}.cloud-search__add-btn[_ngcontent-%COMP%]{min-width:auto;padding:10px;border:1px solid var(--cloud-search-heading);border-radius:10px;color:var(--cloud-search-heading);font-size:14px}.cloud-search__select-search-option[_ngcontent-%COMP%]{height:48px}.cloud-search__select-search-input[_ngcontent-%COMP%]{width:calc(100% - 32px);height:34px;border:0;outline:0;color:var(--cloud-search-heading);font-size:14px}.cloud-search__select-clear[_ngcontent-%COMP%]{color:var(--cloud-search-muted);font-size:18px;vertical-align:middle;cursor:pointer}@keyframes _ngcontent-%COMP%_rotate{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_dash{0%{stroke-dasharray:1 150;stroke-dashoffset:0}50%{stroke-dasharray:90 150;stroke-dashoffset:-35}to{stroke-dasharray:90 150;stroke-dashoffset:-124}}.cloud-atler.is-locked[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;filter:blur(3px);opacity:.72}.feature-lock-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#f7f8fb7a;z-index:10}.feature-lock-card[_ngcontent-%COMP%]{width:min(420px,100%);background:#fff;border-radius:16px;padding:36px 28px;text-align:center;box-shadow:0 12px 30px #0f172a14}.feature-lock-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#facc15);margin:0 auto 18px;display:flex;align-items:center;justify-content:center}.feature-lock-icon[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{color:#fff;font-size:30px}.feature-lock-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:#111827;font-size:25px;line-height:32px;font-weight:700}.feature-lock-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:14px auto 24px;color:#4b5563;font-size:16px;line-height:26px;max-width:560px}.feature-lock-btn[_ngcontent-%COMP%]{border:none;border-radius:8px;padding:12px 22px;background:#6366f1;color:#fff;font-size:12px;font-weight:600;cursor:pointer}.feature-lock-btn[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#4f46e5,#4338ca)}@media only screen and (max-width:1250px){.cloud-search[_ngcontent-%COMP%]{padding:25px 20px}.cloud-search__bar[_ngcontent-%COMP%]{width:100%}.cloud-search__suggestions[_ngcontent-%COMP%]{width:100%;align-items:center}.suggestion-list[_ngcontent-%COMP%]{align-items:center;justify-content:center}}"]})}}return t})();var fu=(()=>{class t{constructor(e,n,i,s){this.platformId=e,this.router=n,this.dialogRef=i,this.data=s}ngOnInit(){}returnToHome(){this.dialogRef.close(),this.router.navigate(["/admin-dashboard/cloud-atler"])}static{this.\u0275fac=function(n){return new(n||t)(y(Jn),y(G),y(Et),y(Qt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-order-success"]],decls:12,vars:0,consts:[[1,"content"],["src","assets/images/verified.png"],[1,"message"],[1,"text"],[1,"buttons"],["mat-button","",1,"primary-btn",3,"click"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div"),h(2,"img",1),a(),o(3,"span",2),l(4,"Order Successfully Processed"),a(),o(5,"span",3),l(6,"Thank you for your purchase! Your cloud services have been ordered "),h(7,"br"),l(8," and are being provisioned. You will receive a confirmation email shortly."),a(),o(9,"div",4)(10,"button",5),v("click",function(){return i.returnToHome()}),l(11,"Back to Resources"),a()()())},dependencies:[N,Wi,cs,z,ut],styles:[".primary-btn[_ngcontent-%COMP%]{font-size:16px;font-weight:500;line-height:24px;color:#fff;margin-top:20px;padding:10px 28px;border-radius:8px;
12cursor:pointer;background:#35a5db;border:none}.message[_ngcontent-%COMP%]{color:#111827;width:80%;font-weight:700;font-size:30px;line-height:36px;letter-spacing:0px;text-align:center}.text[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:24px;letter-spacing:0px;text-align:center;color:#4b5563}.content[_ngcontent-%COMP%]{padding:5%;place-items:center;display:flex;flex-direction:column;gap:12px}.buttons[_ngcontent-%COMP%]{display:flex;gap:20px}"]})}}return t})();var $l=()=>[];function d3(t,r){t&1&&(o(0,"div",3)(1,"div",4)(2,"div",5),h(3,"span",6),a()()())}function p3(t,r){if(t&1&&(h(0,"img",41),F(1,"lowercase")),t&2){let e=u().$implicit,n=u(2);p("src","assets/images/"+n.providerIconMap[X(1,1,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)],Qe)}}function m3(t,r){if(t&1&&(h(0,"img",41),F(1,"lowercase")),t&2){let e=u().$implicit,n=u(2);p("src","assets/images/"+n.providerIconMap[X(1,1,e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.service_provider)],Qe)}}function u3(t,r){if(t&1&&(o(0,"div",42),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)}}function g3(t,r){if(t&1&&(o(0,"div",42),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.title)}}function f3(t,r){if(t&1&&(o(0,"div",43),l(1),F(2,"lowercase"),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.providerNameMap[X(2,1,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)]," ")}}function h3(t,r){if(t&1&&(o(0,"div",43),l(1),F(2,"lowercase"),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.providerNameMap[X(2,1,e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.service_provider)]," ")}}function _3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_plan))}}function C3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vm_name)}}function x3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.ram_gb," GB")}}function v3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vcpu_cores," vCPUs")}}function b3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.storage_spec)}}function y3(t,r){if(t&1&&(o(0,"div",48),l(1),a()),t&2){let e=u(2).$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)," ")}}function M3(t,r){if(t&1&&(o(0,"div",49),l(1),o(2,"span"),l(3),a()()),t&2){let e=u(2).$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.term)," - "),c(2),x("$",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.upfront_amount_usd)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.upfront_amount_usd)*(e==null?null:e.QUANTITY)).toFixed(2))}}function S3(t,r){if(t&1&&(o(0,"div",49),l(1,"Monthly - "),o(2,"span"),l(3),a()()),t&2){let e=u(2).$implicit;c(3),x("$",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd)*(e==null?null:e.QUANTITY)).toFixed(2))}}function O3(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getVMMonthlyPrice(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.hourly_rate_usd,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider,e==null?null:e.QUANTITY)," ")}}function P3(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getStorageMonthlyPrice(e,e==null?null:e.QUANTITY)," ")}}function E3(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getFunctionMonthlyPrice(e,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider,e==null?null:e.QUANTITY)," ")}}function w3(t,r){if(t&1&&(o(0,"div",45),g(1,y3,2,1,"div",46),F(2,"lowercase"),F(3,"lowercase"),g(4,M3,4,2,"div",47),F(5,"lowercase"),F(6,"lowercase"),g(7,S3,4,1,"div",47)(8,O3,6,1,"div",37)(9,P3,6,1,"div",37)(10,E3,6,1,"div",37),a()),t&2){let e=u().$implicit;c(),p("ngIf",X(2,6,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="partial upfront"||X(3,8,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="all upfront"),c(3),p("ngIf",X(5,10,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="partial upfront"||X(6,12,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="all upfront"),c(3),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Virtual Machine"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="object-storage"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Serverless Function")}}function I3(t,r){if(t&1&&(o(0,"div",50),l(1),a()),t&2){let e=u().$implicit;c(),x(" $",(e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.cost)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.cost)*(e==null?null:e.QUANTITY)).toFixed(2))}}function T3(t,r){if(t&1){let e=A();o(0,"div",18)(1,"div",19)(2,"div",20),g(3,p3,2,3,"img",21)(4,m3,2,3,"img",21),a(),o(5,"div",22),h(6,"img",23),a()(),o(7,"div",24)(8,"div",25),g(9,u3,2,1,"div",26)(10,g3,2,1,"div",26),a(),g(11,f3,3,3,"div",27)(12,h3,3,3,"div",27),o(13,"div",28),g(14,_3,2,1,"span",29)(15,C3,2,1,"span",29)(16,x3,2,1,"span",29)(17,v3,2,1,"span",29)(18,b3,2,1,"span",29),a(),o(19,"div",30)(20,"div",31)(21,"button",32),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.decreaseQuantity(i))}),l(22,"\u2212"),a(),o(23,"span",33),l(24),a(),o(25,"button",34),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.increaseQuantity(i))}),l(26,"+"),a()()()(),o(27,"div",35),g(28,w3,11,14,"div",36)(29,I3,2,1,"div",37),o(30,"div",38)(31,"button",39),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.viewInstanceDetails(i==null?null:i.RESOURCE_TYPE,i==null?null:i.SERVICE_DETAILS))}),l(32," View Details"),a(),o(33,"button",40),v("click",function(){let i=O(e).$implicit,s=u(2);return P(s.removeItemFromCart(i==null?null:i.ID))}),l(34,"Remove"),a()()()()}if(t&2){let e=r.$implicit;c(3),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(5),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(2),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_plan),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vm_name),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.ram_gb),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vcpu_cores),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.storage_spec),c(6),C(e==null?null:e.QUANTITY),c(4),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal")}}function A3(t,r){if(t&1){let e=A();o(0,"div")(1,"div",7)(2,"div",8),v("click",function(){O(e);let i=u();return P(i.backToInstances())}),h(3,"iconify-icon",9),l(4," Back "),a(),o(5,"div",10),l(6,"Your Cart"),a()(),o(7,"div",11)(8,"div",12),g(9,T3,35,14,"div",13),a(),o(10,"div",14)(11,"h3"),l(12,"Order Summary"),a(),o(13,"div",15)(14,"span"),l(15,"Total"),a(),o(16,"span"),l(1
127),a()(),o(18,"span",16),l(19,"Billed monthly. Prices may vary based on actual usage."),a(),o(20,"button",17),v("click",function(){O(e);let i=u();return P(i.proceedToCheckout())}),l(21," Proceed to Checkout "),a()()()()}if(t&2){let e=u();c(9),p("ngForOf",e.cartItems||J(3,$l)),c(8),x("$",e.formattedMnSubtotal),c(3),p("disabled",e.cartItems.length===0)}}function D3(t,r){t&1&&(o(0,"mat-error",86),l(1," Required "),a())}function R3(t,r){t&1&&(o(0,"mat-error",86),l(1," Required "),a())}function k3(t,r){if(t&1&&(o(0,"mat-option",87),l(1),a()),t&2){let e=r.$implicit;p("value",e.ID),c(),x(" ",e.NAME," ")}}function N3(t,r){t&1&&(o(0,"mat-error",86),l(1," Required "),a())}function F3(t,r){if(t&1&&(h(0,"img",96),F(1,"lowercase")),t&2){let e=u().$implicit,n=u(2);p("src","assets/images/"+n.providerIconMap[X(1,1,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)],Qe)}}function z3(t,r){if(t&1&&(h(0,"img",96),F(1,"lowercase")),t&2){let e=u().$implicit,n=u(2);p("src","assets/images/"+n.providerIconMap[X(1,1,e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.service_provider)],Qe)}}function L3(t,r){if(t&1&&(o(0,"div",99),l(1),F(2,"uppercase"),a()),t&2){let e=u(2).$implicit;c(),rt(" ",X(2,2,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)," - ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vm_name)}}function V3(t,r){if(t&1&&(o(0,"div",99),l(1),F(2,"uppercase"),a()),t&2){let e=u(2).$implicit;c(),rt(" ",X(2,2,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)," - ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.storage_type," ")}}function B3(t,r){if(t&1&&(o(0,"div",99),l(1),F(2,"uppercase"),a()),t&2){let e=u(2).$implicit;c(),rt(" ",X(2,2,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)," - ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_type," ")}}function U3(t,r){if(t&1&&(o(0,"div",97),g(1,L3,3,4,"div",98)(2,V3,3,4,"div",98)(3,B3,3,4,"div",98),a()),t&2){let e=u().$implicit;c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Virtual Machine"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="object-storage"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Serverless Function")}}function j3(t,r){if(t&1&&(o(0,"div",97)(1,"div",99),l(2),F(3,"uppercase"),a(),o(4,"div",50),l(5),a()()),t&2){let e=u().$implicit;c(2),rt(" ",X(3,3,e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.service_provider)," ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.title),c(3),x("$",(e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.cost)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.cost)*(e==null?null:e.QUANTITY)).toFixed(2)," ")}}function $3(t,r){if(t&1&&(o(0,"div",43),l(1),F(2,"lowercase"),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.providerNameMap[X(2,1,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider)]," ")}}function q3(t,r){if(t&1&&(o(0,"div",43),l(1),F(2,"lowercase"),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.providerNameMap[X(2,1,e==null||e.SERVICE_DETAILS==null||e.SERVICE_DETAILS.selection==null?null:e.SERVICE_DETAILS.selection.service_provider)]," ")}}function H3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_plan))}}function W3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.ram_gb," GB")}}function G3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vcpu_cores," vCPUs")}}function Y3(t,r){if(t&1&&(o(0,"span",44),l(1),a()),t&2){let e=u().$implicit;c(),x(" ",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.storage_spec)}}function K3(t,r){if(t&1&&(o(0,"div",48),l(1),a()),t&2){let e=u(2).$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)," ")}}function Q3(t,r){if(t&1&&(o(0,"div",49),l(1),o(2,"span"),l(3),a()()),t&2){let e=u(2).$implicit,n=u(2);c(),x(" ",n.formatText(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.term)," - "),c(2),x("$",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.upfront_amount_usd)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.upfront_amount_usd)*(e==null?null:e.QUANTITY)).toFixed(2))}}function J3(t,r){if(t&1&&(o(0,"div",49),l(1,"Monthly - "),o(2,"span"),l(3),a()()),t&2){let e=u(2).$implicit;c(3),x("$",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd)*(e==null?null:e.QUANTITY)==null?null:((e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd)*(e==null?null:e.QUANTITY)).toFixed(2))}}function Z3(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getVMMonthlyPrice(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.hourly_rate_usd,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider,e==null?null:e.QUANTITY)," ")}}function X3(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getStorageMonthlyPrice(e,e==null?null:e.QUANTITY)," ")}}function eI(t,r){if(t&1&&(o(0,"div",50)(1,"span",51),l(2,"Avg."),a(),l(3),o(4,"span",51),l(5,"/mo"),a()()),t&2){let e=u(2).$implicit,n=u(2);c(3),x(" $",n.getFunctionMonthlyPrice(e,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.service_provider,e==null?null:e.QUANTITY)," ")}}function tI(t,r){if(t&1&&(o(0,"div",100),g(1,K3,2,1,"div",46),F(2,"lowercase"),F(3,"lowercase"),g(4,Q3,4,2,"div",47),F(5,"lowercase"),F(6,"lowercase"),g(7,J3,4,1,"div",47)(8,Z3,6,1,"div",37)(9,X3,6,1,"div",37)(10,eI,6,1,"div",37),a()),t&2){let e=u().$implicit;c(),p("ngIf",X(2,6,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="partial upfront"||X(3,8,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="all upfront"),c(3),p("ngIf",X(5,10,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="partial upfront"||X(6,12,e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_option)=="all upfront"),c(3),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.monthly_rate_usd),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Virtual Machine"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="object-storage"),c(),p("ngIf",(e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.product_name)==="Serverless Function")}}function nI(t,r){if(t&1&&(o(0,"div",88)(1,"div",19),g(2,F3,2,3,"img",89)(3,z3,2,3,"img",89),h(4,"img",90),a(),o(5,"div",91),g(6,U3,4,3,"div",92)(7,j3,6,5,"div",92)(8,$3,3,3,"div",27)(9,q3,3,3,"div",27),o(10,"div",93),g(11,H3,2,1,"span",29)(12,W3,2,1,"span",29)(13,G3,2,1,"span",29)(14,Y3,2,1,"span",29),a(),g(15,tI,11,14,"div",94),o(16,"div",95)(17,"div",33),l(18),a()()()()),t&2){let e=r.$implicit;c(2),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(3),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="internal"),c(2),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.payment_plan),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.ram_gb),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.vcpu_cores),c(),p("ngIf",e==null||e.SERVICE_DETAILS==null?null:e.SERVICE_DETAILS.storage_spec),c(),p("ngIf",(e==null?null:e.RESOURCE_TYPE)==="external"),c(3),x("Qty: ",e==null?null:e.QUANTITY)}}function iI(t,r){if(t&1){let e=A();o(0,"div",52)(1,"div",7)(2,"div",8),v("click",function(){O(e);let i=u();return P(i.backToCart())}),h(3,"iconify-icon",9),l(4,"Back to Cart "),a(),o(5,"div",10),l(6,"Checkout Your Order"),a()(),o(7,"div",53)(8,"div",54)(9,"form",55)(10,"h2"),l(11,"Billing Information"),a(),o(12,"div",56)(13,"label",57),l(14,"Full Name"),o(15,"span",58),l(16,"*"),a()(),h(17,"input",59),g(18,D3,2,0,"mat-error",60),a(),o(19,"div",61)(20,"div",62)(21,"label",63),l(22,"Email Address"),o(23,"span",58),l(24,"*"),a()(),h(25,"input",64),g(26,R3,2,0,"mat-error",60),a(),o(27,"div",62)(28,"label",65),l(29,"Phone Number"),a(),h(30,"input",66),a()(),o(31,"div",56)(32,"label",67),l(33,"Company Name"),a(),h(34,"input",68),a(),o(35,"div",69)(36,"div",70),l(37,"Billing Address"),a(),o(38,"div",61)(39,"div",62),h(40,"input",71),a(),o(41,"div",62),h(42,"input",72),a()(),o(43,"div",61)(44,"div",62),h(45,"input",73),a(),o(4
126,"div",62),h(47,"input",74),a()(),o(48,"div",61)(49,"div",62),h(50,"input",75),a(),o(51,"div",62)(52,"mat-select",76)(53,"mat-option")(54,"ngx-mat-select-search",77)(55,"mat-icon",78),l(56,"close"),a()()(),g(57,k3,2,2,"mat-option",79),a(),g(58,N3,2,0,"mat-error",60),a()()()()(),o(59,"div",80)(60,"h2"),l(61,"Order Summary"),a(),o(62,"div",81),g(63,nI,19,12,"div",82),a(),o(64,"div",83)(65,"span"),l(66,"Total"),a(),o(67,"span"),l(68),a()(),o(69,"span",84),l(70,"Billed monthly. Prices may vary based on actual usage."),a(),o(71,"button",85),v("click",function(){O(e);let i=u();return P(i.completePurchase())}),l(72," Complete Purchase"),a()()()()}if(t&2){let e,n,i,s=u();c(9),p("formGroup",s.billingForm),c(9),p("ngIf",(s.billingForm.controls.fullName==null?null:s.billingForm.controls.fullName.touched)&&((e=s.billingForm.get("fullName"))==null?null:e.hasError("required"))),c(8),p("ngIf",(s.billingForm.controls.email==null?null:s.billingForm.controls.email.touched)&&((n=s.billingForm.get("email"))==null?null:n.hasError("required"))),c(28),p("formControl",s.filterCountry),c(3),p("ngForOf",s.filterList||J(9,$l)),c(),p("ngIf",(s.billingForm.controls.country==null?null:s.billingForm.controls.country.touched)&&((i=s.billingForm.get("country"))==null?null:i.hasError("required"))),c(5),p("ngForOf",s.cartItems||J(10,$l)),c(5),x("$",s.formattedMnSubtotal),c(3),p("disabled",!s.billingForm.valid)}}var hu=(()=>{class t{get providerIconMap(){return Wn}get providerNameMap(){return cu}constructor(e,n,i,s,d,m,f,_,b){this.platformId=e,this.router=n,this.notify=i,this.fb=s,this.dialog=d,this.cartService=m,this.route=f,this.ngZone=_,this.cdr=b,this.loading=!1,this.emailPattern=`${ye.EMAIL_PATTERN}`,this.cartItems=[],this.countryList=[],this.filterList=[],this.filterCountry=new Vt,this._onDestroy=new Rt,this.showBilling=!1,this.promoCode="",this.monthlyHours=ye.HOURS_IN_A_MONTH,this.specialOffers=[{provider:"AWS",providerIcon:"assets/images/aws.png",title:"AWS Startup Credits",validUntil:new Date("2025-06-30"),description:"Get up to $5,000 in AWS credits for eligible startups. Perfect for new cloud projects.",amount:"$5,000"},{provider:"Google",providerIcon:"assets/images/gcp.png",title:"GCP First Year Discount",validUntil:new Date("2025-07-15"),description:"New customers get 30% off on all Google Cloud services for the first 12 months.",amount:"30% OFF"},{provider:"DigitalOcean",providerIcon:"assets/images/digitalocean.png",title:"DigitalOcean Bundle",validUntil:new Date("2025-09-15"),description:"Get $100 in credit over 60 days when you add storage and database to your Droplet.",amount:"$100 Credit"}],this.cloudSolutions=[{image:"assets/images/cloud-infrastructure-provider.png",title:"Cloud Infrastructure",subtitle:"Enterprise-grade infrastructure with 99.99% uptime guarantee",price:"$99/mo",tag:"Featured",tagClass:"featured"},{image:"assets/images/cloud-security-provider.png",title:"Cloud Security",subtitle:"Advanced security features with real-time threat detection",price:"$149/mo",tag:"New",tagClass:"new"},{image:"assets/images/cloud-storage-provider.png",title:"Cloud Storage",subtitle:"Scalable storage solutions with instant access",price:"$79/mo",tag:"Popular",tagClass:"popular"},{image:"assets/images/cloud-analytics-provider.png",title:"Cloud Analytics",subtitle:"Advanced analytics with AI-powered insights",price:"$199/mo",tag:"Best Value",tagClass:"best-value"}],this.recommendedItems=[{icon:"assets/images/aws-lambda-provider.png",title:"AWS Lambda",subtitle:"Serverless Computing",description:"Run code without provisioning or managing servers. Pay only for the compute time you consume.",price:"$0.20/million requests"},{icon:"assets/images/google-cloud-cdn-provider.png",title:"Google Cloud CDN",subtitle:"Content Delivery Network",description:"Accelerate content delivery using Google\u2019s global edge network with simple setup and monitoring.",price:"$0.08/GB"},{icon:"assets/images/azure-kubernetes-service-provider.png",title:"Azure Kubernetes Service",subtitle:"Container Orchestration",description:"Simplify Kubernetes deployment, management, and operations with a fully managed service.",price:"$73.00/month"}],this.billingForm=this.fb.group({fullName:["",[U.required]],email:["",[U.required,U.pattern(this.emailPattern)]],phone:[""],company:[""],street:[""],area:[""],city:[""],state:[""],postalCode:[""],country:["",[U.required]]})}ngOnInit(){pn(this.platformId)&&(this.countryList=window.localStorage.getItem("COUNTRY"),this.countryList=this.countryList?JSON.parse(this.countryList):[],this.filterList=this.countryList),this.getCart()}ngAfterViewInit(){this.filterCountry.valueChanges.pipe(Tt(this._onDestroy)).subscribe(()=>{this.filterCountryName()}),this.route.fragment.subscribe(e=>{e&&setTimeout(()=>this.billingContent(e),0)})}billingContent(e){if(e==="billingContent"&&(this.setShowBilling(!0),this.completePurchase(),pn(this.platformId))){let n=document.getElementById(e);n&&n.scrollIntoView({behavior:"smooth",block:"start"})}}filterCountryName(){let e=this.filterCountry.value;this.filterList=this.countryList.filter(n=>n?.NAME?.toLowerCase().indexOf(e?.toLowerCase())!==-1)}getCart(){this.setLoading(!0),this.cartService.getCartItems().subscribe({next:e=>{this.cartItems=Array.isArray(e?.object)?e.object:[],this.setLoading(!1)},error:e=>{this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status),this.setLoading(!1)}})}
12updateItemQuantity(e,n){this.setLoading(!0);let i={RESOURCE:[{RESOURCE_TYPE:e.RESOURCE_TYPE,RESOURCE_ID:e.RESOURCE_ID,QUANTITY:n,SERVICE_DETAILS:e.SERVICE_DETAILS,USER_INPUT:e.USER_INPUT}]};this.cartService.addItemToCart(i).subscribe({next:s=>{s.status===200&&s.object.length>0?this.getCart():this.setLoading(!1)},error:s=>{this.setLoading(!1),this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}})}increaseQuantity(e){if(e.QUANTITY!=null){let n=e.QUANTITY+1;this.updateItemQuantity(e,n)}}decreaseQuantity(e){if(e.QUANTITY>1){let n=e.QUANTITY-1;this.updateItemQuantity(e,n)}else this.removeItemFromCart(e.ID)}removeItemFromCart(e){this.setLoading(!0);let n={ID:[e]};this.cartService.removeCartItem(n).subscribe({next:i=>{i&&i.status===200?this.getCart():this.setLoading(!1)},error:i=>{this.setLoading(!1),this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]?E[i?.error?.status]:"error",i?.error?.status)}})}viewInstanceDetails(e,n){if(e==="external"){let i=this.slugify(n.service_provider),s=this.slugify(n.product_name),d=i+"-"+s+"--"+n.record_id;this.router.navigate(["/admin-dashboard/cloud-atler/service",d])}else if(e==="internal"){let i=n.category,s=this.slugify(n.title);i==="packages"?this.router.navigate(["/packages",s]):this.router.navigate(["/offers",s])}}slugify(e){return e?.toString()?.toLowerCase()?.trim()?.replace(/[\/\s]+/g,"-")?.replace(/[^\w-]+/g,"")?.replace(/-+/g,"-")?.replace(/^-+|-+$/g,"")}get itemCount(){return this.cartItems.length}get HrSubtotal(){return this.cartItems.reduce((e,n)=>e+n?.SERVICE_DETAILS?.hourly_rate_usd*n?.QUANTITY,0)}get MnSubtotal(){return this.cartItems.reduce((e,n)=>e+(n?.RESOURCE_TYPE==="external"?this.getExternalPrice(n):n?.SERVICE_DETAILS?.selection?.cost)*n?.QUANTITY,0)}getExternalPrice(e){if(e?.SERVICE_DETAILS?.product_name==="Virtual Machine")return e?.SERVICE_DETAILS?.payment_option?.toLowerCase()==="partial upfront"?e?.SERVICE_DETAILS?.upfront_amount_usd+e?.SERVICE_DETAILS?.monthly_rate_usd:e?.SERVICE_DETAILS?.payment_option?.toLowerCase()==="all upfront"?e?.SERVICE_DETAILS?.upfront_amount_usd:e?.SERVICE_DETAILS?.monthly_rate_usd;if(e?.SERVICE_DETAILS?.product_name==="object-storage")return this.getStorageMonthlyPrice(e,e?.QUANTITY);if(e?.SERVICE_DETAILS?.product_name==="Serverless Function")return this.getFunctionMonthlyPrice(e,e?.SERVICE_DETAILS?.service_provider,e?.QUANTITY)}get formattedHrSubtotal(){return this.HrSubtotal?.toFixed(2)}get formattedMnSubtotal(){return this.MnSubtotal?.toFixed(2)}backToInstances(){this.router.navigate(["/admin-dashboard/cloud-atler"])}applyPromoCode(){this.promoCode?.trim()!==""&&(this.promoCode="")}patchBillingForm(){if(pn(this.platformId)){let e=window.localStorage.getItem("userInfo")||"{}";this.userInfo=e?JSON.parse(e):null}this.userInfo&&this.billingForm.patchValue({fullName:this.userInfo.firstName+" "+this.userInfo.lastName,email:this.userInfo.emailId})}proceedToCheckout(){this.setShowBilling(!0),this.patchBillingForm()}setShowBilling(e){this.showBilling=e}backToCart(){this.showBilling=!1}completePurchase(){if(this.billingForm.valid){this.setLoading(!0);let e=[];this.cartItems.forEach(i=>{let s={RESOURCE_TYPE:i?.RESOURCE_TYPE,RESOURCE_ID:i?.RESOURCE_ID,QUANTITY:i?.QUANTITY,SERVICE_DETAILS:i?.SERVICE_DETAILS,USER_INPUT:i?.USER_INPUT||{}};e.push(s)});let n={ORDER_DETAILS:{COMPANY_NAME:this.billingForm.value.company,ADDRESS:{STREET_HOUSE:this.billingForm.value.street,AREA:this.billingForm.value.area,CITY:this.billingForm.value.city,STATE:this.billingForm.value.state,PIN_CODE:this.billingForm.value.postalCode,COUNTRY:this.billingForm.value.country}},ORDER_ITEMS:e};this.cartService.confirmOrder(n).subscribe({next:i=>{this.setLoading(!1),i.status===200&&i.object&&this.successPopup()},error:i=>{this.setLoading(!1),this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]?E[i?.error?.status]:"error",i?.error?.status)}})}}formatText(e){return e?.replace(/-/g," ")?.replace(/\b\w/g,n=>n?.toUpperCase())}isScientificNotation(e){let n=e,i=String(n);return i.includes("e")||i.includes("E")?n=Number(n).toFixed(10):n=Number(n),n}getVMMonthlyPrice(e,n,i){let s=this.monthlyHours[n?n.toLowerCase():""];return(this.isScientificNotation(e)*s*i).toFixed(2)}getStorageMonthlyPrice(e,n){let i=0,s=0,d=0,m=0,f=e?.SERVICE_DETAILS?.storage_tier_gb,_=[],b=0,M=0,S=0;if(e?.SERVICE_DETAILS?.storage_tier_available===!1)i=e?.USER_INPUT?.storage_amount_per_month*this.isScientificNotation(e?.SERVICE_DETAILS?.storage_price_per_gb[0]);else if(e?.SERVICE_DETAILS?.storage_tier_available===!0){for(let w=0;w<f.length;w++)_=[],_=f[w].split("-"),_[1]=="~"?e?.USER_INPUT?.storage_amount_per_month>parseInt(_[0])&&(b=w):e?.USER_INPUT?.storage_amount_per_month>parseInt(_[0])&&e?.USER_INPUT?.storage_amount_per_month<=parseInt(_[1])&&(b=w);for(let w=b;w>=0;w--)_=[],_=f[w].split("-"),b==w?M+=(e?.USER_INPUT?.storage_amount_per_month-parseInt(_[0]))*this.isScientificNotation(e?.SERVICE_DETAILS?.storage_price_per_gb[w]):M+=(parseInt(_[1])-parseInt(_[0]))*this.isScientificNotation(e?.SERVICE_DETAILS?.storage_price_per_gb[w]);i=M}return s=e?.USER_INPUT?.retieval_amount_per_month*this.isScientificNotation(e?.SERVICE_DETAILS?.retrieval_price_per_gb)||0,d=e?.USER_INPUT?.read_requests_per_month*this.isScientificNotation(e?.SERVICE_DETAILS?.read_price_per_request)||0,m=e?.USER_INPUT?.write_requests_per_month*this.isScientificNotation(e?.SERVICE_DETAILS?.write_price_per_request)||0,S=i+s+d+m,(S*n).toFixed(2)||0}getFunctionMonthlyPrice(e,n,i){let s=0,d=0,m=0,f=0,_=0,b=e?.SERVICE_DETAILS?.memory_duration_tier_gb_s,M=[],S=0,w=0,D=0;if(s=e?.USER_INPUT?.number_of_requests*(e?.USER_INPUT?.duration_of_request/1e3),d=e?.USER_INPUT?.amount_of_memory/1024*s,f=e?.USER_INPUT?.number_of_requests*this.isScientificNotation(e?.SERVICE_DETAILS?.price_per_request),n==="gcp"&&(_=s*this.isScientificNotation(e?.SERVICE_DETAILS?.duration_price_per_s)),e?.SERVICE_DETAILS?.memory_duration_tier_available===!1)m=d*this.isScientificNotation(e?.SERVICE_DETAILS?.memory_duration_price_per_gb_s[0]);else if(e?.SERVICE_DETAILS?.memory_duration_tier_available===!0){for(let R=0;R<b.length;R++)M=[],M=b[R].split("-"),M[1]=="~"?d>parseInt(M[0])&&(S=R):d>parseInt(M[0])&&d<=parseInt(M[1])&&(S=R);for(let R=S;R>=0;R--)M=[],M=b[R].split("-"),S==R?w+=(d-parseInt(M[0]))*this.isScientificNotation(e?.SERVICE_DETAILS?.memory_duration_price_per_gb_s[R]):w+=(parseInt(M[1])-parseInt(M[0]))*this.isScientificNotation(e?.SERVICE_DETAILS?.memory_duration_price_per_gb_s[R]);m=w}return D=m+f+_,(D*i).toFixed(2)||0}successPopup(){this.dialog.open(fu,{width:"950px",height:"450px",disableClose:!0}).afterClosed().subscribe(n=>{})}setLoading(e){this.ngZone.run(()=>{this.loading=e,this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||t)(y(Jn),y(G),y(V),y(ze),y(Se),y(Rn),y(Le),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-order-billing"]],decls:4,vars:3,consts:[["class","overlay",4,"ngIf"],[4,"ngIf"],["id","billingContent",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"head-row"],[1,"back-arrow",3,"click"],["icon","material-symbols:arrow-back-rounded"],[1,"pricing-head"],[1,"cart-content"],[1,"cart-items"],["class","cart-item",4,"ngFor","ngForOf"],[1,"order-summary"],[1,"summary-row","total"],[1,"order-summary-note"],[1,"btn-purchase",3,"click","disabled"],[1,"cart-item"],[1,"image-container"],[1,"item-image"],[3,"src",4,"ngIf"],[1,"reve-image"],["src","assets/images/reve-logo.jpg"],[1,"item-details"],[1,"item-header"],["class","item-name",4,"ngIf"],["class","item-provider",4,"ngIf"],[1,"item-tags-row"],["class","tag",4,"ngIf"],[1,"item-control
12s-row"],[1,"item-qty-row"],["mat-button","","color","basic",1,"qty-btn-minus",3,"click"],[1,"item-qty"],["mat-button","","color","basic",1,"qty-btn-plus",3,"click"],[1,"item-actions"],["class","item-price-details",4,"ngIf"],["class","item-price",4,"ngIf"],[1,"item-action-btns","item-action-btns-opposite"],["mat-button","",1,"view-btn",3,"click"],["mat-button","",1,"remove-btn",3,"click"],[3,"src"],[1,"item-name"],[1,"item-provider"],[1,"tag"],[1,"item-price-details"],["class","payment-option",4,"ngIf"],["class","price-item",4,"ngIf"],[1,"payment-option"],[1,"price-item"],[1,"item-price"],[1,"price-period"],["id","billingContent"],[1,"detail-content"],[1,"billing-wrapper"],["autocomplete","off",3,"formGroup"],[1,"form-row"],["for","fullName"],[1,"required"],["id","fullName","type","text","formControlName","fullName","required","","readonly",""],["class","error",4,"ngIf"],[1,"form-row","two-cols"],[1,"form-column"],["for","email"],["id","email","type","email","formControlName","email","required","","readonly",""],["for","phone"],["id","phone","type","tel","formControlName","phone","readonly",""],["for","company"],["
12id","company","type","text","formControlName","company"],[1,"billing-address"],[1,"billing-address-header"],["placeholder","Street address","type","text","formControlName","street"],["placeholder","Area","type","text","formControlName","area"],["placeholder","City","type","text","formControlName","city"],["placeholder","State/Province","type","text","formControlName","state"],["placeholder","Postal/ZIP code","type","number","formControlName","postalCode"],["placeholder","Select Country *","panelClass","codeClass","formControlName","country","required",""],["placeholderLabel","Search","noEntriesFoundLabel","No Matching Found",3,"formControl"],["ngxMatSelectSearchClear","",1,"close-icon"],[3,"value",4,"ngFor","ngForOf"],[1,"order-wrapper"],[1,"order-items"],["class","order-item",4,"ngFor","ngForOf"],[1,"total"],[1,"total-text"],["mat-button","",1,"btn-purchase",3,"click","disabled"],[1,"error"],[3,"value"],[1,"order-item"],["class","provider-icon",3,"src",4,"ngIf"],["src","assets/images/reve-logo.jpg",1,"provider-icon"],[1,"order-item-details"],["class","item-title-row",4,"ngIf"],[1,"item-tags"],["class","order-price-details",4,"ngIf"],[1,"item-activation-row"],[1,"provider-icon",3,"src"],[1,"item-title-row"],["class","item-title",4,"ngIf"],[1,"item-title"],[1,"order-price-details"]],template:function(n,i){n&1&&(g(0,d3,4,0,"div",0),o(1,"div"),g(2,A3,22,4,"div",1)(3,iI,73,11,"div",2),a()),n&2&&(p("ngIf",i.loading),c(2),p("ngIf",!i.showBilling),c(),p("ngIf",i.showBilling))},dependencies:[N,$,B,z,as,ut,Dn,fe,ue,mn,ve,qi,me,$e,Gt,Hi,Ge,We,_s,hs,Wi,Xn,Zn],styles:[".head-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px 50px;background-color:#fff;border-bottom:1px solid #E5E7EB}.head-row[_ngcontent-%COMP%]   .back-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:16px;color:#374151;cursor:pointer;text-align:start;width:13%}.head-row[_ngcontent-%COMP%]   .back-arrow[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:24px}.head-row[_ngcontent-%COMP%]   .pricing-head[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000;text-align:center;width:72%}.cart-content[_ngcontent-%COMP%]{display:flex;gap:30px;margin-top:20px;padding:30px 50px;flex-direction:row;justify-content:space-between}.cart-content[_ngcontent-%COMP%]   .cart-items[_ngcontent-%COMP%]{width:70%}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:24px;background:#fff;border-radius:12px;margin-bottom:18px;box-shadow:0 1px 3px #0000000a;padding:24px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;align-items:center}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .reve-image[_ngcontent-%COMP%]{width:60px;height:56px;display:flex;align-items:center;justify-content:center}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .reve-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:80%;max-height:80%}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:56px;height:56px;display:flex;align-items:center;justify-content:center;background:#f6f8fa;border-radius:8px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:80%;max-height:80%}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:10px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-header[_ngcontent-%COMP%]{align-items:center;gap:8px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-header[_ngcontent-%COMP%]   .item-name[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-provider[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}
12.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-tags-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-tags-row[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%]{background:#eff6ff;color:#1d4ed8;border-radius:20px;padding:4px 10px;font-size:13px;display:inline-block}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px;margin-top:12px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]{display:flex;align-items:center}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]   .qty-btn-minus[_ngcontent-%COMP%]{min-width:36px;height:36px;border-radius:6px 0 0 6px;font-size:18px;font-weight:500;background:#f9fafb;color:#374151;border:1px solid #D1D5DB;box-shadow:none;transition:border-color .2s}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]   .qty-btn-minus[_ngcontent-%COMP%]:hover{border-color:#35a5db}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]   .qty-btn-plus[_ngcontent-%COMP%]{min-width:36px;height:36px;border-radius:0 6px 6px 0;font-size:18px;font-weight:500;background:#f9fafb;color:#374151;border:1px solid #D1D5DB;box-shadow:none;transition:border-color .2s}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]   .qty-btn-plus[_ngcontent-%COMP%]:hover{border-color:#35a5db}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   .item-controls-row[_ngcontent-%COMP%]   .item-qty-row[_ngcontent-%COMP%]   .item-qty[_ngcontent-%COMP%]{font-size:15px;min-width:48px;text-align:center;background:#fff;border:1px solid #E5E7EB;height:34px;line-height:34px;display:inline-block;border-left:none;border-right:none}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:25px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .item-price-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px;align-items:flex-end}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .payment-option[_ngcontent-%COMP%]{font-size:13px;color:#1f2937;background-color:#dcdcdc;padding:5px 10px;border-radius:20px;text-align:center}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:600;color:#1f2937}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%]{font-weight:600;font-size:16px;margin-bottom:4px}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .price-period[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#6b7280}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .item-action-btns-opposite[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:auto}.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .item-action-btns-opposite[_ngcontent-%COMP%]   .view-btn[_ngcontent-%COMP%]{border:1px solid #35A5DB;color:#35a5db;background:transparent;font-weight:500;border-radius:8px;min-width:120px}
12.cart-content[_ngcontent-%COMP%]   .cart-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]   .item-action-btns-opposite[_ngcontent-%COMP%]   .remove-btn[_ngcontent-%COMP%]{border:1px solid #DC2626;color:#dc2626;background:transparent;font-weight:500;border-radius:8px;min-width:120px}.cart-content[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]{flex:1;background:#fff;border-radius:12px;padding:24px;height:fit-content;box-shadow:0 1px 3px #0000001a;width:30%}.cart-content[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827;margin-bottom:15px}.cart-content[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;color:#4b5563}.cart-content[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary-row.total[_ngcontent-%COMP%]{margin-top:16px;padding-top:16px;border-top:1px solid #E5E7EB;font-weight:600;font-size:16px;color:#111827}.cart-content[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .btn-purchase[_ngcontent-%COMP%]{width:100%;background-color:#2c2c2c;color:#fff;font-weight:500;font-size:16px;padding:12px;border:none;border-radius:8px;cursor:pointer;margin-top:18px}.cart-content[_ngcontent-%COMP%]   .order-summary-note[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;text-align:center;margin-top:16px}.detail-content[_ngcontent-%COMP%]{padding:30px 50px;display:flex;flex-direction:row;gap:30px;justify-content:space-between}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]{width:70%;height:fit-content;display:flex;flex-direction:column;gap:25px;background:#fff;border-radius:8px;padding:30px;box-shadow:0 4px 12px #0000001a}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:24px;color:#111827;font-weight:700;font-size:20px;line-height:28px;letter-spacing:0px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{width:100%}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:16px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row.two-cols[_ngcontent-%COMP%]{flex-direction:row;gap:20px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row.two-cols[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row.two-cols[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row.two-cols[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{width:92%}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]   .form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:14px;color:#374151;margin-bottom:6px;font-weight:500;line-height:20px;letter-spacing:0px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:#f44336;margin-left:2px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .form-row[_ngcontent-%COMP%]   mat-select[_ngcontent-%COMP%]{padding:8px 14px;border-radius:6px;border:1px solid #d1d5db;font-size:14px;height:20px;transition:border-color .3s cubic-bezier(.4,0,.2,1)}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   fieldset.billing-address[_ngcontent-%COMP%]{margin-top:24px;border:1px solid #d1d5db;border-radius:8px;padding:16px 20px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   fieldset.billing-address[_ngcontent-%COMP%]   .billing-address[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#374151;margin-bottom:5px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .billing-address-header[_ngcontent-%COMP%]{font-size:14px;color:#374151;margin-bottom:6px;font-weight:500;line-height:20px;letter-spacing:0px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .billing-address-header[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:#f44336;margin-left:2px;font-weight:500}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{font-size:12px;color:#f44336;margin-top:4px;min-height:16px}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .btn-submit[_ngcontent-%COMP%]{background-color:#7c3aed;color:#fff;padding:12px 24px;font-weight:600;border:none;border-radius:8px;
12cursor:pointer;transition:background-color .3s ease}.detail-content[_ngcontent-%COMP%]   .billing-wrapper[_ngcontent-%COMP%]   .btn-submit[_ngcontent-%COMP%]:hover{background-color:#5b21b6}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]{width:30%;display:flex;flex-direction:column;gap:20px;background:#fff;border-radius:8px;box-shadow:0 4px 12px #0000001a;padding:20px;height:fit-content}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-weight:700;font-size:20px;line-height:28px;color:#111827;padding:0 0 16px;text-align:left}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]{overflow-y:auto;margin:0 -20px;padding:0 20px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;border-bottom:1px solid #e5e7eb;padding-bottom:12px;margin-bottom:12px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;align-items:center}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .provider-icon[_ngcontent-%COMP%]{width:40px;height:40px;object-fit:contain;border-radius:4px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]{flex-grow:1;width:50%;display:flex;flex-direction:column;gap:5px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-title-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;width:100%}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-title[_ngcontent-%COMP%]{font-weight:500;font-size:14px;line-height:20px;color:#111827}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%]{font-weight:700;font-size:14px;line-height:20px;color:#111827;white-space:nowrap}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .price-period[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#6b7280}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-provider[_ngcontent-%COMP%]{font-size:13px;color:#6b7280}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-tags[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;padding:4px 8px;border-radius:20px;background-color:#eff6ff;color:#1d4ed8;text-transform:capitalize}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-activation-row[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center;width:100%;margin-top:4px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-activation[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;color:#6b7280}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-item-details[_ngcontent-%COMP%]   .item-qty[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;color:#6b7280;margin-left:16px;white-space:nowrap}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-price-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px;align-items:flex-start}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-price-details[_ngcontent-%COMP%]   .payment-option[_ngcontent-%COMP%]{font-size:12px;color:#1f2937;background-color:#dcdcdc;padding:4px 8px;border-radius:20px;text-align:center}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-price-details[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]{font-size:13px;color:#6b7280}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .order-price-details[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:600;color:#1f2937}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .item-right-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;margin-left:16px;min-width:80px;justify-content:space-between;padding:4px 0}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-items[_ngcontent-%COMP%]   .order-item[_ngcontent-%COMP%]   .item-right-col[_ngcontent-%COMP%]   .item-qty[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;font-weight:400;line-height:16px;text-align:right}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-totals[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:16px 0}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-totals[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:16px;line-height:24px;color:#4b5563;font-weight:400}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-totals[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{color:#4b5563}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .order-totals[_ngcontent-%COMP%]   .estimated-savings[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{color:#10b981}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .total[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:18px;font-weight:700;line-height:28px;color:#000;padding:16px 0 0;border-top:1px solid #e5e7eb}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .btn-purchase[_ngcontent-%COMP%]{width:100%;background-color:#2c2c2c;color:#fff;font-weight:500;font-size:16px;padding:12px;border:none;border-radius:8px;
12cursor:pointer;margin:8px 0 16px}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .btn-purchase[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.detail-content[_ngcontent-%COMP%]   .order-wrapper[_ngcontent-%COMP%]   .total-text[_ngcontent-%COMP%]{font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;color:#6b7280}"]})}}return t})();var on=()=>[];function oI(t,r){t&1&&(o(0,"div",8)(1,"div",9)(2,"div",10),h(3,"span",11),a()()())}function rI(t,r){if(t&1&&(o(0,"div",12),l(1),F(2,"uppercase"),a()),t&2){let e=u();c(),rt(" ",X(2,2,e.instanceDetails==null?null:e.instanceDetails.service_provider)," ",e.instanceDetails==null?null:e.instanceDetails.vm_name," Instance Details ")}}function aI(t,r){if(t&1&&(o(0,"div",12),l(1),F(2,"uppercase"),a()),t&2){let e=u();c(),rt(" ",X(2,2,e.instanceDetails==null?null:e.instanceDetails.service_provider)," ",e.instanceDetails==null?null:e.instanceDetails.storage_type," Details ")}}function lI(t,r){if(t&1&&(o(0,"div",12),l(1),F(2,"uppercase"),a()),t&2){let e=u();c(),rt(" ",X(2,2,e.instanceDetails==null?null:e.instanceDetails.service_provider)," ",e.instanceDetails==null?null:e.instanceDetails.product_type," Details ")}}function sI(t,r){if(t&1&&(o(0,"div",32),l(1),a()),t&2){let e=u(2);c(),x(" ",e.formatText(e.instanceDetails==null?null:e.instanceDetails.payment_option)," ")}}function cI(t,r){if(t&1&&(o(0,"div",31),l(1),o(2,"span"),l(3),a()()),t&2){let e=u(2);c(),x(" ",e.formatText(e.instanceDetails==null?null:e.instanceDetails.term)," - "),c(2),x("$",(e.instanceDetails==null?null:e.instanceDetails.upfront_amount_usd)==null?null:(e.instanceDetails==null?null:e.instanceDetails.upfront_amount_usd).toFixed(2))}}function dI(t,r){if(t&1&&(o(0,"div",74)(1,"div",75),l(2,"Description"),a(),o(3,"div",76),l(4),a()()),t&2){let e=u(2);c(4),C(e.resourceDetails==null?null:e.resourceDetails.DESCRIPTION)}}function pI(t,r){if(t&1&&(o(0,"div",77)(1,"div",78),l(2,"CPU Benchmark Scores"),a(),o(3,"div",79)(4,"div",80)(5,"div",81),l(6,"Single-Core Score"),a(),o(7,"div",82),l(8),a()(),o(9,"div",83),h(10,"div",84),a()(),o(11,"div",79)(12,"div",80)(13,"div",81),l(14,"Multi-Core Score"),a(),o(15,"div",82),l(16),a()(),o(17,"div",83),h(18,"div",84),a()(),o(19,"div",79)(20,"div",80)(21,"div",81),l(22,"Floating Point Performance"),a(),o(23,"div",82),l(24),a()(),o(25,"div",83),h(26,"div",84),a()(),o(27,"div",79)(28,"div",80)(29,"div",81),l(30,"Integer Performance"),a(),o(31,"div",82),l(32),a()(),o(33,"div",83),h(34,"div",84),a()()()),t&2){let e=u(2);c(8),x(" ",e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE.VALUE," "),c(2),pe("width",(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE.VALUE)/(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.SINGLE_CORE_SCORE.MAX)*100+"%"),c(6),x(" ",e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE.VALUE),c(2),pe("width",(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE.VALUE)/(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.MULTI_CORE_SCORE.MAX)*100+"%"),c(6),x(" ",e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE.VALUE," "),c(2),pe("width",(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE.VALUE)/(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.FLOATING_POINT_PERFORMANCE.MAX)*100+"%"),c(6),x(" ",e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE.VALUE," "),c(2),pe("width",(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE.VALUE)/(e.resourceDetails==null||e.resourceDetails.CPU_BENCHMARK_SCORES==null||e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES.INTEGER_PERFORMANCE.MAX)*100+"%")}}function mI(t,r){if(t&1&&(o(0,"div",85)(1,"div",43),l(2,"CPU Performance"),a(),o(3,"div",76),l(4),a()()),t&2){let e=u(2);c(4),C(e.resourceDetails==null?null:e.resourceDetails.CPU_PERFORMANCE)}}function uI(t,r){if(t&1&&(o(0,"div",86)(1,"div",87),h(2,"iconify-icon",88),l(3," Recommendation "),a(),o(4,"div",89),l(5),a()()),t&2){let e=u(2);c(5),x(" ",e.resourceDetails==null?null:e.resourceDetails.RECOMMENDATION," ")}}function gI(t,r){if(t&1&&(o(0,"div",77)(1,"div",78),l(2,"Memory Benchmark Scores"),a(),o(3,"div",79)(4,"div",80)(5,"div",81),l(6,"Memory Read"),a(),o(7,"div",82),l(8),F(9,"number"),a()(),o(10,"div",83),h(11,"div",84),a()(),o(12,"div",79)(13,"div",80)(14,"div",81),l(15,"Memory Write"),a(),o(16,"div",82),l(17),F(18,"number"),a()(),o(19,"div",83),h(20,"div",84),a()(),o(21,"div",79)(22,"div",80)(23,"div",81),l(24,"Memory Copy"),a(),o(25,"div",82),l(26),F(27,"number"),a()(),o(28,"div",83),h(29,"div",84),a()()()),t&2){let e=u(2);c(8),x(" ",ie(9,9,e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED.SPEED,"1.0-0")," GB/s"),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_READ_SPEED.MAX)*100+"%"),c(6),x(" ",ie(18,12,e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED.SPEED,"1.0-0")," GB/s "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_WRITE_SPEED.MAX)*100+"%"),c(6),x(" ",ie(27,15,e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED.SPEED,"1.0-0")," GB/s "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES==null||e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES.MEMORY_COPY_SPEED.MAX)*100+"%")}}function fI(t,r){if(t&1&&(o(0,"div",90)(1,"div",43),l(2,"Memory Usage Recommendations"),a(),o(3,"div",91)(4,"div",76),l(5),a()()()),t&2){let e=u(2);c(5),C(e.resourceDetails.MEMORY_RECOMMENDATION)}}function hI(t,r){if(t&1&&(o(0,"div",77)(1,"div",78),l(2,"Storage Benchmark Scores"),a(),o(3,"div",79)(4,"div",80)(5,"div",81),l(6,"Sequential Read"),a(),o(7,"div",82),l(8),F(9,"number"),a()(),o(10,"div",83),h(11,"div",84),a()(),o(12,"div",79)(13,"div",80)(14,"div",81),l(15,"Sequential Write"),a(),o(16,"div",82),l(17),F(18,"number"),a()(),o(19,"div",83),h(20,"div",84),a()(),o(21,"div",79)(22,"div",80)(23,"div",81),l(24,"Random Read (4K)"),a(),o(25,"div",82),l(26),F(27,"number"),a()(),o(28,"div",83),h(29,"div",84),a()(),o(30,"div",79)(31,"div",80)(32,"div",81),l(33,"Random Write (4K)"),a(),o(34,"div",82),l(35),F(36,"number"),a()(),o(37,"div",83),h(38,"div",84),a()()()),t&2){let e=u(2);c(8),x(" ",ie(9,12,e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED.SPEED,"1.0-0")," MB/s "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_READ_SPEED.MAX)*100+"%"),c(6),x(" ",ie(18,15,e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED.SPEED,"1.0-0")," MB/s "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_SEQUENTIAL_WRITE_SPEED.MAX)*100+"%"),c(6),x(" ",ie(27,18,e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED.SPEED,"1.0-0")," IOPS "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_READ_SPEED.MAX)*100+"%"),c(6),x(" ",ie(36,21,e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED.SPEED,"1.0-0")," IOPS "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES==null||e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES.STORAGE_RANDOM_WRITE_SPEED.MAX)*100+"%")}}function _I(t,r){if(t&1&&(o(0,"div",77)(1,"div",78),l(2,"Network Benchmark Scores"),a(),o(3,"div",79)(4,"div",80)(5,"div",81),l(6,"Throughput"),a(),o(7,"div",82),l(8),F(9,"number"),a()(),o(10,"div",83),h(11,"div",84),a()(),o(12,"div",79)(13,"div",80)(14,"div",81),l(15,"Packet Rate"),a(),o(16,"div",82),l(17),F(18,"number"),a()(),o(19,"div",83),h(20,"div",84),a()(),o(21,"div",79)(22,"div",80)(23,"div",81),l(24,"Latency (same AZ)"),a(),o(25,"div",82),l(26),F(27,"number"),a()(),o(28,"div",83),h(29,"div",84),a()(),o(30,"div",79)(31,"div",80)(32,"div",81),l(33,"Latency (cross-AZ)"),a(),o(34,"div",82),l(35),F(36,"number"),a()(),o(37,"div",83),h(38,"div",84),a()()()),t&2){let e=u(2);c(8),x(" ",ie(9,12,e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED.SPEED,"1.0-0")," Gbps "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_THROUGHPUT_SPEED.MAX)*100+"%"),c(6),x(" ",ie(18,15,e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED.SPEED,"1.0-0")," PPS "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED.SPEED)/(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_PACKET_RATE_SPEED.MAX)*100+"%"),c(6),x(" ",ie(27,18,e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ.SPEED,"1.0-2")," ms "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ.SPEED)/(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_SAME_AZ.MAX)*100+"%"),c(6),x(" ",ie(36,21,e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ.SPEED,"1.0-2")," ms "),c(3),pe("width",(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ.SPEED)/(e.resourceDetails==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES==null||e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES.NETWORK_LATENCY_CROSS_AZ.MAX)*100+"%")}}function CI(t,r){if(t&1&&(o(0,"div",93)(1,"div",94)(2,"div",95),h(3,"iconify-icon",96),l(4),a(),o(5,"div",97),l(6),a()()()),t&2){let e=r.$implicit;c(4),x(" ",e==null?null:e.HEADING),c(2),x("\xA0",e==null?null:e.DETAIL)}}function xI(t,r){if(t&1&&(o(0,"div",90)(1,"div",43),l(2,"Network Security Features"),a(),g(3,CI,7,2,"div",92),a()),t&2){let e=u(2);c(3),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.NETWORK_SECURITY_FEATURES)||J(1,on))}}function vI(t,r){t&1&&(o(0,"div",98),h(1,"mat
12-progress-spinner",99),a())}function bI(t,r){t&1&&(o(0,"th",109),l(1,"Region"),a())}function yI(t,r){if(t&1&&(o(0,"td",110),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",e==null||e.document==null?null:e.document.actual_region_name)}}function MI(t,r){t&1&&(o(0,"th",109),l(1,"Payment Option"),a())}function SI(t,r){if(t&1&&(o(0,"td",110),l(1),a()),t&2){let e=r.$implicit,n=u(3);c(),x(" ",n.formatText(e==null||e.document==null?null:e.document.payment_option)||"--")}}function OI(t,r){t&1&&(o(0,"th",109),l(1,"Payment Plan"),a())}function PI(t,r){if(t&1&&(o(0,"td",110),l(1),a()),t&2){let e=r.$implicit,n=u(3);c(),x(" ",n.formatText(e==null||e.document==null?null:e.document.payment_plan)||"--")}}function EI(t,r){t&1&&(o(0,"th",109),l(1,"Average Monthly Price"),a())}function wI(t,r){if(t&1&&(o(0,"td",110),l(1),a()),t&2){let e=r.$implicit,n=u(3);c(),x(" $",n.getMonthlyPrice(e==null||e.document==null?null:e.document.hourly_rate_usd,e==null||e.document==null?null:e.document.service_provider))}}function II(t,r){t&1&&h(0,"tr",111)}function TI(t,r){t&1&&h(0,"tr",112)}function AI(t,r){if(t&1&&(o(0,"table",100),I(1,101),g(2,bI,2,0,"th",102)(3,yI,2,1,"td",103),T(),I(4,104),g(5,MI,2,0,"th",102)(6,SI,2,1,"td",103),T(),I(7,105),g(8,OI,2,0,"th",102)(9,PI,2,1,"td",103),T(),I(10,106),g(11,EI,2,0,"th",102)(12,wI,2,1,"td",103),T(),g(13,II,1,0,"tr",107)(14,TI,1,0,"tr",108),a()),t&2){let e=u(2);p("dataSource",e.dataSource),c(13),p("matHeaderRowDef",e.displayedColumns),c(),p("matRowDefColumns",e.displayedColumns)}}function DI(t,r){t&1&&(o(0,"div",113),l(1,"No pricing data available"),a())}function RI(t,r){t&1&&(o(0,"div",98),h(1,"mat-progress-spinner",99),a())}function kI(t,r){if(t&1){let e=A();o(0,"div",117)(1,"div",118)(2,"div",119)(3,"div",120),h(4,"img",18),F(5,"lowercase"),o(6,"div",19)(7,"div",20),l(8),F(9,"uppercase"),o(10,"span"),l(11),a()(),o(12,"div",121),l(13),a()()(),o(14,"div",122)(15,"div",34)(16,"div",123),h(17,"iconify-icon",124),a(),o(18,"div",35),l(19,"Avg."),a(),o(20,"div"),l(21),a(),o(22,"div",35),l(23,"/mo"),a()(),o(24,"div",125),l(25),a()()(),h(26,"mat-divider"),o(27,"div",126)(28,"div",127)(29,"div",128),l(30,"Product Name"),a(),o(31,"div",25),l(32),a()(),o(33,"div",127)(34,"div",128),l(35,"Instance Type"),a(),o(36,"div",25),l(37),a()(),o(38,"div",127)(39,"div",128),l(40,"Processor Type"),a(),o(41,"div",25),l(42),a()(),o(43,"div",127)(44,"div",128),l(45,"Network"),a(),o(46,"div",25),l(47),a()()(),o(48,"div",129)(49,"div",130)(50,"div",131),h(51,"iconify-icon",132),l(52),a(),o(53,"div",131),h(54,"iconify-icon",133),l(55),a()(),o(56,"div",134)(57,"button",135),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.viewInstanceDetails(i==null||i.hits[0]==null?null:i.hits[0].document))}),h(58,"iconify-icon",136),a(),o(59,"button",135),v("click",function(){let i=O(e).$implicit,s=u(3);return P(s.addToCart(i==null||i.hits[0]==null?null:i.hits[0].document))}),h(60,"iconify-icon",137),a()()()(),o(61,"div",138)(62,"div",31)(63,"div",32),l(64),a()(),o(65,"div",31)(66,"div",128),l(67),a(),o(68,"div",25),l(69),a()(),o(70,"div",31)(71,"div",128),l(72,"Monthly"),a(),o(73,"div",25),l(74),a()(),o(75,"div",31)(76,"div",32),l(77),a()()()()}if(t&2){let e=r.$implicit,n=u(3);c(4),p("src","assets/images/"+n.providerIconMap[X(5,23,e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.service_provider)],Qe),c(4),x("",X(9,25,e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.service_provider)," "),c(3),x("- ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.product_type),c(2),In("",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.vcpu_cores," vCPU \u2022 ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.ram_gb," GB RAM \u2022 ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.storage_spec," "),c(8),x("$",n.getMonthlyPrice(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.hourly_rate_usd,e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.service_provider)),c(4),x(" ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.instance_family," "),c(7),C(e
12==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.product_name),c(5),C(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.vm_name),c(5),x("",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.cpu_model," "),c(5),x("",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.network_performance," "),c(5),Pi(" ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.cs_global_region," - ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.cs_geo_region," - ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.cs_region," - ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.cs_city," "),c(3),rt(" ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.os_type," - ",e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.os," "),c(9),x("",n.formatText(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.payment_option)," "),c(3),C(n.formatText(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.term)),c(2),x("$",(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.upfront_amount_usd)==null?null:(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.upfront_amount_usd).toFixed(2)," "),c(5),x("$",(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.monthly_rate_usd)==null?null:(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.monthly_rate_usd).toFixed(2)," "),c(3),C(n.formatText(e==null||e.hits[0]==null||e.hits[0].document==null?null:e.hits[0].document.payment_plan))}}function NI(t,r){if(t&1&&(o(0,"div",114)(1,"div",43),l(2," Similar Deals "),a(),o(3,"div",115),g(4,kI,78,27,"div",116),a()()),t&2){let e=u(2);c(4),p("ngForOf",e.similarDeals||J(1,on))}}function FI(t,r){if(t&1&&(o(0,"div",93)(1,"div",94)(2,"div",95),l(3),a(),o(4,"div",97),l(5),a()()()),t&2){let e=r.$implicit;c(3),x("- ",e==null?null:e.HEADING),c(2),C(e==null?null:e.DETAIL)}}function zI(t,r){if(t&1&&(o(0,"div",139)(1,"div",43),l(2,"Recommended Use Cases"),a(),g(3,FI,6,2,"div",92),a()),t&2){let e=r.ngIf;c(3),p("ngForOf",e||J(1,on))}}function LI(t,r){if(t&1&&(o(0,"div",93)(1,"div",94)(2,"div",95),l(3),a(),o(4,"div",97),l(5),a()()()),t&2){let e=r.$implicit;c(3),x("- ",e==null?null:e.HEADING),c(2),C(e==null?null:e.DETAIL)}}function VI(t,r){if(t&1&&(o(0,"div",139)(1,"div",43),l(2,"Security & Compliance"),a(),g(3,LI,6,2,"div",92),a()),t&2){let e=r.ngIf;c(3),p("ngForOf",e||J(1,on))}}function BI(t,r){if(t&1){let e=A();o(0,"div",13)(1,"section",14)(2,"div",15)(3,"div",16)(4,"div",17),h(5,"img",18),F(6,"lowercase"),o(7,"div",19)(8,"div",20),l(9),a(),o(10,"div",21),l(11),a()()(),o(12,"div",22)(13,"div",23)(14,"div",24),l(15,"vCPU"),a(),o(16,"div",25),l(17),a()(),o(18,"div",23)(19,"div",24),l(20,"Memory"),a(),o(21,"div",25),l(22),a()(),o(23,"div",23)(24,"div",24),l(25,"Storage"),a(),o(26,"div",25),l(27),a()()()(),o(28,"div",26)(29,"div",27)(30,"div",28),g(31,sI,2,1,"div",29),F(32,"lowercase"),F(33,"lowercase"),g(34,cI,4,2,"div",30),F(35,"lowercase"),F(36,"lowercase"),o(37,"div",31),l(38,"Monthly - "),o(39,"span"),l(40),a()(),o(41,"div",32),l(42),a()(),o(43,"div",33)(44,"div",34)(45,"span",35),l(46,"Avg."),a(),l(47),o(48,"span",35),l(49,"/mo"),a()(),o(50,"button",36),v("click",function(){O(e);let i=u();return P(i.addToCart(i.instanceDetails))}),l(51," Add to Cart "),a()()()()(),g(52,dI,5,1,"div",37),a(),o(53,"section",38)(54,"mat-tab-group",39)(55,"mat-tab",40)(56,"div",41)(57,"div",42)(58,"div",43),l(59,"CPU Specifications"),a(),o(60,"div",22),l(61,"Processor"),o(62,"span"),l(63),a()(),o(64,"div",22),l(65,"Architecture"),o(66,"span"),l(67),a()(),o(68,"div",22),l(69,"Clock Speed"),o(70,"span"),l(71),a()(),o(72,"div",22),l(73,"Instance Family"),o(74,"span"),l(75),a()(),o(76,"div",22),l(77,"Burst Performance Capable "),o(78,"span"),l(79),a()(),o(80,"div",22),l(81,"Auto Recovery Capable"),o(82,"span"),l(83),a()(),o(84,"div",22),l(85,"Dedicated Host Capable"),o(86,"span"),l(87),a()(),o(88,"div",22),l(89,"GPU Available"),o(90,"span"),l(91),a()(),o(92,"div",22),l(93,"GPU Brand"),o(94,"span"),l(95),a()(),o(96,"div",22),l(97,"GPU Count"),o(98,"span"),l(99),a()(),o(100,"div",22),l(101,"GPU Memory"),o(102,"span"),l(103),a()(),o(104,"div",22),l(105,"GPU Model"),o(106,"span"),l(107),a()(),o(108,"div",22),l(109,"Host Type"),o(110,"span"),l(111),a()(),o(112,"div",22),l(113,"IPV4 (Per Interface)"),o(114,"span"),l(115),a()(),o(116,"div",22),l(117,"IPV6 Capable"),o(118,"span"),l(119),a()(),o(120,"div",22),l(121,"IPV6 (Per Interface)"),o(122,"span"),l(123),a()(),o(124,"div",22),l(125,"Latest Generation"),o(126,"span"),l(127),a()()(),o(128,"div",44)(129,"div"),g(130,pI,35,12,"div",45)(131,mI,5,1,"div",46),a(),o(132,"div"),g(133,uI,6,1,"div",47),a()()()(),o(134,"mat-tab",48)(135,"div",41)(136,"div",42)(137,"div",43),l(138,"Memory Specifications"),a(),o(139,"div",22),l(140,"Operating System"),o(141,"span"),l(142),a()(),o(143,"div",22),l(144,"Operating System Type"),o(145,"span"),l(146),a()(),o(147,"div",22),l(148,"RAM"),o(149,"span"),l(150),a()(),o(151,"div",22),l(152,"RAM Type"),o(153,"span"),l(154),a()(),o(155,"div",22),l(156,"Total GPU Memory"),o(157,"span"),l(158),a()()(),o(159,"div",44),g(160,gI,30,18,"div",45)(161,fI,6,1,"div",49),a()()(),o(162,"mat-tab",50)(163,"div",41)(164,"div",42)(165,"div",43),l(166,"Storage Specifications"),a(),o(167,"div",22),l(168,"Storage Option Available"),o(169,"span"),l(1
1270),a()(),o(171,"div",22),l(172,"Storage"),o(173,"span"),l(174),a()(),o(175,"div",22),l(176,"Storage Type"),o(177,"span"),l(178),a()()(),o(179,"div",44),g(180,hI,39,24,"div",45),a()()(),o(181,"mat-tab",51)(182,"div",41)(183,"div",42)(184,"div",43),l(185,"Network Specifications"),a(),o(186,"div",22),l(187,"Network Bandwidth"),o(188,"span"),l(189),a()(),o(190,"div",22),l(191,"Max Network Bandwidth"),o(192,"span"),l(193),a()(),o(194,"div",22),l(195,"Min Network Bandwidth"),o(196,"span"),l(197),a()(),o(198,"div",22),l(199,"Max Network Cards"),o(200,"span"),l(201),a()(),o(202,"div",22),l(203,"Network Encryption Capable"),o(204,"span"),l(205),a()(),o(206,"div",22),l(207,"Max Network Interfaces"),o(208,"span"),l(209),a()(),o(210,"div",22),l(211,"Network Performance"),o(212,"span"),l(213),a()()(),o(214,"div",44),g(215,_I,39,24,"div",45)(216,xI,4,2,"div",49),a()()()()(),o(217,"section",52)(218,"div",53)(219,"div",54)(220,"div",55),l(221,"CloudAtler Atlerpilot"),a(),o(222,"div",56),l(223,"Put your cloud on Atlerpilot"),a(),o(224,"div",57),l(225," Operate multi-cloud with confidence\u2014see spend in real time, automate fixes, and enforce guardrails without slowing teams "),a(),o(226,"div",58)(227,"div",59),h(228,"img",60),o(229,"span",61),l(230," Real-time cost tracking"),a()(),o(231,"div",59),h(232,"img",62),o(233,"span",61),l(234," Automated optimization"),a()(),o(235,"div",59),h(236,"img",63),o(237,"span",61),l(238," Security guardrails"),a()()()(),o(239,"div"),h(240,"img",64),a()()(),o(241,"section",14),g(242,vI,2,0,"div",65),o(243,"div",66)(244,"div",43),l(245," Regional Pricing Comparison "),a(),o(246,"div",67),g(247,AI,15,3,"table",68),a(),h(248,"mat-paginator",69,0),g(250,DI,2,0,"div",70),a()(),o(251,"section",14),g(252,RI,2,0,"div",65)(253,NI,5,2,"div",71),a(),o(254,"section",72),g(255,zI,4,2,"div",73)(256,VI,4,2,"div",73),a()()}if(t&2){let e=u();c(5),p("src","assets/images/"+e.providerIconMap[X(6,69,e.instanceDetails==null?null:e.instanceDetails.service_provider)],Qe),c(4),In("",e.instanceDetails==null?null:e.instanceDetails.product_type," - ",e.instanceDetails==null?null:e.instanceDetails.product_name," - ",e.instanceDetails==null?null:e.instanceDetails.vm_name," "),c(2),Pi("",e.instanceDetails==null?null:e.instanceDetails.cs_global_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_geo_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_city),c(6),rt("",e.instanceDetails==null?null:e.instanceDetails.vcpu_cores," vCPU",(e.instanceDetails==null?null:e.instanceDetails.vcpu_cores)>1?"s":""," "),c(5),x("",e.instanceDetails==null?null:e.instanceDetails.ram_gb," GB"),c(5),C(e.instanceDetails==null?null:e.instanceDetails.storage_spec),c(4),p("ngIf",X(32,71,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="partial upfront"||X(33,73,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="all upfront"),c(3),p("ngIf",X(35,75,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="partial upfront"||X(36,77,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="all upfront"),c(6),x("$",(e.instanceDetails==null?null:e.instanceDetails.monthly_rate_usd)==null?null:(e.instanceDetails==null?null:e.instanceDetails.monthly_rate_usd).toFixed(2)),c(2),C(e.formatText(e.instanceDetails==null?null:e.instanceDetails.payment_plan)),c(5),x(" $",e.getMonthlyPrice(e.instanceDetails==null?null:e.instanceDetails.hourly_rate_usd,e.instanceDetails==null?null:e.instanceDetails.service_provider)," "),c(5),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.DESCRIPTION),c(11),C((e.instanceDetails==null?null:e.instanceDetails.cpu_model)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.cpu_model),c(4),C((e.instanceDetails==null?null:e.instanceDetails.cpu_architecture)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.cpu_architecture),c(4),C((e.instanceDetails==null?null:e.instanceDetails.cpu_clock_ghz)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.cpu_clock_ghz),c(4),C((e.instanceDetails==null?null:e.instanceDetails.instance_family)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.instance_family),c(4),C((e.instanceDetails==null?null:e.instanceDetails.burst_performance_capable)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.burst_performance_capable),c(4),C((e.instanceDetails==null?null:e.instanceDetails.auto_recovery_capable)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.auto_recovery_capable),c(4),C((e.instanceDetails==null?null:e.instanceDetails.dedicated_host_capable)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.dedicated_host_capable),c(4),C((e.instanceDetails==null?null:e.instanceDetails.gpu_available)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.gpu_available),c(4),C((e.instanceDetails==null?null:e.instanceDetails.gpu_brand)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.gpu_brand),c(4),C((e.instanceDetails==null?null:e.instanceDetails.gpu_count)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.gpu_count),c(4),C((e.instanceDetails==null?null:e.instanceDetails.gpu_memory_mb)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.gpu_memory_mb)+" MB"),c(4),C((e.instanceDetails==null?null:e.instanceDetails.gpu_model)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.gpu_model),c(4),C((e.instanceDetails==null?null:e.instanceDetails.host_type)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.host_type),c(4),C((e.instanceDetails==null?null:e.instanceDetails.ipv4_per_interface)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.ipv4_per_interface),c(4),C((e.instanceDetails==null?null:e.instanceDetails.ipv6_capable)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.ipv6_capable),c(4),C((e.instanceDetails==null?null:e.instanceDetails.ipv6_per_interface)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.ipv6_per_interface),c(4),C((e.instanceDetails==null?null:e.instanceDetails.is_latest_generation)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.is_latest_generation),c(3),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.CPU_BENCHMARK_SCORES),c(),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.CPU_PERFORMANCE),c(2),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.RECOMMENDATION),c(9),C((e.instanceDetails==null?null:e.instanceDetails.os)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.os),c(4),C((e.instanceDetails==null?null:e.instanceDetails.os_type)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.os_type),c(4),C((e.instanceDetails==null?null:e.instanceDetails.ram_gb)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.ram_gb)+" GB"),c(4),C((e.instanceDetails==null?null:e.instanceDetails.ram_type)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.ram_type),c(4),C((e.instanceDetails==null?null:e.instanceDetails.total_gpu_memory_mb)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.total_gpu_memory_mb)+" MB"),c(2),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.MEMORY_BENCHMARK_SCORES),c(),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.MEMORY_RECOMMENDATION),c(9),C((e.instanceDetails==null?null:e.instanceDetails.storage_option)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.storage_option),c(4),C((e.instanceDetails==null?null:e.instanceDetails.storage_spec)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.storage_spec),c(4),C((e.instanceDetails==null?null:e.instanceDetails.storage_type)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.storage_type),c(2),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.STORAGE_BENCHMARK_SCORES),c(9),C((e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_gbps)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_gbps)+" GBPS"),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_max_gbps)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_max_gbps)+" GBPS"),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_min_gbps)=="na"?"--":(e.instanceDetails==null?null:e.instanceDetails.network_bandwidth_min_gbps)+" GBPS"),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_cards_max)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.network_cards_max),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_encryption_capable)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.network_encryption_capable),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_interfaces_max)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.network_interfaces_max),c(4),C((e.instanceDetails==null?null:e.instanceDetails.network_performance)=="na"?"--":e.instanceDetails==null?null:e.instanceDetails.network_performance),c(2),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.NETWORK_BENCHMARK_SCORES),c(),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.NETWORK_SECURITY_FEATURES),c(26),p("ngIf",e.pricingLoading),c(),p("hidden",e.pricingLoading),c(4),p("ngIf",e.dataSource.data.length>0),c(),p("pageSize",5)("pageIndex",0)("hidePageSize",!0),c(2),p("ngIf",e.dataSource.data.length==0),c(2),p("ngIf",e.dealLoa
12ding),c(),p("ngIf",!e.dealLoading),c(2),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.RECOMMENDED_USE_CASES),c(),p("ngIf",e.resourceDetails==null?null:e.resourceDetails.SECURITY_COMPLIANCE)}}function UI(t,r){t&1&&h(0,"mat-divider")}function jI(t,r){if(t&1&&(o(0,"div",179)(1,"div",180)(2,"div",168),l(3),a(),o(4,"div",181),l(5),a(),o(6,"div",170),l(7),a()(),g(8,UI,1,0,"mat-divider",182),a()),t&2){let e=r.$implicit,n=r.index,i=u(2);c(3),C(e==null?null:e.CATEGORY),c(2),C(e==null?null:e.SPECIFICATION),c(2),C(e==null?null:e.VALUE),c(),p("ngIf",n<(i.resourceDetails==null?null:i.resourceDetails.TECHNICAL_SPECIFICATION.length)-1)}}function $I(t,r){if(t&1&&(o(0,"div",183),h(1,"img",184),o(2,"div"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function qI(t,r){if(t&1&&(o(0,"div",183),h(1,"img",185),o(2,"div"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function HI(t,r){if(t&1&&(o(0,"div",186)(1,"div"),h(2,"img",187),a(),o(3,"div",188)(4,"div",189),l(5),a(),o(6,"div",190),l(7),a()()()),t&2){let e=r.$implicit;c(5),C(e==null?null:e.HEADING),c(2),C(e==null?null:e.DETAIL)}}function WI(t,r){if(t&1&&(o(0,"div",183)(1,"div"),l(2),a()()),t&2){let e=r.$implicit;c(2),C(e)}}function GI(t,r){if(t&1){let e=A();o(0,"div",13)(1,"section",140)(2,"div"),h(3,"img",141),a(),o(4,"div",142)(5,"div",143),l(6),F(7,"uppercase"),a(),o(8,"div",144),l(9),a(),o(10,"div",145),l(11),a()()(),o(12,"section",146)(13,"div",147),l(14,"Storage Cost Calculator"),a(),o(15,"div",148)(16,"form",149)(17,"div",150)(18,"label",151),l(19,"Storage Amount/Mo"),a(),h(20,"input",152),a(),o(21,"div",150)(22,"label",151),l(23,"Retrieval Amount/Mo"),a(),h(24,"input",153),a(),o(25,"div",150)(26,"label",151),l(27,"Read Request/Mo"),a(),h(28,"input",154),a(),o(29,"div",150)(30,"label",151),l(31,"Write Request/Mo"),a(),h(32,"input",155),a(),o(33,"div",156)(34,"button",157),v("click",function(){O(e);let i=u();return P(i.updateCalculator())}),l(35,"Update"),a()()(),o(36,"div",158)(37,"div",159),l(38,"Cost Breakdown"),a(),o(39,"div",160)(40,"div",161)(41,"div",162),l(42,"Storage Amount per Month:"),a(),o(43,"div",163),l(44),a()(),o(45,"div",161)(46,"div",162),l(47,"Retrieval Amount per Month:"),a(),o(48,"div",163),l(49),a()(),o(50,"div",161)(51,"div",162),l(52,"Read Amount per Request:"),a(),o(53,"div",163),l(54),a()(),o(55,"div",161)(56,"div",162),l(57,"Write Amount per Request:"),a(),o(58,"div",163),l(59),a()()(),h(60,"mat-divider"),o(61,"div",161)(62,"div",164),l(63,"Total Monthly Cost:"),a(),o(64,"div",164),l(65),a()(),h(66,"mat-divider"),o(67,"div",159),l(68,"Selected Configuration"),a(),o(69,"div",160)(70,"div",161)(71,"div",162),l(72,"Region:"),a(),o(73,"div",163),l(74),a()(),o(75,"div",161)(76,"div",162),l(77,"City:"),a(),o(78,"div",163),l(79),a()()(),o(80,"div",156)(81,"button",165),v("click",function(){O(e);let i=u();return P(i.addToCart(i.instanceDetails))}),l(82," Add to Cart "),a()()()()(),o(83,"section",146)(84,"div",147),l(85,"Technical Specifications"),a(),o(86,"div",166)(87,"div",167)(88,"div",168),l(89,"Category"),a(),o(90,"div",169),l(91,"Specification"),a(),o(92,"div",170),l(93,"Value"),a()(),g(94,jI,9,4,"div",171),a()(),o(95,"section",146)(96,"div",147),l(97,"Security & Compliance"),a(),o(98,"div",172)(99,"div",173)(100,"div",174),l(101,"Security Features"),a(),o(102,"div",175),g(103,$I,4,1,"div",176),a()(),o(104,"div",173)(105,"div",174),l(106,"Compliance Standards"),a(),o(107,"div",175),g(108,qI,4,1,"div",176),a()()()(),o(109,"section",146)(110,"div",147),l(111,"Data Redundancy"),a(),o(112,"div",177),g(113,HI,8,2,"div",178),a()(),o(114,"section",146)(115,"div",147),l(116,"Availability Standards"),a(),o(117,"div",177),g(118,WI,3,1,"div",176),a()()()}if(t&2){let e=u();c(6),rt("",X(7,17,e.instanceDetails==null?null:e.instanceDetails.service_provider)," ",e.instanceDetails==null?null:e.instanceDetails.storage_type),c(3),C(e.instanceDetails==null?null:e.instanceDetails.storage_type),c(2),C(e.resourceDetails==null?null:e.resourceDetails.DESCRIPTION),c(5
12),p("formGroup",e.costForm),c(28),x("$",e.storageCostBreakdown.storage),c(5),x("$",e.storageCostBreakdown.retrieval),c(5),x("$",e.storageCostBreakdown.read),c(5),x("$",e.storageCostBreakdown.write),c(6),x("$",e.storageCostBreakdown.total),c(9),C(e.instanceDetails==null?null:e.instanceDetails.cs_region),c(5),C(e.instanceDetails==null?null:e.instanceDetails.cs_city),c(15),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.TECHNICAL_SPECIFICATION)||J(19,on)),c(9),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.SECURITY_COMPLIANCE)||J(20,on)),c(5),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.COMPLIANCE_STANDARD)||J(21,on)),c(5),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.DATA_REDUNDANCY)||J(22,on)),c(5),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.AVAILABILITY_STANDARD)||J(23,on))}}function YI(t,r){if(t&1&&(o(0,"div",211)(1,"div",212),l(2),a(),o(3,"div",213),l(4),a()()),t&2){let e=r.$implicit;c(2),C(e==null?null:e.HEADING),c(2),C(e==null?null:e.VALUE)}}function KI(t,r){if(t&1&&(o(0,"div",208)(1,"div",189),l(2),a(),o(3,"div",209),g(4,YI,5,2,"div",210),a()()),t&2){let e=r.$implicit,n=u(2);c(2),C(n.formatText((e==null||e.key==null?null:e.key.toString())||"")),c(2),p("ngForOf",n.getArrayValue(e==null?null:e.value))}}function QI(t,r){if(t&1&&(o(0,"div",183),h(1,"img",184),o(2,"div"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function JI(t,r){if(t&1&&(o(0,"div",183),h(1,"img",185),o(2,"div"),l(3),a()()),t&2){let e=r.$implicit;c(3),C(e)}}function ZI(t,r){t&1&&h(0,"mat-divider")}function XI(t,r){if(t&1&&(o(0,"div",179)(1,"div",214)(2,"div",197),l(3),a(),o(4,"div",197),l(5),a(),o(6,"div",215),l(7),a(),o(8,"div",198),l(9),a()(),g(10,ZI,1,0,"mat-divider",182),a()),t&2){let e=r.$implicit,n=r.index,i=u(2);c(3),C(e==null?null:e.METRIC),c(2),C(e==null?null:e.STANDARD),c(2),C(e==null?null:e.OPTIMIZED),c(2),C(e==null?null:e.DESCRIPTION),c(),p("ngIf",n<(i.resourceDetails==null?null:i.resourceDetails.PERFORMANCE_BENCHMARK.length)-1)}}function eT(t,r){if(t&1&&(o(0,"div",216),l(1),a()),t&2){let e=r.$implicit;c(),x(" - ",e," ")}}function tT(t,r){if(t&1&&(o(0,"div",217),l(1),a()),t&2){let e=r.$implicit;c(),x(" - ",e," ")}}function nT(t,r){if(t&1){let e=A();o(0,"div",13)(1,"section",140)(2,"div"),h(3,"img",191),a(),o(4,"div",142)(5,"div",143),l(6),F(7,"uppercase"),a(),o(8,"div",144),l(9),a(),o(10,"div",145),l(11),a()()(),o(12,"section",146)(13,"div",147),l(14,"Storage Cost Calculator"),a(),o(15,"div",148)(16,"form",149)(17,"div",150)(18,"label",151),l(19,"No. of Request"),a(),h(20,"input",192),a(),o(21,"div",150)(22,"label",151),l(23,"Duration of Request (In Millisecond)"),a(),h(24,"input",193),a(),o(25,"div",150)(26,"label",151),l(27,"Amount of Memory"),a(),h(28,"input",194),a(),o(29,"div",156)(30,"button",157),v("click",function(){O(e);let i=u();return P(i.updateCalculator())}),l(31,"Update"),a()()(),o(32,"div",158)(33,"div",159),l(34,"Cost Breakdown"),a(),o(35,"div",160)(36,"div",161)(37,"div",162),l(38,"No. of Request:"),a(),o(39,"div",163),l(40),a()(),o(41,"div",161)(42,"div",162),l(43,"Duration of Request (In Millisecond):"),a(),o(44,"div",163),l(45),a()(),o(46,"div",161)(47,"div",162),l(48,"Amount of Memory:"),a(),o(49,"div",163),l(50),a()()(),h(51,"mat-divider"),o(52,"div",161)(53,"div",164),l(54,"Total Monthly Cost:"),a(),o(55,"div",164),l(56),a()(),h(57,"mat-divider"),o(58,"div",159),l(59,"Selected Configuration"),a(),o(60,"div",160)(61,"div",161)(62,"div",162),l(63,"Region:"),a(),o(64,"div",163),l(65),a()(),o(66,"div",161)(67,"div",162),l(68,"City:"),a(),o(69,"div",163),l(70),a()()(),o(71,"div",156)(72,"button",165),v("click",function(){O(e);let i=u();return P(i.addToCart(i.instanceDetails))}),l(73," Add to Cart "),a()()()()(),o(74,"section",146)(75,"div",147),l(76,"Technical Specifications"),a(),o(77,"div",195),g(78,KI,5,2,"div",196),F(79,"keyvalue"),a()(),o(80,"section",146)(81,"div",147),l(82,"Security & Compliance"),a(),o(83,"div",172)(84,"div",173)(85,"div",174),l(86,"Security Features"),a(),o(87,"div",175),g(88,QI,4,1,"div",176),a()(),o(89,"div",173)(90,"div",174),l(91,"Compliance Standards"),a(),o(92,"div",175),g(93,JI,4,1,"div",176),a()()()(),o(94,"section",146)(95,"div",147),l(96,"Performance Benchmarks"),a(),o(97,"div",166)(98,"div",167)(99,"div",197),l(100,"Metric"),a(),o(101,"div",197),l(102,"Standard"),a(),o(103,"div",197),l(104,"Optimized"),a(),o(105,"div",198),l(106,"Description"),a()(),g(107,XI,11,5,"div",171),a()(),o(108,"section",199)(109,"div",200)(110,"div",201),l(111,"Standard Configuration"),a(),o(112,"div",202),g(113,eT,2,1,"div",203),a()(),o(114,"div",204)(115,"div",205),l(116,"Optimized Configuration"),a(),o(117,"div",206),g(118,tT,2,1,"div",207),a()()()()}if(t&2){let e=u();c(6),rt("",X(7,17,e.instanceDetails==null?null:e.instanceDetails.service_provider)," ",e.instanceDetails==null?null:e.instanceDetails.product_name),c(3),C(e.instanceDetails==null?null:e.instanceDetails.product_name),c(2),C(e.resourceDetails==null?null:e.resourceDetails.DESCRIPTION),c(5
12),p("formGroup",e.costForm),c(24),C(e.costForm.value.noOfRequest),c(5),C(e.costForm.value.durationOfRequest),c(5),C(e.costForm.value.amountOfMemory),c(6),x(" $",e.functionCostBreakdown.totalCost),c(9),C(e.instanceDetails==null?null:e.instanceDetails.cs_region),c(5),C(e.instanceDetails==null?null:e.instanceDetails.cs_city),c(8),p("ngForOf",X(79,19,e.resourceDetails==null?null:e.resourceDetails.TECHNICAL_SPECIFICATION)),c(10),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.SECURITY_COMPLIANCE)||J(21,on)),c(5),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.COMPLIANCE_STANDARD)||J(22,on)),c(14),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.PERFORMANCE_BENCHMARK)||J(23,on)),c(6),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.STANDARD_CONFIGURATION)||J(24,on)),c(5),p("ngForOf",(e.resourceDetails==null?null:e.resourceDetails.OPTIMIZED_CONFIGURATION)||J(25,on))}}function iT(t,r){if(t&1&&(o(0,"span"),l(1),a()),t&2){let e=u(2);c(),In(" ",e.formatText(e.instanceDetails==null?null:e.instanceDetails.payment_option)," - ",e.formatText(e.instanceDetails==null?null:e.instanceDetails.term)," - $",(e.instanceDetails==null?null:e.instanceDetails.upfront_amount_usd)==null?null:(e.instanceDetails==null?null:e.instanceDetails.upfront_amount_usd).toFixed(2))}}function oT(t,r){if(t&1&&(o(0,"div",218)(1,"div",17)(2,"div",219),h(3,"img",18),F(4,"lowercase"),o(5,"div",220)(6,"div",221),l(7),a(),o(8,"div",222),g(9,iT,2,3,"span",182),F(10,"lowercase"),F(11,"lowercase"),l(12),a()()()()()),t&2){let e=u();c(3),p("src","assets/images/"+e.providerIconMap[X(4,9,e.instanceDetails==null?null:e.instanceDetails.service_provider)],Qe),c(4),rt("",e.instanceDetails==null?null:e.instanceDetails.product_name," ",e.instanceDetails==null?null:e.instanceDetails.vm_name),c(2),p("ngIf",X(10,11,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="partial upfront"||X(11,13,e.instanceDetails==null?null:e.instanceDetails.payment_option)=="all upfront"),c(3),Jl(" \u2022 Monthly - $",(e.instanceDetails==null?null:e.instanceDetails.monthly_rate_usd)==null?null:(e.instanceDetails==null?null:e.instanceDetails.monthly_rate_usd).toFixed(2),"/month \u2022 ",e.instanceDetails==null?null:e.instanceDetails.cs_global_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_geo_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_region," - ",e.instanceDetails==null?null:e.instanceDetails.cs_city," ")}}var _u=(()=>{class t{get providerIconMap(){return Wn}constructor(e,n,i,s,d,m,f,_,b,M){this.router=e,this.route=n,this.authService=i,this.notify=s,this.cartService=d,this.dialog=m,this.fb=f,this.searchStateService=_,this.ngZone=b,this.cdr=M,this.loading=!1,this.pricingLoading=!0,this.dealLoading=!0,this.instanceId="",this.instanceDetails={},this.resourceDetails={},this.similarDeals=[],this.monthlyHours=ye.HOURS_IN_A_MONTH,this.displayedColumns=["region_name","payment_option","payment_plan","avg_monthly_price"],this.dataSource=new fn,this.completeFormArray=[],this.completeSearchCriteria={},this.storageCostBreakdown={storage:"0.00",retrieval:"0.00",read:"0.00",write:"0.00",total:"0.00"},this.functionCostBreakdown={totalCost:"0.00"},this.providerConfirmationMessage="You are about to add the product which is from different cloud providers than the one you have in your cart. Are you sure you want to add?",this.costForm=this.fb.group({storageAmount:[""],retrievalAmount:[""],readRequests:[""],writeRequests:[""],noOfRequest:[""],durationOfRequest:[""],amountOfMemory:[""]})}ngOnInit(){}ngAfterViewInit(){this.loadInstanceData(),this.searchStateService.completeFormArray$.pipe($i(e=>!!e&&e.length>0)).subscribe(e=>{this.updateCompleteFormArray(e)})}getArrayValue(e){return Array.isArray(e)?e:[]}loadInstanceData(){let e=this.route.snapshot.paramMap.get("slug"),n=String(e||"").split("--");this.instanceId=n[n.length-1],this.instanceId?this.getResource():this.router.navigate(["/admin-dashboard/cloud-atler"]),this.updateMetaTags(e)}updateMetaTags(e){return e}updateCompleteFormArray(e){this.completeFormArray=[...e],this.extractCompleteSearchCriteria(),this.updateCostFormWithDynamicValues()}getCompleteSearchCriteria(){return this.completeSearchCriteria}extractCompleteSearchCriteria(){if(this.completeFormArray&&this.completeFormArray.length>0){let e=this.completeFormArray[0];this.completeSearchCriteria={selectedService:e?.service_type?.[0],selectedProduct:e?.product_name?.[0],storageAmount:e?.storage_amount?.[0],retrievalAmount:e?.retrieval_amount?.[0],readRequests:e?.read_requests?.[0],writeRequests:e?.write_requests?.[0],noOfRequest:e?.no_of_request?.[0],durationOfRequest:e?.duration_of_request?.[0],amountOfMemory:e?.amount_of_memory?.[0]}}}updateCostFormWithDynamicValues(){if(this.instanceDetails?.product_name==="object-storage"){let e=this.getCompleteSearchCriteria(),n=this.isStru
12cturedSearchContext()&&this.hasValidStorageInputs(),i=n?e.storageAmount:500,s=n?e.retrievalAmount:500,d=n?e.readRequests:1e4,m=n?e.writeRequests:1e4;this.costForm.patchValue({storageAmount:i,retrievalAmount:s,readRequests:d,writeRequests:m})}else if(this.instanceDetails?.product_name==="Serverless Function"){let e=this.getCompleteSearchCriteria(),n=this.isStructuredSearchContext()&&this.hasValidFunctionInputs(),i=n?e.noOfRequest:1e6,s=n?e.durationOfRequest:300,d=n?e.amountOfMemory:256;this.costForm.patchValue({noOfRequest:i,durationOfRequest:s,amountOfMemory:d})}this.updateCalculator()}isStructuredSearchContext(){return this.completeFormArray&&this.completeFormArray.length>0&&Object.keys(this.completeSearchCriteria).length>0}getCurrentServiceType(){return this.getCompleteSearchCriteria()?.selectedService||null}getCurrentProductName(){return this.getCompleteSearchCriteria()?.selectedProduct||null}hasValidStorageInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.storageAmount&&e?.retrievalAmount&&e?.readRequests&&e?.writeRequests)}hasValidFunctionInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.noOfRequest&&e?.durationOfRequest&&e?.amountOfMemory)}isScientificNotation(e){let n=e,i=String(n);return i.includes("e")||i.includes("E")?n=Number(n).toFixed(10):n=Number(n),n}updateCalculator(){if(this.instanceDetails?.product_name==="object-storage"){let e=this.costForm.value,n=e.storageAmount||500,i=e.retrievalAmount||500,s=e.readRequests||1e4,d=e.writeRequests||1e4;this.costForm.patchValue({storageAmount:n,retrievalAmount:i,readRequests:s,writeRequests:d}),this.storageCostBreakdown=this.calculateStorageCostBreakdown(n,i,s,d)}else if(this.instanceDetails?.product_name==="Serverless Function"){let e=this.costForm.value,n=e.noOfRequest||1e6,i=e.durationOfRequest||300,s=e.amountOfMemory||256;this.costForm.patchValue({noOfRequest:n,durationOfRequest:i,amountOfMemory:s});let d=this.getFunctionMonthlyPrice(this.instanceDetails?.memory_duration_price_per_gb_s,this.instanceDetails?.price_per_request,this.instanceDetails?.duration_price_per_s,this.instanceDetails?.service_provider,this.instanceDetails?.memory_duration_tier_available,this.instanceDetails?.memory_duration_tier_gb_s);this.functionCostBreakdown={totalCost:d}}}calculateStorageCostBreakdown(e,n,i,s){let d=0,m=this.instanceDetails?.storage_tier_gb,f=[],_=0,b=0;if(this.instanceDetails?.storage_tier_available===!1)d=e*this.isScientificNotation(this.instanceDetails?.storage_price_per_gb[0]);else if(this.instanceDetails?.storage_tier_available===!0){for(let R=0;R<m.length;R++)f=[],f=m[R].split("-"),f[1]=="~"?e>parseInt(f[0])&&(_=R):e>parseInt(f[0])&&e<=parseInt(f[1])&&(_=R);for(let R=_;R>=0;R--)f=[],f=m[R].split("-"),_==R?b+=(e-parseInt(f[0]))*this.isScientificNotation(this.instanceDetails?.storage_price_per_gb[R]):b+=(parseInt(f[1])-parseInt(f[0]))*this.isScientificNotation(this.instanceDetails?.storage_price_per_gb[R]);d=b}let M=n*this.isScientificNotation(this.instanceDetails?.retrieval_price_per_gb)||0,S=i*this.isScientificNotation(this.instanceDetails?.read_price_per_request)||0,w=s*this.isScientificNotation(this.instanceDetails?.write_price_per_request)||0,D=d+M+S+w;return{storage:d?.toFixed(2)||"0.00",retrieval:M?.toFixed(2)||"0.00",read:S?.toFixed(2)||"0.00",write:w?.toFixed(2)||"0.00",total:D?.toFixed(2)||"0.00"}}getFunctionMonthlyPrice(e,n,i,s,d,m){let f=0,_=0,b=0,M=0,S=0,w=m,D=[],R=0,W=0,H=0;if(d===!1)f=this.costForm.value.noOfRequest*(this.costForm.value.durationOfRequest/1e3),_=this.costForm.value.amountOfMemory/1024*f,b=_*this.isScientificNotation(e[0]),M=this.costForm.value.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i)),H=b+M+S;else if(d===!0){f=this.costForm.value.noOfRequest*(this.costForm.value.durationOfRequest/1e3),_=this.costForm.value.amountOfMemory/1024*f,M=this.costForm.value.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i));for(let L=0;L<w.length;L++)D=[],D=w[L].split("-"),D[1]=="~"?_>parseInt(D[0])&&(R=L):_>parseInt(D[0])&&_<=parseInt(D[1])&&(R=L);for(let L=R;L>=0;L--)D=[],D=w[L].split("-"),R==L?W+=(_-parseInt(D[0]))*this.isScientificNotation(e[L]):W+=(parseInt(D[1])-parseInt(D[0]))*this.isScientificNotation(e[L]);H=W+M+S}return H?.toFixed(2)||"0.00"}getResource(){this.setLoading(!0),this.authService.getResource(this.instanceId).subscribe({next:e=>{this.instanceDetails=e?.object?.results?.[0]?.hits?.[0]?.document||e?.object?.hits?.[0]?.document||e?.object||{},this.instanceDetails?(this.getResourceDetails(),this.instanceDetails?.product_name==="Virtual Machine"&&(this.getPricingDetails(),this.get
12SimilarDeal()),(this.instanceDetails?.product_name==="object-storage"||this.instanceDetails?.product_name==="Serverless Function")&&this.updateCostFormWithDynamicValues()):this.setLoading(!1)},error:e=>{this.setLoading(!1),this.notify.showNotification(e?.error?.message,"top",E[e?.error?.status]?E[e?.error?.status]:"error",e?.error?.status)}})}getResourceDetails(){this.setLoading(!0);let e={};this.instanceDetails?.product_name==="Virtual Machine"?e={PRODUCT_NAME:this.instanceDetails?.product_name,DATA:{SERVICE_PROVIDER:this.instanceDetails?.service_provider,VM_NAME:this.instanceDetails?.vm_name,ACTUAL_REGION_CODE:this.instanceDetails?.actual_region_code,ACTUAL_REGION_NAME:this.instanceDetails?.actual_region_name}}:this.instanceDetails?.product_name==="object-storage"?e={PRODUCT_NAME:this.instanceDetails?.product_name,DATA:{SERVICE_PROVIDER:this.instanceDetails?.service_provider,ACTUAL_REGION_CODE:this.instanceDetails?.actual_region_code,ACTUAL_REGION_NAME:this.instanceDetails?.actual_region_name,ACCESS_TIER:this.instanceDetails?.access_tier,ACCESS_TIER_OPTION:this.instanceDetails?.access_tier_option,REDUNDANCY:this.instanceDetails?.redundancy}}:this.instanceDetails?.product_name==="Serverless Function"&&(e={PRODUCT_NAME:this.instanceDetails?.product_name,DATA:{SERVICE_PROVIDER:this.instanceDetails?.service_provider,ACTUAL_REGION_CODE:this.instanceDetails?.actual_region_code,ACTUAL_REGION_NAME:this.instanceDetails?.actual_region_name,SERVERLESS_ARCHITECTURE:this.instanceDetails?.serverless_architecture}}),this.authService.getResourceDetails(e).subscribe({next:n=>{this.resourceDetails=n?.object||{},this.setLoading(!1)},error:n=>{this.setLoading(!1),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}})}getPricingDetails(){let e={PRODUCT_TYPE:this.instanceDetails?.product_type,PRODUCT_NAME:this.instanceDetails?.product_name,INSTANCE_FAMILY:this.instanceDetails?.instance_family,SERVICE_PROVIDER:this.instanceDetails?.service_provider,VM_NAME:this.instanceDetails?.vm_name,HOST_TYPE:this.instanceDetails?.host_type,OS:this.instanceDetails?.os,OS_TYPE:this.instanceDetails?.os_type,PAYMENT_OPTION:this.instanceDetails?.payment_option,PAYMENT_PLAN:this.instanceDetails?.payment_plan,TERM:this.instanceDetails?.term};this.authService.getRegionalPricing(e).subscribe({next:n=>{this.dataSource.data=n?.object?.results?.[0]?.hits||[],this.dataSource.paginator=this.paginator,this.pricingLoading=!1,this.refreshView()},error:n=>{this.pricingLoading=!1,this.refreshView(),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}})}getSimilarDeal(){let e={PRODUCT_TYPE:this.instanceDetails?.product_type,PRODUCT_NAME:this.instanceDetails?.product_name,INSTANCE_FAMILY:this.instanceDetails?.instance_family,OS:this.instanceDetails?.os,OS_TYPE:this.instanceDetails?.os_type,PAYMENT_OPTION:this.instanceDetails?.payment_option,PAYMENT_PLAN:this.instanceDetails?.payment_plan,TERM:this.instanceDetails?.term,CS_CITY:this.instanceDetails?.cs_city,RAM_GB:this.instanceDetails?.ram_gb,VCPU_CORES:this.instanceDetails?.vcpu_cores};this.authService.getSimilarDeals(e).subscribe({next:n=>{this.similarDeals=n?.object?.results?.[0]?.grouped_hits||[],this.dealLoading=!1,this.refreshView()},error:n=>{this.dealLoading=!1,this.refreshView(),this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}})}viewInstanceDetails(e){let n=this.slugify(e.service_provider),i=this.slugify(e.product_name),s=n+"-"+i+"--"+e.record_id;this.instanceDetails={},this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>{this.router.navigate(["/admin-dashboard/cloud-atler/service",s])})}slugify(e){return e?.toString()?.toLowerCase()?.trim()?.replace(/[\/\s]+/g,"-")?.replace(/[^\w-]+/g,"")?.replace(/-+/g,"-")?.replace(/^-+|-+$/g,"")}addToCart(e){e&&this.verifyCartBeforeAdding(e)}verifyCartBeforeAdding(e){this.cartService.getCartItems().subscribe({next:n=>{let i=Array.isArray(n?.object)?n.object:[];this.shouldConfirmProviderChange(i,e?.service_provider)?this.promptProviderConfirmation(e):this.updateItemQuantity(e,1)},error:n=>{this.notify.showNotification(n?.error?.message,"top",E[n?.error?.status]?E[n?.error?.status]:"error",n?.error?.status)}})}promptProviderConfirmation(e){this.dialog.open(eo,{width:"558px",height:"auto",data:{title:this.providerConfirmationMessage},disableClose:!0}).afterClosed().subscribe(i=>{i?.state===!0&&this.updateItemQuantity(e,1)})}shouldConfirmProviderChange(e,n){if(!Array.isArray(e)||e.length===0)return!1;let i=this.normalizeProvider(n);return i?!e.some(d=>{let m=this.normalizeProvider(d?.SERVICE_DETAILS?.service_provider);return!!m&&m===i}):!1}normalizeProvider(e){return e?.toString()?.trim()?.toLowerCase()||""}
12updateItemQuantity(e,n){let i={};e?.product_name==="object-storage"?i={storage_amount_per_month:this.costForm.value.storageAmount,retieval_amount_per_month:this.costForm.value.retrievalAmount,read_requests_per_month:this.costForm.value.readRequests,write_requests_per_month:this.costForm.value.writeRequests}:e?.product_name==="Serverless Function"&&(i={number_of_requests:this.costForm.value.noOfRequest,duration_of_request:this.costForm.value.durationOfRequest,amount_of_memory:this.costForm.value.amountOfMemory});let s={RESOURCE:[{RESOURCE_TYPE:"external",RESOURCE_ID:e?.record_id,QUANTITY:n,SERVICE_DETAILS:e,USER_INPUT:i}]};this.cartService.addItemToCart(s).subscribe({next:d=>{d.status===200&&d.object.length>0&&(this.cartService.cartUpdated$.next(),this.router.navigate(["/admin-dashboard/cloud-atler"]))},error:d=>{this.notify.showNotification(d?.error?.message,"top",E[d?.error?.status]?E[d?.error?.status]:"error",d?.error?.status)}})}backToInstances(){this.instanceDetails={},this.router.navigate(["/admin-dashboard/cloud-atler"])}formatText(e){return(typeof e=="string"?e:String(e||""))?.toLowerCase()?.replace(/[-_]/g," ")?.replace(/\b\w/g,i=>i?.toUpperCase())}getMonthlyPrice(e,n){let i=this.monthlyHours[n?n.toLowerCase():""];return(e*i).toFixed(2)}setLoading(e){this.ngZone.run(()=>{this.loading=e,this.cdr.detectChanges()})}refreshView(){this.ngZone.run(()=>this.cdr.detectChanges())}static{this.\u0275fac=function(n){return new(n||t)(y(G),y(Le),y(Kt),y(V),y(Rn),y(Se),y(ze),y(Cn),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-instance-details"]],viewQuery:function(n,i){if(n&1&&bt(gt,5),n&2){let s;ht(s=_t())&&(i.paginator=s.first)}},decls:13,vars:8,consts:[["paginator",""],["class","overlay",4,"ngIf"],[1,"head-row"],[1,"back-arrow",3,"click"],["icon","material-symbols:arrow-back-rounded"],["class","pricing-head",4,"ngIf"],["class","detail-content",4,"ngIf"],["class","footer-row",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],[1,"pricing-head"],[1,"detail-content"],[1,"specs-container"],[1,"specs-section"],[1,"spec-details"],[1,"title-row"],[1,"provider-logo",3,"src"],[1,"provider-details"],[1,"provider-name"],[1,"provider-region"],[1,"spec-row"],[1,"spec-card"],[1,"spec-title"],[1,"spec-value"],[1,"price-card"],[1,"price-details"],[1,"payment-details"],["class","payment-option",4,"ngIf"],["class","price-item",4,"ngIf"],[1,"price-item"],[1,"payment-option"],[1,"price-actions"],[1,"price"],[1,"price-period"],["mat-button","",1,"cart-btn",3,"click"],["class","description",4,"ngIf"],[1,"compute-section"],[1,"detail-tabs"],["label","Compute"],[1,"compute-tab"],[1,"left-panel"],[1,"feature-title"],[1,"right-panel"],["class","benchmark-scores",4,"ngIf"],["class","performance-description",4,"ngIf"],["class","recommendation",4,"ngIf"],["label","Memory"],["class","spec-column",4,"ngIf"],["label","Storage"],["label","Network"],[1,"atlerpilot-container"],[1,"atler-row"],[1,"atler-column"],[1,"atler-title"],[1,"atler-sub-title"],[1,"atler-sub-desc"],[1,"atler-sub-row"],[1,"atler-sub-content"],["src","assets/images/analytics.png"],[1,"atler-sub-item"],["src","assets/images/automated-settings.png"],["src","assets/images/security-guard.png"],["src","assets/images/atler-dashboard2.png","alt","atler-dashboard",1,"atler-dashboard"],["class","loading-spinner",4,"ngIf"],[1,"pricing-container",3,"hidden"],[1,"price-table-container"],["mat-table","","class","price-table",3,"dataSource",4,"ngIf"],[3,"pageSize","pageIndex","hidePageSize"],["class","no-data",4,"ngIf"],["class","pricing-container",4,"ngIf"],[1,"features-section"],["class","feature-card",4,"ngIf"],[1,"description"],[1,"desc-title"],[1,"desc-content"],[1,"benchmark-scores"],[1,"benchmark-title"],[1,"benchmark-item"],[1,"benchmark-header"],[1,"benchmark-label"],[1,"benchmark-value"],[1,"benchmark-bar"],[1,"benchmark-progress"],[1,"performance-description"],[1,"recommendation"],[1,"recc-title"],["icon","ic:outline-info"],[1,"recc-desc"],[1,"spec-column"],[1,"memory-recommendation"],["class","feature-row",4,"ngFor","ngForOf"],[1,"feature-row"],[1,"feature-head"],[1,"title"],["icon","charm:tick","width","16","height","16"],[1,"desc"],[1,"loading-spinner"],["color","primary","mode","indeterminate","diameter","50"],["mat-table","",1,"price-table",3,"dataSource"],["matColumnDef","region_name"],["mat-header-cell","","class","table-header",4,"matHeaderCellDef"],["mat-cell","","class","table-cell",4,"matCellDef"],["matColumnDef","payment_option"],["matColumnDef","payment_plan"],["matColumnDef","avg_monthly_price"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"table-header"],["mat-cell","",1,"table-cell"],["mat-header-row",""],["mat-row",""],[1,"no-data"],[1,"pricing-container"],[1,"instance-cards"],["class","instance-card-container",4,"ngFor","ngForOf"],[1,"instance-card-container"],[1,"instance-card"],[1,"instance-header"],[1,"provider-type"],[1,"instance-details"],[1,"instance-price"],["matTooltip","This is an approximate price, actual price may vary.",1,"price-period-icon"],["icon","material-symbols:info-outline-rounded"],[1,"instance-family"],[1,"instance-specs"],[1,"spec-item"],[1,"spec-label"],[1,"instance-action"],[1,"location"],[1,"location-div"],["icon","material-symbols:location-on-outline-rounded"],["icon","material-symbols:settings-outline-rounded"],[1,"action-buttons"],["mat-icon-button","",1,"action-icons",3,"click"],["icon","lsicon:view-filled"],["icon","mdi:cart-outline"],[1,"instance-card","instance-specs","instance-card-price"],[1,"feature-card"],[1,"storage-container"],["src","assets/images/storage-icon.png",1,"storage-image"],[1,"storage-desc"],[1,"storage-title"],[1,"storage-subtitle"],[1,"storage-content"],[1,"cost-container"],[1,"section-title"],[1,"cost-section"],["autocomplete","off",1,"left-cost-section",3,"formGroup"],[1,"cost-item"],[1,"cost-label"],["type","number","formControlName","storageAmount"],["type","number","formControlName","retrievalAmount"],["type","number","formControlName","readRequests"],["type","number","formControlName","writeRequests"],[1,"cost-action"],["mat-button","",1,"update-btn",3,"click"],[1,"right-cost-section"],[1,"cost-title"],[1,"cost-secs"],[1,"cost-row"],[1,"cost-head"],[1,"cost-value"],[1,"total-head"],["mat-button","",1,"add-cart-btn",3,"click"],[1,"technical-table"],[1,"storage-table"],[1,"category-div"],[1,"spec-div"],[1,"value-div"],["class","table-content",4,"ngFor","ngForOf"],[1,"section-content"],[1,"section-item"],[1,"item-title"],[1,"section-items"],["class","security-item",4,"ngFor","ngForOf"],[1,"redundancy-item"],["class","redundancy-row",4,"ngFor","ngForOf"],[1,"table-content"],[1,"table-row"],[1,"spec-div","spec-value"],[4,"ngIf"],[1,"security-item"],["src","assets/images/security-features.png"],["src","assets/images/compliance-standard.png"],[1,"redundancy-row"],["src","assets/images/item-list.png"],[1,"redundancy-detail
12s"],[1,"redundancy-title"],[1,"redundancy-desc"],["src","assets/images/function-icon.png",1,"storage-image"],["type","number","formControlName","noOfRequest"],["type","number","formControlName","durationOfRequest"],["type","number","formControlName","amountOfMemory"],[1,"technical-spec"],["class","tech-column",4,"ngFor","ngForOf"],[1,"metric-div"],[1,"desc-div"],[1,"config-container"],[1,"config-standard"],[1,"stand-title"],[1,"stand-items"],["class","stand-item",4,"ngFor","ngForOf"],[1,"config-optimized"],[1,"opt-title"],[1,"opt-items"],["class","opt-item",4,"ngFor","ngForOf"],[1,"tech-column"],[1,"tech-specs"],["class","tech-value",4,"ngFor","ngForOf"],[1,"tech-value"],[1,"tech-head"],[1,"tech-detail"],[1,"fun-table-row"],[1,"metric-div","optimized-value"],[1,"stand-item"],[1,"opt-item"],[1,"footer-row"],[1,"footer-start"],[1,"footer-details"],[1,"foot-name"],[1,"foot-region"]],template:function(n,i){n&1&&(g(0,oI,4,0,"div",1),o(1,"div")(2,"div",2)(3,"div",3),v("click",function(){return i.backToInstances()}),h(4,"iconify-icon",4),l(5,"Back to Instances "),a(),g(6,rI,3,4,"div",5)(7,aI,3,4,"div",5)(8,lI,3,4,"div",5),a(),g(9,BI,257,79,"div",6)(10,GI,119,24,"div",6)(11,nT,119,26,"div",6)(12,oT,13,15,"div",7),a()),n&2&&(p("ngIf",i.loading),c(6),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.product_name)=="Virtual Machine"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.product_name)=="object-storage"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.product_name)=="Serverless Function"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.service_type)=="compute"&&(i.instanceDetails==null?null:i.instanceDetails.product_name)=="Virtual Machine"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.service_type)=="storage"&&(i.instanceDetails==null?null:i.instanceDetails.product_name)=="object-storage"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.service_type)=="serverless"&&(i.instanceDetails==null?null:i.instanceDetails.product_name)=="Serverless Function"),c(),p("ngIf",(i.instanceDetails==null?null:i.instanceDetails.service_type)=="compute"&&(i.instanceDetails==null?null:i.instanceDetails.product_name)=="Virtual Machine"))},dependencies:[N,$,B,z,ut,Gi,Ji,Jt,Pe,we,De,Ie,Ee,Re,Te,Ae,ke,Ne,Zi,ti,ni,mn,ve,qi,me,$e,Ge,We,gt,Xn,Zn,Wt,Xl],styles:[".provider-logo[_ngcontent-%COMP%]{width:40px;height:40px}.head-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px 50px;background-color:#fff;border-bottom:1px solid #E5E7EB}.head-row[_ngcontent-%COMP%]   .back-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:16px;color:#374151;cursor:pointer;text-align:start;width:13%}.head-row[_ngcontent-%COMP%]   .pricing-head[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000;text-align:center;width:85%}.detail-content[_ngcontent-%COMP%]{padding:30px 50px;display:flex;flex-direction:column;gap:30px}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]{background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:10px 25px 25px;display:flex;justify-content:space-between;gap:20px}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:30px;padding-left:23px}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]{width:48%;display:flex;flex-direction:column;position:relative;gap:20px}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%]   .spec-column[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]   .spec-column[_ngcontent-%COMP%]{gap:20px;display:flex;flex-direction:column}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:15px;width:100%;font-size:16px;color:#4b5563}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#000}.detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%]   .memory-recommendation[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .compute-section[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]   .memory-recommendation[_ngcontent-%COMP%]{padding:15px;background-color:#f9fafb;border-radius:16px}.feature-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#000;padding:10px 0}.performance-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;margin-top:20px}.description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.desc-title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#000}.desc-content[_ngcontent-%COMP%]{font-size:16px;color:#4b5563;line-height:24px}.feature-head[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.feature-head[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;font-weight:500;font-size:16px;color:#000;line-height:1.4}.feature-head[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{margin-top:2px;flex-shrink:0;color:#22c55e}.feature-head[_ngcontent-%COMP%]   .desc[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:20px;padding-left:22px}.benchmark-scores[_ngcontent-%COMP%]{margin-bottom:16px}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#000;padding:10px 0;margin-bottom:8px}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]{margin-bottom:16px}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]   .benchmark-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]   .benchmark-header[_ngcontent-%COMP%]   .benchmark-label[_ngcontent-%COMP%]{font-size:14px;color:#4b5563}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]   .benchmark-header[_ngcontent-%COMP%]   .benchmark-value[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#000}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]   .benchmark-bar[_ng
12content-%COMP%]{height:8px;background:#e5e7eb;border-radius:4px;position:relative;overflow:hidden}.benchmark-scores[_ngcontent-%COMP%]   .benchmark-item[_ngcontent-%COMP%]   .benchmark-bar[_ngcontent-%COMP%]   .benchmark-progress[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,#3b82f6,#2563eb);border-radius:4px;min-width:8px;transition:width .5s ease-in-out}.right-panel[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{flex:1;display:flex;flex-direction:column}.recommendation[_ngcontent-%COMP%]{padding:15px;background-color:#eff6ff;border-radius:16px}.recommendation[_ngcontent-%COMP%]   .recc-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:500;color:#1e40af;margin-bottom:8px}.recommendation[_ngcontent-%COMP%]   .recc-desc[_ngcontent-%COMP%]{font-size:14px;color:#1d4ed8;line-height:20px}.atlerpilot-container[_ngcontent-%COMP%]{background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px}.atlerpilot-container[_ngcontent-%COMP%]   .atler-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px}.atlerpilot-container[_ngcontent-%COMP%]   .atler-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.atlerpilot-container[_ngcontent-%COMP%]   .atler-title[_ngcontent-%COMP%]{font-size:14px;line-height:20px;font-weight:500;color:#35a5db}.atlerpilot-container[_ngcontent-%COMP%]   .atler-sub-title[_ngcontent-%COMP%]{font-size:30px;line-height:36px;font-weight:700;color:#000}.atlerpilot-container[_ngcontent-%COMP%]   .atler-sub-desc[_ngcontent-%COMP%]{font-size:18px;line-height:28px;font-weight:400;color:#4b5563}.atlerpilot-container[_ngcontent-%COMP%]   .atler-sub-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:40px}.atlerpilot-container[_ngcontent-%COMP%]   .atler-sub-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.atlerpilot-container[_ngcontent-%COMP%]   .atler-sub-item[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:400;color:#374151}.atlerpilot-container[_ngcontent-%COMP%]   .atler-dashboard[_ngcontent-%COMP%]{width:384px;border-radius:16px}.specs-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px}.specs-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:20px}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]{width:65%;display:flex;flex-direction:column;justify-content:start;gap:20px}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .title-row[_ngcontent-%COMP%]{display:flex;justify-content:start;align-items:center;gap:25px}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .title-row[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .title-row[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-name[_ngcontent-%COMP%]{font-size:20px;font-weight:700;color:#000}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .title-row[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-region[_ngcontent-%COMP%]{font-size:15px;font-weight:400;color:#6b7280}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:15px;width:100%}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%]{width:31%;background-color:#f9fafb;padding:15px;border-radius:16px;display:flex;flex-direction:column;gap:10px;color:#6b7280}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%]   .spec-title[_ngcontent-%COMP%]{font-size:14px}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#000}.specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%]   .spec-desc[_ngcontent-%COMP%]{font-size:12px}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]{width:35%;display:flex;flex-direction:column;justify-content:space-between;gap:20px;background-color:#f9fafb;border-radius:16px;padding:25px}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:start;gap:10px;font-size:14px;color:#6b7280}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .payment-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;align-items:start}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .payment-option[_ngcontent-%COMP%]{font-size:13px;color:#1f2937;background-color:#dcdcdc;padding:5px 10px;border-radius:20px;text-align:center}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:600;color:#1f2937}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;gap:30px}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .cart
12-btn[_ngcontent-%COMP%]{font-size:14px;padding:10px 20px;border-radius:8px;background-color:#35a5db;color:#fff}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#1f2937}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-period[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#6b7280}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-value[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:30px;font-weight:700;color:#000}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-value[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#6b7280}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-actions[_ngcontent-%COMP%]   .deploy-btn[_ngcontent-%COMP%]{width:100%;background-color:#35a5db;color:#fff;font-size:16px;font-weight:500;border-radius:8px;padding:7px 15px;height:auto}.features-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:30px}.features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]{width:50%;background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px;display:flex;flex-direction:column;gap:20px}.features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]   .feature-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:start;gap:15px}.features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]   .feature-row[_ngcontent-%COMP%]   .feature-head[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]   .feature-row[_ngcontent-%COMP%]   .feature-head[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-weight:500;font-size:16px;color:#000}.features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]   .feature-row[_ngcontent-%COMP%]   .feature-head[_ngcontent-%COMP%]   .desc[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:20px;padding-left:10px}.instance-cards[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:25px}.instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 calc(50% - 15px);max-width:calc(50% - 10px);border-radius:16px}.instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.instance-cards[_ngcontent-%COMP%]   .instance-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:16px;border:2px solid #FFFFFF;overflow:hidden;background-color:#fff;gap:15px;box-shadow:0 2px 8px #0000001a;z-index:2}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:20px 20px 0}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-logo[_ngcontent-%COMP%]{width:40px;height:40px}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#1f2937}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .provider-name[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:13px}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-type[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .instance-details[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-family[_ngcontent-%COMP%]{font-size:11px;color:#047857;background-color:#d1fae5;padding:5px 10px;border-radius:20px;text-align:center}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;
12gap:7px}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{display:flex;align-items:center;gap:3px;font-size:15px;font-weight:700;color:#1f2937}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price-period-icon[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]   .price-period[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]{display:flex;padding:0 20px;justify-content:space-between;align-items:start}.instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]   .spec-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;max-width:25%}.instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]   .price-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px}.instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]   .spec-label[_ngcontent-%COMP%]{font-size:12px;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#1f2937}.instance-cards[_ngcontent-%COMP%]   .instance-card-price[_ngcontent-%COMP%]{flex-direction:row;align-items:center;padding:30px 20px 10px;top:-20px;position:relative;z-index:1}.instance-cards[_ngcontent-%COMP%]   .payment-option[_ngcontent-%COMP%]{font-size:11px;color:#1f2937;background-color:#dcdcdc;padding:5px 10px;border-radius:20px;text-align:center}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:5px;align-items:center;padding:0 20px 20px}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{display:flex;gap:10px;width:70%}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]   .location-div[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12px;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:end;align-items:center;width:30%}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-icons[_ngcontent-%COMP%]{color:#35a5db}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .action-icons[_ngcontent-%COMP%]:disabled{opacity:.5}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]{display:flex;justify-content:center}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]{display:flex;align-items:center;border:1px solid #E5E7EB;border-radius:8px;overflow:hidden;width:auto;height:30px}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:#f9fafb;border:none;font-size:16px;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;color:#6b7280}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-btn[_ngcontent-%COMP%]:active{background:#e5e7eb}.instance-cards[_ngcontent-%COMP%]   .instance-action[_ngcontent-%COMP%]   .quantity-selector[_ngcontent-%COMP%]   .quantity-controls[_ngcontent-%COMP%]   .qty-input[_ngcontent-%COMP%]{width:34px;height:30px;border:none;text-align:center;font-size:14px;outline:none;padding:0;background:#fff}.pricing-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.loading-spinner[_ngcontent-%COMP%]{display:flex;justify-content:center}table[_ngcontent-%COMP%]{table-layout:fixed;width:100%;border:none;border-bottom:1px solid #E5E7EB;box-shadow:none}table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:start!important}.mat-mdc-header-row[_ngcontent-%COMP%]{background:#f9fafb;border:none}.table-header[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#6b7280;width:20%}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:14px;color:#111827;font-weight:500;line-height:20px}.table-cell[_ngcontent-%COMP%]{width:9%}.mdc-data-table__cell[_ngcontent-%COMP%], .mdc-data-table__header-cell[_ngcontent-%COMP%]{padding:10px 20px}th.mat-header-cell[_ngcontent-%COMP%], td.mat-cell[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 10px;text-align:start!important}.no-data[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;text-align:center;font-style:italic}.support-section[_ngcontent-%COMP%]{background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px;display:flex;flex-direction:column;gap:20px}.support-section[_ngcontent-%COMP%]   .support-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000}.support-section[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:15px}.support-section[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]{width:31%;border:1px solid #E5E7EB;padding:15px;border-radius:16px;display:flex;flex-direction:column;align-items:start;gap:10px}.support-section[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .support-head[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#000}.support-section[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .support-desc[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:20px}.storage-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:25px;background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px}.storage-desc[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.storage-title[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#111827}.storage-subtitle[_ngcontent-%COMP%]{font-size:16px;color:#4b5563}.storage-content[_ngcontent-%COMP%]{font-size:14px;color:#374151;line-height:23px;padding-top:10px;width:70%}.cost-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:25px;background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px}.config-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:25px;background-color:#fff;border-radius:16px;border:1px solid #E5E7EB;padding:25px}.section-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.cost-section[_ngcontent-%COMP%]{display:flex;gap:20px}.left-cost-section[_ngcontent-%COMP%]{width:50%;display:flex;flex-direction:column;gap:10px}.cost-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}
12.cost-label[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#374151}input[_ngcontent-%COMP%]{padding:10px 14px;border-radius:6px;border:1px solid #D1D5DB;font-size:14px;height:40px;transition:border-color .3s cubic-bezier(.4,0,.2,1)}.cost-action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.update-btn[_ngcontent-%COMP%]{background-color:#fff;color:#35a5db!important;border:1px solid #35A5DB;font-size:14px;padding:10px 20px;border-radius:8px;margin-top:25px}.add-cart-btn[_ngcontent-%COMP%]{font-size:14px;padding:10px 20px;border-radius:8px;background-color:#35a5db;color:#fff!important}.right-cost-section[_ngcontent-%COMP%]{width:50%;display:flex;flex-direction:column;background-color:#f9fafb;border-radius:16px;padding:25px;gap:20px}.cost-title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827}.cost-secs[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.cost-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cost-header[_ngcontent-%COMP%]{font-size:16px;color:#4b5563}.cost-value[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827}.total-head[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827}.technical-table[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}.storage-table[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:#f9fafb;padding:20px;font-size:16px;font-weight:600;color:#111827;gap:20px}.table-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px;font-weight:500;color:#111827;gap:20px;padding:20px}.category-div[_ngcontent-%COMP%], .spec-div[_ngcontent-%COMP%]{width:30%}.value-div[_ngcontent-%COMP%]{width:40%}.spec-value[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#4b5563}.section-content[_ngcontent-%COMP%]{display:flex;gap:20px}.item-title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827}.section-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;width:47%}.section-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.security-item[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;font-size:16px;color:#374151}.redundancy-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px}.redundancy-row[_ngcontent-%COMP%]{display:flex;gap:10px}.redundancy-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.redundancy-title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827}.redundancy-desc[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;line-height:20px}.technical-spec[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:start;gap:30px}.tech-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px;flex:1 1 calc(50% - 25px);max-width:calc(50% - 15px)}.tech-specs[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.tech-value[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:16px;line-height:24px;gap:20px}.tech-head[_ngcontent-%COMP%]{font-size:16px;color:#4b5563;display:flex;text-align:start;width:35%}.tech-detail[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827;display:flex;text-align:end}.fun-table-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px;color:#4b5563;gap:20px;padding:20px}.metric-div[_ngcontent-%COMP%]{width:20%}.desc-div[_ngcontent-%COMP%]{width:40%;line-height:24px}.optimized-value[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#16a34a}.config-standard[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;background-color:#eff6ff;border-radius:16px;padding:25px;width:49%}.stand-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1e3a8a}.stand-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.stand-item[_ngcontent-%COMP%]{font-size:16px;color:#1e40af;line-height:24px}
12.config-optimized[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;background-color:#fff7ed;border-radius:16px;padding:25px;width:49%}.opt-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#7c2d12}.opt-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.opt-item[_ngcontent-%COMP%]{font-size:16px;color:#9a3412;line-height:24px}.footer-row[_ngcontent-%COMP%]{background:#fff;border-top:1px solid #E5E7EB;padding:15px 50px;display:flex;justify-content:space-between;align-items:center;position:fixed;bottom:60px;left:0;right:0;z-index:1000}@media only screen and (min-width:1251px){.footer-row[_ngcontent-%COMP%]{position:static;bottom:auto}}.footer-row[_ngcontent-%COMP%]   .footer-start[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.footer-row[_ngcontent-%COMP%]   .footer-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.footer-row[_ngcontent-%COMP%]   .footer-details[_ngcontent-%COMP%]   .foot-name[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#000}.footer-row[_ngcontent-%COMP%]   .footer-details[_ngcontent-%COMP%]   .foot-region[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#6b7280}.detail-tabs[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]     .mat-mdc-tab-disabled{opacity:1}[_nghost-%COMP%]     .mat-mdc-tab-header{background:transparent;border-bottom:1px solid #E5E7EB;margin-bottom:20px}[_nghost-%COMP%]     .mdc-tab-indicator--active{background:transparent!important;color:#35a5db!important;font-weight:500}[_nghost-%COMP%]     .mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:#35a5db!important;font-size:16px;font-weight:500}[_nghost-%COMP%]     .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:#35a5db!important;font-size:16px;border-radius:15px}[_nghost-%COMP%]     .mdc-tab__text-label{color:#6b7280!important;font-size:16px;font-weight:500}[_nghost-%COMP%]     .mdc-tab-indicator__content--underline{border:2px solid #35A5DB!important;border-radius:15px}@media only screen and (max-width:1250px){.head-row[_ngcontent-%COMP%]{padding:20px}.detail-content[_ngcontent-%COMP%]{padding:20px;position:relative;z-index:1;margin-bottom:150px}.detail-content[_ngcontent-%COMP%]   .compute-tab[_ngcontent-%COMP%]{flex-direction:column}.detail-content[_ngcontent-%COMP%]   .left-panel[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .right-panel[_ngcontent-%COMP%]{width:100%!important}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center;align-items:center}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]{width:100%}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center;align-items:center}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .spec-details[_ngcontent-%COMP%]   .spec-row[_ngcontent-%COMP%]   .spec-card[_ngcontent-%COMP%], .detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]{width:80%}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]{flex-wrap:wrap}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .price-details[_ngcontent-%COMP%]   .price-actions[_ngcontent-%COMP%]{gap:15px!important}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]{flex-direction:column;gap:25px!important}.detail-content[_ngcontent-%COMP%]   .specs-section[_ngcontent-%COMP%]   .price-card[_ngcontent-%COMP%]   .provider-details[_ngcontent-%COMP%]   .payment-details[_ngcontent-%COMP%]{gap:15px!important}.detail-content[_ngcontent-%COMP%]   .features-section[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center;align-items:center}.detail-content[_ngcontent-%COMP%]   .features-section[_ngcontent-%COMP%]   .feature-card[_ngcontent-%COMP%]{width:100%}.detail-content[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center;align-items:center}.detail-content[_ngcontent-%COMP%]   .support-row[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]{width:100%!important}.atler-row[_ngcontent-%COMP%]{gap:20px!important;flex-wrap:wrap}.atler-sub-row[_ngcontent-%COMP%]{gap:15px!important;flex-wrap:wrap}.instance-cards[_ngcontent-%COMP%]   .instance-card-container[_ngcontent-%COMP%]{flex:1 1 100%!important;max-width:100%!important}.instance-header[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px;justify-content:center;align-items:center}.instance-specs[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px}.instance-specs[_ngcontent-%COMP%]   .spec-item[_ngcontent-%COMP%]{max-width:100%!important;flex-direction:row;gap:25px;justify-content:space-between}.instance-action[_ngcontent-%COMP%]{flex-wrap:wrap;gap:20px}.instance-action[_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{width:fit-content!important;flex-wrap:wrap}.instance-action[_ngcontent-%COMP%]   .action-buttons[_ngcontent-%COMP%]{width:fit-content!important}.price-table-container[_ngcontent-%COMP%]{overflow-x:auto;-webkit-overflow-scrolling:touch}.price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{min-width:600px}.price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:10px;font-size:13px}.price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-child, .price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{position:sticky;left:0;min-width:250px}.price-table-container[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]{position:sticky;top:0;background:#fff;z-index:2}}"]})}}return t})();var vt=()=>[];function rT(t,r){t&1&&(o(0,"div",3)(1,"div",4)(2,"div",5),h(3,"span",6),a()()())}function aT(t,r){t&1&&(o(0,"div",21),l(1,"VM Comparison Portal"),a())}function lT(t,r){t&1&&(o(0,"div",21),l(1,"Storage Solutions Comparison "),a())}function sT(t,r){t&1&&(o(0,"div",21),l(1,"Serverless Functions Comparision"),a())}function cT(t,r){if(t&1&&(o(0,"div",35),l(1),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" Avg. $",n.getVMMonthlyPrice(e==null||e.document==null?null:e.document.hourly_rate_usd,e==null||e.document==null?null:e.document.service_provider),"/mo")}}function dT(t,r){if(t&1&&(o(0,"div",35),l(1),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" Avg. $",n.getStorageMonthlyPrice(e==null||e.document==null?null:e.document.storage_price_per_gb,e==null||e.document==null?null:e.document.retrieval_price_per_gb,e==null||e.document==null?null:e.document.read_price_per_request,e==null||e.document==null?null:e.document.write_price_per_request,e==null||e.document==null?null:e.document.storage_tier_available,e==null||e.document==null?null:e.document.storage_tier_gb),"/mo")}}function pT(t,r){if(t&1&&(o(0,"div",35),l(1),a()),t&2){let e=u().$implicit,n=u(2);c(),x(" Avg. $",n.getFunctionMonthlyPrice(e==null||e.document==null?null:e.document.memory_duration_price_per_gb_s,e==null||e.document==null?null:e.document.price_per_request,e==null||e.document==null?null:e.document.duration_price_per_s,e==null||e.document==null?null:e.document.service_provider,e==null||e.document==null?null:e.document.memory_duration_tier_available,e==null||e.document==null?null:e.document.memory_duration_tier_gb_s),"/mo")}}function mT(t,r){if(t&1){let e=A();o(0,"th",22)(1,"div",23)(2,"div",24),h(3,"img",25),F(4,"lowercase"),o(5,"div",26)(6,"div",27),l(7),a(),o(8,"div",28),l(9),a(),o(10,"div",29),l(11),a()()(),o(12,"div",24)(13,"div",30)(14,"input",31),v("change",function(){let i=O(e).$implicit,s=u(2);return P(s.selectInstance(i))}),a(),o(15,"label",32),h(16,"span",33),a()(),g(17,cT,2,1,"div",34)(18,dT,2,1,"div",34)(19,pT,2,1,"div",34),a()()()}if(t&2){let e=r.$implicit,n=u(2);p("ngStyle",n.getInstanceColumnStyles()),c(3),p("src","assets/images/"+n.providerIconMap[X(4,13,e==null||e.document==null?null:e.document.service_provider)],Qe),c(4),C(e==null||e.document==null?null:e.document.product_name),c(2),C(e==null||e.document==null?null:e.document.vm_name),c(2),C(e==null||e.document==null?null:e.document.product_type),c(3),p("id","instance-"+(e==null||e.document==null?null:e.document.record_id))("value",e==null||e.document==null?null:e.document.record_id)("checked",n.isInstanceSelected(e)),He("aria-label","Select "+(e==null||e.document==null?null:e.document.product_name)),c(),p("for","instance-"+(e==null||e.document==null?null:e.document.record_id)),c(2),p("ngIf",n.getCurrentProductName()==="Virtual Machine"),c(),p("ngIf",n.getCurrentProductName()==="object-storage"),c(),p("ngIf",n.getCurrentProductName()==="Serverless Function")}}function uT(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"vcpu_cores")),c(),x(" ",(e==null||e.document==null?null:e.document.vcpu_
12cores)||"--"," vCPU ")}}function gT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.cpu_model)||"--"," ")}}function fT(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"cpu_clock_ghz")),c(),x(" ",(e==null||e.document==null?null:e.document.cpu_clock_ghz)||"--")}}function hT(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"ram_gb")),c(),x(" ",(e==null||e.document==null?null:e.document.ram_gb)||"--"," GB ")}}function _T(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.storage_spec)||"--"," ")}}function CT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.network_performance)||"--")}}function xT(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"hourly_rate_usd")),c(),x(" $",(e==null||e.document==null||e.document.hourly_rate_usd==null?null:e.document.hourly_rate_usd.toFixed(2))||"--")}}function vT(t,r){if(t&1&&(o(0,"td",46)(1,"div",48)(2,"div"),l(3),a(),o(4,"div"),l(5),a()()()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"monthly_rate_usd")),c(3),x("$",(e==null||e.document==null||e.document.monthly_rate_usd==null?null:e.document.monthly_rate_usd.toFixed(2))||"--"),c(2),x("(",n.formatText(e==null||e.document==null?null:e.document.payment_plan),")")}}function bT(t,r){if(t&1&&(o(0,"td",46)(1,"div",48)(2,"div"),l(3),a(),o(4,"div"),l(5),a()()()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"upfront_amount_usd")),c(3),x("$",(e==null||e.document==null||e.document.upfront_amount_usd==null?null:e.document.upfront_amount_usd.toFixed(2))||"--"),c(2),x("(",n.formatText(e==null||e.document==null?null:e.document.term),")")}}function yT(t,r){if(t&1&&(o(0,"td",47)(1,"div",48)(2,"div"),l(3),a()()()),t&2){let e=r.$implicit,n=u(3);c(3),C(n.formatText(e==null||e.document==null?null:e.document.payment_option))}}function MT(t,r){if(t&1&&(o(0,"td",46)(1,"div",48)(2,"div"),l(3),a()()()),t&2){let e=r.$implicit,n=u(3);p("ngClass",n.getHighlightClass(e,"avg_monthly_price")),c(3),x("$",n.getVMMonthlyPrice(e==null||e.document==null?null:e.document.hourly_rate_usd,e==null||e.document==null?null:e.document.service_provider))}}function ST(t,r){if(t&1&&(o(0,"tr",36)(1,"td")(2,"div",37),h(3,"iconify-icon",49),l(4," GPU Specification "),a()()()),t&2){let e=u(3);c(),He("colspan",e.compareInstances.length+1)}}function OT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.gpu_model)||"--"," ")}}function PT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"GPU model"),a(),g(3,OT,2,1,"td",41),a()),t&2){let e=u(3);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function ET(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(4);p("ngClass",n.getHighlightClass(e,"gpu_count")),c(),x(" ",(e==null||e.document==null?null:e.document.gpu_count)||"--"," ")}}function wT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"GPU count"),a(),g(3,ET,2,2,"td",40),a()),t&2){let e=u(3);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function IT(t,r){if(t&1&&(o(0,"td",46),l(1),a()),t&2){let e=r.$implicit,n=u(4);p("ngClass",n.getHighlightClass(e,"gpu_memory_mb")),c(),x(" ",(e==null||e.document==null?null:e.document.gpu_memory_mb)||"--"," ")}}function TT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"GPU memory info"),a(),g(3,IT,2,2,"td",40),a()),t&2){let e=u(3);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function AT(t,r){if(t&1&&(o(0,"tbody")(1,"tr",36)(2,"td")(3,"div",37),h(4,"iconify-icon",38),l(5," Compute Specifications "),a()()(),o(6,"tr")(7,"td",39),l(8,"vCPU"),a(),g(9,uT,2,2,"td",40),a(),o(10,"tr")(11,"td",39),l(12,"Architecture"),a(),g(13,gT,2,1,"td",41),a(),o(14,"tr")(15,"td",39),l(16,"Base Clock Speed"),a(),g(17,fT,2,2,"td",40),a(),o(18,"tr",36)(19,"td")(20,"div",37),h(21,"iconify-icon",42),l(22," Memory Specifications "),a()()(),o(23,"tr")(24,"td",39),l(25,"RAM"),a(),g(26,hT,2,2,"td",40),a(),o(27,"tr",36)(28,"td")(29,"div",37),h(30,"iconify-icon",43),l(31," Storage Specifications "),a()()(),o(32,"tr")(33,"td",39),l(34,"Storage Type"),a(),g(35,_T,2,1,"td",41),a(),o(36,"tr",36)(37,"td")(38,"div",37),h(39,"iconify-icon",44),l(40," Networking "),a()()(),o(41,"tr")(42,"td",39),l(43,"Network Performance"),a(),g(44,CT,2,1,"td",41),a(),o(45,"tr",36)(46,"td")(47,"div",37),h(48,"iconify-icon",45),l(49," Payment Plan "),a()()(),o(50,"tr")(51,"td",39),l(52,"Hourly Rate"),a(),g(53,xT,2,2,"td",40),a(),o(54,"tr")(
1255,"td",39),l(56,"Monthly Price"),a(),g(57,vT,6,3,"td",40),a(),o(58,"tr")(59,"td",39),l(60,"Term"),a(),g(61,bT,6,3,"td",40),a(),o(62,"tr")(63,"td",39),l(64,"Plan"),a(),g(65,yT,4,1,"td",41),a(),o(66,"tr")(67,"td",39),l(68,"Average Monthly Price"),a(),g(69,MT,4,2,"td",40),a(),g(70,ST,5,1,"tr",18)(71,PT,4,2,"tr",17)(72,wT,4,2,"tr",17)(73,TT,4,2,"tr",17),a()),t&2){let e=u(2);c(2),He("colspan",e.compareInstances.length+1),c(7),p("ngForOf",e.compareInstances||J(20,vt)),c(4),p("ngForOf",e.compareInstances||J(21,vt)),c(4),p("ngForOf",e.compareInstances||J(22,vt)),c(2),He("colspan",e.compareInstances.length+1),c(7),p("ngForOf",e.compareInstances||J(23,vt)),c(2),He("colspan",e.compareInstances.length+1),c(7),p("ngForOf",e.compareInstances||J(24,vt)),c(2),He("colspan",e.compareInstances.length+1),c(7),p("ngForOf",e.compareInstances||J(25,vt)),c(2),He("colspan",e.compareInstances.length+1),c(7),p("ngForOf",e.compareInstances||J(26,vt)),c(4),p("ngForOf",e.compareInstances||J(27,vt)),c(4),p("ngForOf",e.compareInstances||J(28,vt)),c(4),p("ngForOf",e.compareInstances||J(29,vt)),c(4),p("ngForOf",e.compareInstances||J(30,vt)),c(),p("ngIf",e.hasGpuData()),c(),p("ngIf",e.hasGpuData()),c(),p("ngIf",e.hasGpuData()),c(),p("ngIf",e.hasGpuData())}}function DT(t,r){if(t&1&&(o(0,"tr",36)(1,"td")(2,"div",37),h(3,"iconify-icon",38),l(4," Storage Specifications "),a()()()),t&2){let e=u(2);c(),He("colspan",e.compareInstances.length+1)}}function RT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.access_tier)||"--"," ")}}function kT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"Access Tier"),a(),g(3,RT,2,1,"td",41),a()),t&2){let e=u(2);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function NT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.access_tier_option)||"--"," ")}}function FT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"Access Tier Option"),a(),g(3,NT,2,1,"td",41),a()),t&2){let e=u(2);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function zT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.redundancy)||"--")}}function LT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"Redundancy"),a(),g(3,zT,2,1,"td",41),a()),t&2){let e=u(2);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function VT(t,r){if(t&1&&(o(0,"tr",36)(1,"td")(2,"div",37),h(3,"iconify-icon",38),l(4," Function Specifications "),a()()()),t&2){let e=u(2);c(),He("colspan",e.compareInstances.length+1)}}function BT(t,r){if(t&1&&(o(0,"td",47),l(1),a()),t&2){let e=r.$implicit;c(),x(" ",(e==null||e.document==null?null:e.document.serverless_architecture)||"--")}}function UT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2,"Architecture"),a(),g(3,BT,2,1,"td",41),a()),t&2){let e=u(2);c(3),p("ngForOf",e.compareInstances||J(1,vt))}}function jT(t,r){if(t&1&&(I(0),h(1,"iconify-icon",52),T()),t&2){let e=u().$implicit,n=u().$implicit,i=u().$implicit,s=u(3);c(),yn(s.getFeatureClass(s.getFeatureValueForCategory(e==null||e.document==null?null:e.document.record_id,i,n))),p("icon",s.getFeatureIcon(s.getFeatureValueForCategory(e==null||e.document==null?null:e.document.record_id,i,n)))}}function $T(t,r){if(t&1&&(o(0,"span"),l(1),a()),t&2){let e=u().$implicit,n=u().$implicit,i=u().$implicit,s=u(3);c(),C(s.getFeatureValueForCategory(e==null||e.document==null?null:e.document.record_id,i,n)??"--")}}function qT(t,r){if(t&1&&(o(0,"td",47),g(1,jT,2,3,"ng-container",51)(2,$T,2,1,"ng-template",null,0,at),a()),t&2){let e=r.$implicit,n=Ce(3),i=u().$implicit,s=u().$implicit,d=u(3);c(),p("ngIf",d.isBooleanValue(d.getFeatureValueForCategory(e==null||e.document==null?null:e.document.record_id,s,i)))("ngIfElse",n)}}function HT(t,r){if(t&1&&(o(0,"tr")(1,"td",39),l(2),a(),g(3,qT,4,2,"td",41),a()),t&2){let e=r.$implicit,n=u(4);c(2),C(n.formatFeatureName(e)),c(),p("ngForOf",n.compareInstances||J(2,vt))}}function WT(t,r){if(t&1&&(I(0),o(1,"tr",36)(2,"td")(3,"div",37),h(4,"iconify-icon",38),l(5),a()()(),g(6,HT,4,3,"tr",50),T()),t&2){let e=r.$implicit,n=u(3);c(2),He("colspan",(n.compareInstances||J(3,vt)).length+1),c(3),x(" ",n.formatFeatureName(e)," "),c(),p("ngForOf",n.getFeatureKe
12ysForCategory(e))}}function GT(t,r){if(t&1&&(I(0),g(1,WT,7,4,"ng-container",50),T()),t&2){let e=u(2);c(),p("ngForOf",e.getComparisonCategories())}}function YT(t,r){if(t&1&&(o(0,"div",62)(1,"div",63),l(2,"Best Value:"),a(),o(3,"div",71),l(4),a()()),t&2){let e=u(3);c(4),C(e.getBestValue())}}function KT(t,r){if(t&1){let e=A();o(0,"div",53)(1,"div",54)(2,"div",55)(3,"div",56),h(4,"img",57),F(5,"lowercase"),o(6,"div",58)(7,"div",59),l(8),a(),o(9,"div",60),l(10),a()()(),o(11,"div",61)(12,"div",62)(13,"div",63),l(14,"Total Average Monthly Cost:"),a(),o(15,"div",64),l(16),a()(),g(17,YT,5,1,"div",65),a()(),o(18,"div",66)(19,"button",67),v("click",function(){O(e);let i=u(2);return P(i.viewSelectedDetails())}),l(20," View Details "),a(),o(21,"button",68),v("click",function(){O(e);let i=u(2);return P(i.addSelectedToCart())}),l(22," Add to Cart "),a(),o(23,"button",69),v("click",function(){O(e);let i=u(2);return P(i.clearSelection())}),h(24,"iconify-icon",70),a()()()()}if(t&2){let e=u(2);Y("footer-visible",e.selectedInstance),c(4),p("src","assets/images/"+e.providerIconMap[X(5,7,e.selectedInstance==null?null:e.selectedInstance.service_provider)],Qe),c(4),C(e.selectedInstance==null?null:e.selectedInstance.product_name),c(2),C(e.selectedInstance==null?null:e.selectedInstance.product_type),c(6),x("$",e.getTotalMonthlyCost()),c(),p("ngIf",e.getBestValue())}}function QT(t,r){t&1&&h(0,"div",72)}function JT(t,r){if(t&1){let e=A();o(0,"div",7)(1,"div",8)(2,"div",9),v("click",function(){O(e);let i=u();return P(i.backToHome())}),h(3,"iconify-icon",10),l(4,"Back "),a(),g(5,aT,2,0,"div",11)(6,lT,2,0,"div",11)(7,sT,2,0,"div",11),o(8,"div",12),l(9),a()(),o(10,"div",13)(11,"table",14)(12,"thead")(13,"tr")(14,"th",15),l(15,"Specifications"),a(),g(16,mT,20,15,"th",16),a()(),g(17,AT,74,31,"tbody",17),o(18,"tbody"),g(19,DT,5,1,"tr",18)(20,kT,4,2,"tr",17)(21,FT,4,2,"tr",17)(22,LT,4,2,"tr",17)(23,VT,5,1,"tr",18)(24,UT,4,2,"tr",17)(25,GT,2,1,"ng-container",17),a()()(),g(26,KT,25,9,"div",19)(27,QT,1,0,"div",20),a()}if(t&2){let e=u();c(5),p("ngIf",e.getCurrentProductName()==="Virtual Machine"),c(),p("ngIf",e.getCurrentProductName()==="object-storage"),c(),p("ngIf",e.getCurrentProductName()==="Serverless Function"),c(2),C(e.getComparisonCount()),c(7),p("ngForOf",e.compareInstances||J(15,vt)),c(),p("ngIf",e.getCurrentProductName()==="Virtual Machine"),c(2),p("ngIf",e.getCurrentProductName()==="object-storage"),c(),p("ngIf",e.getCurrentProductName()==="object-storage"),c(),p("ngIf",e.getCurrentProductName()==="object-storage"),c(),p("ngIf",e.getCurrentProductName()==="object-storage"),c(),p("ngIf",e.getCurrentProductName()==="Serverless Function"),c(),p("ngIf",e.getCurrentProductName()==="Serverless Function"),c(),p("ngIf",e.AIComparison&&e.AIComparison.length>0),c(),p("ngIf",e.selectedInstance),c(),p("ngIf",e.selectedInstance)}}var Cu=(()=>{class t{get providerIconMap(){return Wn}constructor(e,n,i,s,d,m,f,_,b,M){this.platformId=e,this.router=n,this.route=i,this.authService=s,this.notify=d,this.cartService=m,this.searchStateService=f,this.dialog=_,this.ngZone=b,this.cdr=M,this.loading=!0,this.compareInstances=[],this.AIComparison=[],this.selectedInstanceId=null,this.selectedInstance=null,this.monthlyHours=ye.HOURS_IN_A_MONTH,this.websiteUrl="",this.completeFormArray=[],this.completeSearchCriteria={},this.providerConfirmationMessage="You are about to add the product which is from different cloud providers than the one you have in your cart. Are you sure you want to add?"}ngOnInit(){}ngAfterViewInit(){this.scrollToTopContent(),this.loadCompareData(),this.searchStateService.completeFormArray$.pipe($i(e=>!!e&&e.length>0)).subscribe(e=>{this.updateCompleteFormArray(e)})}loadCompareData(){this.setLoading(!0);let e=this.route.snapshot.paramMap.get("slug"),n=String(e||"").split("--vs--"),i=[];if(n.map(s=>{let d=s.split("--"),m=d[d.length-2],f=d[d.length-1];i.push({ID:m,RECORD_ID:f})}),i.length>0){let s={RESOURCES:i};this.authService.getCompareResources(s).subscribe({next:d=>{this.compareInstances=d?.object?.results?.[0]?.hits||[],this.compareInstances.length>0?this.getResourceComparison():this.setLoading(!1)},error:d=>{this.setLoading(!1),this.notify.showNotification(d?.error?.message,"top",E[d?.error?.status]?E[d?.error?.status]:"error",d?.error?.status)}})}else this.setLoading(!1);this.updateMetaTags(e)}updateMetaTags(e){return e}updateCompleteFormArray(e){this.completeFormArray=[...e],this.extractCompleteSearchCriteria()}getCompleteSearchCriteria(){return this.completeSearchCriteria}extractCompleteSearchCriteria(){if(this.completeFormArray&&this.completeFormArray.length>0){let e=this.completeFormArray[0];this.completeSearchCriteria={selectedService:e?.service_type?.[0],selectedProduct:e?.product_name?.[0],storageAmount:e?.storage_amount?.[0],retrievalAmount:e?.retrieval_amount?.[0],readRequests:e?.read_requests?.[0],writeRequests:e?.write_requests?.[0],noOfRequest:e?.no_of_request?.[0],durationOfRequest:e?.duration_of_request?.[0],amountOfMemory:e?.amount_of_memory?.[0]}}}isStructuredSearchContext(){return this.completeFormArray&&this.completeFormArray.length>0&&Object.keys(this.completeSearchCriteria).length>0}getCurrentProductName(){return this.compareInstances[0]?.document?.product_name||null}hasValidStorageInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.storageAmount&&e?.retrievalAmount&&e?.readRequests&&e?.writeRequests)}hasValidFunctionInputs(){let e=this.getCompleteSearchCriteria();return!!(e?.noOfRequest&&e?.durationOfRequest&&e?.amountOfMemory)}getResourceComparison(){let e={},n=[];this.compareInstances[0]?.document?.product_name==="Virtual Machine"?this.compareInstances.forEac
12h(s=>{e={RECORD_ID:s?.document?.record_id,PRODUCT_NAME:s?.document?.product_name,DATA:{SERVICE_PROVIDER:s?.document?.service_provider,VM_NAME:s?.document?.vm_name,ACTUAL_REGION_CODE:s?.document?.actual_region_code,ACTUAL_REGION_NAME:s?.document?.actual_region_name}},n.push(e)}):this.compareInstances[0]?.document?.product_name==="object-storage"?this.compareInstances.forEach(s=>{e={RECORD_ID:s?.document?.record_id,PRODUCT_NAME:s?.document?.product_name,DATA:{SERVICE_PROVIDER:s?.document?.service_provider,ACTUAL_REGION_CODE:s?.document?.actual_region_code,ACTUAL_REGION_NAME:s?.document?.actual_region_name,ACCESS_TIER:s?.document?.access_tier,ACCESS_TIER_OPTION:s?.document?.access_tier_option,SERVICE_TYPE:s?.document?.service_type,STORAGE_TYPE:s?.document?.storage_type,STORAGE_OPTION:s?.document?.storage_option}},n.push(e)}):this.compareInstances[0]?.document?.product_name==="Serverless Function"&&this.compareInstances.forEach(s=>{e={RECORD_ID:s?.document?.record_id,PRODUCT_NAME:s?.document?.product_name,DATA:{SERVICE_PROVIDER:s?.document?.service_provider,ACTUAL_REGION_CODE:s?.document?.actual_region_code,ACTUAL_REGION_NAME:s?.document?.actual_region_name,SERVICE_TYPE:s?.document?.service_type,SERVERLESS_ARCHITECTURE:s?.document?.serverless_architecture}},n.push(e)});let i={RESOURCE:n};if(n.length===0){this.setLoading(!1);return}this.authService.getAIComparison(i).subscribe({next:s=>{this.AIComparison=s?.object?.RESOURCE||[],this.setLoading(!1)},error:s=>{this.setLoading(!1),this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}})}setLoading(e){this.ngZone.run(()=>{this.loading=e,this.cdr.detectChanges()})}isScientificNotation(e){let n=e,i=String(n);return i.includes("e")||i.includes("E")?n=Number(n).toFixed(10):n=Number(n),n}getVMMonthlyPrice(e,n){let i=this.monthlyHours[n?n.toLowerCase():""];return e?(this.isScientificNotation(e)*i).toFixed(2):"--"}getStorageMonthlyPrice(e,n,i,s,d,m){let f=0,_=0,b=0,M=0,S=m,w=[],D=0,R=0,W=0,H=this.isStructuredSearchContext()&&this.getCurrentProductName()==="object-storage"&&this.hasValidStorageInputs();if(d===!1)H?(f=this.getCompleteSearchCriteria()?.storageAmount*this.isScientificNotation(e[0])||0,_=this.getCompleteSearchCriteria()?.retrievalAmount*this.isScientificNotation(n)||0,b=this.getCompleteSearchCriteria()?.readRequests*this.isScientificNotation(i)||0,M=this.getCompleteSearchCriteria()?.writeRequests*this.isScientificNotation(s)||0):(f=500*this.isScientificNotation(e[0])||0,_=500*this.isScientificNotation(n)||0,b=1e4*this.isScientificNotation(i)||0,M=1e4*this.isScientificNotation(s)||0),W=f+_+b+M;else if(d===!0){f=H?this.getCompleteSearchCriteria()?.storageAmount:500,H?(_=this.getCompleteSearchCriteria()?.retrievalAmount*this.isScientificNotation(n)||0,b=this.getCompleteSearchCriteria()?.readRequests*this.isScientificNotation(i)||0,M=this.getCompleteSearchCriteria()?.writeRequests*this.isScientificNotation(s)||0):(_=500*this.isScientificNotation(n)||0,b=1e4*this.isScientificNotation(i)||0,M=1e4*this.isScientificNotation(s)||0);for(let L=0;L<S.length;L++)w=[],w=S[L].split("-"),w[1]=="~"?f>parseInt(w[0])&&(D=L):f>parseInt(w[0])&&f<=parseInt(w[1])&&(D=L);for(let L=D;L>=0;L--)w=[],w=S[L].split("-"),D==L?R+=(f-parseInt(w[0]))*this.isScientificNotation(e[L]):R+=(parseInt(w[1])-parseInt(w[0]))*this.isScientificNotation(e[L]);W=R+_+b+M}return W?.toFixed(2)||"0.00"}getFunctionMonthlyPrice(e,n,i,s,d,m){let f=0,_=0,b=0,M=0,S=0,w=m,D=[],R=0,W=0,H=0,L=this.isStructuredSearchContext()&&this.getCurrentProductName()==="Serverless Function"&&this.hasValidFunctionInputs();if(d===!1)L?(f=this.getCompleteSearchCriteria()?.noOfRequest*(this.getCompleteSearchCriteria()?.durationOfRequest/1e3),_=this.getCompleteSearchCriteria()?.amountOfMemory/1024*f,b=_*this.isScientificNotation(e[0]),M=this.getCompleteSearchCriteria()?.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))):(f=1e6*(300/1e3),_=256/1024*f,b=_*this.isScientificNotation(e[0]),M=1e6*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))
12),H=b+M+S;else if(d===!0){L?(f=this.getCompleteSearchCriteria()?.noOfRequest*(this.getCompleteSearchCriteria()?.durationOfRequest/1e3),_=this.getCompleteSearchCriteria()?.amountOfMemory/1024*f,M=this.getCompleteSearchCriteria()?.noOfRequest*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i))):(f=1e6*(300/1e3),_=256/1024*f,M=1e6*this.isScientificNotation(n),s==="gcp"&&(S=f*this.isScientificNotation(i)));for(let q=0;q<w.length;q++)D=[],D=w[q].split("-"),D[1]=="~"?_>parseInt(D[0])&&(R=q):_>parseInt(D[0])&&_<=parseInt(D[1])&&(R=q);for(let q=R;q>=0;q--)D=[],D=w[q].split("-"),R==q?W+=(_-parseInt(D[0]))*this.isScientificNotation(e[q]):W+=(parseInt(D[1])-parseInt(D[0]))*this.isScientificNotation(e[q]);H=W+M+S}return H?.toFixed(2)||"--"}formatFeatureName(e){let n={PUBLIC_IP:"Public IP","24_7_SUPPORT":"24/7 Support",SLA_GUARANTEE:"SLA Guarantee",API_SUPPORT:"API Support",SOS_COMPLIANCE:"SOS Compliance",HIPAA_ELIGIBLE:"HIPAA Eligible",CDN_INTEGRATION:"CDN Integration"};return n[e]?n[e]:this.formatText(e)}getFeatureIcon(e){return e===!0||e==="yes"||e==="available"?"mdi:tick":e===!1||e==="no"||e==="unavailable"?"ic:round-close":"mingcute:question-line"}getFeatureClass(e){return e===!0||e==="yes"||e==="available"?"feature-available":e===!1||e==="no"||e==="unavailable"?"feature-unavailable":"feature-unknown"}getComparisonCategories(){if(!Array.isArray(this.AIComparison))return[];let e=new Set;return this.AIComparison.forEach(n=>{let i=n?.COMPARISON;i&&(Array.isArray(i)?i.forEach(s=>{s&&typeof s=="object"&&Object.keys(s).forEach(d=>e.add(d))}
12):typeof i=="object"&&Object.keys(i).forEach(s=>e.add(s)))}),Array.from(e)}getFeatureKeysForCategory(e){if(!Array.isArray(this.AIComparison))return[];let n=new Set;return this.AIComparison.forEach(i=>{let s=i?.COMPARISON;if(!s)return;let d=[];if(Array.isArray(s)){let m=s.find(f=>f&&f[e]);d=Array.isArray(m?.[e])?m[e]:[]}else s&&s[e]&&(d=Array.isArray(s[e])?s[e]:[]);d.forEach(m=>{m&&typeof m=="object"&&Object.keys(m).forEach(f=>n.add(f))})}),Array.from(n)}getFeatureValueForCategory(e,n,i){if(!e||!Array.isArray(this.AIComparison))return null;let s=this.AIComparison.find(f=>String(f?.RECORD_ID)===String(e));if(!s)return null;let d=s?.COMPARISON,m=[];if(Array.isArray(d)){let f=d.find(_=>_&&_[n]);m=Array.isArray(f?.[n])?f[n]:[]}else d&&d[n]&&(m=Array.isArray(d[n])?d[n]:[]);for(let f of m)if(f&&typeof f=="object"&&Object.prototype.hasOwnProperty.call(f,i))return f[i];return null}isBooleanValue(e){return typeof e=="boolean"||e==="yes"||e==="no"}getComparisonCount(){let e=this.compareInstances.length;return`Comparing ${e} instance${e!==1?"s":""}`}extractNumericValue(e){if(e==null||e==="--"||e==="")return null;if(typeof e=="number"&&!isNaN(e))return e;let i=String(e).toLowerCase()?.trim()?.replace(/[,$%]/g,"")?.replace(/\s*(gb|ghz|vcpu|cores?|hours?|days?|gbps?|mbps?)\s*/gi,"")?.replace(/\s+/g,"")?.trim(),s=parseFloat(i);return isNaN(s)?null:s}getNumericHighlightClass(e,n,i){if(!["vcpu_cores","ram_gb","cpu_clock_ghz","hourly_rate_usd","monthly_rate_usd","upfront_amount_usd","avg_monthly_price","gpu_count","gpu_memory_mb","sla_guarantee"]?.includes(i))return"";let d=[],m=this.extractNumericValue(n);if(m===null||(e.forEach(M=>{let S=this.extractNumericValue(M);S!==null&&d.push(S)}),d.length<2))return"";let f=Math.min(...d),_=Math.max(...d);if(f===_)return"";if(["hourly_rate_usd","monthly_rate_usd","upfront_amount_usd","avg_monthly_price"]?.includes(i)){if(m===f)return"highlight-best";if(m===_)return"highlight-worst"}else{if(m===_)return"highlight-best";if(m===f)return"highlight-worst"}return""}getRowValues(e){return this.compareInstances.map(n=>{switch(e){case"vcpu_cores":return n?.document?.vcpu_cores;case"ram_gb":return n?.document?.ram_gb;case"cpu_clock_ghz":return n?.document?.cpu_clock_ghz;case"hourly_rate_usd":return n?.document?.hourly_rate_usd;case"monthly_rate_usd":return n?.document?.monthly_rate_usd;case"upfront_amount_usd":return n?.document?.upfront_amount_usd;case"avg_monthly_price":return this.getVMMonthlyPrice(n?.document?.hourly_rate_usd,n?.document?.service_provider);case"gpu_count":return n?.document?.gpu_count;case"gpu_memory_mb":return this.extractNumericValue(n?.document?.gpu_memory_mb);case"sla_guarantee":return n?.document?.sla_guarantee;default:return null}})}getHighlightClass(e,n){let i=this.getRowValues(n),s;switch(n){case"vcpu_cores":s=e?.document?.vcpu_cores;break;case"ram_gb":s=e?.document?.ram_gb;break;case"cpu_clock_ghz":s=e?.document?.cpu_clock_ghz;break;case"hourly_rate_usd":s=e?.document?.hourly_rate_usd;break;case"monthly_rate_usd":s=e?.document?.monthly_rate_usd;break;case"upfront_amount_usd":s=e?.document?.upfront_amount_usd;break;case"avg_monthly_price":s=this.getVMMonthlyPrice(e?.document?.hourly_rate_usd,e?.document?.service_provider);break;case"gpu_count":s=e?.document?.gpu_count;break;case"gpu_memory_mb":s=this.extractNumericValue(e?.document?.gpu_memory_mb);break;case"sla_guarantee":s=e?.document?.sla_guarantee;break;default:s=e?.document?.[n]}return this.getNumericHighlightClass(i,s,n)}hasGpuData(){return!this.compareInstances||this.compareInstances.length===0?!1:this.compareInstances.some(e=>{let n=e?.document;if(!n)return!1;let i=n.gpu_model,s=!!i&&i!==""&&i.toString().toLowerCase()!=="0"&&i.toString().toLowerCase()!=="0.0"&&i.toString().toLowerCase()!=="na",d=n.gpu_count,m=!!d&&d!==""&&d.toString().toLowerCase()!=="0"&&d.toString().toLowerCase()!=="0.0"&&d.toString().toLowerCase()!=="na",f=n.gpu_memory_mb,_=!!f&&f!==""&&f.toString().toLowerCase()!=="0"&&f.toString().toLowerCase()!=="0.0"&&f.toString().toLowerCase()!=="na";return s||m||_})}selectInstance(e){this.selectedInstanceId=e?.document?.record_id,this.selectedInstance=e?.document}clearSelection(){this.selectedInstanceId=null,this.selectedInstance=null}isInstanceSelected(e){return this.selectedInstanceId===e?.document?.record_id}removeFromComparison(e){let n={ID:[e?.document?.id]};this.cartService.removeComparison(n).subscribe({next:s=>{s&&s.object&&Array.isArray(s.object)&&(this.compareInstances=s.object,pn(this.platformId)&&window.localStorage.setItem("COMPARE_INSTANCES",JSON.stringify(this.compareInstances)))},error:s=>{this.notify.showNotification(s?.error?.message,"top",E[s?.error?.status]?E[s?.error?.status]:"error",s?.error?.status)}}),this.selectedInstanceId===e?.document?.record_id&&this.clearSelection();let i=this.compareInstances.filter(s=>s.document?.record_id!==e.document?.record_id);this.compareInstances=i,pn(this.platformId)&&window.localStorage.setItem("COMPARE_INSTANCES",JSON.stringify(i)),this.compareInstances.length===0&&this.clearSelection()}addSelectedToCart(){this.selectedInstance&&this.verifyCartBeforeAdding(this.selectedInstance,1)}verifyCartBeforeAdding(e,n){this.cartService.getCartItems().subscribe({next:i=>{let s=Array.isArray(i?.object)?i.object:[];this.shouldConfirmProviderChange(s,e?.service_provider)?this.promptProviderConfirmation(e,n):this.updateItemQuantity(e,n
12)},error:i=>{this.notify.showNotification(i?.error?.message,"top",E[i?.error?.status]?E[i?.error?.status]:"error",i?.error?.status)}})}promptProviderConfirmation(e,n){this.dialog.open(eo,{width:"558px",height:"auto",data:{title:this.providerConfirmationMessage},disableClose:!0}).afterClosed().subscribe(s=>{s?.state===!0&&this.updateItemQuantity(e,n)})}shouldConfirmProviderChange(e,n){if(!Array.isArray(e)||e.length===0)return!1;let i=this.normalizeProvider(n);return i?!e.some(d=>{let m=this.normalizeProvider(d?.SERVICE_DETAILS?.service_provider||d?.SERVICE_DETAILS?.selection?.service_provider);return!!m&&m===i}):!1}normalizeProvider(e){return e?.toString()?.trim()?.toLowerCase()||""}updateItemQuantity(e,n){let i={};e?.product_name==="object-storage"?i={storage_amount_per_month:this.getCompleteSearchCriteria()?.storageAmount||500,retieval_amount_per_month:this.getCompleteSearchCriteria()?.retrievalAmount||500,read_requests_per_month:this.getCompleteSearchCriteria()?.readRequests||1e4,write_requests_per_month:this.getCompleteSearchCriteria()?.writeRequests||1e4}:e?.product_name==="Serverless Function"&&(i={number_of_requests:this.getCompleteSearchCriteria()?.noOfRequest||1e6,duration_of_request:this.getCompleteSearchCriteria()?.durationOfRequest||300,amount_of_memory:this.getCompleteSearchCriteria()?.amountOfMemory||256});let s={RESOURCE:[{RESOURCE_TYPE:"external",RESOURCE_ID:e?.record_id,QUANTITY:n,SERVICE_DETAILS:e,USER_INPUT:i}]};this.cartService.addItemToCart(s).subscribe({next:d=>{d.status===200&&d.object.length>0&&(this.cartService.cartUpdated$.next(),this.router.navigate(["/admin-dashboard/cloud-atler"]))},error:d=>{this.notify.showNotification(d?.error?.message,"top",E[d?.error?.status]?E[d?.error?.status]:"error",d?.error?.status)}})}viewSelectedDetails(){if(this.selectedInstance){let e=this.slugify(this.selectedInstance?.
12service_provider),n=this.slugify(this.selectedInstance?.product_name),i=e+"-"+n+"--"+this.selectedInstance?.record_id;this.router.navigate(["/admin-dashboard/cloud-atler/service",i])}}slugify(e){return e?.toString()?.toLowerCase()?.trim()?.replace(/[\/\s]+/g,"-")?.replace(/[^\w-]+/g,"")?.replace(/-+/g,"-")?.replace(/^-+|-+$/g,"")}getTotalMonthlyCost(){if(this.selectedInstance){if(this.getCurrentProductName()==="Virtual Machine")return this.getVMMonthlyPrice(this.selectedInstance?.hourly_rate_usd,this.selectedInstance?.service_provider);if(this.getCurrentProductName()==="object-storage")return this.getStorageMonthlyPrice(this.selectedInstance?.storage_price_per_gb,this.selectedInstance?.retrieval_price_per_gb,this.selectedInstance?.read_price_per_request,this.selectedInstance?.write_price_per_request,this.selectedInstance?.storage_tier_available,this.selectedInstance?.storage_tier_gb);if(this.getCurrentProductName()==="Serverless Function")return this.getFunctionMonthlyPrice(this.selectedInstance?.memory_duration_price_per_gb_s,this.selectedInstance?.price_per_request,this.selectedInstance?.duration_price_per_s,this.selectedInstance?.
12service_provider,this.selectedInstance?.memory_duration_tier_available,this.selectedInstance?.memory_duration_tier_gb_s)}return"0.00"}getBestValue(){if(this.compareInstances.length===0)return"";let e=this.compareInstances[0],n=0;return this.getCurrentProductName()==="Virtual Machine"?(n=parseFloat(this.getVMMonthlyPrice(e?.document?.hourly_rate_usd,e?.document?.service_provider)),this.compareInstances.forEach(i=>{let s=parseFloat(this.getVMMonthlyPrice(i?.document?.hourly_rate_usd,i?.document?.service_provider));s<n&&(n=s,e=i)})):this.getCurrentProductName()==="object-storage"?(n=parseFloat(this.getStorageMonthlyPrice(e?.document?.storage_price_per_gb,e?.document?.retrieval_price_per_gb,e?.document?.read_price_per_request,e?.document?.write_price_per_request,e?.document?.storage_tier_available,e?.document?.storage_tier_gb)),this.compareInstances.forEach(i=>{let s=parseFloat(this.getStorageMonthlyPrice(i?.document?.storage_price_per_gb,i?.document?.retrieval_price_per_gb,i?.document?.read_price_per_request,i?.document?.write_price_per_request,i?.document?.storage_tier_available,i?.document?.storage_tier_gb));s<n&&(n=s,e=i)})):this.getCurrentProductName()==="Serverless Function"&&(n=parseFloat(this.getFunctionMonthlyPrice(e?.document?.memory_duration_price_per_gb_s,e?.document?.price_per_request,e?.document?.duration_price_per_s,e?.document?.service_provider,e?.document?.memory_duration_tier_available,e?.document?.memory_duration_tier_gb_s)),this.compareInstances.forEach(i=>{let s=parseFloat(this.getFunctionMonthlyPrice(i?.document?.memory_duration_price_per_gb_s,i?.document?.price_per_request,i?.document?.duration_price_per_s,i?.document?.service_provider,i?.document?.memory_duration_tier_available,i?.document?.memory_duration_tier_gb_s));s<n&&(n=s,e=i)})),e?.document?.product_name||""}formatText(e){return e?.toLowerCase()?.replace(/[-_]/g," ")?.replace(/\b\w/g,n=>n?.toUpperCase())}backToHome(){this.router.navigate(["/admin-dashboard/cloud-atler"])}scrollToTopContent(){setTimeout(()=>{if(pn(this.platformId)){let e=document.getElementById("pageContent");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}},100)}getInstanceColumnWidth(){let e=this.compareInstances.length;return e===0?"100%":`${100/e}%`}getInstanceColumnStyles(){return{width:this.getInstanceColumnWidth(),"min-width":this.getInstanceColumnWidth()}}static{this.\u0275fac=function(n){return new(n||t)(y(Jn),y(G),y(Le),y(Kt),y(V),y(Rn),y(Cn),y(Se),y(be),y(Z))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cloud-atler-comparison-results"]],decls:2,vars:2,consts:[["textVal",""],["class","overlay",4,"ngIf"],["id","pageContent",4,"ngIf"],[1,"overlay"],[1,"overlay__inner"],[1,"overlay__content"],[1,"spinner"],["id","pageContent"],[1,"head-row"],[1,"back-arrow",3,"click"],["icon","material-symbols:arrow-back-rounded"],["class","pricing-head",4,"ngIf"],[1,"comparison-count"],[1,"comparison-table-container"],[1,"comparison-table"],[1,"spec-column"],["class","instance-column",3,"ngStyle",4,"ngFor","ngForOf"],[4,"ngIf"],["class","spec-group-header",4,"ngIf"],["class","selection-footer",3,"footer-visible",4,"ngIf"],["class","footer-spacer",4,"ngIf"],[1,"pricing-head"],[1,"instance-column",3,"ngStyle"],[1,"instance-header"],[1,"instnace-title"],[1,"provider-logo",3,"src"],[1,"instance-text"],[1,"instance-title"],[1,"instance-subtitle"],[1,"instance-type"],[1,"instance-selection"],["type","radio","name","selectedInstance",1,"instance-radio",3,"change","id","value","checked"],[1,"radio-label",3,"for"],[1,"radio-custom"],["class","instance-price",4,"ngIf"],[1,"instance-price"],[1,"spec-group-header"],[1,"group-title"],["icon","material-symbols:memory"],[1,"spec-label"],["class","spec-value",3,"ngClass",4,"ngFor","ngForOf"],["class","spec-value",4,"ngFor","ngForOf"],["icon","bx:memory-card"],["icon","mingcute:storage-line"],["icon","lucide:globe"],["icon","majesticons:dollar-circle-line"],[1,"spec-value",3,"ngClass"],[1,"spec-value"],[1,"reserved-info"],["icon","famicons:play-forward-outline"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[3,"icon"],[1,"selection-footer"],[1,"footer-content"],[1,"footer-left"],[1,"selected-instance-info"],[1,"footer-provider-logo",3,"src"],[1,"instance-details"],[1,"instance-name"],[1,"instance-specs"],[1,"pricing-info"],[1,"monthly-cost"],[1,"cost-label"],[1,"cost-value"],["class","monthly-cost",4,"ngIf"],[1,"footer-actions"],["mat-button","",1,"footer-btn","secondary",3,"click"],["mat-button","",1,"footer-btn","primary",3,"click"],["type","button","aria-label","Clear selection",1,"close-footer-btn",3,"click"],["icon","material-symbols:close"],[1,"best-value"],[1,"footer-spacer"]],template:function(n,i){n&1&&g(0,rT,4,0,"div",1)(1,JT,28,16,"div",2),n&2&&(p("ngIf",i.loading),c(),p("ngIf",!!i.getCurrentProductName()))},dependencies:[N,xe,$,B,pr,z,ut,Zn],styles:['.head-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px 50px;background:transparent}.head-row[_ngcontent-%COMP%]   .back-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:16px;color:#374151;cursor:pointer;text-align:start;width:5%}.head-row[_ngcontent-%COMP%]   .pricing-head[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#000;text-align:center;width:80%}.head-row[_ngcontent-%COMP%]   .comparison-count[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;text-align:end;width:15%}.comparison-table-container[_ngcontent-%COMP%]{overflow-x:auto;padding:20px 50px;background:#f9fafb}.comparison-table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0;background:#fff;box-shadow:0 2px 8px #0000000a;border-radius:16px;overflow:hidden;table-layout:fixed}.comparison-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .comparison-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px;text-align:center;border-bottom:1px solid #F3F4F6;vertical-align:middle}.comparison-table[_ngcontent-%COMP%]   .spec-column[_ngcontent-%COMP%]{background:#fff;font-weight:500;color:#111827;text-align:left;
12width:200px;min-width:200px;position:sticky;left:0;z-index:10}.comparison-table[_ngcontent-%COMP%]   .instance-column[_ngcontent-%COMP%]{background:#fff;position:relative}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:10px;position:relative}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .remove-instance-btn[_ngcontent-%COMP%]{position:absolute;top:-8px;right:-8px;width:24px;height:24px;color:#9ca3af;border-radius:50%;z-index:5}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .remove-instance-btn[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:16px;position:absolute;right:4px;bottom:4px}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instnace-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]{position:relative}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .instance-radio[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .instance-radio[_ngcontent-%COMP%]:checked + .radio-label[_ngcontent-%COMP%]   .radio-custom[_ngcontent-%COMP%]{background-color:#35a5db;border-color:#35a5db}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .instance-radio[_ngcontent-%COMP%]:checked + .radio-label[_ngcontent-%COMP%]   .radio-custom[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .radio-label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .radio-label[_ngcontent-%COMP%]   .radio-custom[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid #D1D5DB;border-radius:50%;background:#fff;position:relative;transition:all .2s ease}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .radio-label[_ngcontent-%COMP%]   .radio-custom[_ngcontent-%COMP%]:after{content:"";position:absolute;top:20%;left:20%;width:10px;height:10px;background:#fff;border-radius:50%;transform:translate(-50%,-50%) scale(0);opacity:0;transition:all .2s ease}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-selection[_ngcontent-%COMP%]   .radio-label[_ngcontent-%COMP%]   .radio-custom[_ngcontent-%COMP%]:hover{border-color:#2563eb}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .provider-logo[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-title[_ngcontent-%COMP%]{font-weight:500;font-size:16px;color:#111827;text-align:center}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-subtitle[_ngcontent-%COMP%]{font-weight:600;font-size:16px;color:#6b7280}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-type[_ngcontent-%COMP%]{font-weight:700;font-size:14px;color:#6b7280}.comparison-table[_ngcontent-%COMP%]   .instance-header[_ngcontent-%COMP%]   .instance-price[_ngcontent-%COMP%]{font-size:18px;color:#111827;font-weight:700}.comparison-table[_ngcontent-%COMP%]   .spec-group-header[_ngcontent-%COMP%]{background-color:#f9fafb}.comparison-table[_ngcontent-%COMP%]   .spec-group-header[_ngcontent-%COMP%]   .group-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-weight:500;color:#111827;text-align:left;gap:10px}.comparison-table[_ngcontent-%COMP%]   .spec-group-header[_ngcontent-%COMP%]   .group-title[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px;color:#111827}.comparison-table[_ngcontent-%COMP%]   .spec-label[_ngcontent-%COMP%]{background:#fff;font-size:14px;color:#374151;text-align:left;position:sticky;left:0;z-index:5}.comparison-table[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]{font-size:14px;color:#000}.comparison-table[_ngcontent-%COMP%]   .spec-value.highlight-best[_ngcontent-%COMP%]{background-color:#dcfce7;color:#166534}.comparison-table[_ngcontent-%COMP%]   .spec-value.feature-value[_ngcontent-%COMP%]{text-align:center}.comparison-table[_ngcontent-%COMP%]   .spec-value.feature-value[_ngcontent-%COMP%]   iconify-icon[_ngcontent-%COMP%]{font-size:20px}.comparison-table[_ngcontent-%COMP%]   .spec-value.feature-available[_ngcontent-%COMP%], .comparison-table[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]   .feature-available[_ngcontent-%COMP%]{color:#16a34a;font-size:20px}.comparison-table[_ngcontent-%COMP%]   .spec-value.feature-unavailable[_ngcontent-%COMP%], .comparison-table[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]   .feature-unavailable[_ngcontent-%COMP%]{color:#dc2626;font-size:20px}.comparison-table[_ngcontent-%COMP%]   .spec-value.feature-unknown[_ngcontent-%COMP%], .comparison-table[_ngcontent-%COMP%]   .spec-value[_ngcontent-%COMP%]   .feature-unknown[_ngcontent-%COMP%]{color:#6b7280}.comparison-table[_ngcontent-%COMP%]   .spec-value.highlight-worst[_ngcontent-%COMP%]{background-color:#fef2f2;color:#dc2626}.comparison-table[_ngcontent-%COMP%]   .reserved-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:3px}.selection-footer[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #E5E7EB;box-shadow:0 -4px 6px -1px #0000001a;z-index:1000;transform:translateY(100%);transition:transform .3s ease-in-out}.selection-footer.footer-visible[_ngcontent-%COMP%]{transform:translateY(0)}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:15px 50px;margin:0 auto}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:25px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .selected-instance-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .selected-instance-info[_ngcontent-%COMP%]   .footer-provider-logo[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .selected-instance-info[_ngcontent-%COMP%]   .instance-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .selected-instance-info[_ngcontent-%COMP%]   .instance-details[_ngcontent-%COMP%]   .instance-name[_ng
12content-%COMP%]{font-weight:500;font-size:16px;color:#111827}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .selected-instance-info[_ngcontent-%COMP%]   .instance-details[_ngcontent-%COMP%]   .instance-specs[_ngcontent-%COMP%]{font-size:14px;color:#6b7280}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .pricing-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .pricing-info[_ngcontent-%COMP%]   .monthly-cost[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .pricing-info[_ngcontent-%COMP%]   .cost-label[_ngcontent-%COMP%]{font-size:14px;color:#4b5563;font-weight:500}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .pricing-info[_ngcontent-%COMP%]   .cost-value[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#111827}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]   .pricing-info[_ngcontent-%COMP%]   .best-value[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#06c}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-actions[_ngcontent-%COMP%]   .footer-btn[_ngcontent-%COMP%]{font-size:14px;padding:10px 20px;border-radius:8px}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-actions[_ngcontent-%COMP%]   .footer-btn.secondary[_ngcontent-%COMP%]{background-color:#fff;color:#374151;border:1px solid #E5E7EB}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-actions[_ngcontent-%COMP%]   .footer-btn.primary[_ngcontent-%COMP%]{background-color:#35a5db;color:#fff}.selection-footer[_ngcontent-%COMP%]   .footer-content[_ngcontent-%COMP%]   .footer-actions[_ngcontent-%COMP%]   .close-footer-btn[_ngcontent-%COMP%]{border:0;background:transparent;color:#9ca3af;cursor:pointer}.footer-spacer[_ngcontent-%COMP%]{height:80px}']})}}return t})();var s$=[{path:"",component:As,children:[{path:"",component:va},{path:"service-dashboard",component:va},{path:"cost-analysis",component:up},{path:"cspm-dashboard",component:_p},{path:"finops-dashboard",component:km},{path:"user-management",component:Es},{path:"reports",component:Ns},{path:"budget",component:iu},{path:"budget/setup",component:ru},{path:"budget/resources",component:au},{path:"budget/alerts",component:lu},{path:"tag-allocations",component:nu},{path:"teams",component:Ym},{path:"teams/manage-team",component:Km},{path:"teams/team-breakdown",component:Qm},{path:"cost-center",component:Zm},{path:"cost-center/cost-center-breakdown",component:Xm},{path:"cost-center/manage-cost-center",component:eu},{path:"patch-management",component:qs},{path:"patch-management/risk-analysis-details",component:mp},{path:"patch-management/total-instances-details",component:Vm},{path:"patch-management/patch-complaint-details",component:zm},{path:"patch-management/running-instances-details",component:Lm},{path:"patch-management/non-compliance-details",component:Bm},{path:"patch-management/workflow/:id",component:Fm},{path:"patch-management/job-schedule",component:jm},{path:"patch-management/integrations",component:$m},{path:"performance",component:vp},{path:"rds",component:xp},{path:"ebs",component:bp},{path:"ecs",component:Cp},{path:"about-us",component:Ds},{path:"support",component:Rs},{path:"change-password",component:ws},{path:"credential",component:ks},{path:"dashboard-ready-modal",component:Xr},{path:"cloud-config",component:qm},{path:"cloud-config/connection-setup",component:Hm},{path:"cloud-config/cost-configure-and-optimize",component:Wm},{path:"cloud-atler",component:gu},{path:"cloud-atler/order-billing",component:hu},{path:"cloud-atler/service/:slug",component:_u},{path:"cloud-atler/compare/:slug",component:Cu}]}];export{s$ as AdminRoutes};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.