1"use strict";(self.webpackChunkprivacypillar_sfo3=self.webpackChunkprivacypillar_sfo3||[]).push([["src_app_ropa_policies_policies_module_ts"],{63162:(z,L,p)=>{p.r(L),p.d(L,{PoliciesModule:()=>Mt});var n=p(36895),_=p(51692),T=p(59241),A=p(96923),S=p(38611),h=p(82778),c=p(24006),g=p(22833),b=p(70713),P=p(36358),x=p(18178),B=p(74146),N=p(33169),J=p(74642),O=p(97392),d=p(35569),f=p(79723),l=p(34466),r=p(22962),m=p(3848),v=p(86257),C=p(46162),w=p(51572),k=p(28255),W=p(63961),E=p(42111),q=p(24028),X=p(90717),tt=p(45221),U=p(87545),D=p(92340),t=p(94650),F=p(61737),Z=p(27221),$=p(80529),Q=p(46262);let et=(()=>{const i=class{constructor(e,s){this.http=e,this.loki=s,this.ropaBasePath="/policies"}getPoliciesList(e){return this.http.get(`${D.N.keyStoneUrl}${this.ropaBasePath}/${e}`).pipe((0,Z.K)(s=>(0,F._)(s)))}deletePolicy(e,s){return this.http.delete(`${D.N.keyStoneUrl}${this.ropaBasePath}/${e}/${s}`).pipe((0,Z.K)(u=>(0,F._)(u)))}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.LFG($.eN),t.LFG(Q.L))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),o})();var Y=p(62430);const it=[{label:"Id",key:"id",columnType:"Link"},{label:"Name",key:"name",columnType:"Text"},{label:"Policy Type",key:"policy_type",columnType:"Text"},{label:"Activites",key:"processing_activities",columnType:"Array"},{label:"Assets",key:"systems",columnType:"Array"},{label:"Policy Version",key:"policy_version",columnType:"Text"},{label:"Last Updated",key:"updated_at",columnType:"Date"},{label:"Actions",key:"",columnType:"Actions"}];let nt=(()=>{const i=class extends Y.a{constructor(){super({oid:"",pid:"",policiesList:[],columList:it})}};let o=i;return i.\u0275fac=function(s){return new(s||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),o})();var V=p(11481),ot=p(29175);let j=(()=>{const i=class{constructor(e,s,u,y,I,R,Ot,kt){this.activatedRouter=e,this.policiesListApiService=s,this.policiesListStateService=u,this.router=y,this.messageService=I,this.confirmationService=R,this.titleService=Ot,this.permissionService=kt}init(){this.titleService.setTitle("Policies - "+D.N.portalPrefix),this.activatedRouter.queryParams.pipe((0,U.w)(e=>(this.policiesListStateService.updateState({oid:e.oid,pid:e.pid}),this.policiesListApiService.getPoliciesList(e.oid)))).subscribe(e=>{this.policiesListStateService.updateState({policiesList:e})})}getState(){return this.policiesListStateService.getState()}getStateObs(){return this.policiesListStateService.getStateObs()}hasPermission(e){return this.permissionService.getPermissionsByModuleName("RoPA Management")?.access.includes(e)}addPolicies(){this.hasPermission("create")&&this.router.navigate(["/ropa/policies/","create"],{queryParams:{oid:this.policiesListStateService.getState().oid,pid:this.policiesListStateService.getState().pid}})}viewDetails(e){this.hasPermission("edit")&&this.router.navigate(["/ropa/policies/","edit",e.id],{queryParams:{oid:this.policiesListStateService.getState().oid,pid:this.policiesListStateService.getState().pid}})}deletePolicy(e){this.hasPermission("delete")&&this.confirmationService.confirm({target:event.target,message:`Are you sure you want to delete this policy ${e.name}?`,header:"Confirmation",icon:"pi pi-exclamation-triangle",acceptIcon:"none",rejectIcon:"none",rejectButtonStyleClass:"p-button-text",accept:()=>{this.policiesListApiService.deletePolicy(this.policiesListStateService.getState().oid,e.id).subscribe({next:()=>{this.messageService.add({severity:"success",summary:"Success",detail:"Policy deleted successfully"}),this.init()},error:s=>{this.messageService.add({severity:"error",summary:"Error",detail:"Error in deleting Policy"})}})}})}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.LFG(_.gz),t.LFG(et),t.LFG(nt),t.LFG(_.F0),t.LFG(E.ez),t.LFG(E.YP),t.LFG(V.Dx),t.LFG(ot.$))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac}),o})();function st(o,i){if(1&o){const a=t.EpF();t.TgZ(0,"p-button",18),t.NdJ("click",function(){t.CHM(a);const s=t.oxw(2);return t.KtG(s.addPolicies())}),t.qZA()}if(2&o){const a=t.oxw(2);t.Q6J("disabled",!a.hasPermission("create"))("title",a.getPermissionTooltip("create"))}}function at(o,i){if(1&o){const a=t.EpF();t.TgZ(0,"div",19)(1,"h5",20),t._uU(2,"Manage Policies"),t.qZA(),t.TgZ(3,"span",21),t._UZ(4,"i",22),t.TgZ(5,"input",23),t.
1NdJ("input",function(s){t.CHM(a),t.oxw();const u=t.MAs(15);return t.KtG(u.filterGlobal(s.target.value,"contains"))}),t.qZA()()()}}function lt(o,i){if(1&o&&(t.TgZ(0,"th"),t._uU(1),t.qZA()),2&o){const a=i.$implicit;t.xp6(1),t.hij(" ",a.label," ")}}function rt(o,i){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,lt,2,1,"th",24),t.qZA()),2&o){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a)}}function pt(o,i){if(1&o){const a=t.EpF();t.TgZ(0,"td",30),t.NdJ("click",function(){t.CHM(a);const s=t.oxw(2).$implicit,u=t.oxw(2);return t.KtG(u.viewDetails(s))}),t.TgZ(1,"span"),t._uU(2),t.qZA()()}if(2&o){const a=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(2),t.hij(" ",e[a.key],"")}}function ct(o,i){if(1&o&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&o){const a=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e[a.key]?e[a.key]:"- - - -"," ")}}function dt(o,i){if(1&o&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&o){const a=t.oxw().$implicit,e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e[a.key],"short")," ")}}function ut(o,i){if(1&o&&(t.TgZ(0,"td",32),t._uU(1),t.qZA()),2&o){const a=t.oxw().$implicit,e=t.oxw().$implicit,s=t.oxw(2);t.Q6J("title",s.getArrayTitle(e[a.key])),t.xp6(1),t.hij(" ",s.getArrayDisplay(e[a.key])," ")}}function mt(o,i){if(1&o){const a=t.EpF();t.ynx(0),t.TgZ(1,"span",35)(2,"button",36),t.NdJ("click",function(){const u=t.CHM(a).$implicit,y=t.oxw(3).$implicit,I=t.oxw(2);return t.KtG(I.menuItemClick(u.value,y))}),t.TgZ(3,"span"),t._uU(4),t.qZA()()(),t.BQk()}if(2&o){const a=i.$implicit,e=t.oxw(5);t.xp6(1),t.s9C("title",e.getPermissionTooltip(a.permissionName)),t.xp6(1),t.Q6J("disabled",!e.hasPermission(a.permissionName)),t.xp6(2),t.Oqu(a.label)}}function gt(o,i){if(1&o&&(t.TgZ(0,"td")(1,"button",33)(2,"mat-icon"),t._uU(3,"more_vert"),t.qZA()(),t.TgZ(4,"mat-menu",null,34),t.YNc(6,mt,5,3,"ng-container",24),t.qZA()()),2&o){const a=t.MAs(5),e=t.oxw(4);t.xp6(1),t.Q6J("matMenuTriggerFor",a),t.xp6(5),t.Q6J("ngForOf",e.menuItems)}}function ht(o,i){if(1&o&&(t.ynx(0)(1,25),t.YNc(2,pt,3,1,"td",26),t.YNc(3,ct,2,1,"td",27),t.YNc(4,dt,3,4,"td",28),t.YNc(5,ut,2,2,"td",29),t.YNc(6,gt,7,2,"td",28),t.BQk()()),2&o){const a=i.$implicit;t.xp6(1),t.Q6J("ngSwitch",a.columnType),t.xp6(1),t.Q6J("ngSwitchCase","Link"),t.xp6(1),t.Q6J("ngSwitchCase","Text"),t.xp6(1),t.Q6J("ngSwitchCase","Date"),t.xp6(1),t.Q6J("ngSwitchCase","Array"),t.xp6(1),t.Q6J("ngSwitchCase","Actions")}}function ft(o,i){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,ht,7,6,"ng-container",24),t.qZA()),2&o){const a=i.columns;t.xp6(1),t.Q6J("ngForOf",a)}}function vt(o,i){if(1&o&&(t.TgZ(0,"div",37),t._uU(1),t.qZA()),2&o){const a=t.oxw().ngIf;t.xp6(1),t.hij(" In total there are ",a.policiesList?a.policiesList.length:0," Policies. ")}}const _t=function(o,i){return{oid:o,pid:i}},yt=function(){return["name"]},bt=function(){return{width:"450px"}};function xt(o,i){if(1&o&&(t.TgZ(0,"div")(1,"div",1)(2,"div",2)(3,"div")(4,"nav",3)(5,"ol",4)(6,"li",5)(7,"a",6),t._uU(8,"Home"),t.qZA()(),t.TgZ(9,"li",7),t._uU(10,"policies"),t.qZA()()()()()(),t.TgZ(11,"div",8)(12,"p-toolbar",9),t.YNc(13,st,1,2,"ng-template",10),t.qZA(),t.TgZ(14,"p-table",11,12),t.YNc(16,at,6,0,"ng-template",13),t.YNc(17,rt,2,1,"ng-template",14),t.YNc(18,ft,2,1,"ng-template",15),t.YNc(19,vt,2,1,"ng-template",16),t.qZA(),t._UZ(20,"p-confirmDialog")(21,"p-toast",17),t.qZA()()),2&o){const a=i.ngIf;t.xp6(7),t.Q6J("queryParams",t.WLB(9,_t,a.oid,a.pid)),t.xp6(7),t.Q6J("value",a.policiesList)("rows",20)("globalFilterFields",t.DdM(12,yt))("rowHover",!0)("columns",a.columList)("showCurrentPageReport",!0),t.xp6(6),t.Akn(t.DdM(13,bt))}}let Ct=(()=>{const i=class{constructor(e){this.policiesListActionService=e,this.menuItems=[{label:"Edit",value:"EDIT",permissionName:"edit"},{label:"Delete",value:"DELETE",permissionName:"delete"}],this.stateObs=this.policiesListActionService.getStateObs()}ngOnInit(){this.policiesListActionService.init()}addPolicies(){this.policiesListActionService.addPolicies()}viewDetails(e){this.policiesListActionService.viewDetails(e)}menuItemClick(e,s){"DELETE"===e?this.policiesListActionService.deletePolicy(s):this.policiesListActionService.viewDetails(s)}hasPermission(e){return this.policiesListActionService.hasPermission(e)}getPermissionTooltip(e){return this.hasPermission(e)?"":"You don't have permission"}getArrayDisplay(e){return Array.isArray(e)&&0!==e.length?e.map(s=>
1"object"==typeof s?s.name??s.title??"":s).filter(Boolean).join(", "):"- - - -"}getArrayTitle(e){return Array.isArray(e)&&0!==e.length?e.map(s=>"object"==typeof s?s.name??s.title??"":s).filter(Boolean).join(", "):""}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.Y36(j))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-policies-page"]],features:[t._Bn([j])],decls:2,vars:3,consts:[[4,"ngIf"],[1,"col-md-12",2,"margin-bottom","25px","margin-top","15px","margin-left","6.5px"],[1,"d-sm-flex","align-items-center","justify-content-between"],["aria-label","breadcrumb",1,"bredcrub-row",2,"margin-left","-14px"],[1,"breadcrumb","breadcrumb-style1","mg-b-10"],[1,"breadcrumb-item"],["routerLink","/home/welcome",3,"queryParams"],[1,"breadcrumb-item","active"],[1,"card","m-2","ng-deep-consent-jursidiction-wrapper"],["styleClass","mb-4 gap-2"],["pTemplate","left"],["dataKey","id",3,"value","rows","globalFilterFields","rowHover","columns","showCurrentPageReport"],["dt",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","summary"],["position","bottom-right"],["severity","success","label"," Add Policies","icon","pi pi-plus",1,"p-button-text","my-custom-btn","mr-2",3,"disabled","title","click"],[1,"pp-flex","align-items-center","justify-content-between"],[1,"m-0"],[1,"p-input-icon-left"],[1,"pi","pi-search"],["pInputText","","type","text","placeholder","Search...",3,"input"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],[3,"click",4,"ngSwitchCase"],["class","purposes__truncate",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","purposes__truncate",3,"title",4,"ngSwitchCase"],[3,"click"],[1,"purposes__truncate"],[1,"purposes__truncate",3,"title"],["mat-icon-button","",1,"purposes__menu",3,"matMenuTriggerFor"],["menu","matMenu"],[3,"title"],["mat-menu-item","",3,"disabled","click"],[1,"flex","align-items-center","justify-content-between"]],template:function(s,u){1&s&&(t.YNc(0,xt,22,14,"div",0),t.ALo(1,"async")),2&s&&t.Q6J("ngIf",t.lcZ(1,1,u.stateObs))},dependencies:[n.sg,n.O5,n.RF,n.n9,_.rH,A.iA,E.jx,S.zx,h.o,k.VK,k.OP,k.p6,O.Hw,f.FN,l.Q,C.o,n.Ov,n.uU],styles:[".my-custom-btn .p-button{background-color:#16bf5e;background:#16bf5e;border:1px solid #16bf5e;font-size:small} .my-custom-btn .p-button .p-button-icon-left{margin-right:8px} .my-custom-btn .p-button:hover{background-color:#16bf5e;background:#16bf5e;border:1px solid #16bf5e;font-size:small}.purposes__add-button[_ngcontent-%COMP%]{display:flex;justify-content:end;margin:15px}.purposes__menu[_ngcontent-%COMP%]{border:white!important;background-color:#fff!important}.purposes__truncate[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden} .p-button-icon.p-button-icon-left{margin-right:0rem!important} .mdc-list-item__primary-text{color:#000!important} .mat-mdc-menu-panel{background-color:#fff!important;z-index:10000000000000000000!important} .cdk-overlay-container{z-index:10000000!important} .ng-deep-preference-wrapper .p-button-icon.p-button-icon-left{margin-right:0rem!important}"]}),o})();var M=p(591),Tt=p(30567),St=p(21086);let Pt=(()=>{const i=class extends Y.a{constructor(){super({oid:"",pid:"",initialLoad:new M.X(!0),actionType:"",policiesId:"",users:[]})}};let o=i;return i.\u0275fac=function(s){return new(s||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),o})();var wt=p(24850);let Dt=(()=>{const i=class{constructor(e,s){this.http=e,this.loki=s}getUsers(e){const s=(new $.LE).set("orgid",e);return this.http.get(`${D.N.apiUrl}/team_member`,{params:s}).pipe((0,wt.U)(u=>u.response.map(y=>({user_id:y.id,email:`${y.user_name} || ${y.user_email}`}))),(0,Z.K)(u=>(0,F._)(()=>u)))}createPolicies(e,s){return this.http.post(`${D.N.keyStoneUrl}/policies/${s}`,e).pipe((0,Z.K)(u=>(0,F._)(()=>u)))}getPoliciesDetails(e,s){return this.http.get(`${D.N.keyStoneUrl}/policies/${e}/${s}`).pipe((0,Z.K)(u=>(0,F._)(()=>u)))}editPoliciesDetails(e,s,u){return this.http.put(`${D.N.keyStoneUrl}/policies/${e}/${s}`,u).pipe((0,Z.K)(y=>(0,F._)(()=>y)))}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.LFG($.eN),t.LFG(Q.L))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),o})(),G=(()=>{const i=class{constructor(e,s,u,y,I,R){this.activatedRouter=e,this.policiesDetailsPageStateService=s,this.policiesDetailsPageApiService=u,this.messageService=y,this.router=I,this.titleService=R,this.modalConfigForm$=new M.X(new c.cw({})),this.modalLoading$=new M.X(!0),this.modalConfigForm=this.modalConfigForm$.asObservable(),this.modalLoading=this.modalLoading$.asObservable()}
1init(){this.titleService.setTitle("Policies - "+D.N.portalPrefix),this.policiesDetailsPageStateService.updateState({initialLoad:new M.X(!1)}),this.activatedRouter.queryParams.pipe((0,U.w)(e=>(this.policiesDetailsPageStateService.updateState({oid:e.oid,pid:e.pid}),this.activatedRouter.params)),(0,U.w)(e=>(this.policiesDetailsPageStateService.updateState({actionType:e?.actionType,policiesId:e?.id}),(0,Tt.D)({users:this.policiesDetailsPageApiService.getUsers(this.policiesDetailsPageStateService.getState().oid)}))),(0,U.w)(e=>(this.policiesDetailsPageStateService.updateState({users:e.users}),"edit"===this.policiesDetailsPageStateService.getState().actionType?this.policiesDetailsPageApiService.getPoliciesDetails(this.policiesDetailsPageStateService.getState().oid,this.policiesDetailsPageStateService.getState().policiesId):(0,St.of)(null)))).subscribe(e=>{this.modalConfigForm$.next(new c.cw({name:new c.NI(e?e?.name:"",c.kI.required),policyType:new c.NI(e?e?.policy_type:"",c.kI.required),responsible:new c.NI(e?this.filterById(this.policiesDetailsPageStateService.getState().users,e?.responsibility,"email"):"",c.kI.required),policyVersion:new c.NI(e?e?.policy_version:"",c.kI.required),link:new c.NI(e?e?.link_to_policy:"",c.kI.required)})),this.policiesDetailsPageStateService.updateState({initialLoad:new M.X(!0)})})}getStateObs(){return this.policiesDetailsPageStateService.getStateObs()}savePolicies(){if(this.modalConfigForm$.getValue().invalid)return;const e={organization_id:this.policiesDetailsPageStateService.getState().oid,name:this.modalConfigForm$.getValue().value.name,policy_type:this.modalConfigForm$.getValue().value.policyType,policy_version:this.modalConfigForm$.getValue().value.policyVersion,link_to_policy:this.modalConfigForm$.getValue().value.link,note:"Covers GDPR and other compliance standards",responsibility:this.modalConfigForm$.getValue().value.responsible,tags_values:"",tags:[],document:"https://example.com/docs/data-protection-policy-v1.pdf"};"edit"===this.policiesDetailsPageStateService.getState().actionType?this.policiesDetailsPageApiService.editPoliciesDetails(this.policiesDetailsPageStateService.getState().oid,this.policiesDetailsPageStateService.getState().policiesId,e).subscribe(s=>{this.messageService.add({severity:"success",summary:"Success",detail:"Policy updated successfully"})}):this.policiesDetailsPageApiService.createPolicies(e,this.policiesDetailsPageStateService.getState().oid).subscribe(s=>{this.messageService.add({severity:"success",summary:"Success",detail:"Policy created successfully"}),this.router.navigate(["/ropa/policies/"],{queryParams:{oid:this.policiesDetailsPageStateService.getState().oid,pid:this.policiesDetailsPageStateService.getState().pid}})})}filterById(e,s,u){return s?e.find(I=>I[u]===s[u]):""}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.LFG(_.gz),t.LFG(Pt),t.LFG(Dt),t.LFG(E.ez),t.LFG(_.F0),t.LFG(V.Dx))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac}),o})();function At(o,i){if(1&o&&(t.TgZ(0,"option",32),t._uU(1),t.qZA()),2&o){const a=i.$implicit;t.Q6J("ngValue",a),t.xp6(1),t.hij(" ",a.email," ")}}function It(o,i){if(1&o){const a=t.EpF();t.TgZ(0,"div",15)(1,"div")(2,"form",16)(3,"div",17)(4,"h2",18),t._uU(5," Create Policy "),t.qZA()(),t.TgZ(6,"div",19)(7,"div",20)(8,"label",21),t._uU(9,"Name"),t.qZA(),t._UZ(10,"input",22),t.qZA(),t.TgZ(11,"div",20)(12,"label",23),t._uU(13,"Policy "),t.qZA(),t._UZ(14,"input",24),t.qZA(),t.TgZ(15,"div",20)(16,"label",23),t._uU(17,"Responsible"),t.qZA(),t.TgZ(18,"select",25)(19,"option",26),t._uU(20," Select Responsible Person "),t.qZA(),t.YNc(21,At,2,2,"option",27),t.qZA()(),t.TgZ(22,"div",20)(23,"label",23),t._uU(24,"Policy Version"),t.qZA(),t._UZ(25,"input",28),t.qZA(),t.TgZ(26,"div",20)(27,"label",23),t._uU(28,"Link"),t.qZA(),t._UZ(29,"input",29),t.qZA()(),t.TgZ(30,"div",30)(31,"p-button",31),t.NdJ("click",function(){t.CHM(a);const s=t.oxw(3);return t.KtG(s.savePolicies())}),t._uU(32),t.qZA()()()()()}if(2&o){const a=i.ngIf,e=t.oxw(2).ngIf;let s;t.xp6(2),t.Q6J("formGroup",a),t.xp6(8),t.Q6J("ngClass",a.get("name").invalid&&(a.get("name").dirty||a.get("name").touched)?"ng-invalid ng-dirty":""),t.xp6(4),t.Q6J("ngClass",a.get("policyType").invalid&&(a.get("policyType").dirty||a.get("policyType").touched)?"ng-invalid ng-dirty":""),t.xp6(4),t.Q6J("ngClass",null!=(s=a.get("responsible"))&&s.invalid&&(null!=(s=a.get("responsible"))&&s.dirty||null!=(s=a.get("responsible"))&&s.touched)?"ng-invalid ng-dirty":""),t.xp6(3),t.Q6J("ngForOf",e.users),t.xp6(4),t.Q6J("ngClass",a.get("policyVersion").invalid&&(a.get("policyVersion").dirty||a.get("policyVersion").touched)?"ng-invalid ng-dirty":""),t.xp6(4),t.Q6J("ngClass",a.get("link").invalid&&(a.get("link").dirty||a.get("link").touched)?"ng-invalid ng-dirty":""),t.xp6(2),t.Q6J("disabled",a.invalid),t.xp6(1),t.hij(" ","edit"===e.actionType?"Update":"Save"," ")}}const K=function(o,i){return{oid:o,pid:i}};function Lt(o,i){if(1&o&&(t.TgZ(0,"div")(1,"div",4)(2,"div",5)(3,"div")(4,"nav",6)(5,"ol",7)(6,"li",8)(7,"a",9),t._uU(8,"Home"),t.qZA()(),t.TgZ(9,"li",8)(10,"a",10),t._uU(11,"Policies"),t.qZA()(),t.TgZ(12,"li",11),t._uU(13),t.qZA()()()()()(),t.TgZ(14,"section",12)(15,"div",13),t.YNc(16,It,33,9,"div",14),t.ALo(17,"async"),t.qZA()()()),2&o){const a=t.oxw().ngIf,e=t.oxw();
1t.xp6(7),t.Q6J("queryParams",t.WLB(6,K,a.oid,a.pid)),t.xp6(3),t.Q6J("queryParams",t.WLB(9,K,a.oid,a.pid)),t.xp6(3),t.hij(" ","create"===a.actionType?"Create":"Update"," "),t.xp6(3),t.Q6J("ngIf",t.lcZ(17,4,e.policyForm$))}}function Et(o,i){1&o&&(t.TgZ(0,"div",33),t._UZ(1,"mat-spinner",34),t.qZA()),2&o&&(t.xp6(1),t.Q6J("strokeWidth",4))}function Ft(o,i){if(1&o&&(t.TgZ(0,"div"),t.YNc(1,Lt,18,12,"div",1),t.ALo(2,"async"),t.YNc(3,Et,2,1,"ng-template",null,2,t.W1O),t._UZ(5,"p-toast",3),t.qZA()),2&o){const a=i.ngIf,e=t.MAs(4);t.xp6(1),t.Q6J("ngIf",t.lcZ(2,2,a.initialLoad))("ngIfElse",e)}}let H=(()=>{const i=class{constructor(e){this.policiesDetailsPageActionService=e,this.policyForm$=this.policiesDetailsPageActionService.modalConfigForm,this.stateObs=this.policiesDetailsPageActionService.getStateObs()}ngOnInit(){this.policiesDetailsPageActionService.init()}savePolicies(){this.policiesDetailsPageActionService.savePolicies()}};let o=i;return i.\u0275fac=function(s){return new(s||i)(t.Y36(G))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-policies-details-page"]],features:[t._Bn([G])],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["loader",""],["position","bottom-right"],[1,"col-md-12",2,"margin-bottom","25px","margin-top","15px","margin-left","6.5px"],[1,"d-sm-flex","align-items-center","justify-content-between"],["aria-label","breadcrumb",1,"bredcrub-row",2,"margin-left","-14px"],[1,"breadcrumb","breadcrumb-style1","mg-b-10"],[1,"breadcrumb-item"],["routerLink","/home/welcome",3,"queryParams"],["routerLink","/ropa/policies",3,"queryParams"],[1,"breadcrumb-item","active"],[1,"pp-bg-white","pp-rounded-lg","pp-shadow-md","pp-mt-6","pp-max-w-full","pp-overflow-x-auto","ng-deep-entity-details-page","ng-deep-enitity-details-page"],[1,"pp-flex","pp-items-center","pp-justify-between","pp-justify-items-center","pp-px-10","pp-py-6"],["class","pp-w-full pp-bg-white pp-p-6 pp-ml-4",4,"ngIf"],[1,"pp-w-full","pp-bg-white","pp-p-6","pp-ml-4"],[3,"formGroup"],[1,"pp-w-full","pp-py-6","pp-flex","pp-flex-col","pp-items-center","pp-text-center"],[1,"pp-text-2xl","pp-font-bold","pp-text-blue-700","pp-mb-6","pp-text-center"],[1,"consent-purpose-modal__content","mt-4"],[1,"consent-purpose-modal__content__field"],[1,"consent-purpose-modal__content__field--required",2,"font-weight","600","color","black"],["type","text","pInputText","","formControlName","name","placeholder","Enter Policy Name",3,"ngClass"],["for","formLogoId",1,"consent-purpose-modal__content__field--required",2,"font-weight","600","color","black"],["type","text","pInputText","","formControlName","policyType","placeholder","Enter Policy Type",3,"ngClass"],["formControlName","responsible",1,"form-control",3,"ngClass"],["value","","disabled","","selected",""],[3,"ngValue",4,"ngFor","ngForOf"],["type","text","pInputText","","formControlName","policyVersion","placeholder","Enter Policy Version",3,"ngClass"],["type","text","pInputText","","formControlName","link","placeholder","https://example.com/website-policy",3,"ngClass"],[1,"pp-flex","pp-justify-end","pp-mt-4"],["pButton","",1,"p-button-text","my-custom-btn",3,"disabled","click"],[3,"ngValue"],[2,"display","flex","justify-content","center","height","100vh","align-items","center"],["diameter","50",3,"strokeWidth"]],template:function(s,u){1&s&&(t.YNc(0,Ft,6,4,"div",0),t.ALo(1,"async")),2&s&&t.Q6J("ngIf",t.lcZ(1,1,u.stateObs))},dependencies:[n.mk,n.sg,n.O5,_.rH,S.Hq,S.zx,h.o,c._Y,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.JL,c.sg,c.u,f.FN,w.Ou,n.Ov],styles:['.mat-step-header .mat-step-icon-selected{background-color:#16bf5e!important} .mat-step-header .mat-step-icon-state-edit{background-color:#16bf5e!important}.consent-purpose-modal__content[_ngcontent-%COMP%]{display:flex;width:100%;gap:1rem;flex-wrap:wrap;justify-content:center;align-items:center;flex-direction:column}.consent-purpose-modal__content__field[_ngcontent-%COMP%]{width:50%;display:flex;flex-direction:column;flex:45%}.consent-purpose-modal__content__field--required[_ngcontent-%COMP%]:after{content:" *";color:red}.consent-purpose-modal__header--width[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between}.consent-purpose-modal__header--content[_ngcontent-%COMP%]{color:#000;width:100%} .ng-deep-entity-details-page .p-dropdown{width:100%!important;max-width:100%!important} .ng-deep-entity-details-page .p-dropdown-panel{width:100%!important} .ng-deep-entity-details-page .p-chips{width:100%!important} .ng-deep-entity-details-page .p-chips-multiple-container{width:100%!important} .my-custom-btn .p-button:hover{background-color:#16bf5e;background:#16bf5e;border:1px solid #16bf5e;font-size:small} .my-custom-btn .p-button{background-color:#16bf5e;background:#16bf5e;border:1px solid #16bf5e;font-size:small} .ng-deep-enitity-details-page .p-multiselect{width:100%!important} .ng-deep-enitity-details-page .p-multiselect-panel{z-index:100000!important} .ng-deep-enitity-details-page .p-inputtext{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));padding:.625rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))} .ng-deep-enitity-details-page .p-inputtext:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))} .ng-deep-enitity-details-page .form-control, .ng-deep-enitity-details-page .p-multiselect{border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))} .ng-deep-enitity-details-page .form-control:focus, .ng-deep-enitity-details-page .p-multiselect:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}']}),o})();const Zt=[{path:"",component:Ct},{path:":actionType",component:H},{path:":actionType/:id",component:H}];let Mt=(()=>{const i=class{};let o=i;return i.\u0275fac=function(s){return new(s||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({providers:[E.ez,E.YP,X.xA],imports:[n.ez,_.Bz.forChild(Zt),T.P4,A.U$,S.hJ,h.j,c.u5,c.UX,g.cc,b.LU,P.nD,x.kW,B.A,N.L$,J.S,k.Tx,O.Ps,d.KZ,f.EV,l.D,r.q4,m.Nh,v.T5,C.V,w.Cq,W.xc,q.d,tt.Gg]}),o})()}
1,45221:(z,L,p)=>{p.d(L,{Gg:()=>O});var n=p(94650),_=p(36895),T=p(42111),A=p(82778),S=p(24006);const h=["inputtext"];function c(d,f){1&d&&n.GkF(0)}function g(d,f){if(1&d&&(n.TgZ(0,"span",11),n._uU(1),n.qZA()),2&d){const l=n.oxw().$implicit,r=n.oxw();n.xp6(1),n.Oqu(r.field?r.resolveFieldData(l,r.field):l)}}function b(d,f){if(1&d){const l=n.EpF();n.TgZ(0,"span",12),n.NdJ("click",function(m){n.CHM(l);const v=n.oxw().index,C=n.oxw();return n.KtG(C.removeItem(m,v))}),n.qZA()}}const P=function(d){return{$implicit:d}};function x(d,f){if(1&d){const l=n.EpF();n.TgZ(0,"li",6,7),n.NdJ("click",function(m){const C=n.CHM(l).$implicit,w=n.oxw();return n.KtG(w.onItemClick(m,C))}),n.YNc(2,c,1,0,"ng-container",8),n.YNc(3,g,2,1,"span",9),n.YNc(4,b,1,0,"span",10),n.qZA()}if(2&d){const l=f.$implicit,r=n.oxw();n.xp6(2),n.Q6J("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",n.VKq(4,P,l)),n.xp6(1),n.Q6J("ngIf",!r.itemTemplate),n.xp6(1),n.Q6J("ngIf",!r.disabled)}}const B=function(d,f){return{"p-inputtext p-chips-multiple-container":!0,"p-focus":d,"p-disabled":f}},N={provide:S.JU,useExisting:(0,n.Gpc)(()=>J),multi:!0};let J=(()=>{class d{constructor(l,r){this.el=l,this.cd=r,this.allowDuplicate=!0,this.onAdd=new n.vpe,this.onRemove=new n.vpe,this.onFocus=new n.vpe,this.onBlur=new n.vpe,this.onChipClick=new n.vpe,this.onModelChange=()=>{},this.onModelTouched=()=>{}}
1ngAfterContentInit(){this.templates.forEach(l=>{l.getType(),this.itemTemplate=l.template})}onClick(){this.inputViewChild.nativeElement.focus()}onInput(){this.updateFilledState()}onPaste(l){this.disabled||(this.separator&&((l.clipboardData||window.clipboardData).getData("Text").split(this.separator).forEach(m=>{this.addItem(l,m,!0)}),this.inputViewChild.nativeElement.value=""),this.updateFilledState())}updateFilledState(){this.filled=!(!this.value||0===this.value.length)||this.inputViewChild.nativeElement&&""!=this.inputViewChild.nativeElement.value}onItemClick(l,r){this.onChipClick.emit({originalEvent:l,value:r})}writeValue(l){this.value=l,this.updateMaxedOut(),this.cd.markForCheck()}registerOnChange(l){this.onModelChange=l}registerOnTouched(l){this.onModelTouched=l}setDisabledState(l){this.disabled=l,this.cd.markForCheck()}resolveFieldData(l,r){if(l&&r){if(-1==r.indexOf("."))return l[r];{let C=r.split("."),w=l;for(var m=0,v=C.length;m<v;++m)w=w[C[m]];return w}}return null}onInputFocus(l){this.focus=!0,this.onFocus.emit(l)}onInputBlur(l){this.focus=!1,this.addOnBlur&&this.inputViewChild.nativeElement.value&&this.addItem(l,this.inputViewChild.nativeElement.value,!1),this.onModelTouched(),this.onBlur.emit(l)}removeItem(l,r){if(this.disabled)return;let m=this.value[r];this.value=this.value.filter((v,C)=>C!=r),this.onModelChange(this.value),this.onRemove.emit({originalEvent:l,value:m}),this.updateFilledState(),this.updateMaxedOut()}addItem(l,r,m){this.value=this.value||[],r&&r.trim().length&&(this.allowDuplicate||-1===this.value.indexOf(r))&&(this.value=[...this.value,r],this.onModelChange(this.value),this.onAdd.emit({originalEvent:l,value:r})),this.updateFilledState(),this.updateMaxedOut(),this.inputViewChild.nativeElement.value="",m&&l.preventDefault()}onKeydown(l){switch(l.which){case 8:if(0===this.inputViewChild.nativeElement.value.length&&this.value&&this.value.length>0){this.value=[...this.value];let r=this.value.pop();this.onModelChange(this.value),this.onRemove.emit({originalEvent:l,value:r}),this.updateFilledState()}break;case 13:this.addItem(l,this.inputViewChild.nativeElement.value,!0);break;case 9:this.addOnTab&&""!==this.inputViewChild.nativeElement.value&&this.addItem(l,this.inputViewChild.nativeElement.value,!0);break;default:this.max&&this.value&&this.max===this.value.length?l.preventDefault():this.separator&&","===this.separator&&188===l.which&&this.addItem(l,this.inputViewChild.nativeElement.value,!0)}}updateMaxedOut(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.disabled=!(!this.max||!this.value||this.max!==this.value.length)||this.disabled||!1)}}return d.\u0275fac=function(l){return new(l||d)(n.Y36(n.SBq),n.Y36(n.sBO))},d.\u0275cmp=n.Xpm({type:d,selectors:[["p-chips"]],contentQueries:function(l,r,m){if(1&l&&n.Suo(m,T.jx,4),2&l){let v;n.iGM(v=n.CRH())&&(r.templates=v)}},viewQuery:function(l,r){if(1&l&&n.Gf(h,5),2&l){let m;n.iGM(m=n.CRH())&&(r.inputViewChild=m.first)}},hostVars:4,hostBindings:function(l,r){2&l&&n.ekj("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focus)},inputs:{allowDuplicate:"allowDuplicate",disabled:"disabled",style:"style",styleClass:"styleClass",field:"field",placeholder:"placeholder",max:"max",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",addOnTab:"addOnTab",addOnBlur:"addOnBlur",separator:"separator"},outputs:{onAdd:"onAdd",onRemove:"onRemove",onFocus:"onFocus",onBlur:"onBlur",onChipClick:"onChipClick"},features:[n._Bn([N])],decls:6,vars:17,consts:[[3,"ngClass","ngStyle","click"],[3,"ngClass"],["class","p-chips-token",3,"click",4,"ngFor","ngForOf"],[1,"p-chips-input-token"],["type","text",3,"disabled","ngStyle","keydown","input","paste","focus","blur"],["inputtext",""],[1,"p-chips-token",3,"click"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-chips-token-label",4,"ngIf"],["class","p-chips-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-chips-token-label"],[1,"p-chips-token-icon","pi","pi-times-circle",3,"click"]],template:function(l,r){1&l&&(n.TgZ(0,"div",0),n.NdJ("
1click",function(){return r.onClick()}),n.TgZ(1,"ul",1),n.YNc(2,x,5,6,"li",2),n.TgZ(3,"li",3)(4,"input",4,5),n.NdJ("keydown",function(v){return r.onKeydown(v)})("input",function(){return r.onInput()})("paste",function(v){return r.onPaste(v)})("focus",function(v){return r.onInputFocus(v)})("blur",function(v){return r.onInputBlur(v)}),n.qZA()()()()),2&l&&(n.Tol(r.styleClass),n.Q6J("ngClass","p-chips p-component")("ngStyle",r.style),n.xp6(1),n.Q6J("ngClass",n.WLB(14,B,r.focus,r.disabled)),n.xp6(1),n.Q6J("ngForOf",r.value),n.xp6(2),n.Tol(r.inputStyleClass),n.Q6J("disabled",r.disabled)("ngStyle",r.inputStyle),n.uIk("id",r.inputId)("placeholder",r.value&&r.value.length?null:r.placeholder)("tabindex",r.tabindex)("aria-labelledby",r.ariaLabelledBy))},dependencies:[_.mk,_.sg,_.O5,_.tP,_.PC],styles:[".p-chips{display:inline-flex}.p-chips-multiple-container{align-items:center;cursor:text;display:flex;flex-wrap:wrap;list-style-type:none;margin:0;overflow:hidden;padding:0}.p-chips-token{align-items:center;cursor:default;display:inline-flex;flex:0 0 auto}.p-chips-input-token{display:inline-flex;flex:1 1 auto}.p-chips-token-icon{cursor:pointer}.p-chips-input-token input{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0;outline:0 none;padding:0;width:100%}.p-fluid .p-chips{display:flex}"],encapsulation:2,changeDetection:0}),d})(),O=(()=>{class d{}return d.\u0275fac=function(l){return new(l||d)},d.\u0275mod=n.oAB({type:d}),d.\u0275inj=n.cJS({imports:[_.ez,A.j,T.m8,A.j,T.m8]}),d})()},74146:(z,L,p)=>{p.d(L,{A:()=>S,g:()=>A});var n=p(94650),_=p(36895),T=p(24006);let A=(()=>{class h{constructor(g,b,P,x){this.el=g,this.ngModel=b,this.control=P,this.cd=x,this.onResize=new n.vpe}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(g){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}onFocus(g){this.autoResize&&this.resize(g)}onBlur(g){this.autoResize&&this.resize(g)}resize(g){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(g||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}}return h.\u0275fac=function(g){return new(g||h)(n.Y36(n.SBq),n.Y36(T.On,8),n.Y36(T.a5,8),n.Y36(n.sBO))},h.\u0275dir=n.lG2({type:h,selectors:[["","pInputTextarea",""]],hostVars:10,hostBindings:function(g,b){1&g&&n.NdJ("input",function(x){return b.onInput(x)})("focus",function(x){return b.onFocus(x)})("blur",function(x){return b.onBlur(x)}),2&g&&n.ekj("p-inputtextarea",!0)("p-inputtext",!0)("p-component",!0)("p-filled",b.filled)("p-inputtextarea-resizable",b.autoResize)},inputs:{autoResize:"autoResize"},outputs:{onResize:"onResize"}}),h})(),S=(()=>{class h{}return h.\u0275fac=function(g){return new(g||h)},h.\u0275mod=n.oAB({type:h}),h.\u0275inj=n.cJS({imports:[_.ez]}),h})()}}]);
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.