1"use strict";(self.webpackChunkharbor_portal=self.webpackChunkharbor_portal||[]).push([[4768],{4768:($,f,r)=>{r.r(f),r.d(f,{ProjectConfigModule:()=>g});var C=r(858),w=r(6292),t=r(4650),v=r(1992),_=r(3526),j=r(8726),h=r(268),A=r(38),T=r(2443),P=r(9383),a=r(4006),c=r(8402),y=r(6895),O=r(4241);const I=["cfgConfirmationDialog"],Z=["dateInput"],b=["dateSystemInput"];function L(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"clr-checkbox-wrapper")(1,"input",25),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.projectPolicy.ContentTrust=i)}),t.qZA(),t.TgZ(2,"label",26),t._uU(3),t.ALo(4,"translate"),t.qZA()()}if(2&l){const e=t.oxw(2);t.xp6(1),t.Q6J("ngModel",e.projectPolicy.ContentTrust)("disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(4,3,"ACCESSORY.NOTARY"))}}function E(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"clr-checkbox-container",22)(1,"label")(2,"span"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"clr-checkbox-wrapper")(6,"input",23),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.projectPolicy.ContentTrustCosign=i)}),t.qZA(),t.TgZ(7,"label",24),t._uU(8),t.ALo(9,"translate"),t.qZA()(),t.YNc(10,L,5,5,"clr-checkbox-wrapper",8),t.TgZ(11,"clr-control-helper",5),t._uU(12),t.ALo(13,"translate"),t.qZA()()}if(2&l){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,6,"PROJECT_CONFIG.SECURITY")),t.xp6(3),t.Q6J("ngModel",e.projectPolicy.ContentTrustCosign)("disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(9,8,"ACCESSORY.CO_SIGN")),t.xp6(2),t.Q6J("ngIf",e.withNotary),t.xp6(2),t.hij(" ",t.lcZ(13,10,"PROJECT_CONFIG.CONTENT_TRUST_POLCIY")," ")}}function M(l,o){1&l&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"PROJECT_CONFIG.SECURITY")))}function N(l,o){if(1&l&&(t.TgZ(0,"option",27),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l){const e=o.$implicit;t.Q6J("ngValue",e.severity),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.severityLevel)," ")}}function S(l,o){1&l&&(t.TgZ(0,"span",51),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CVE_ALLOWLIST.WARNING_SYS")))}function R(l,o){1&l&&(t.TgZ(0,"span",51),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CVE_ALLOWLIST.WARNING_PRO")))}function U(l,o){if(1&l&&(t.TgZ(0,"div"),t.YNc(1,S,3,3,"span",50),t.YNc(2,R,3,3,"span",50),t.qZA()),2&l){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.isUseSystemAllowlist()),t.xp6(1),t.Q6J("ngIf",!e.isUseSystemAllowlist())}}function J(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div",52)(1,"clr-icon",53),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.showAddModal=!1)}),t.qZA(),t.TgZ(2,"div")(3,"clr-textarea-container",54)(4,"label"),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.TgZ(7,"textarea",55),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.cveIds=i)}),t.qZA(),t.TgZ(8,"clr-control-helper"),t._uU(9),t.ALo(10,"translate"),t.qZA()()(),t.TgZ(11,"div")(12,"button",56),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.addToProjectAllowlist())}),t._uU(13),t.ALo(14,"translate"),t.qZA()()()}if(2&l){const e=t.oxw(2);t.xp6(5),t.Oqu(t.lcZ(6,5,"CVE_ALLOWLIST.ENTER")),t.xp6(2),t.Q6J("ngModel",e.cveIds),t.xp6(2),t.Oqu(t.lcZ(10,7,"CVE_ALLOWLIST.HELP")),t.xp6(3),t.Q6J("disabled",e.isDisabled()),t.xp6(1),t.hij(" ",t.lcZ(14,9,"CVE_ALLOWLIST.ADD")," ")}}function q(l,o){1&l&&(t.TgZ(0,"li",60),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CVE_ALLOWLIST.NONE")," "))}function k(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"li")(1,"a",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit,d=t.oxw(3);return t.KtG(d.goToDetail(s.cve_id))}),t._uU(2),t.qZA()()}if(2&l){const e=o.$implicit;t.xp6(2),t.Oqu(e.cve_id)}}function V(l,o){if(1&l&&(t.TgZ(0,"ul",57),t.YNc(1,q,3,3,"li",58),t.YNc(2,k,3,1,"li",59),t.qZA()),2&l){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(null==e.systemAllowlist||null==e.systemAllowlist.items?null:e.systemAllowlist.items.length)<1),t.xp6(1),t.Q6J("ngForOf",null==e.systemAllowlist?null:e.systemAllowlist.items)}}function G(l,o){1&l&&(t.TgZ(0,"li",60),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&l&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CVE_ALLOWLIST.NONE")," "))}function Y(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"li")(1,"a",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit,d=t.oxw(3);return t.KtG(d.goToDetail(s.cve_id))}),t._uU(2),t.qZA(),t.TgZ(3,"a",62),t.NdJ("click",function(){const s=t.CHM(e).index,d=t.oxw(3);return t.KtG(d.deleteItem(s))}),t._UZ(4,"clr-icon",63),t.qZA()()}if(2&l){const e=o.$implicit;t.xp6(2),t.Oqu(e.cve_id)}}function D(l,o){if(1&l&&(t.TgZ(0,"ul",57),t.YNc(1,G,3,3,"li",58),t.YNc(2,Y,5,1,"li",59),t.qZA()),2&l){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(null==e.projectAllowlist||null==e.projectAllowlist.items?null:e.projectAllowlist.items.length)<1),t.xp6(1),t.Q6J("ngForOf",null==e.projectAllowlist?null:e.projectAllowlist.items)}}function F(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"input",64,65),t.NdJ("clrDateChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.expiresDate=i)}),t.ALo(2,"translate"),t.qZA()}if(2&l){const e=t.oxw(2);t.s9C("placeholder",t.lcZ(2,3,"CVE_ALLOWLIST.NEVER_EXPIRES")),t.Q6J("disabled",!e.hasChangeConfigRole)("clrDate",e.expiresDate)}}function Q(l,o){if(1&l&&(t._UZ(0,"input",66),t.ALo(1,"translate")),2&l){const e=t.oxw(2);t.s9C("placeholder",t.lcZ(1,3,"CVE_ALLOWLIST.NEVER_EXPIRES")),t.s9C("value",e.systemExpiresDateString),t.Q6J("disabled",!e.hasChangeConfigRole)}}function H(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div",28)(1,"label",29),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"div",30)(5,"div",5)(6,"div")(7,"span"),t._uU(8),t.ALo(9,"translate"),t.qZA()(),t.TgZ(10,"div")(11,"span"),t._uU(12),t.ALo(13,"translate"),t.qZA()(),t.TgZ(14,"div")(15,"span"),t._uU(16),t.ALo(17,"translate"),t.qZA()(),t.YNc(18,U,3,2,"div",8),t.qZA(),t.TgZ(19,"clr-radio-container",22)(20,"clr-radio-wrapper")(21,"input",31),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.systemAllowlistOrProjectAllowlist=i)}),t.qZA(),t.TgZ(22,"label"),t._uU(23),t.ALo(24,"translate"),t.qZA()(),t.TgZ(25,"clr-radio-wrapper")(26,"input",32),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.systemAllowlistOrProjectAllowlist=i)}),t.qZA(),t.TgZ(27,"label"),t._uU(28),t.ALo(29,"translate"),t.qZA()()(),t.TgZ(30,"div",33)(31,"div",34)(32,"div")(33,"button",35),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.showAddModal=!i.showAddModal)}),t._uU(34),t.ALo(35,"translate"),t.qZA(),t.TgZ(36,"button",36),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.addSystem())}),t._uU(37),t.ALo(38,"translate"),t.qZA()(),t.YNc(39,J,15,11,"div",37),t.YNc(40,V,3,2,"ul",38),t.YNc(41,D,3,2,"ul",38),t.qZA(),t.TgZ(42,"div",39)(43,"div",40)(44,"label",41),t._uU(45),t.ALo(46,"translate"),t.qZA(),t.TgZ(47,"div",42)(48,"input",43,44),t.NdJ("clrDateChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.systemExpiresDate=i)}),t.qZA(),t.YNc(50,F,3,5,"input",45),t.YNc(51,Q,2,5,"input",46),t.qZA()(),t.TgZ(52,"div",47),t._UZ(53,"label",48),t.TgZ(54,"clr-checkbox-wrapper")(55,"input",49),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.neverExpires=i)}),t.qZA(),t.TgZ(56,"label"),t._uU(57),t.ALo(58,"translate"),t.qZA()()()()()()()}if(2&l){const e=t.oxw();t.ekj("clr-form-control-disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(3,28,"CVE_ALLOWLIST.CVE_ALLOWLIST")),t.xp6(6),t.Oqu(t.lcZ(9,30,"CVE_ALLOWLIST.PRO_ALLOWLIST_EXPLAIN")),t.xp6(4),t.Oqu(t.lcZ(13,32,"CVE_ALLOWLIST.PRO_OR_SYS")),t.xp6(4),t.Oqu(t.lcZ(17,34,"CVE_ALLOWLIST.MERGE_INTO")),t.xp6(2),t.Q6J("ngIf",e.hasExpired),t.xp6(3),t.Q6J("ngModel",e.systemAllowlistOrProjectAllowlist),t.uIk("disabled",e.hasChangeConfigRole?null:"disabled"),t.xp6(2),t.Oqu(t.lcZ(24,36,"CVE_ALLOWLIST.
1SYS_ALLOWLIST")),t.xp6(3),t.Q6J("ngModel",e.systemAllowlistOrProjectAllowlist),t.uIk("disabled",e.hasChangeConfigRole?null:"disabled"),t.xp6(2),t.Oqu(t.lcZ(29,38,"CVE_ALLOWLIST.PRO_ALLOWLIST")),t.xp6(5),t.Q6J("disabled",e.isUseSystemAllowlist()||!e.hasChangeConfigRole),t.xp6(1),t.hij(" ",t.lcZ(35,40,"CVE_ALLOWLIST.ADD")," "),t.xp6(2),t.Q6J("disabled",e.isUseSystemAllowlist()||!e.hasChangeConfigRole),t.xp6(1),t.hij(" ",t.lcZ(38,42,"CVE_ALLOWLIST.ADD_SYSTEM")," "),t.xp6(2),t.Q6J("ngIf",e.showAddModal&&!e.isUseSystemAllowlist()),t.xp6(1),t.Q6J("ngIf",e.isUseSystemAllowlist()),t.xp6(1),t.Q6J("ngIf",!e.isUseSystemAllowlist()),t.xp6(4),t.Oqu(t.lcZ(46,44,"CVE_ALLOWLIST.EXPIRES_AT")),t.xp6(3),t.Q6J("clrDate",e.systemExpiresDate),t.xp6(2),t.Q6J("ngIf",!e.isUseSystemAllowlist()),t.xp6(1),t.Q6J("ngIf",e.isUseSystemAllowlist()),t.xp6(4),t.Q6J("disabled",e.isUseSystemAllowlist()||!e.hasChangeConfigRole)("checked",e.neverExpires)("ngModel",e.neverExpires),t.xp6(2),t.hij(" ",t.lcZ(58,46,"CVE_ALLOWLIST.NEVER_EXPIRES")," ")}}const p=1e3;class x{constructor(){this.Public=!1,this.ContentTrust=!1,this.ContentTrustCosign=!1,this.PreventVulImg=!1,this.PreventVulImgSeverity="low",this.ScanImgOnPush=!1}initByProject(o){this.Public="true"===o.metadata.public,this.ContentTrust="true"===o.metadata.enable_content_trust,this.ContentTrustCosign="true"===o.metadata.enable_content_trust_cosign,this.PreventVulImg="true"===o.metadata.prevent_vul,o.metadata.severity&&(this.PreventVulImgSeverity=o.metadata.severity),this.ScanImgOnPush="true"===o.metadata.auto_scan}}class u{constructor(o,e,n,i,s,d){this.errorHandler=o,this.translate=e,this.projectService=n,this.systemInfoService=i,this.userPermission=s,this.event=d,this.onGoing=!1,this.projectName="unknown",this.isProxyCacheProject=!1,this.orgProjectPolicy=new x,this.projectPolicy=new x,this.severityOptions=[{severity:"critical",severityLevel:"VULNERABILITY.SEVERITY.CRITICAL"},{severity:"high",severityLevel:"VULNERABILITY.SEVERITY.HIGH"},{severity:"medium",severityLevel:"VULNERABILITY.SEVERITY.MEDIUM"},{severity:"low",severityLevel:"VULNERABILITY.SEVERITY.LOW"},{severity:"none",severityLevel:"VULNERABILITY.SEVERITY.NONE"}],this.userSystemAllowlist=!0,this.showAddModal=!1,this.userProjectAllowlist=!1}ngOnInit(){this.projectId?(this.systemInfoService.getSystemInfo().subscribe(o=>{this.systemInfo=o,setTimeout(()=>{this.dateSystemInput.nativeElement.parentNode.setAttribute("hidden","hidden")},100)},o=>this.errorHandler.error(o)),this.retrieve(),this.getPermission(),this.get
1SystemAllowlist()):this.errorHandler.error("Project ID cannot be unset.")}getSystemAllowlist(){this.systemInfoService.getSystemAllowlist().subscribe(o=>{o&&(this.systemAllowlist=o,this.systemAllowlist.expires_at&&(this.systemExpiresDate=new Date(this.systemAllowlist.expires_at*p),setTimeout(()=>{this.systemExpiresDateString=this.dateSystemInput.nativeElement.value},100)))},o=>{this.errorHandler.error(o)})}getPermission(){this.userPermission.getPermission(this.projectId,h._W.CONFIGURATION.KEY,h._W.CONFIGURATION.VALUE.UPDATE).subscribe(o=>{this.hasChangeConfigRole=o})}get withNotary(){return!!this.systemInfo&&this.systemInfo.with_notary}retrieve(o){this.projectService.getProject(this.projectId).subscribe(e=>{this.orgProjectPolicy.initByProject(e),this.projectPolicy.initByProject(e),e.cve_allowlist||(e.cve_allowlist={items:[],expires_at:null}),e.cve_allowlist.items||(e.cve_allowlist.items=[]),e.cve_allowlist.expires_at||(e.cve_allowlist.expires_at=null),e.metadata.reuse_sys_cve_allowlist||(e.metadata.reuse_sys_cve_allowlist="true"),e&&e.cve_allowlist&&(this.projectAllowlist=(0,_.d9)(e.cve_allowlist),this.projectAllowlistOrigin=(0,_.d9)(e.cve_allowlist),this.systemAllowlistOrProjectAllowlist=e.metadata.reuse_sys_cve_allowlist,this.systemAllowlistOrProjectAllowlistOrigin=e.metadata.reuse_sys_cve_allowlist)},e=>this.errorHandler.error(e))}refresh(){this.retrieve(),this.event.publish(A.n.REFRESH_PROJECT_INFO)}isValid(){let o=!1;return(!this.projectPolicy.PreventVulImg||this.severityOptions.some(e=>e.severity===this.projectPolicy.PreventVulImgSeverity))&&(o=!0),o}hasChanges(){return!(0,_.jy)(this.orgProjectPolicy,this.projectPolicy)}save(){!this.hasChanges()&&!this.hasAllowlistChanged||(this.onGoing=!0,this.projectService.updateProjectPolicy(this.projectId,this.projectPolicy,this.systemAllowlistOrProjectAllowlist,this.projectAllowlist).subscribe(()=>{this.onGoing=!1,this.translate.get("CONFIG.SAVE_SUCCESS").subscribe(o=>{this.errorHandler.info(o)}),this.refresh()},o=>{this.onGoing=!1,this.errorHandler.error(o)}))}cancel(){let o=new j.c("CONFIG.CONFIRM_TITLE","CONFIG.CONFIRM_SUMMARY","",{},10);this.confirmationDlg.open(o)}reset(){this.projectPolicy=(0,_.d9)(this.orgProjectPolicy)}confirmCancel(o){o&&10===o.source&&1===o.state&&(this.reset(),this.hasAllowlistChanged&&(this.projectAllowlist=(0,_.d9)(this.projectAllowlistOrigin),this.systemAllowlistOrProjectAllowlist=this.systemAllowlistOrProjectAllowlistOrigin))}isUseSystemAllowlist(){return"true"===this.systemAllowlistOrProjectAllowlist}deleteItem(o){this.projectAllowlist.items.splice(o,1)}addSystem(){if(this.showAddModal=!1,!(this.systemAllowlist&&this.systemAllowlist.items&&this.systemAllowlist.items.length>0))return;this.projectAllowlist&&!this.projectAllowlist.items&&(this.projectAllowlist.items=[]);let o={};this.projectAllowlist.items.forEach(e=>{o[e.cve_id]=!0}),this.systemAllowlist.items.forEach(e=>{o[e.cve_id]||(o[e.cve_id]=!0,this.projectAllowlist.items.push(e))})}addToProjectAllowlist(){this.projectAllowlist&&!this.projectAllowlist.items&&(this.projectAllowlist.items=[]);let o={};this.projectAllowlist.items.forEach(e=>{o[e.cve_id]=!0}),this.cveIds.split(/[\n,]+/).forEach(e=>{let n={};n.cve_id=e.trim(),o[n.cve_id]||(o[n.cve_id]=!0,this.projectAllowlist.items.push(n))}),this.cveIds=null,this.showAddModal=!1}get hasAllowlistChanged(){return!((0,_.jy)(this.projectAllowlist,this.projectAllowlistOrigin)&&this.systemAllowlistOrProjectAllowlistOrigin===this.systemAllowlistOrProjectAllowlist)}isDisabled(){let o=this.cveIds;return!(o&&o.trim())}get expiresDate(){if("true"===this.systemAllowlistOrProjectAllowlist){if(this.systemAllowlist&&this.systemAllowlist.expires_at)return new Date(this.systemAllowlist.expires_at*p)}else if(this.projectAllowlist&&this.projectAllowlist.expires_at)return new Date(this.projectAllowlist.expires_at*p);return null}set expiresDate(o){"false"===this.systemAllowlistOrProjectAllowlist&&this.projectAllowlist&&o&&(this.projectAllowlist.expires_at=Math.floor(o.getTime()/p))}get neverExpires(){if("true"===this.systemAllowlistOrProjectAllowlist){if(this.systemAllowlist&&this.systemAllowlist.expires_at)return!(this.systemAllowlist&&this.systemAllowlist.expires_at)}else if(this.projectAllowlist&&this.projectAllowlist.expires_at)return!(this.projectAllowlist&&this.projectAllowlist.expires_at);return!0}set neverExpires(o){o?(this.projectAllowlist.expires_at=null,this.systemInfoService.resetDateInput(this.dateInput)):this.projectAllowlist.expires_at=Math.floor((new Date).getTime()/p)}get hasExpired(){if("true"===this.systemAllowlistOrProjectAllowlist){if(this.systemAllowlist&&this.systemAllowlist.expires_at)return(new Date).getTime()>this.systemAllowlist.expires_at*p}else if(this.projectAllowlistOrigin&&this.projectAllowlistOrigin.expires_at)return(new Date).getTime()>this.projectAllowlistOrigin.expires_at*p;return!1}goToDetail(o){window.open(`https://nvd.nist.gov/vuln/detail/${o}`,"_blank")}}u.\u0275fac=function(o){return new(o||u)(t.Y36(T.q),t.Y36(P.sK),t.Y36(h.Y4),t.Y36(h.Ob),t.Y36(h.Hx),t.Y36(A.P))},u.\u0275cmp=t.Xpm({type:u,selectors:[["hbr-project-policy-config"]],viewQuery:function(o,e){if(1&o&&(t.Gf(I,5),t.Gf(Z,5),t.Gf(b,5)),2&o){let n;t.iGM(n=t.CRH())&&(e.confirmationDlg=n.first),t.iGM(n=t.CRH())&&(e.dateInput=n.first),t.iGM(n=t.CRH())&&(e.dateSystemInput=n.first)}},inputs:{projectId:"projectId",projectName:"projectName",isProxyCacheProject:"isProxyCacheProject",hasSignedIn:"hasSignedIn",hasProjectAdminRole:"hasProjectAdminRole"},decls:58,vars:47,consts:[[1,"clr-form","clr-form-horizontal"],["projectPolicyForm","ngForm"],[1,"form-block"],["id","clr-wrapper-public"],["type","checkbox","id","clr-checkbox-wrapper-public","clrCheckbox","","name","public",3,"ngModel","disabled","ngModelChange"],[1,"config-subtext"],["clrInline","",4,"ngIf"],["id","prevent-vulenrability-image",1,"margin-top-05"],[4,"ngIf"],["type","checkbox","clrCheckbox","","name","prevent-vulenrability-image-input",3,"ngModel","disabled","ngModelChange"],[1,"chk-explain"],["
1id","severity-blk"],[1,"clr-select-wrapper"],["id","severity","name","severity",1,"clr-select",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["id","scan-image-on-push-wrapper"],["type","checkbox","clrCheckbox","","name","scan-image-on-push",3,"ngModel","disabled","ngModelChange"],["class","clr-form-control",3,"clr-form-control-disabled",4,"ngIf"],["type","button",1,"btn","btn-primary",3,"disabled","click"],["type","button",1,"btn","btn-outline",3,"disabled","click"],[3,"confirmAction"],["cfgConfirmationDialog",""],["clrInline",""],["id","content-trust-cosign","type","checkbox","clrCheckbox","","name","content-trust-cosign",3,"ngModel","disabled","ngModelChange"],["for","content-trust-cosign"],["id","content-trust","type","checkbox","clrCheckbox","","name","content-trust",3,"ngModel","disabled","ngModelChange"],["for","content-trust"],[3,"ngValue"],[1,"clr-form-control"],[1,"clr-control-label"],[1,"w-100","clr-control-container"],["id","use-system","type","radio","clrRadio","","name","systemAllowlistOrProjectAllowlist","required","","value","true",3,"ngModel","ngModelChange"],["id","use-project","type","radio","clrRadio","","name","systemAllowlistOrProjectAllowlist","required","","value","false",3,"ngModel","ngModelChange"],[1,"clr-row","width-90per"],[1,"clr-col","position-relative","col-flex-grow-0"],["id","show-add-modal",1,"btn","btn-link",3,"disabled","click"],["id","add-system",1,"btn","btn-link","ml-1",3,"disabled","click"],["class","add-modal add-modal-dark",4,"ngIf"],["class","allowlist-window",4,"ngIf"],[1,"clr-col","padding-top-16","pl-2"],[1,"clr-row","expire-data"],[1,"bottom-line","bottom-line-project-config","clr-col-3"],[1,"underline"],["readonly","","type","date",3,"clrDate","clrDateChange"],["dateSystemInput",""],["readonly","","type","date","newFormLayout","true",3,"disabled","placeholder","clrDate","clrDateChange",4,"ngIf"],["clrInput","","readonly","","type","text",3,"disabled","placeholder","value",4,"ngIf"],[1,"clr-row"],["for","neverExpires",1,"clr-col-3"],["type","checkbox","clrCheckbox","","name","neverExpires","id","neverExpires",3,"disabled","checked","ngModel","ngModelChange"],["class","label label-warning",4,"ngIf"],[1,"label","label-warning"],[1,"add-modal","add-modal-dark"],["shape","window-close",1,"float-lg-right","margin-top-4",3,"click"],[1,"flex-direction-column"],["id","allowlist-textarea","clrTextarea","","name","cveIds",1,"w-100",3,"ngModel","ngModelChange"],["id","add-to-allowlist",1,"btn","btn-link",3,"disabled","click"],[1,"allowlist-window"],["class","none",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"none"],["href","javascript:void(0)",3,"click"],["href","javascript:void(0)",1,"float-lg-right",3,"click"],["shape","times-circle"],["readonly","","type","date","newFormLayout","true",3,"disabled","placeholder","clrDate","clrDateChange"],["dateInput",""],["clrInput","","readonly","","type","text",3,"disabled","placeholder","value"]],template:function(o,e){1&o&&(t.TgZ(0,"form",0,1)(2,"section",2)(3,"clr-checkbox-container",3)(4,"label"),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.TgZ(7,"clr-checkbox-wrapper")(8,"input",4),t.NdJ("ngModelChange",function(i){return e.projectPolicy.Public=i}),t.qZA(),t.TgZ(9,"label"),t._uU(10),t.ALo(11,"translate"),t.qZA()(),t.TgZ(12,"clr-control-helper",5),t._uU(13),t.ALo(14,"translate"),t.qZA()(),t.YNc(15,E,14,12,"clr-checkbox-container",6),t.TgZ(16,"clr-checkbox-container",7)(17,"label"),t.YNc(18,M,3,3,"span",8),t.qZA(),t.TgZ(19,"clr-checkbox-wrapper")(20,"input",9),t.NdJ("ngModelChange",function(i){return e.projectPolicy.PreventVulImg=i}),t.qZA(),t.TgZ(21,"label"),t._uU(22),t.ALo(23,"translate"),t.qZA()(),t.TgZ(24,"clr-control-helper",5)(25,"div",10)(26,"label",5)(27,"div",11)(28,"div"),t._uU(29),t.ALo(30,"translate"),t.qZA(),t.TgZ(31,"div",12)(32,"select",13),t.NdJ("ngModelChange",function(i){return e.projectPolicy.PreventVulImgSeverity=i}),t.YNc(33,N,3,4,"option",14),t.qZA()(),t.TgZ(34,"div"),t._uU(35),t.ALo(36,"translate"),t.qZA()()()()()(),t.TgZ(37,"clr-checkbox-container")(38,"label"),t._uU(39),t.ALo(40,"translate"),t.qZA(),t.TgZ(41,"clr-checkbox-wrapper",15)(42,"input",16),t.NdJ("ngModelChange",function(i){return e.projectPolicy.ScanImgOnPush=i}),t.qZA(),t.TgZ(43,"label"),t._uU(44),t.ALo(45,"translate"),t.qZA()(),t.TgZ(46,"clr-control-helper",5),t._uU(47),t.ALo(48,"translate"),t.qZA()(),t.YNc(49,H,59,48,"div",17),t.TgZ(50,"button",18),t.NdJ("click",function(){return e.save()}),t._uU(51),t.ALo(52,"translate"),t.qZA(),t.TgZ(53,"button",19),t.NdJ("click",function(){return e.cancel()}),t._uU(54),t.ALo(55,"translate"),t.qZA(),t.TgZ(56,"confirmation-dialog",20,21),t.NdJ("confirmAction",function(i){return e.confirmCancel(i)}),t.qZA()()()),2&o&&(t.xp6(5),t.Oqu(t.lcZ(6,25,"PROJECT_CONFIG.REGISTRY")),t.xp6(3),t.Q6J("ngModel",e.projectPolicy.Public)("disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(11,27,"PROJECT_CONFIG.PUBLIC_TOGGLE")),t.xp6(3),t.hij(" ",t.lcZ(14,29,"PROJECT_CONFIG.PUBLIC_POLICY")," "),t.xp6(2),t.Q6J("ngIf",!e.isProxyCacheProject),t.xp6(3),t.Q6J("ngIf",!!e.isProxyCacheProject),t.xp6(2),t.Q6J("ngModel",e.projectPolicy.PreventVulImg)("disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(23,31,"PROJECT_CONFIG.PREVENT_VULNERABLE_TOGGLE")),t.xp6(7),t.hij(" ",t.lcZ(30,33,"PROJECT_CONFIG.PREVENT_VULNERABLE_1")," "),t.xp6(3),t.Q6J("ngModel",e.projectPolicy.PreventVulImgSeverity)("disabled",!e.projectPolicy.PreventVulImg),t.xp6(1),t.Q6J("ngForOf",e.severityOptions),t.xp6(2),t.hij(" ",t.lcZ(36,35,"PROJECT_CONFIG.PREVENT_VULNERABLE_2")," "),t.xp6(4),t.Oqu(t.lcZ(40,37,"PROJECT_CONFIG.SCAN")),t.xp6(3),t.Q6J("ngModel",e.projectPolicy.ScanImgOnPush)("disabled",!e.hasChangeConfigRole),t.xp6(2),t.Oqu(t.lcZ(45,39,"PROJECT_CONFIG.AUTOSCAN_TOGGLE")),t.xp6(3),t.hij(" ",t.lcZ(48,41,"PROJECT_CONFIG.AUTOSCAN_POLICY")," "),t.xp6(2),t.Q6J("ngIf",e.systemInfo),t.xp6(1),t.Q6J("disabled",!((e.isValid()&&e.hasChanges()||e.hasAllowlistChanged)&&e.hasChangeConfigRole)),t.xp6(1),t.hij(" ",t.lcZ(52,43,"BUTTON.SAVE")," "),t.xp6(2),t.Q6J("disabled",!((e.isValid()&&e.hasChanges()||e.hasAllowlistChanged)&&e.hasChangeConfigRole)),t.xp6(1),t.hij(" ",t.lcZ(55,45,"BUTTON.CANCEL")," "))},dependencies:[a._Y,a.YN,a.Kr,a.Fj,a.Wl,a.EJ,a._,a.JJ,a.JL,a.Q7,a.On,a.F,c.qvL,c.MgK,c.CM6,c.KKC,c.Y_4,c.PEh,c.Tsp,c.ZJg,c.xRP,c.asN,c.DAq,c.EeQ,c.XE5,c.LAP,y.sg,y.O5,O.z,P.X$],styles:["#severity-blk[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:inline-block}.select[_ngcontent-%COMP%]{width:120px}.margin-top-4[_ngcontent-%COMP%]{margin-top:4px}.allowlist-window[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:3px;padding:12px;height:224px;width:270px;overflow-y:auto}.allowlist-window[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{height:24px;line-height:24px;list-style-type:none}.width-90per[_ngcontent-%COMP%]{width:90%}.none[_ngcontent-%COMP%]{color:#ccc}.underline[_ngcontent-%COMP%]{border-bottom:1px solid}.color-0079bb[_ngcontent-%COMP%]{color:#0079bb}.padding-top-16[_ngcontent-%COMP%]{padding-top:16px}.position-relative[_ngcontent-%COMP%]{position:relative}.add-modal[_ngcontent-%COMP%]{position:absolute;padding:0 8px}.add-modal[_ngcontent-%COMP%] .flex-direction-column[_ngcontent-%COMP%]{flex-direction:column}.add-modal[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:1px solid}.add-modal[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{float:right}.hand[_ngcontent-%COMP%]{cursor:pointer;margin:0}.config-subtext[_ngcontent-%COMP%]{font-size:.55rem;line-height:1.2rem;font-weight:300}.col-flex-grow-0[_ngcontent-%COMP%]{flex-grow:0}.expire-data[_ngcontent-%COMP%]{min-width:12.5rem;margin-top:-1rem}.bottom-line[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;font-size:13px;color:#000}.margin-top-05[_ngcontent-%COMP%]{margin-top:.5rem}"]});class m{constructor(o,e,n){this.route=o,this.router=e,this.session=n,this.isProxyCacheProject=!1}
1ngOnInit(){this.projectId=+this.route.snapshot.parent.parent.params.id,this.currentUser=this.session.getCurrentUser(),this.hasSignedIn=null!==this.session.getCurrentUser();let o=this.route.snapshot.parent.parent.data;if(o){let e=o.projectResolver;this.projectName=e.name,e.registry_id&&(this.isProxyCacheProject=!0)}}}m.\u0275fac=function(o){return new(o||m)(t.Y36(C.gz),t.Y36(C.F0),t.Y36(v.m))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-project-config"]],decls:3,vars:4,consts:[[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12","col-xs-12","config-top"],[3,"projectId","projectName","isProxyCacheProject","hasSignedIn"]],template:function(o,e){1&o&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"hbr-project-policy-config",2),t.qZA()()),2&o&&(t.xp6(2),t.Q6J("projectId",e.projectId)("projectName",e.projectName)("isProxyCacheProject",e.isProxyCacheProject)("hasSignedIn",e.hasSignedIn))},dependencies:[u],styles:[".config-top[_ngcontent-%COMP%]{top:8px}"]});const X=[{path:"",component:m}];class g{}g.\u0275fac=function(o){return new(o||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[C.Bz.forChild(X),w.m]})}}]);
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.