1import{a as rt}from"./chunk-YD3IHEWA.js";import{A as y,ea as nt}from"./chunk-XMYO62VM.js";import"./chunk-NVHUVRXW.js";import{$ as S,$a as H,Aa as G,Ac as X,Ba as u,Bc as z,Bd as T,C as g,Cf as it,D as f,E as l,Ee as tt,Fd as _,Gd as Y,H as w,Hb as B,I as A,Ka as I,La as j,Ma as D,Mf as E,Nd as M,Oa as n,Oc as J,Pa as N,Qa as L,W as p,Wd as k,Za as V,_ as a,_a as Q,aa as h,da as C,e as lt,ea as v,he as Z,kb as W,na as d,se as x,sf as et,ta as s,tb as q,ua as c,ud as dt,ue as $,va as R,yd as K,za as U}from"./chunk-6MW4V7QH.js";var st=lt(dt());var O=(()=>{class e{constructor(t){this.apiService=t}getSubscriptions(t){return this.apiService.get("/api/v1/users/"+t+"/subscriptions").toPromise()}saveSubscriptions(t,i){return this.apiService.put("/api/v1/users/"+t+"/subscriptions",i)}static{this.\u0275fac=function(i){return new(i||e)(l(Y))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gt=["chkDom"];function ft(e,ut){if(e&1){let t=U();s(0,"div"),n(1,` 2 `),s(2,"app-user-subscription",4),G("saveSubscriptionData",function(r){w(t);let o=u();return A(o.saveSubscriptionData(r))})("reseteSubscription",function(r){w(t);let o=u();return A(o.reseteSubscription(r))}),c(),n(3,` 3 `),c()}if(e&2){let t=u();p(2),d("subscriptionData",t.subscriptionData)}}var St={responsePreference:"responsePreference",emailChanel:"MAIL",emailAndTextchanel:"EMAIL AND TEXT",preferenceAll:"ALL",sms:"SMS",subscriptionSettings:"subscriptionSettings"},ct=(()=>{class e extends x{constructor(t,i,r,o,m,mt){super(r),this.alertService=t,this.checkboxComponentService=i,this.i18Svc=r,this.route=o,this.storageService=m,this.subscriptionsService=mt}ngOnInit(){super.ngOnInit(St.subscriptionSettings),this.alertArray=[],this.currentUserSettingsSubject=this.storageService.getUserSettings(),this.route.data.pipe(k(this)).subscribe(t=>{this.subscriptionData=t.data})}ngOnDestroy(){}saveSubscriptionData(t){this.subscriptionsService.saveSubscriptions(this.currentUserSettingsSubject.userUid,t).pipe(k(this)).subscribe(i=>{this.childComp.updateObjectAfterSave(i.data.subscriptionData.subscriptions),this.showAlertSuccess(i.successBanners),window.scrollTo(0,0)})}showAlertSuccess(t){t&&st.forEach(t,i=>{this.showAlert(this.pageConstants.success,i.message,this.alertArray)})}
3showAlert(t,i,r){let o=this.alertService.getAlertObject(i,t,0);this.alertService.stackAlertArray(r,o)}reseteSubscription(t){this.showAlert(this.pageConstants.success,this.literal.resetSubscription,this.alertArray),window.scrollTo(0,0)}static{this.\u0275fac=function(i){return new(i||e)(a(Z),a(it),a(_),a(K),a(M),a(O))}}static{this.\u0275cmp=S({type:e,selectors:[["app-subscriptions-grid"]],viewQuery:function(i,r){if(i&1&&(I(y,5),I(gt,5)),i&2){let o;j(o=D())&&(r.childComp=o.first),j(o=D())&&(r.components=o)}},standalone:!1,features:[C],decls:12,vars:3,consts:[[1,"subscription-setting"],[1,"page-title"],[3,"alertArrayChange","alertArray"],[4,"ngIf"],[3,"saveSubscriptionData","reseteSubscription","subscriptionData"]],template:function(i,r){i&1&&(s(0,"div",0),n(1,` 4 `),s(2,"div"),n(3,` 5 `),s(4,"h1",1),n(5),c(),n(6,` 6 `),c(),n(7,` 7 `),s(8,"app-alert-container",2),H("alertArrayChange",function(m){return Q(r.alertArray,m)||(r.alertArray=m),m}),c(),n(9,` 8 `),v(10,ft,4,1,"div",3),n(11,` 9`),c()),i&2&&(p(5),N(r.literal.subscriptionHeader),p(3),V("alertArray",r.alertArray),p(2),d("ngIf",r.subscriptionData))},dependencies:[q,$,y],styles:['.subscription-setting[_ngcontent-%COMP%]{margin-bottom:20px}.subscription-setting[_ngcontent-%COMP%] app-chkbox .box{text-align:left}.subscription-setting[_ngcontent-%COMP%] p-checkbox[_ngcontent-%COMP%] .p-checkbox .p-checkbox-box .p-checkbox-checked{background-color:#fafafa}.subscription-setting[_ngcontent-%COMP%] app-collapsible-panel[_ngcontent-%COMP%] .card-collapse .card-body{margin-left:24px;background-color:#fafafa}.subscription-setting[_ngcontent-%COMP%] .subscription-panel[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-family:var(--regular)}.subscription-setting[_ngcontent-%COMP%] .subscription-panel[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{vertical-align:middle;color:#0000008a}.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-header.row[_ngcontent-%COMP%]{border-bottom:none;margin:0}.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-header[_ngcontent-%COMP%] [class*=" col-"][_ngcontent-%COMP%]{border-bottom:2px solid #e0e0e0}.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{border-bottom:none;margin:0}.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] [class*=" col-"][_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}@media (max-width: 575.98px){.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.subscription-setting[_ngcontent-%COMP%] .responsive-grid[_ngcontent-%COMP%] .t-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] [class*=" col-"][_ngcontent-%COMP%]{border-bottom:0}}']})}}return e})();function Ct(e,ut){if(e&1&&(n(0,` 10 `),s(1,"div",4),n(2),c(),n(3,` 11 `)),e&2){let t=u();p(2),L(` 12 `,t.literal.settingHeader,` 13 `)}}var at=(()=>{class e extends x{constructor(t){super(t),this.i18Svc=t,this.subTabConfig={parentComponent:e}}ngOnInit(){super.ngOnInit(this.pageConstants.mySettings)}ngOnDestroy(){}static{this.\u0275fac=function(i){return new(i||e)(a(_))}}static{this.\u0275cmp=S({type:e,selectors:[["app-subscriptions"]],standalone:!1,features:[C],decls:14,vars:1,consts:[["subTabs",""],["pageHeader",""],[1,"container-fluid"],[3,"subTabConfig"],[1,"d-lg-block","d-none","page-navigations"]],template:function(i,r){i&1&&(s(0,"div",2),n(1,` 14 `),s(2,"app-sub-tabs",3,0),n(4,` 15 `),v(5,Ct,4,1,"ng-template",null,1,W),n(7,` 16 `),c(),n(8,` 17 `),s(9,"div"),n(10,` 18 `),R(11,"app-subscriptions-grid"),n(12,` 19 `),c(),n(13,` 20`),c()),i&2&&(p(2),d("subTabConfig",r.subTabConfig))},dependencies:[et,ct],encapsulation:2})}}return e})();var P=(()=>{class e{constructor(t,i){this.storageService=t,this.subscriptionsService=i}resolve(t){return this.currentUserSettingsSubject=this.storageService.getUserSettings(),this.subscriptionsService.getSubscriptions(this.currentUserSettingsSubject.userUid).then(i=>i)}static{this.\u0275fac=function(i){return new(i||e)(l(M),l(O))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var vt=[{path:"",component:at,resolve:{subscriptionList:P}}],pt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=h({type:e})}static{this.\u0275inj=f({imports:[T.forChild(vt),T]})}}return e})();var Xt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=h({type:e})}static{this.\u0275inj=f({providers:[P],imports:[B,tt,nt,X,J,z,E,E,pt,rt]})}}return e})();export{Xt as SubscriptionsModule};
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.