1"use strict";(self.webpackChunkess=self.webpackChunkess||[]).push([[167],{72167:(Cn,ce,h)=>{h.r(ce),h.d(ce,{AccountSettingModule:()=>vn});var g=h(72200),Ke=h(38132),w=h(85972),x=h(67911),e=h(73664),c=h(2615),k=h(97116),de=h(93368),qe=h(92888),Ze=h(27395),M=h(13816);function H(o,s,t,i,n){return o||s?o?s?o.toLowerCase().localeCompare(s.toLowerCase()):n?1:-1:n?-1:1:0}var y=h(25112),E=h(76233),O=h(66345);function Je(o,s){if(1&o&&e.nrm(0,"fico-table-new",4),2&o){const t=e.XpG();e.Y8G("data",t.usersData)}}let et=(()=>{class o{constructor(t,i){this.accountService=t,this.sessionService=i,this.usersData={options:null,data:null,messages:{noResults:"This account has no users."}},this.selectedUser=null,this.allRoles=[],this.userActionCompleted=!0,this.usersData.options={defaultColDef:{resizable:!0,sortable:!0,unSortIcon:!0},pagination:!0,paginationPageSize:10,suppressMovableColumns:!0,rowHeight:40,columnDefs:[{headerName:"User Name",field:"user_name",comparator:(n,r)=>n.toLowerCase().localeCompare(r.toLowerCase())},{headerName:"Email",field:"email"},{headerName:"Job Title",field:"job_title",comparator:H},{headerName:"Create Date",headerClass:"header_center",cellRenderer:function(n){return new g.vh("en-US").transform(n.value,"LLL d, yyyy")},cellStyle:{"text-align":"center"},field:"create_date"},{headerName:"Last Login",headerClass:"header_center",cellRenderer:function(n){return new g.vh("en-US").transform(n.value,"LLL d, yyyy")},cellStyle:{"text-align":"center"},field:"last_login",comparator:H}]}}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.usersData.data=null,this.loadUserTable()}),this.accountService.fetchAllRoles().then(t=>{this.allRoles=t}),this.canEditDomains=this.sessionService.isAdmin()}ngOnDestroy(){this.settingsSubcription.unsubscribe()}loadUserTable(){this.accountService.getUsersData().then(t=>{this.usersData.data=t})}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(k.Q))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["users-table"]],standalone:!1,decls:8,vars:2,consts:[[3,"display"],[2,"display","flex","flex-direction","row"],[2,"overflow","hidden","flex-grow","1"],[3,"data",4,"ngIf"],[3,"data"]],template:function(i,n){1&i&&(e.j41(0,"h3"),e.EFF(1,"Users"),e.k0s(),e.j41(2,"p"),e.EFF(3," The table below lists various active users associated with your account and their account roles.\n"),e.k0s(),e.nrm(4,"loading",0),e.j41(5,"div",1)(6,"div",2),e.DNE(7,Je,1,1,"fico-table-new",3),e.k0s()()),2&i&&(e.R7$(4),e.Y8G("display",!n.usersData.data),e.R7$(3),e.Y8G("ngIf",n.usersData.data))},dependencies:[g.bT,E.q,O.p],styles:[".row[_ngcontent-%COMP%]{margin-top:-30px;padding-right:14px;margin-bottom:10px}.action-icon[_ngcontent-%COMP%]{font-size:25px}.tag[_ngcontent-%COMP%]{margin:5px 5px 0 0;padding:2px 10px}h3[_ngcontent-%COMP%]{margin-top:0} users-table .ag-theme-balham .ag-row:hover{background-color:#f2f2f2}.user-hover[_ngcontent-%COMP%]:hover{text-decoration-line:underline}"]})}}return o})();function tt(o,s){if(1&o&&e.nrm(0,"fico-table-new",4),2&o){const t=e.XpG();e.Y8G("data",t.subscriptionsData)}}let it=(()=>{class o{constructor(t){this.accountService=t,this.subscriptionsData={options:null,data:null,messages:{noResults:"This account has no product subscriptions."},emitMessageOnRowClick:!1},this.subscriptionsData.options={defaultColDef:{resizable:!0,sortable:!0,unSortIcon:!0},pagination:!0,paginationPageSize:10,suppressMovableColumns:!0,rowHeight:40,columnDefs:[{headerName:"Product Name",field:"product_name"},{headerName:"Start Date",field:"start_date",cellRenderer:function(i){return new g.vh("en-US").transform(i.value,"LLL d, yyyy")},headerClass:"header_center",cellStyle:{"text-align":"center"}},{headerName:"End Date",field:"end_date",cellRenderer:function(i){return" -- "!==i.value?new g.vh("en-US").transform(i.value,"LLL d, yyyy"):i.value},headerClass:"header_center",cellStyle:{"text-align":"center"}},{headerName:"Status",field:"status",headerClass:"header_center",cellStyle:{"text-align":"center"},sort:"asc"}]}}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.subscriptionsData.data=null,this.loadSubscriptionsTable()})}ngOnDestroy(){this.settingsSubcription.unsubscribe()}loadSubscriptionsTable(){this.accountService.getSubscriptionsData().then(t=>{this.subscriptionsData.data=t})}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["subscriptions-table"]],standalone:!1,decls:6,vars:2,consts:[[3,"display"],[2,"display","flex","flex-direction","row"],[2,"overflow","hidden","flex-grow","1"],[3,"data",4,"ngIf"],[3,"data"]],template:function(i,n){1&i&&(e.j41(0,"p"),e.EFF(1," The table below lists the various service subscriptions associated with your account.\n"),e.k0s(),e.nrm(2,"loading",0),e.j41(3,"div",1)(4,"div",2),e.DNE(
15,tt,1,1,"fico-table-new",3),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("display",!n.subscriptionsData.data),e.R7$(3),e.Y8G("ngIf",n.subscriptionsData.data))},dependencies:[g.bT,E.q,O.p],encapsulation:2})}}return o})();var f=h(10467),G=h(14844);function nt(o,s){if(1&o){const t=e.RV6();e.j41(0,"fico-form",4),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG();return c.Njj(r.updateIntegrations(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("shouldListenForOutputEventsCompletion",!0)("outputEventsCompleted",t.updateIntegrationsRequestCompleted)("formType","integration")("data",t.selectedIntegrations)}}let st=(()=>{class o{constructor(t){this.accountService=t,this.selectedIntegrations=null,this.updateIntegrationsRequestCompleted=!0}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.selectedIntegrations=null,this.loadIntegrationsData()})}loadIntegrationsData(){this.accountService.getIntegrationConfig().then(t=>{this.selectedIntegrations={},t.forEach(i=>{"email"===i.integration_platform?(this.populateFgControls(this.integrationsConfigDataMap("email"),this.integrationsFgMap("email"),i),this.selectedIntegrations.enable_disable_send_email=i.integration_active):i.integration_platform&&(this.populateFgControls(this.integrationsConfigDataMap(i.integration_platform),this.integrationsFgMap(i.integration_platform),i),i.integration_active&&(this.selectedIntegrations.platform=i.integration_platform))}),this.selectedIntegrations.platform||(this.selectedIntegrations.platform="none")})}updateIntegrations(t){var i=this;return(0,f.A)(function*(){const n=t.data,r={email:Object.assign({},i.formatFgPOSTData(i.integrationsConfigDataMap("email"),i.integrationsFgMap("email"),n),{status:!!n.email_integration_email_to_addresses}),integration:Object.assign({},"none"!==n.platform?i.formatFgPOSTData(i.integrationsConfigDataMap(n.platform),i.integrationsFgMap(n.platform),n):{},{integration_platform:n.platform})};i.updateIntegrationsRequestCompleted=!1;try{yield i.accountService.updateIntegrationsConfig(r)}catch{}finally{i.updateIntegrationsRequestCompleted=!0}})()}formatFgPOSTData(t,i,n){const r={integration_config:{}};return t.forEach(a=>{"string"==typeof a?r[a]=encodeURIComponent(n[i.toLowerCase()+"_"+a]):a.config.forEach(l=>{r.integration_config[l]=encodeURIComponent(n[i.toLowerCase()+"_"+l])})}),r}populateFgControls(t,i,n){t.forEach(r=>{"string"==typeof r?this.selectedIntegrations[i.toLowerCase()+"_"+r]=n[r]:r.config.forEach(a=>{this.selectedIntegrations[i.toLowerCase()+"_"+a]=n.integration_config[a]})})}integrationsConfigDataMap(t){let i=[];switch(t){case"email":i=["integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_email_cc_addresses","integration_email_recipient_name","integration_email_to_addresses"]}];break;case"Asana":i=["integration_name","integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_url","integration_api_key","integration_workspace","integration_assignee","integration_project"]}];break;case"Slack":i=["integration_name","integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_token","integration_channel"]}];break;case"ticket by email":i=["integration_name","integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_ticket_by_email_to_addresses","integration_ticket_by_email_cc_addresses"]}];break;case"ServiceNow":i=["integration_name","integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_url","integration_username","integration_password","integration_table_name","integration_caller_value","integration_category_value","integration_assignment_value","integration_contact_type_value","integration_message_field_name","integration_subject_field_name"]}];break;case"Jira":i=["integration_name","integration_subject_prefix","integration_message_header","integration_message_footer",{config:["integration_url","integration_username","integration_password","integration_project_key","integration_issue_type"]}]}return i}integrationsFgMap(t){let i;switch(t){case"email":i="Email";break;case"Asana":i="Asana";break;case"Slack":i="Slack";break;case"ticket by email":i="Ticket";break;case"ServiceNow":i="ServiceNow";break;case"Jira":i="Jira"}return i}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["admin-integrations"]],standalone:!1,decls:7,vars:2,consts:[[1,"row"],[1,"col-md-9","info"],[3,"display"],[3,"shouldListenForOutputEventsCompletion","outputEventsCompleted","formType","data","outputEvents",4,"ngIf"],[3,"outputEvents","shouldListenForOutputEventsCompletion","outputEventsCompleted","formType","data"]],template:function(i,n){1&i&&(e.j41(0,"div")(1,"div",0)(2,"div",1)(3,"p"),e.EFF(4,"Enabling and configuring email and ticketing integrations allow your users to select and submit any ISS Cyber Risk Score Enterprise IP address findings to your organizational ticketing or communication platform directly from within Enterprise Self Assessment."),e.k0s()()(),e.nrm(5,"loading",2),e.DNE(6,nt,1,4,"fico-form",3),e.k0s()),2&i&&(e.R7$(5),e.Y8G("display",!n.selectedIntegrations),e.R7$(),e.Y8G("ngIf",n.selectedIntegrations))},dependencies:[g.bT,E.q,G.b],encapsulation:2})}}return o}
1)();function ot(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"loading",2),e.k0s()),2&o&&(e.R7$(),e.Y8G("display",!0))}function rt(o,s){if(1&o){const t=e.RV6();e.j41(0,"fico-form",3),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG();return c.Njj(r.editAccountReports(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("shouldListenForOutputEventsCompletion",!0)("outputEventsCompleted",t.editAccountReportsRequestCompleted)("formType","reports")("data",t.reportsData)}}let at=(()=>{class o{constructor(t,i){this.accountService=t,this.sessionService=i,this.editAccountReportsRequestCompleted=!0}ngOnInit(){var t=this;this.sessionSub=this.sessionService.session$.subscribe((0,f.A)(function*(){try{t.resetreportsData(),t.reportsData=yield t.accountService.getAccountReportsData()}catch{}}))}ngOnDestroy(){this.sessionSub.unsubscribe()}editAccountReports(t){var i=this;return(0,f.A)(function*({data:n}){i.editAccountReportsRequestCompleted=!1;try{yield i.accountService.editAccountReportsData(n)}catch{}finally{i.editAccountReportsRequestCompleted=!0}}).apply(this,arguments)}resetreportsData(){this.reportsData=void 0}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(k.Q))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["reports"]],standalone:!1,decls:6,vars:2,consts:[["reportsTemplate",""],[4,"ngIf","ngIfElse"],[3,"display"],[3,"outputEvents","shouldListenForOutputEventsCompletion","outputEventsCompleted","formType","data"]],template:function(i,n){if(1&i&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"Reports"),e.k0s(),e.DNE(3,ot,2,1,"div",1)(4,rt,1,4,"ng-template",null,0,e.C5r),e.k0s()),2&i){const r=e.sdS(5);e.R7$(3),e.Y8G("ngIf",!n.reportsData)("ngIfElse",r)}},dependencies:[g.bT,E.q,G.b],styles:["h3[_ngcontent-%COMP%]{margin-top:0}"]})}}return o})();function lt(o,s){if(1&o&&e.nrm(0,"fico-table-new",4),2&o){const t=e.XpG();e.Y8G("data",t.awsEntitlementsData)}}let ct=(()=>{class o{constructor(t){this.accountService=t,this.awsEntitlementsData={options:null,data:null,messages:{noResults:"No data available."},emitMessageOnRowClick:!1},this.awsEntitlementsData.options={defaultColDef:{resizable:!0,sortable:!0,unSortIcon:!0},enableCellTextSelection:!0,suppressMovableColumns:!0,ensureDomOrder:!0,pagination:!0,paginationPageSize:10,rowHeight:40,columnDefs:[{headerName:"Product Name",field:"product_name",width:300,suppressSizeToFit:!0},{headerName:"Max Allowed",headerClass:"header_center",cellStyle:{"text-align":"center"},field:"max_allowed"},{headerName:"Used",headerClass:"header_center",cellStyle:{"text-align":"center"},field:"used"},{headerName:"Usage",headerClass:"header_center",cellStyle:{"text-align":"center"},field:"usage"}]}}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.awsEntitlementsData.data=null,this.getAwsEntitlements()})}ngOnDestroy(){this.settingsSubcription.unsubscribe()}getAwsEntitlements(){this.accountService.getAwsEntitlements().then(t=>{this.awsEntitlementsData.data=t})}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["marketplace-entitlements"]],standalone:!1,decls:17,vars:2,consts:[[3,"display"],[2,"display","flex","flex-direction","row"],[2,"overflow","hidden","flex-grow","1"],[3,"data",4,"ngIf"],[3,"data"]],template:function(i,n){1&i&&(e.j41(0,"p"),e.EFF(1,"The ISS CRS products listed below were purchased through AWS Marketplace."),e.k0s(),e.j41(2,"ul")(3,"li")(4,"b"),e.EFF(5,"Cyber Risk Score Enterprise"),e.k0s(),e.EFF(6," is contracted by organization size, defined by total registered network IP space, measured in /24 equivalents."),e.k0s(),e.j41(7,"li")(8,"b"),e.EFF(9,"Cyber Risk Score ESG"),e.k0s(),e.EFF(10," is contracted by profile bundles. Profile bundles may be purchased in various quantities through AWS Marketplace."),e.k0s()(),e.j41(11,"p"),e.EFF(12,"Your AWS Marketplace contract amount(s) are listed below along with your current usage for each product."),e.k0s(),e.nrm(13,"loading",0),e.j41(14,"div",1)(15,"div",2),e.DNE(16,lt,1,1,"fico-table-new",3),e.k0s()()),2&i&&(e.R7$(13),e.Y8G("display",!n.awsEntitlementsData.data),e.R7$(3),e.Y8G("ngIf",n.awsEntitlementsData.data))},dependencies:[g.bT,E.q,O.p],encapsulation:2})}}return o}
1)();var he=h(14872),z=h(44341),dt=h(97586),ht=h(12819),pe=h(7476);const pt=o=>[o];function ut(o,s){if(1&o&&(e.j41(0,"div",2)(1,"div",3),e.nrm(2,"circle-progress",4),e.k0s(),e.j41(3,"div",5),e.EFF(4," API usage is measured and reported on a daily basis. UTC timestamps are used to determine day boundaries. The usage reported here is not real-time and there may be a lag in how quickly usage data for the current day is reflected in the usage count based chart on the left. The chart below displays your historical daily usage of the API. "),e.k0s()()),2&o){const t=e.XpG();e.R7$(2),e.Y8G("percent",t.latestDailyUsage.usage)("radius",70)("outerStrokeWidth",10)("innerStrokeWidth",10)("space",-10)("outerStrokeColor",t.latestDailyUsage.color)("innerStrokeColor","#e7e8ea")("titleFontSize",32)("subtitleFontSize",12)("showUnits",!0)("unitsFontSize",32)("subtitle",t.latestDailyUsage.date)("title",e.eq3(18,pt,t.latestDailyUsage.usage))("showTitle",!0)("showSubtitle",!0)("animation",!0)("animationDuration",300)("startFromZero",!1)}}function gt(o,s){if(1&o&&(e.j41(0,"div",2),e.nrm(1,"fico-chart",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("data",t.trendData)}}let _t=(()=>{class o{constructor(t){this.accountService=t,this.trendData={},this.selectedKeyValue=null,this.selectedKeyType=null,this.latestDailyUsage=null}ngOnInit(){}ngOnChanges(t){this.selectedKeyValue=t.data.currentValue.key_value,this.selectedKeyType=t.data.currentValue.type.toUpperCase(),this.loadUsage()}loadUsage(){this.latestDailyUsage=null,this.trendData={},this.accountService.getGatewayUsage({key:this.selectedKeyValue,type:this.selectedKeyType}).then(t=>{this.renderUsageTrendChart(t)})}renderUsageTrendChart(t){const i=t.planQuota.limit,n=dt(t.endDate).diff(t.startDate,"days"),r=[];let a=t.startDate,l=0;for(;l<=n;){const u=new g.vh("en-US").transform(a.toString(),"LLL d, yy","UTC");r.push(u),a=new Date(u).getTime()+864e5,l++}const d=[];for(let u=0;u<=n;u++){const m=t.items[u]?t.items[u][0]:0;d.push({y:m,color:m>i/3?m>i/3*2?"#952500":"#c45c01":"#95ae04"})}const p=d[n].y/(t.items[n]?t.items[n][0]+t.items[n][1]:t.planQuota.limit)*100;this.latestDailyUsage={date:`Usage on ${r[n]}`,usage:0===p?0:p.toFixed(2),color:p>100/3?p>100/3*2?"#952500":"#c45c01":"#95ae04"},this.trendData={id:"SCORE-DIST-CHART",chartType:"line",rangeSelector:!0,legendEnabled:!1,drillDownEnabled:!0,yLabelEnabled:!0,xLabelEnabled:!0,series:[{color:"#555555",data:d}],totalRecords:n,categories:r,tooltipOutside:!1,tooltipFormatter:function(){return`<span style="font-size: 10px">Used: ${new g.QX("en-US").transform(this.point.y)}</span><br>\n <span style="font-size: 10px">Remaining: ${new g.QX("en-US").transform(t.items[this.point.x]?t.items[this.point.x][1]:t.planQuota.limit)}</sapn><br>\n <span style="font-size: 10px">Quota: ${new g.QX("en-US").transform(t.items[this.point.x]?this.point.y+t.items[this.point.x][1]:t.planQuota.limit)}</span><br>\n <span style="font-size: 10px">Usage: ${new g.QX("en-US").transform((this.point.y/(this.point.y+(t.items[this.point.x]?t.items[this.point.x][1]:t.planQuota.limit))*100).toFixed(2))}%</span><br>\n <span style="font-size: 10px">Date: ${r[this.point.x]}</sapn>`}}}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["api-usage"]],inputs:{data:"data"},standalone:!1,features:[e.OA$],decls:3,vars:3,consts:[[3,"display"],["class","row",4,"ngIf"],[1,"row"],[2,"width","20%","display","inline-block","vertical-align","middle"],[3,"percent","radius","outerStrokeWidth","innerStrokeWidth","space","outerStrokeColor","innerStrokeColor","titleFontSize","subtitleFontSize","showUnits","unitsFontSize","subtitle","title","showTitle","showSubtitle","animation","animationDuration","startFromZero"],[2,"width","80%","margin","auto"],[3,"data"]],template:function(i,n){1&i&&(e.nrm(0,"loading",0),e.DNE(1,ut,5,20,"div",1)(2,gt,2,1,"div",1)),2&i&&(e.Y8G("display",n.selectedKeyValue&&!(n.latestDailyUsage&&n.trendData)),e.R7$(),e.Y8G("ngIf",n.selectedKeyValue&&n.latestDailyUsage&&n.trendData),e.R7$(),e.Y8G("ngIf",n.selectedKeyValue&&n.latestDailyUsage&&n.trendData))},dependencies:[g.bT,E.q,ht.l,pe.VE],styles:["h3[_ngcontent-%COMP%]{margin-top:0}"]})}}return o}
1)();function ft(o,s){if(1&o){const t=e.RV6();e.qex(0),e.j41(1,"h3")(2,"a",5),e.bIt("click",function(){c.eBV(t);const n=e.XpG();return c.Njj(n.closeEditingPanel())}),e.EFF(3,"API Keys"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"fico-form",6),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG();return c.Njj(r.handleGatewaykeyOutputs(n))}),e.k0s(),e.bVm()}if(2&o){const t=e.XpG();e.R7$(4),e.SpI(" / ",t.editingPanel.name," "),e.R7$(),e.Y8G("formType","gateway-keys")("data",t.editingPanel)}}function mt(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",12)(1,"div")(2,"fico-table-new",13),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG(2);return c.Njj(r.handleEventMessage(n))}),e.k0s()()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.Y8G("data",t.gatewayKeysData)}}function vt(o,s){if(1&o){const t=e.RV6();e.j41(0,"h3"),e.EFF(1,"API Keys"),e.k0s(),e.qex(2),e.j41(3,"div",7)(4,"div",8)(5,"span",9),e.bIt("click",function(){c.eBV(t);const n=e.XpG();return c.Njj(n.openEditingPanel())}),e.k0s()()(),e.bVm(),e.j41(6,"div")(7,"p"),e.EFF(8,"The ISS CRS API delivers the ISS Cyber Risk Score directly to systems in your own environment, making the Score and its supporting data available to you and your users when and where it makes most sense to your workflow."),e.k0s(),e.j41(9,"p"),e.EFF(10,"Access to the ISS CRS API is controlled by API keys. You may create a set of API keys, each of which can be distributed to distinct integration development teams within your organization."),e.k0s(),e.j41(11,"p"),e.EFF(12,"The table below lists each of your organization\u2019s current, active ISS CRS API keys."),e.k0s()(),e.nrm(13,"loading",10),e.DNE(14,mt,3,1,"div",11)}if(2&o){const t=e.XpG();e.R7$(13),e.Y8G("display",!t.gatewayKeysData.data),e.R7$(),e.Y8G("ngIf",!t.editingPanel&&t.gatewayKeysData.data)}}function bt(o,s){if(1&o&&(e.qex(0),e.nrm(1,"api-usage",14),e.bVm()),2&o){const t=e.XpG();e.R7$(),e.Y8G("data",t.usageData)}}let yt=(()=>{class o{constructor(t,i,n){this.accountService=t,this.toasterService=i,this.sessionService=n,this.platformOnly=!1,this.chartModalConfig={},this.chartModalOptions={bodyStyles:{minHeight:"200px",padding:"15px 20px"},headerStyles:{border:"none"},size:"modal-large"},this.confirmModalConfig={},this.confirmModalOptions={footer:!0,footerBtnDisabled:!1,footerBtnLabel:"Ok",title:"Delete Key",size:"modal-small"},this.gatewayKeysData={options:null,data:null,messages:{noResults:"This account has no gateway keys."},emitMessageOnRowClick:!1,emitMessageOnCellClick:!0},this.documentationLink=null,this.editingPanel=null,this.usageData=null,this.gatewayKeysData.options={columnDefs:[{headerName:"Key Name",field:"key_name"},{headerName:"Key Value",field:"key_value",width:400,suppressSizeToFit:!0},{headerName:"Type",field:"type"},{headerName:"Description",field:"description"},{headerName:"Create Date",cellRenderer:function(r){return new g.vh("en-US").transform(r.value,"LLL d, yyyy")},field:"create_date"},{headerName:"Action",colId:"action",cellRenderer:function(){return'<i data-action-type="copy" title="Copy to clipboard" style="cursor:pointer;" class="icon-page-summary"></i> \n <i title="Usage" data-action-type="usage" style="cursor:pointer;" class="icon-page-research"></i> \n <i title="Documentation" data-action-type="documentation" style="cursor:pointer;" class="icon-page-acrobat"></i> \n <i title="Delete" data-action-type="delete" style="cursor:pointer;" class="icon-trash"></i>'}}],defaultColDef:{resizable:!0,sortable:!0,unSortIcon:!0},enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationPageSize:10,suppressMovableColumns:!0,rowHeight:40}}ngOnInit(){var t=this;this.settingsSubcription=this.accountService.lastUpdated.subscribe((0,f.A)(function*(){t.gatewayKeysData.data=null,t.loadGatewayKeysTable()}))}ngOnDestroy(){this.settingsSubcription.unsubscribe()}copyToClipboard(t){if(t){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=t.key_value,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}}handleEventMessage(t){if(t&&t.type&&"ROW-CLICKED"===t.type)switch(t.event.target.getAttribute("data-action-type")){case"delete":this.selectedKeyForDeletion=t.data.key_name,this.confirmModalOptions.footerBtnFn=()=>this.deleteGatewayKey(t.data),this.confirmModalConfig.show();break;case"copy":this.copyToClipboard(t.data);break;case"usage":this.usageData=t.data,this.chartModalConfig.show();break;case"documentation":window.open(`${this.documentationLink}?urls.primaryName=${"Self Assessment / Vendor Management"===t.data.type?encodeURIComponent("Self Assessment/Vendor Management"):t.data.type}`,"_blank")}}openEditingPanel(){const t=[],i=this.sessionService.getSession().subscriptions.some(l=>Number(l.product_id)===w.Y.ESG_API),n=this.sessionService.getSession().subscriptions.some(l=>Number(l.product_id)===w.Y.PLATFORM_API)&&this.sessionService.canAccessWithRoles([x.X.ACCOUNT_ADMIN,x.X.PLATFORM_API_USER,x.X.SYSTEM_ADMIN]),r=this.sessionService.getSession().subscriptions.some(l=>Number(l.product_id)===w.Y.ENTERPRISE_API)&&this.sessionService.canAccessWithRoles([x.X.ACCOUNT_ADMIN,x.X.SYSTEM_ADMIN]),a=this.sessionService.getSession().subscriptions.some(l=>Number(l.product_id)===w.Y.ISS_INTERNAL_API);
1i&&t.push("Insurance API"),n&&t.push("Platform API"),r&&t.push("Enterprise API"),a&&t.push("ISS Internal"),this.editingPanel={name:"Add Key",items:{type:t}}}closeEditingPanel(){this.editingPanel=null,this.loadGatewayKeysTable()}deleteGatewayKey(t){var i=this;return(0,f.A)(function*(){try{200===(yield i.accountService.deleteGatewayKey({key_value:t.key_value})).status&&(i.toasterService.show("success",{message:"The selected API key was successfully deleted."}),i.loadGatewayKeysTable())}catch(n){i.toasterService.show("error",{message:n.error.message})}})()}handleGatewaykeyOutputs(t){var i=this;return(0,f.A)(function*(){try{const n=yield i.accountService.createGatewayKey({key_name:t.data.gateway_key_name,description:t.data.gateway_key_description,type:t.data.type.toUpperCase()});"Success"!==n?i.toasterService.show("error",{message:n.message}):(i.toasterService.show("success",{message:"Your API key was successfully added."}),i.closeEditingPanel())}catch(n){i.toasterService.show("error",{message:n.error.message})}})()}loadGatewayKeysTable(){var t=this;return(0,f.A)(function*(){try{let{keys:i,url:n}=yield t.accountService.getGatewayKeysData();t.platformOnly&&(i=i.filter(r=>r.product_id===w.Y.PLATFORM_API)),t.gatewayKeysData.data=i.map(r=>({key_name:r.name,key_value:r.value,description:r.description,create_date:r.create_date,type:r.product_id===w.Y.PLATFORM_API?"Platform API":[w.Y.ESG_API].includes(r.product_id)?"Insurance API":r.product_id===w.Y.ENTERPRISE_API?"Enterprise API":r.product_id===w.Y.ISS_INTERNAL_API?"ISS Internal":""})),t.documentationLink=n}catch{}})()}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(he.W),e.rXU(k.Q))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["gateway-keys"]],inputs:{platformOnly:"platformOnly"},standalone:!1,decls:14,vars:8,consts:[["mainTemplate",""],[1,"gateway-keys"],[4,"ngIf","ngIfElse"],[3,"configChange","config","options"],[4,"ngIf"],[3,"click"],[3,"outputEvents","formType","data"],[1,"row"],[1,"btn-group","float-end"],["aria-hidden","true",1,"action-icon","set1-add_circle-line",3,"click"],[3,"display"],["class","ag-grid",4,"ngIf"],[1,"ag-grid"],[3,"outputEvents","data"],[3,"data"]],template:function(i,n){if(1&i){const r=e.RV6();e.j41(0,"div",1),e.DNE(1,ft,6,3,"ng-container",2)(2,vt,15,2,"ng-template",null,0,e.C5r),e.k0s(),e.j41(4,"fico-modal",3),e.mxI("configChange",function(l){return c.eBV(r),e.DH7(n.chartModalConfig,l)||(n.chartModalConfig=l),c.Njj(l)}),e.DNE(5,bt,2,1,"ng-container",4),e.k0s(),e.j41(6,"fico-modal",3),e.mxI("configChange",function(l){return c.eBV(r),e.DH7(n.confirmModalConfig,l)||(n.confirmModalConfig=l),c.Njj(l)}),e.j41(7,"p"),e.EFF(8,"Key "),e.j41(9,"b"),e.EFF(10),e.k0s(),e.EFF(11," will be permanently deleted and cannot be recovered."),e.nrm(12,"br"),e.EFF(13,"Are you sure?"),e.k0s()()}if(2&i){const r=e.sdS(3);e.R7$(),e.Y8G("ngIf",n.editingPanel)("ngIfElse",r),e.R7$(3),e.R50("config",n.chartModalConfig),e.Y8G("options",n.chartModalOptions),e.R7$(),e.Y8G("ngIf",n.usageData),e.R7$(),e.R50("config",n.confirmModalConfig),e.Y8G("options",n.confirmModalOptions),e.R7$(4),e.JRh(n.selectedKeyForDeletion)}},dependencies:[g.bT,E.q,G.b,O.p,z.I,_t],styles:["h3[_ngcontent-%COMP%]{margin-top:0}.gateway-keys[_ngcontent-%COMP%]{position:relative}.row[_ngcontent-%COMP%]{position:absolute;right:0;top:0}.ag-grid[_ngcontent-%COMP%]{display:flex;flex-direction:row;background-color:#fff}.ag-grid[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{flex-grow:1;overflow:hidden} .modal-large{width:910px}"]})}}return o})(),St=(()=>{class o{constructor(t){this.accountService=t,this.updatePasswordRequestCompleted=!0}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.passwordData={}})}ngOnDestroy(){this.settingsSubcription.unsubscribe()}updatePassword(t){var i=this;return(0,f.A)(function*(){i.updatePasswordRequestCompleted=!1;try{yield i.accountService.updatePassword({old_password:t.data.old_password,new_password:t.data.new_password})}catch{}finally{i.updatePasswordRequestCompleted=!0}})()}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["password"]],standalone:!1,decls:17,vars:4,consts:[[3,"outputEvents","shouldListenForOutputEventsCompletion","outputEventsCompleted","formType","data"]],template:function(i,n){1&i&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"Password"),e.k0s(),e.j41(3,"span"),e.EFF(4,"Passwords must contain:"),e.k0s(),e.j41(5,"ul")(6,"li"),e.EFF(7,"at least one digit (0-9)"),e.k0s(),e.j41(8,"li"),e.EFF(9,"at least one lowercase character"),e.k0s(),e.j41(10,"li"),e.EFF(11,"at least one uppercase character"),e.k0s(),e.j41(12,"li"),e.EFF(13,"at least one special character"),e.k0s(),e.j41(14,"li"),e.EFF(15,"and be between 8 and 40 characters long"),e.k0s()(),e.j41(16,"fico-form",0),e.bIt("outputEvents",function(a){return n.updatePassword(a)}),e.k0s()()),2&i&&(e.R7$(16),e.Y8G("shouldListenForOutputEventsCompletion",!0)("outputEventsCompleted",n.updatePasswordRequestCompleted)("formType","password")("data",n.passwordData))},dependencies:[G.b],styles:["h3[_ngcontent-%COMP%]{margin-top:0}"]})}}return o}
1)();var Ct=h(97338),ue=h(31635),S=h(17705),Dt=h(72806);const wt=["*"];function Et(o,s){if(1&o){const t=e.RV6();e.j41(0,"button",2),e.bIt("click",function(){c.eBV(t);const n=e.XpG(2);return c.Njj(n.close())}),e.j41(1,"span",3),e.EFF(2,"\xd7"),e.k0s(),e.j41(3,"span",4),e.EFF(4,"Close"),e.k0s()()}}function Rt(o,s){if(1&o&&(e.j41(0,"div",1),e.DNE(1,Et,5,0,"ng-template",0),e.SdG(2),e.k0s()),2&o){const t=e.XpG();e.HbH("alert alert-"+t.type),e.Y8G("ngClass",t.classes),e.R7$(),e.Y8G("ngIf",t.dismissible)}}let It=(()=>{class o{constructor(){this.type="warning",this.dismissible=!1,this.dismissOnTimeout=void 0}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=c.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),ge=(()=>{class o{constructor(t,i){this.changeDetection=i,this.type="warning",this.dismissible=!1,this.isOpen=!0,this.onClose=new e.bkB,this.onClosed=new e.bkB,this.classes="",this.dismissibleChange=new e.bkB,Object.assign(this,t),this.dismissibleChange.subscribe(()=>{this.classes=this.dismissible?"alert-dismissible":"",this.changeDetection.markForCheck()})}ngOnInit(){this.dismissOnTimeout&&setTimeout(()=>this.close(),parseInt(this.dismissOnTimeout,10))}close(){this.isOpen&&(this.onClose.emit(this),this.isOpen=!1,this.changeDetection.markForCheck(),this.onClosed.emit(this))}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(It),e.rXU(S.gRc))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["alert"],["bs-alert"]],inputs:{type:"type",dismissible:"dismissible",dismissOnTimeout:"dismissOnTimeout",isOpen:"isOpen"},outputs:{onClose:"onClose",onClosed:"onClosed"},ngContentSelectors:wt,decls:1,vars:1,consts:[[3,"ngIf"],["role","alert",3,"ngClass"],["type","button","aria-label","Close",1,"close","btn-close",3,"click"],["aria-hidden","true",1,"visually-hidden"],[1,"sr-only","visually-hidden"]],template:function(i,n){1&i&&(e.NAR(),e.DNE(0,Rt,3,4,"ng-template",0)),2&i&&e.Y8G("ngIf",n.isOpen)},dependencies:[g.bT,g.YU],encapsulation:2,changeDetection:0})}}return(0,ue.Cg)([(0,Dt.Yr)(),(0,ue.Sn)("design:type",Object)],o.prototype,"dismissible",void 0),o})(),Pt=(()=>{class o{static forRoot(){return{ngModule:o,providers:[]}}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275mod=e.$C({type:o})}static{this.\u0275inj=c.G2t({})}}return o})();function xt(o,s){if(1&o&&(e.j41(0,"alert",8),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.alertMsg)}}function Tt(o,s){1&o&&(e.j41(0,"h3"),e.EFF(1,"Score Alerts"),e.k0s())}function kt(o,s){if(1&o){const t=e.RV6();e.j41(0,"h3")(1,"a",9),e.bIt("click",function(){c.eBV(t);const n=e.XpG();return c.Njj(n.closeEditingPanel())}),e.EFF(2,"Score Alerts"),e.k0s(),e.EFF(3),e.k0s()}if(2&o){const t=e.XpG();e.R7$(3),e.SpI(" / ",t.selectedScoreAlert.name,"\n")}}function Ft(o,s){if(1&o){const t=e.RV6();e.j41(0,"span",10),e.bIt("click",function(){c.eBV(t);const n=e.XpG();return c.Njj(n.openEditingPanel())}),e.k0s()}}function At(o,s){1&o&&(e.j41(0,"p"),e.EFF(1," The table below lists various score alerts configurations associated with your account.\n"),e.k0s())}function Mt(o,s){if(1&o){const t=e.RV6();e.j41(0,"fico-table-new",11),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG();return c.Njj(r.handleEventMessage(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("data",t.scoreAlertsData)}}function Ot(o,s){if(1&o){const t=e.RV6();e.j41(0,"fico-form",12),e.bIt("outputEvents",function(n){c.eBV(t);const r=e.XpG();return c.Njj(r.handleScoreAlertsOutputs(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("formType","score-alerts")("data",t.selectedScoreAlert)}}let Gt=(()=>{class o{constructor(t,i){this.accountService=t,this.sessionService=i,this.scoreAlertsData={options:null,data:null,messages:{noResults:"This account has no score alerts."},emitMessageOnRowClick:!0},this.portfolios=[],this.profiles=[],this.selectedScoreAlert=null,this.alertMsg=null,this.operatorsMap={"is equal to":"==","is not equal to":"!=","is greater than":">","is greater than or equal to":">=","is less than":"<","is less than or equal to":"<="},this.scoreAlertsData.options={defaultColDef:{resizable:!0,sortable:!0,unSortIcon:!0},pagination:!0,paginationPageSize:10,suppressMovableColumns:!0,rowHeight:40,columnDefs:[{headerName:"Alert Name",field:"config_name",comparator:H},{headerName:"Scope",field:"config_scope",cellRenderer:function(n){return"Account"===n.data.scope?`${n.data.scope} Wide`:n.data.config_scope&&n.data.config_scope.data?`${n.data.scope}: ${n.data.config_scope.data.map(r=>r.value).join(", ")}`:void 0},comparator:(n,r)=>n.level.localeCompare(r.level)},{headerName:"Created By",field:"created_by"},{headerName:"Create Date",headerClass:"header_center",cellRenderer:function(n){return new g.vh("en-US").transform(n.value,"LLL d, yyyy")},cellStyle:{"text-align":"center"},field:"create_date"}]}}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.scoreAlertsData.data=null,this.loadScoreAlertsTable(),this.loadPortfolios(),this.loadProfiles()})}ngOnDestroy(){this.settingsSubcription.unsubscribe()}loadScoreAlertsTable(){this.accountService.getScoreAlertsData().then(t=>{this.scoreAlertsData.data=t})}loadProfiles(){this.accountService.getProfiles().then(t=>{this.profiles=t})}loadPortfolios(){this.accountService.getPortfolios().then(t=>{this.portfolios=t})}closeEditingPanel(){this.alertMsg=null,this.selectedScoreAlert=null,this.loadScoreAlertsTable()}openEditingPanel(){this.selectedScoreAlert={items:{portfolios:this.portfolios.map(t=>t.value),profiles:this.profiles.map(t=>t.value)},active:!0,scope:"Account",name:"Add Score Alert",first_select_account:"score point change",second_select:"none"}}handleEventMessage(t){t&&t.type&&"ROW-CLICKED"===t.type&&(this.selectedScoreAlert={items:{portfolios:this.portfolios.map(i=>i.value),profiles:this.profiles.map(i=>i.value)},id:t.data.config_id,active:t.data.active,scope:t.data.scope,name:t.data.config_name,delete_name:t.data.config_name,config_name:t.data.config_name},("Portfolio"===t.data.scope||"Profile"===t.data.scope)&&t.data.config_scope&&t.data.config_scope.data&&(this.selectedScoreAlert[`${t.data.scope.toLowerCase()}s`]=t.data.config_scope.data.map(i=>i.value)),this.selectedScoreAlert[`first_select_${t.data.scope.toLowerCase()}`]=t.data.config_conditions[0].unit,this.selectedScoreAlert.first_operator=Object.keys(this.operatorsMap).find(i=>this.operatorsMap[i]===t.data.config_conditions[0].operator),this.selectedScoreAlert.first_points=t.data.config_conditions[0].value,2===t.data.config_conditions.length?(this.selectedScoreAlert.second_select=t.data.config_conditions[1].unit,this.selectedScoreAlert.second_operator=Object.keys(this.operatorsMap).find(i=>this.operatorsMap[i]===t.data.config_conditions[1].operator),this.selectedScoreAlert.second_points=t.data.config_conditions[1].value):1===t.data.config_conditions.length&&(this.selectedScoreAlert.second_select="none"))}handleScoreAlertsOutputs(t){this.alertMsg=null;const i=this.normalizedFormData(t);
1i&&("add"===t.type?this.addScoreAlert(i):"edit"===t.type?this.editScoreAlert(i):"delete"===t.type&&this.deleteScoreAlert(i))}addScoreAlert(t){var i=this;return(0,f.A)(function*(){yield i.accountService.addScoreAlert(t),i.closeEditingPanel()})()}editScoreAlert(t){var i=this;return(0,f.A)(function*(){yield i.accountService.editScoreAlert(t),i.closeEditingPanel()})()}deleteScoreAlert(t){var i=this;return(0,f.A)(function*(){yield i.accountService.deleteScoreAlert(t),i.closeEditingPanel()})()}normalizedFormData(t){if("delete"===t.type)return{alertId:t.id};let i={};const n=[],r=t.data.scope.toLowerCase();if("profile"===r||"portfolio"===r){if(!t.data[`${r}s`]||0===t.data[`${r}s`].length)return this.alertMsg=`${t.data.scope}s cannot be blank!`,null;i[`${r}_id`]=[],t.data[`${r}s`].forEach(a=>{i[`${r}_id`].push(("profile"===r?this.profiles:this.portfolios).find(l=>l.value===a).id)})}else"account"===r&&(i=null);return t.data[`first_select_${r}`]?(n.push({operator:this.operatorsMap[t.data.first_operator],unit:t.data[`first_select_${r}`],value:t.data.first_points}),"none"!==t.data.second_select&&t.data.second_operator&&t.data.second_points&&n.push({operator:this.operatorsMap[t.data.second_operator],unit:t.data.second_select,value:t.data.second_points}),{alertConditions:JSON.stringify(n),alertName:t.data.config_name,alertId:"edit"===t.type?t.id:Ct.Y.PROFILE_SCORE_CHANGE_EVENT_ID,alertScope:i,alertStatus:!0===t.data.active&&null}):(this.alertMsg="All alert conditional inputs are required.",null)}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(k.Q))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["score-alerts"]],standalone:!1,decls:10,vars:8,consts:[["type","danger",4,"ngIf"],[4,"ngIf"],["class","row action-icon set1-add_circle-line float-end","aria-hidden","true",3,"click",4,"ngIf"],[3,"display"],[2,"display","flex","flex-direction","row"],[2,"overflow","hidden","flex-grow","1"],[3,"data","outputEvents",4,"ngIf"],[3,"formType","data","outputEvents",4,"ngIf"],["type","danger"],[3,"click"],["aria-hidden","true",1,"row","action-icon","set1-add_circle-line","float-end",3,"click"],[3,"outputEvents","data"],[3,"outputEvents","formType","data"]],template:function(i,n){1&i&&(e.DNE(0,xt,2,1,"alert",0)(1,Tt,2,0,"h3",1)(2,kt,4,1,"h3",1)(3,Ft,1,0,"span",2)(4,At,2,0,"p",1),e.nrm(5,"loading",3),e.j41(6,"div",4)(7,"div",5),e.DNE(8,Mt,1,1,"fico-table-new",6),e.k0s()(),e.DNE(9,Ot,1,2,"fico-form",7)),2&i&&(e.Y8G("ngIf",n.alertMsg),e.R7$(),e.Y8G("ngIf",!n.selectedScoreAlert),e.R7$(),e.Y8G("ngIf",n.selectedScoreAlert),e.R7$(),e.Y8G("ngIf",!n.sessionService.isPSEUser()&&!n.selectedScoreAlert),e.R7$(),e.Y8G("ngIf",!n.selectedScoreAlert),e.R7$(),e.Y8G("display",!n.scoreAlertsData.data),e.R7$(3),e.Y8G("ngIf",!n.selectedScoreAlert&&n.scoreAlertsData.data),e.R7$(),e.Y8G("ngIf",n.selectedScoreAlert))},dependencies:[g.bT,E.q,G.b,O.p,ge],styles:["h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{margin-top:-30px;padding-right:14px;margin-bottom:10px} score-alerts .ag-theme-balham .ag-row:hover{cursor:pointer;background-color:#f2f2f2}"]})}}return o})();var _e=h(69966),fe=h(93101),_=h(21413),N=h(18359),Nt=h(43236),jt=h(41584),$t=h(30536),me=h(71985),W=h(57786),Xt=h(84412),T=h(44522),ve=h(95735),R=h(67847),B=h(56977),Ut=h(96354),Vt=h(96697),Bt=h(88141),Yt=h(25558),be=h(99172),Ht=h(88968),Q=h(65478),ye=h(61577),zt=h(89726),Wt=h(80408);function K(o){const s=o.cloneNode(!0),t=s.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();s.removeAttribute("id");for(let n=0;n<t.length;n++)t[n].removeAttribute("id");return"canvas"===i?De(o,s):("input"===i||"select"===i||"textarea"===i)&&Ce(o,s),Se("canvas",o,s,De),Se("input, textarea, select",o,s,Ce),s}function Se(o,s,t,i){const n=s.querySelectorAll(o);if(n.length){const r=t.querySelectorAll(o);for(let a=0;a<n.length;a++)i(n[a],r[a])}}let Qt=0;function Ce(o,s){"file"!==s.type&&(s.value=o.value),"radio"===s.type&&s.name&&(s.name=`mat-clone-${s.name}-${Qt++}`)}function De(o,s){const t=s.getContext("2d");if(t)try{t.drawImage(o,0,0)}catch{}}function q(o){const s=o.getBoundingClientRect();return{top:s.top,right:s.right,bottom:s.bottom,left:s.left,width:s.width,height:s.height,x:s.x,y:s.y}}function Z(o,s,t){const{top:i,bottom:n,left:r,right:a}=o;return t>=i&&t<=n&&s>=r&&s<=a}function j(o,s,t){o.top+=s,o.bottom=o.top+o.height,o.left+=t,o.right=o.left+o.width}
1function we(o,s,t,i){const{top:n,right:r,bottom:a,left:l,width:d,height:p}=o,u=d*s,m=p*s;return i>n-m&&i<a+m&&t>l-u&&t<r+u}class Ee{_document;positions=new Map;constructor(s){this._document=s}clear(){this.positions.clear()}cache(s){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),s.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:q(t)})})}handleScroll(s){const t=(0,T.Fb)(s),i=this.positions.get(t);if(!i)return null;const n=i.scrollPosition;let r,a;if(t===this._document){const p=this.getViewportScrollPosition();r=p.top,a=p.left}else r=t.scrollTop,a=t.scrollLeft;const l=n.top-r,d=n.left-a;return this.positions.forEach((p,u)=>{p.clientRect&&t!==u&&t.contains(u)&&j(p.clientRect,l,d)}),n.top=r,n.left=a,{top:l,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function Re(o,s){const t=o.rootNodes;if(1===t.length&&t[0].nodeType===s.ELEMENT_NODE)return t[0];const i=s.createElement("div");return t.forEach(n=>i.appendChild(n)),i}function J(o,s,t){for(let i in s)if(s.hasOwnProperty(i)){const n=s[i];n?o.setProperty(i,n,t?.has(i)?"important":""):o.removeProperty(i)}return o}function F(o,s){const t=s?"":"none";J(o.style,{"touch-action":s?"":"none","-webkit-user-drag":s?"":"none","-webkit-tap-highlight-color":s?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Ie(o,s,t){J(o.style,{position:s?"":"fixed",top:s?"":"0",opacity:s?"":"0",left:s?"":"-999em"},t)}function Y(o,s){return s&&"none"!=s?o+" "+s:o}function Pe(o,s){o.style.width=`${s.width}px`,o.style.height=`${s.height}px`,o.style.transform=L(s.left,s.top)}function L(o,s){return`translate3d(${Math.round(o)}px, ${Math.round(s)}px, 0)`}function xe(o){const s=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*s}function ee(o,s){return o.getPropertyValue(s).split(",").map(i=>i.trim())}const Zt=new Set(["position"]);class Jt{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(s,t,i,n,r,a,l,d,p,u){this._document=s,this._rootElement=t,this._direction=i,this._initialDomRect=n,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=l,this._initialTransform=d,this._zIndex=p,this._renderer=u}attach(s){this._preview=this._createPreview(),s.appendChild(this._preview),Te(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(s){this._preview.style.transform=s}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(s){this._preview.classList.add(s)}getTransitionDuration(){return function qt(o){const s=getComputedStyle(o),t=ee(s,"transition-property"),i=t.find(l=>"transform"===l||"all"===l);if(!i)return 0;const n=t.indexOf(i),r=ee(s,"transition-duration"),a=ee(s,"transition-delay");return xe(r[n])+xe(a[n])}(this._preview)}addEventListener(s,t){return this._renderer.listen(this._preview,s,t)}_createPreview(){const s=this._previewTemplate,t=this._previewClass,i=s?s.template:null;let n;if(i&&s){const r=s.matchSize?this._initialDomRect:null,a=s.viewContainer.createEmbeddedView(i,s.context);a.detectChanges(),n=Re(a,this._document),this._previewEmbeddedView=a,s.matchSize?Pe(n,r):n.style.transform=L(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=K(this._rootElement),Pe(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return J(n.style,{"pointer-events":"none",margin:Te(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Zt),F(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>n.classList.add(r)):n.classList.add(t)),n}}function Te(o){return"showPopover"in o}const ei={passive:!0},ke={passive:!1},ti={passive:!1,capture:!0},Fe="cdk-drag-placeholder",Ae=new Set(["position"]);
1class ni{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=(0,c.vPA)(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _.B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=N.yU.EMPTY;_pointerUpSubscription=N.yU.EMPTY;_scrollSubscription=N.yU.EMPTY;_resizeSubscription=N.yU.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(s){s!==this._disabled&&(this._disabled=s,this._toggleNativeDragInteractions(),this._handles.forEach(t=>F(t,s)))}_disabled=!1;beforeStarted=new _.B;started=new _.B;released=new _.B;ended=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;moved=this._moveEvents;data;constrainPosition;constructor(s,t,i,n,r,a,l){this._config=t,this._document=i,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=l,this.withRootElement(s).withParent(t.parentDragRef||null),this._parentPositions=new Ee(i),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(s){this._handles=s.map(i=>(0,R.i8)(i)),this._handles.forEach(i=>F(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(s){return this._previewTemplate=s,this}withPlaceholderTemplate(s){return this._placeholderTemplate=s,this}withRootElement(s){const t=(0,R.i8)(s);if(t!==this._rootElement){this._removeRootElementListeners();const i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,ke),i.listen(t,"touchstart",this._pointerDown,ei),i.listen(t,"dragstart",this._nativeDragStart,ke)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(s){return this._boundaryElement=s?(0,R.i8)(s):null,this._resizeSubscription.unsubscribe(),s&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(s){return this._parentDragRef=s,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&function Kt(o,s){return s.left<o.left||s.left+s.width>o.right||s.top<o.top||s.top+s.height>o.bottom}(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){const s=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect();let i=0,n=0;t.left<s.left?i=s.left-t.left:t.right>s.right&&(i=s.right-t.right),t.top<s.top?n=s.top-t.top:t.bottom>s.bottom&&(n=s.bottom-t.bottom);let l=this._activeTransform.x+i,d=this._activeTransform.y+n;this._rootElement.style.transform=L(l,d),this._activeTransform={x:l,y:d},this._passiveTransform={x:l,y:d}}}disableHandle(s){!this._disabledHandles.has(s)&&this._handles.indexOf(s)>-1&&(this._disabledHandles.add(s),F(s,!0))}enableHandle(s){this._disabledHandles.has(s)&&(this._disabledHandles.delete(s),F(s,this.disabled))}withDirection(s){return this._direction=s,this}_withDropContainer(s){this._dropContainer=s}getFreeDragPosition(){const s=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:s.x,y:s.y}}setFreeDragPosition(s){return this._activeTransform={x:0,y:0},this._passiveTransform.x=s.x,this._passiveTransform.y=s.y,this._dropContainer||this._applyRootElementTransform(s.x,s.y),this}withPreviewContainer(s){return this._previewContainer=s,this}_sortFromLastPointerPosition(){const s=this._lastKnownPointerPosition;s&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(s),s)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}
1_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=s=>{if(this.beforeStarted.next(),this._handles.length){const t=this._getTargetHandle(s);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,s)}else this.disabled||this._initializeDragSequence(this._rootElement,s)};_pointerMove=s=>{const t=this._getPointerPositionOnPage(s);if(!this._hasStartedDragging()){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const l=Date.now()>=this._dragStartTime+this._getDragStartDelay(s),d=this._dropContainer;if(!l)return void this._endDragSequence(s);(!d||!d.isDragging()&&!d.isReceiving())&&(s.cancelable&&s.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(s)))}return}s.cancelable&&s.preventDefault();const i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{const n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-n.x+this._passiveTransform.x,r.y=i.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:s,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=s=>{this._endDragSequence(s)};_endDragSequence(s){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging()))if(this.released.next({source:this,event:s}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(s),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(s);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:s})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(s){$(s)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",si,ti)}),i){const n=this._rootElement,r=n.parentNode,a=this._placeholder=this._createPlaceholderElement(),l=this._marker=this._marker||this._document.createComment("");r.insertBefore(l,n),this._initialTransform=n.style.transform||"",this._preview=new Jt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),Ie(n,!1,Ae),this._document.body.appendChild(r.replaceChild(a,n)),this.started.next({source:this,event:s}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:s}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(s,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),n=$(t),r=!n&&0!==t.button,a=this._rootElement,l=(0,T.Fb)(t),d=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),p=n?(0,ve.w)(t):(0,ve._)(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),i||r||d||p)return;if(this._handles.length){const P=a.style;this._rootElementTapHighlight=P.webkitTapHighlightColor||"",P.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(P=>this._updateOnScroll(P)),this._boundaryElement&&(this._boundaryRect=q(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,s,t);const m=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0}
1,this._pointerPositionAtLastDirectionChange={x:m.x,y:m.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(s){Ie(this._rootElement,!0,Ae),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),n=this._getPointerPositionOnPage(s),r=this._getDragDistance(n),a=t._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:r,dropPoint:n,event:s}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:n,event:s}),t.drop(this,i,this._initialIndex,this._initialContainer,a,r,n,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:s,y:t},{x:i,y:n}){let r=this._initialContainer._getSiblingContainerFromPosition(this,s,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(s,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{const a=this._dropContainer.getItemIndex(this),l=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,l),this._dropContainer=r,this._dropContainer.enter(this,s,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,s,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(s,t):this._applyPreviewTransform(s-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const s=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(s.left,s.top);const t=this._preview.getTransitionDuration();return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const n=l=>{(!l||this._preview&&(0,T.Fb)(l)===this._preview.element&&"transform"===l.propertyName)&&(a(),i(),clearTimeout(r))},r=setTimeout(n,1.5*t),a=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){const s=this._placeholderTemplate,t=s?s.template:null;let i;return t?(this._placeholderRef=s.viewContainer.createEmbeddedView(t,s.context),this._placeholderRef.detectChanges(),i=Re(this._placeholderRef,this._document)):i=K(this._rootElement),i.style.pointerEvents="none",i.classList.add(Fe),i}_getPointerPositionInElement(s,t,i){const n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():s,a=$(i)?i.targetTouches[0]:i,l=this._getViewportScrollPosition();return{x:r.left-s.left+(a.pageX-r.left-l.left),y:r.top-s.top+(a.pageY-r.top-l.top)}}_getPointerPositionOnPage(s){const t=this._getViewportScrollPosition(),i=$(s)?s.touches[0]||s.changedTouches[0]||{pageX:0,pageY:0}:s,n=i.pageX-t.left,r=i.pageY-t.top;if(this._ownerSVGElement){const a=this._ownerSVGElement.getScreenCTM();if(a){const l=this._ownerSVGElement.createSVGPoint();return l.x=n,l.y=r,l.matrixTransform(a.inverse())}}return{x:n,y:r}}_getConstrainedPointerPosition(s){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:n}=this.constrainPosition?this.constrainPosition(s,this,this._initialDomRect,this._pickupPositionInElement):s;if("x"===this.lockAxis||"x"===t?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,l=this._boundaryRect,{width:d,height:p}=this._getPreviewRect(),u=l.top+a,m=l.bottom-(p-a);i=Me(i,l.left+r,l.right-(d-r)),n=Me(n,u,m)}return{x:i,y:n}}_updatePointerDirectionDelta(s){const{x:t,y:i}=s,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(t-r.x),l=Math.abs(i-r.y);return a>this._config.pointerDirectionChangeThreshold&&(n.x=t>r.x?1:-1,r.x=t),l>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const s=this._handles.length>0||!this.isDragging();s!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=s,F(this._rootElement,s))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(s=>s()),this._rootElementCleanups=void 0}_applyRootElementTransform(s,t){const i=1/this.scale,n=L(s*i,t*i),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Y(n,this._initialTransform)}_applyPreviewTransform(s,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,n=L(s,t);this._preview.setTransform(Y(n,i))}_getDragDistance(s){const t=this._pickupPositionOnPage;return t?{x:s.x-t.x,y:s.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:s,y:t}=this._passiveTransform;if(0===s&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(0===n.width&&0===n.height||0===i.width&&0===i.height)return;const r=n.left-i.left,a=i.right-n.right,l=n.top-i.top,d=i.bottom-n.bottom;n.width>i.width?(r>0&&(s+=r),a>0&&(s-=a)):s=0,n.height>i.height?(l>0&&(t+=l),d>0&&(t-=d)):t=0,(s!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:s})}_getDragStartDelay(s){const t=this.dragStartDelay;return"number"==typeof t?t:$(s)?t.touch:t?t.mouse:0}_updateOnScroll(s){const t=this._parentPositions.handleScroll(s);if(t){const i=(0,T.Fb)(s);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&j(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,T.KT)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(s,t){const i=this._previewContainer||"global";if("parent"===i)return s;if("global"===i){const n=this._document;return t||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return(0,R.i8)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=s=>{if(this._handles.length){const t=this._getTargetHandle(s);t&&!this._disabledHandles.has(t)&&!this.disabled&&s.preventDefault()}else this.disabled||s.preventDefault()};_getTargetHandle(s){return this._handles.find(t=>s.target&&(s.target===t||t.contains(s.target)))}_conditionallyInsertAnchor(s,t,i){if(s===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){const n=this._anchor??=K(this._placeholder);n.classList.remove(Fe),n.classList.add("cdk-drag-anchor"),n.style.transform="",i?i.before(n):(0,R.i8)(t.element).appendChild(n)}}}function Me(o,s,t){return Math.max(s,Math.min(t,o))}function $(o){return"t"===o.type[0]}function si(o){o.preventDefault()}function te(o,s,t){const i=X(s,o.length-1),n=X(t,o.length-1);if(i===n)return;const r=o[i],a=n<i?-1:1;for(let l=i;l!==n;l+=a)o[l]=o[l+a];o[n]=r}function X(o,s){return Math.max(0,Math.min(s,o))}class Oe{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(s){this._dragDropRegistry=s}_previousSwap={drag:null,delta:0,overlaps:!1};start(s){this.withItems(s)}sort(s,t,i,n){const r=this._itemPositions,a=this._getItemIndexFromPointerPosition(s,t,i,n);if(-1===a&&r.length>0)return null;const l="horizontal"===this.orientation,d=r.findIndex(D=>D.drag===s),p=r[a],m=p.clientRect,P=d>a?1:-1,ae=this._getItemOffsetPx(r[d].clientRect,m,P),bn=this._getSiblingOffsetPx(d,r,P),yn=r.slice();return te(r,d,a),r.forEach((D,Sn)=>
1{if(yn[Sn]===D)return;const ze=D.drag===s,le=ze?ae:bn,We=ze?s.getPlaceholderElement():D.drag.getRootElement();D.offset+=le;const Qe=Math.round(D.offset*(1/D.drag.scale));l?(We.style.transform=Y(`translate3d(${Qe}px, 0, 0)`,D.initialTransform),j(D.clientRect,0,le)):(We.style.transform=Y(`translate3d(0, ${Qe}px, 0)`,D.initialTransform),j(D.clientRect,le,0))}),this._previousSwap.overlaps=Z(m,t,i),this._previousSwap.drag=p.drag,this._previousSwap.delta=l?n.x:n.y,{previousIndex:d,currentIndex:a}}enter(s,t,i,n){const r=null==n||n<0?this._getItemIndexFromPointerPosition(s,t,i):n,a=this._activeDraggables,l=a.indexOf(s),d=s.getPlaceholderElement();let p=a[r];if(p===s&&(p=a[r+1]),!p&&(null==r||-1===r||r<a.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(p=a[0]),l>-1&&a.splice(l,1),p&&!this._dragDropRegistry.isDragging(p)){const u=p.getRootElement();u.parentElement.insertBefore(d,u),a.splice(r,0,s)}else this._element.appendChild(d),a.push(s);d.style.transform="",this._cacheItemPositions()}withItems(s){this._activeDraggables=s.slice(),this._cacheItemPositions()}withSortPredicate(s){this._sortPredicate=s}reset(){this._activeDraggables?.forEach(s=>{const t=s.getRootElement();if(t){const i=this._itemPositions.find(n=>n.drag===s)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(s){return this._getVisualItemPositions().findIndex(t=>t.drag===s)}getItemAtIndex(s){return this._getVisualItemPositions()[s]?.drag||null}updateOnScroll(s,t){this._itemPositions.forEach(({clientRect:i})=>{j(i,s,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(s){this._element=s}_cacheItemPositions(){const s="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:q(i)}}).sort((t,i)=>s?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return"horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(s,t,i){const n="horizontal"===this.orientation;let r=n?t.left-s.left:t.top-s.top;return-1===i&&(r+=n?t.width-s.width:t.height-s.height),r}_getSiblingOffsetPx(s,t,i){const n="horizontal"===this.orientation,r=t[s].clientRect,a=t[s+-1*i];let l=r[n?"width":"height"]*i;if(a){const d=n?"left":"top",p=n?"right":"bottom";-1===i?l-=a.clientRect[d]-r[p]:l+=r[d]-a.clientRect[p]}return l}_shouldEnterAsFirstChild(s,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,n="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const a=i[i.length-1].clientRect;return n?s>=a.right:t>=a.bottom}{const a=i[0].clientRect;return n?s<=a.left:t<=a.top}}_getItemIndexFromPointerPosition(s,t,i,n){const r="horizontal"===this.orientation,a=this._itemPositions.findIndex(({drag:l,clientRect:d})=>l!==s&&((!n||l!==this._previousSwap.drag||!this._previousSwap.overlaps||(r?n.x:n.y)!==this._previousSwap.delta)&&(r?t>=Math.floor(d.left)&&t<Math.floor(d.right):i>=Math.floor(d.top)&&i<Math.floor(d.bottom))));return-1!==a&&this._sortPredicate(a,s)?a:-1}}class oi{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(s,t){this._document=s,this._dragDropRegistry=t}start(s){const t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){const n=t[i];this._relatedNodes.push([n,n.nextSibling])}this.withItems(s)}sort(s,t,i,n){const r=this._getItemIndexFromPointerPosition(s,t,i),a=this._previousSwap;if(-1===r||this._activeItems[r]===s)return null;const l=this._activeItems[r];if(a.drag===l&&a.overlaps&&a.deltaX===n.x&&a.deltaY===n.y)return null;const d=this.getItemIndex(s),p=s.getPlaceholderElement(),u=l.getRootElement();r>d?u.after(p):u.before(p),te(this._activeItems,d,r);const m=this._getRootNode().elementFromPoint(t,i);return a.deltaX=n.x,a.deltaY=n.y,a.drag=l,a.overlaps=u===m||u.contains(m),{previousIndex:d,currentIndex:r}}enter(s,t,i,n){const r=this._activeItems.indexOf(s);r>-1&&this._activeItems.splice(r,1);let a=null==n||n<0?this._getItemIndexFromPointerPosition(s,t,i):n;-1===a&&(a=this._getClosestItemIndexToPointer(s,t,i));const l=this._activeItems[a];l&&!this._dragDropRegistry.isDragging(l)?(this._activeItems.splice(a,0,s),l.getRootElement().before(s.getPlaceholderElement())):(this._activeItems.push(s),this._element.appendChild(s.getPlaceholderElement()))}withItems(s){this._activeItems=s.slice()}withSortPredicate(s){this._sortPredicate=s}reset(){const s=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){const[n,r]=this._relatedNodes[i];n.parentNode===s&&n.nextSibling!==r&&(null===r?s.appendChild(n):r.parentNode===s&&s.insertBefore(n,r))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(s){return this._activeItems.indexOf(s)}getItemAtIndex(s){return this._activeItems[s]||null}
1updateOnScroll(){this._activeItems.forEach(s=>{this._dragDropRegistry.isDragging(s)&&s._sortFromLastPointerPosition()})}withElementContainer(s){s!==this._element&&(this._element=s,this._rootNode=void 0)}_getItemIndexFromPointerPosition(s,t,i){const n=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),r=n?this._activeItems.findIndex(a=>{const l=a.getRootElement();return n===l||l.contains(n)}):-1;return-1!==r&&this._sortPredicate(r,s)?r:-1}_getRootNode(){return this._rootNode||(this._rootNode=(0,T.KT)(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(s,t,i){if(0===this._activeItems.length)return-1;if(1===this._activeItems.length)return 0;let n=1/0,r=-1;for(let a=0;a<this._activeItems.length;a++){const l=this._activeItems[a];if(l!==s){const{x:d,y:p}=l.getRootElement().getBoundingClientRect(),u=Math.hypot(t-d,i-p);u<n&&(n=u,r=a)}}return r}}var C=function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o}(C||{}),v=function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o}(v||{});class ri{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;sorted=new _.B;receivingStarted=new _.B;receivingStopped=new _.B;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=N.yU.EMPTY;_verticalScrollDirection=C.NONE;_horizontalScrollDirection=v.NONE;_scrollNode;_stopScrollTimers=new _.B;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(s,t,i,n,r){this._dragDropRegistry=t,this._ngZone=n,this._viewportRuler=r;const a=this.element=(0,R.i8)(s);this._document=i,this.withOrientation("vertical").withElementContainer(a),t.registerDropContainer(this),this._parentPositions=new Ee(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(s,t,i,n){this._draggingStarted(),null==n&&this.sortingDisabled&&(n=this._draggables.indexOf(s)),this._sortStrategy.enter(s,t,i,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:s,container:this,currentIndex:this.getItemIndex(s)})}exit(s){this._reset(),this.exited.next({item:s,container:this})}drop(s,t,i,n,r,a,l,d={}){this._reset(),this.dropped.next({item:s,currentIndex:t,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:r,distance:a,dropPoint:l,event:d})}withItems(s){const t=this._draggables;return this._draggables=s,s.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>-1===s.indexOf(n))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(s){return this._direction=s,this._sortStrategy instanceof Oe&&(this._sortStrategy.direction=s),this}connectedTo(s){return this._siblings=s.slice(),this}withOrientation(s){if("mixed"===s)this._sortStrategy=new oi(this._document,this._dragDropRegistry);else{const t=new Oe(this._dragDropRegistry);t.direction=this._direction,t.orientation=s,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(s){const t=this._container;return this._scrollableElements=-1===s.indexOf(t)?[t,...s]:s.slice(),this}withElementContainer(s){if(s===this._container)return this;(0,R.i8)(this.element);const i=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(s);return i>-1&&this._scrollableElements.splice(i,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(s),this._cachedShadowRoot=null,this._scrollableElements.unshift(s),this._container=s,this}getScrollableParents(){return this._scrollableElements}getItemIndex(s){return this._isDragging?this._sortStrategy.getItemIndex(s):this._draggables.indexOf(s)}getItemAtIndex(s){return this._isDragging?this._sortStrategy.getItemAtIndex(s):this._draggables[s]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(s,t,i,n){if(this.sortingDisabled||!this._domRect||!we(this._domRect,.05,t,i))return;const r=this._sortStrategy.sort(s,t,i,n);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:s})}_startScrollingIfNecessary(s,t){if(this.autoScrollDisabled)return;let i,n=C.NONE,r=v.NONE;if(this._parentPositions.positions.forEach((a,l)=>
1{l===this._document||!a.clientRect||i||we(a.clientRect,.05,s,t)&&([n,r]=function ai(o,s,t,i,n){const r=je(s,n),a=Le(s,i);let l=C.NONE,d=v.NONE;if(r){const p=o.scrollTop;r===C.UP?p>0&&(l=C.UP):o.scrollHeight-p>o.clientHeight&&(l=C.DOWN)}if(a){const p=o.scrollLeft;"rtl"===t?a===v.RIGHT?p<0&&(d=v.RIGHT):o.scrollWidth+p>o.clientWidth&&(d=v.LEFT):a===v.LEFT?p>0&&(d=v.LEFT):o.scrollWidth-p>o.clientWidth&&(d=v.RIGHT)}return[l,d]}(l,a.clientRect,this._direction,s,t),(n||r)&&(i=l))}),!n&&!r){const{width:a,height:l}=this._viewportRuler.getViewportSize(),d={width:a,height:l,top:0,right:a,bottom:l,left:0};n=je(d,t),r=Le(d,s),i=window}i&&(n!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=r,this._scrollNode=i,(n||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const s=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=s.msScrollSnapType||s.scrollSnapType||"",s.scrollSnapType=s.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;const s=this._container.style;s.scrollSnapType=s.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),function Lt(o=0,s=Nt.E){return o<0&&(o=0),(0,jt.O)(o,o,s)}(0,$t.X).pipe((0,B.Q)(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===C.UP?s.scrollBy(0,-t):this._verticalScrollDirection===C.DOWN&&s.scrollBy(0,t),this._horizontalScrollDirection===v.LEFT?s.scrollBy(-t,0):this._horizontalScrollDirection===v.RIGHT&&s.scrollBy(t,0)})};_isOverContainer(s,t){return null!=this._domRect&&Z(this._domRect,s,t)}_getSiblingContainerFromPosition(s,t,i){return this._siblings.find(n=>n._canReceive(s,t,i))}_canReceive(s,t,i){if(!this._domRect||!Z(this._domRect,t,i)||!this.enterPredicate(s,this))return!1;const n=this._getShadowRoot().elementFromPoint(t,i);return!!n&&(n===this._container||this._container.contains(n))}_startReceiving(s,t){const i=this._activeSiblings;!i.has(s)&&t.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(i.add(s),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:s,receiver:this,items:t}))}_stopReceiving(s){this._activeSiblings.delete(s),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:s,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(s=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(s);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const s=(0,T.KT)(this._container);this._cachedShadowRoot=s||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const s=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,s))}}function je(o,s){const{top:t,bottom:i,height:n}=o,r=.05*n;return s>=t-r&&s<=t+r?C.UP:s>=i-r&&s<=i+r?C.DOWN:C.NONE}function Le(o,s){const{left:t,right:i,width:n}=o,r=.05*n;return s>=t-r&&s<=t+r?v.LEFT:s>=i-r&&s<=i+r?v.RIGHT:v.NONE}const U={capture:!0},ie={passive:!1,capture:!0};let li=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,n){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}\n"],encapsulation:2,changeDetection:0})}return o}
1)(),ne=(()=>{class o{_ngZone=(0,c.WQX)(e.SKi);_document=(0,c.WQX)(c.qQL);_styleLoader=(0,c.WQX)(Ht.l);_renderer=(0,c.WQX)(e._9s).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _.B;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,c.vPA)([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new _.B;pointerUp=new _.B;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,ie)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(li),this._activeDragInstances.update(n=>[...n,t]),1===this._activeDragInstances().length)){const n=i.type.startsWith("touch"),r=l=>this.pointerUp.next(l),a=[["scroll",l=>this._scroll.next(l),U],["selectstart",this._preventDefaultWhileDragging,ie]];n?a.push(["touchend",r,U],["touchcancel",r,U]):a.push(["mouseup",r,U]),n||a.push(["mousemove",l=>this.pointerMove.next(l),ie]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([l,d,p])=>this._renderer.listen(this._document,l,d,p))})}}stopDragging(t){this._activeDragInstances.update(i=>{const n=i.indexOf(t);return n>-1?(i.splice(n,1),[...i]):i}),0===this._activeDragInstances().length&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){const i=[this._scroll];return t&&t!==this._document&&i.push(new me.c(n=>this._ngZone.runOutsideAngular(()=>{const r=this._renderer.listen(t,"scroll",a=>{this._activeDragInstances().length&&n.next(a)},U);return()=>{r()}}))),(0,W.h)(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||o)};static \u0275prov=c.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();const ci={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let se=(()=>{class o{_document=(0,c.WQX)(c.qQL);_ngZone=(0,c.WQX)(e.SKi);_viewportRuler=(0,c.WQX)(Q.Xj);_dragDropRegistry=(0,c.WQX)(ne);_renderer=(0,c.WQX)(e._9s).createRenderer(null,null);constructor(){}createDrag(t,i=ci){return new ni(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(t){return new ri(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||o)};static \u0275prov=c.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();const V=new c.nKC("CDK_DRAG_PARENT"),$e=new c.nKC("CdkDragHandle"),Xe=new c.nKC("CDK_DRAG_CONFIG"),Ue=new c.nKC("CdkDropList");let Ve=(()=>{class o{element=(0,c.WQX)(e.aKT);dropContainer=(0,c.WQX)(Ue,{optional:!0,skipSelf:!0});_ngZone=(0,c.WQX)(e.SKi);_viewContainerRef=(0,c.WQX)(e.c1b);_dir=(0,c.WQX)(ye.dS,{optional:!0});_changeDetectorRef=(0,c.WQX)(S.gRc);_selfHandle=(0,c.WQX)($e,{optional:!0,self:!0});_parentDrag=(0,c.WQX)(V,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,c.WQX)(ne);_destroyed=new _.B;_handles=new Xt.t([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new e.bkB;released=new e.bkB;ended=new e.bkB;entered=new e.bkB;exited=new e.bkB;dropped=new e.bkB;moved=new me.c(t=>{const i=this._dragRef.moved.pipe((0,Ut.T)(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=(0,c.WQX)(c.zZn);constructor(){const t=this.dropContainer,i=(0,c.WQX)(Xe,{optional:!0}),n=(0,c.WQX)(se);this._dragRef=n.createDrag(this.element,{dragStartThreshold:i&&null!=i.dragStartThreshold?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&null!=i.pointerDirectionChangeThreshold?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe((0,B.Q)(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){(0,e.mal)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){const i=t.rootElementSelector,n=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){const i=this._handles.getValue(),n=i.indexOf(t);n>-1&&(i.splice(n,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let i=t;this.rootElementSelector&&(i=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,R.i8)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const i=this._dir,n=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay="object"==typeof n&&n?n:(0,R.OE)(n),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe((0,Vt.s)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){const n=this._dragDropRegistry.getDragDirectiveForNode(i);if(n){t.withParent(n._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>
1{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){const{lockAxis:i,dragStartDelay:n,constrainPosition:r,previewClass:a,boundaryElement:l,draggingDisabled:d,rootElementSelector:p,previewContainer:u}=t;this.disabled=d??!1,this.dragStartDelay=n||0,this.lockAxis=i||null,r&&(this.constrainPosition=r),a&&(this.previewClass=a),l&&(this.boundaryElement=l),p&&(this.rootElementSelector=p),u&&(this.previewContainer=u)}_setupHandlesListener(){this._handles.pipe((0,Bt.M)(t=>{const i=t.map(n=>n.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,Yt.n)(t=>(0,W.h)(...t.map(i=>i._stateChanges.pipe((0,be.Z)(i))))),(0,B.Q)(this._destroyed)).subscribe(t=>{const i=this._dragRef,n=t.element.nativeElement;t.disabled?i.disableHandle(n):i.enableHandle(n)})}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,n){2&i&&e.AVh("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",S.L39],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",S.Udg]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[e.Jv_([{provide:V,useExisting:o}]),e.OA$]})}return o})();const oe=new c.nKC("CdkDropListGroup");let Be=(()=>{class o{element=(0,c.WQX)(e.aKT);_changeDetectorRef=(0,c.WQX)(S.gRc);_scrollDispatcher=(0,c.WQX)(Q.R);_dir=(0,c.WQX)(ye.dS,{optional:!0});_group=(0,c.WQX)(oe,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new _.B;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=(0,c.WQX)(zt.g).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new e.bkB;entered=new e.bkB;exited=new e.bkB;sorted=new e.bkB;_unsortedItems=new Set;constructor(){const t=(0,c.WQX)(se),i=(0,c.WQX)(Xe,{optional:!0});this._dropListRef=t.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(n,r)=>this.enterPredicate(n.data,r.data),this._dropListRef.sortPredicate=(n,r,a)=>this.sortPredicate(n,r.data,a.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){const i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=o._dropLists.indexOf(this);t>-1&&o._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe((0,be.Z)(this._dir.value),(0,B.Q)(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{const i=(0,Wt.F)(this.connectedTo).map(n=>"string"==typeof n?o._dropLists.find(a=>a.id===n):n);
1if(this._group&&this._group._items.forEach(n=>{-1===i.indexOf(n)&&i.push(n)}),!this._scrollableParentsResolved){const n=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(r=>r.getElementRef().nativeElement);this._dropListRef.withScrollableParents(n),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){const n=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(n)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=(0,R.OE)(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(n=>n&&n!==this).map(n=>n._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),(0,W.h)(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:i,draggingDisabled:n,sortingDisabled:r,listAutoScrollDisabled:a,listOrientation:l}=t;this.disabled=n??!1,this.sortingDisabled=r??!1,this.autoScrollDisabled=a??!1,this.orientation=l||"vertical",this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,n){2&i&&(e.BMQ("id",n.id),e.AVh("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",S.L39],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",S.L39],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",S.L39],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",S.L39]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[e.Jv_([{provide:oe,useValue:void 0},{provide:Ue,useExisting:o}])]})}return o})(),_i=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=c.G2t({providers:[se],imports:[Q.Gj]})}return o})();var b=h(89417),re=h(67870),Ye=h(71878);const A=o=>({saved:o});function fi(o,s){if(1&o&&(e.j41(0,"alert",8),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.alertMsg)}}function mi(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.label)}}function vi(o,s){if(1&o){const t=e.RV6();e.j41(0,"input",20),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.label,n)||(r.label=n),c.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2).$implicit,i=e.XpG();e.R50("ngModel",t.label),e.Y8G("ngClass",e.eq3(2,A,i.saveWasClicked))}}function bi(o,s){if(1&o){const t=e.RV6();e.j41(0,"span",21),e.bIt("click",function(){c.eBV(t);const n=e.XpG(2).$implicit,r=e.XpG();return c.Njj(r.deleteQuestion(n.id))}),e.k0s()}}function yi(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",12)(1,"span",13),e.bIt("click",function(){c.eBV(t);const n=e.XpG().$implicit;return c.Njj(n.isCollapsed=!n.isCollapsed)}),e.k0s(),e.DNE(2,mi,2,1,"span",14)(3,vi,1,4,"input",15)(4,bi,1,0,"span",16),e.j41(5,"div",17)(6,"span",18),e.nrm(7,"i",19),e.EFF(8),e.k0s(),e.EFF(9,"/"),e.j41(10,"span",18),e.EFF(11),e.k0s()()()}if(2&o){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngClass",t.isCollapsed?"icon-chevron-right":"icon-chevron-down"),e.R7$(),e.Y8G("ngIf",t.locked),e.R7$(),e.Y8G("ngIf",!t.locked),e.R7$(),e.Y8G("ngIf",!t.locked),e.R7$(3),e.Y8G("ngClass",t.locked?"icon-lock-on":""),e.R7$(),e.SpI("",t.locked?"Locked":"Unlocked"," "),e.R7$(2),e.xc7("color",t.active?"green":"red"),e.R7$(),e.SpI(" ",t.active?"Active":"Inactive"," ")}}function Si(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.key)}}function Ci(o,s){if(1&o){const t=e.RV6();e.j41(0,"input",31),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.key,n)||(r.key=n),c.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2).$implicit,i=e.XpG();
1e.R50("ngModel",t.key),e.Y8G("ngClass",e.eq3(2,A,i.saveWasClicked))}}function Di(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.type)}}function wi(o,s){1&o&&(e.j41(0,"option",38),e.EFF(1,"INPUT"),e.k0s())}function Ei(o,s){1&o&&(e.j41(0,"option",39),e.EFF(1,"NUMBER_INPUT"),e.k0s())}function Ri(o,s){if(1&o){const t=e.RV6();e.j41(0,"select",32),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.type,n)||(r.type=n),c.Njj(n)}),e.j41(1,"option",33),e.EFF(2,"RADIO"),e.k0s(),e.j41(3,"option",34),e.EFF(4,"DROPDOWN"),e.k0s(),e.j41(5,"option",35),e.EFF(6,"CHECKBOXES"),e.k0s(),e.DNE(7,wi,2,0,"option",36)(8,Ei,2,0,"option",37),e.k0s()}if(2&o){const t=e.XpG(2).$implicit,i=e.XpG();e.R50("ngModel",t.type),e.Y8G("ngClass",e.eq3(4,A,i.saveWasClicked)),e.R7$(7),e.Y8G("ngIf","Metadata"===i.survey.name),e.R7$(),e.Y8G("ngIf","Metadata"===i.survey.name)}}function Ii(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",24)(1,"label"),e.EFF(2,"Weighting Factor"),e.k0s(),e.j41(3,"div")(4,"input",40),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.factor,n)||(r.factor=n),c.Njj(n)}),e.k0s()()()}if(2&o){const t=e.XpG(2).$implicit,i=e.XpG();e.R7$(4),e.R50("ngModel",t.factor),e.Y8G("ngClass",e.eq3(2,A,i.saveWasClicked))}}function Pi(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.label)}}function xi(o,s){if(1&o){const t=e.RV6();e.j41(0,"input",52),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG().$implicit;return e.DH7(r.label,n)||(r.label=n),c.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG().$implicit,i=e.XpG(4);e.R50("ngModel",t.label),e.Y8G("ngClass",e.eq3(2,A,i.saveWasClicked))}}function Ti(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.weight)}}function ki(o,s){if(1&o){const t=e.RV6();e.j41(0,"input",55),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.weight,n)||(r.weight=n),c.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2).$implicit,i=e.XpG(4);e.R50("ngModel",t.weight),e.Y8G("ngClass",e.eq3(2,A,i.saveWasClicked))}}function Fi(o,s){if(1&o&&(e.j41(0,"div",53),e.DNE(1,Ti,2,1,"span",14)(2,ki,1,4,"input",54),e.k0s()),2&o){const t=e.XpG(4).$implicit;e.R7$(),e.Y8G("ngIf",t.locked),e.R7$(),e.Y8G("ngIf",!t.locked)}}function Ai(o,s){if(1&o&&(e.j41(0,"div",44)(1,"div",45)(2,"table",46)(3,"tr")(4,"td",47)(5,"span"),e.EFF(6),e.k0s()(),e.j41(7,"td",48),e.nrm(8,"span",49),e.k0s(),e.j41(9,"td"),e.DNE(10,Pi,2,1,"span",14)(11,xi,1,4,"input",50),e.k0s()()()(),e.DNE(12,Fi,3,2,"div",51),e.k0s()),2&o){const t=s.$implicit,i=e.XpG(3).$implicit,n=e.XpG();e.R7$(6),e.JRh(t.identifier),e.R7$(4),e.Y8G("ngIf",i.locked),e.R7$(),e.Y8G("ngIf",!i.locked),e.R7$(),e.Y8G("ngIf","Metadata"!==n.survey.name)}}function Mi(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",56)(1,"span",57),e.bIt("click",function(){c.eBV(t);const n=e.XpG(3).$implicit,r=e.XpG();return c.Njj(r.addAnswer(n.id))}),e.k0s(),e.EFF(2," Add answer "),e.k0s()}}function Oi(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",41)(1,"label"),e.EFF(2,"Answers"),e.k0s(),e.j41(3,"div",1),e.bIt("cdkDropListDropped",function(n){c.eBV(t);const r=e.XpG(3);return c.Njj(r.drop(n,"answers"))}),e.DNE(4,Ai,13,4,"div",42)(5,Mi,3,0,"div",43),e.k0s()()}if(2&o){const t=e.XpG(2).$implicit;e.R7$(4),e.Y8G("ngForOf",t.answers),e.R7$(),e.Y8G("ngIf",!t.locked)}}function Gi(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",22)(1,"div",23)(2,"div",24)(3,"label"),e.EFF(4,"Variable Name"),e.k0s(),e.j41(5,"div"),e.DNE(6,Si,2,1,"span",14)(7,Ci,1,4,"input",25),e.k0s()(),e.j41(8,"div",24)(9,"label"),e.EFF(10,"Question Type"),e.k0s(),e.j41(11,"div"),e.DNE(12,Di,2,1,"span",14)(13,Ri,9,6,"select",26),e.k0s()(),e.DNE(14,Ii,5,4,"div",27),e.j41(15,"div",28)(16,"label"),e.EFF(17,"Active"),e.k0s(),e.j41(18,"div")(19,"olt-ui-switch",29),e.bIt("change",function(n){c.eBV(t);const r=e.XpG().$implicit,a=e.XpG();return c.Njj(a.onSwitchChange(n,r))}),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG().$implicit;return e.DH7(r.active,n)||(r.active=n),c.Njj(n)}),e.k0s()()()(),e.DNE(20,Oi,6,2,"div",30),e.k0s()}if(2&o){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("collapse",t.isCollapsed),e.R7$(6),e.Y8G("ngIf",t.locked),e.R7$(),e.Y8G("ngIf",!t.locked),e.R7$(5),e.Y8G("ngIf",t.locked),e.R7$(),e.Y8G("ngIf",!t.locked),e.R7$(),e.Y8G("ngIf","Metadata"!==i.survey.name),e.R7$(5),e.R50("ngModel",t.active),e.R7$(),e.Y8G("ngIf","INPUT"!==t.type&&"NUMBER_INPUT"!==t.type)}}function Ni(o,s){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.label)}}function ji(o,s){if(1&o){const t=e.RV6();e.j41(0,"input",59),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG(2).$implicit;return e.DH7(r.label,n)||(r.label=n),c.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2).$implicit;e.R50("ngModel",t.label)}}function Li(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",12)(1,"span",13),e.bIt("click",function(){c.eBV(t);const n=e.XpG().$implicit;return c.Njj(n.isCollapsed=!n.isCollapsed)}),e.k0s(),e.DNE(2,Ni,2,1,"span",14)(3,ji,1,1,"input",58),e.k0s()}if(2&o){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngClass",t.isCollapsed?"icon-chevron-right":"icon-chevron-down"),e.R7$(),e.Y8G("ngIf",t.locked),e.R7$(),e.Y8G("ngIf",!t.locked)}}function $i(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",22)(1,"div",24)(2,"label"),e.EFF(3,"Weighting Factor"),e.k0s(),e.j41(4,"div")(5,"input",60),e.mxI("ngModelChange",function(n){c.eBV(t);const r=e.XpG().$implicit;return e.DH7(r.factor,n)||(r.factor=n),c.Njj(n)}),e.k0s()()()()}if(2&o){const t=e.XpG().$implicit;e.Y8G("collapse",t.isCollapsed),e.R7$(5),e.R50("ngModel",t.factor)}}function Xi(o,s){if(1&o&&(e.j41(0,"div",9),e.DNE(1,yi,12,9,"div",10)(2,Gi,21,8,"div",11)(3,Li,4,3,"div",10)(4,$i,6,2,"div",11),e.k0s()),2&o){const t=s.$implicit,i=e.XpG();e.Y8G("ngClass",t.locked?"question-active":"question-inactive"),e.R7$(),e.Y8G("ngIf","fico_score"!==t.key||"Likelihood"!==i.survey.name),e.R7$(),e.Y8G("ngIf","fico_score"!==t.key||"Likelihood"!==i.survey.name),e.R7$(),e.Y8G("ngIf","fico_score"===t.key&&"Likelihood"===i.survey.name),e.R7$(),e.Y8G("ngIf","fico_score"===t.key&&"Likelihood"===i.survey.name)}}function Ui(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",61)(1,"button",62),e.bIt("click",function(){c.eBV(t);const n=e.XpG();return c.Njj(n.save())}),e.EFF(2,"Save"),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.saveDisabled)}}let Vi=(()=>{class o{constructor(t,i){this.accountService=t,this.sessionService=i,this.saveDisabled=!1,this.alertMsg=null,this.modalConfig={},this.modalOptions={footer:!0,footerBtnDisabled:!1,footerBtnLabel:"Ok",title:""},this.selectedQuestion=null,this.saveWasClicked=!1}ngOnInit(){this.survey.questions.map(t=>t.isCollapsed=!0)}drop(t,i){te(this.survey[i],t.previousIndex,t.currentIndex)}addQuestion(){this.survey.questions.push({id:(0,fe.A)(),label:null,locked:!1,active:!1,key:null,type:null,factor:1,answers:[]})}deleteQuestion(t){this.survey.questions=this.survey.questions.filter(i=>i.id!==t)}addAnswer(t){const i=this.survey.questions.find(n=>n.id===t);i&&i.answers.push({id:(0,fe.A)(),label:null,weight:null,identifier:i.answers.length+1})}save(){var t=this;return(0,f.A)(function*(){t.saveDisabled=!0,t.saveWasClicked=!0,t.validateInputs(t.survey),t.alertMsg||(yield t.accountService.updateSurvey(t.survey)),t.saveDisabled=!1})()}validateInputs(t){this.alertMsg=null,t.questions&&0!==t.questions.length&&t.questions.forEach(i=>
1{if("fico_score"!==i.key||"Likelihood"!==t.name){if(!i.label||!i.type||!i.key)return void(this.alertMsg="Question Label, Question Type, Variable Name are required.");if((!i.answers||i.answers.length<2)&&"INPUT"!==i.type&&"NUMBER_INPUT"!==i.type)return void(this.alertMsg="At least two answers are required for each question.");if(i.answers.length>=2&&i.answers.forEach(n=>{"Metadata"===t.name&&(n.weight=1),null!==n.label&&"undefined"!==n.label&&""!==n.label&&null!==n.weight&&"undefined"!==n.weight||(this.alertMsg="Answer Label and Answer Value are required.")}),!i.factor||"0"===i.factor)return void(this.alertMsg="Question Weighting factor is required and must not be zero.")}})}onSwitchChange(t,i){var n=this;this.selectedQuestion=i,this.modalOptions.size="modal-small",this.modalOptions.title=t?"Would you like to activate?":"Would you like to deactivate?",this.modalBody=t?"By <b>activating</b>, this question will display in the vendor questionnaire.<br> Are you sure?":"By <b>deactivating</b>, this question will not display in the vendor questionnaire.<br> Are you sure?",this.modalOptions.footerBtnFn=(0,f.A)(function*(){n.selectedQuestion=null}),this.modalConfig.show()}onModalHide(){this.selectedQuestion&&(this.selectedQuestion.active=!this.selectedQuestion.active,this.selectedQuestion=null)}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(k.Q))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["survey-config"]],inputs:{survey:"survey"},standalone:!1,decls:10,vars:6,consts:[["type","danger",4,"ngIf"],["cdkDropList","",1,"example-list",3,"cdkDropListDropped"],["class","question row","cdkDrag","",3,"ngClass",4,"ngFor","ngForOf"],[1,"question",2,"text-align","center","padding","20px"],[1,"set1-add_circle-line","question-add","cursor",3,"click"],["style","text-align: right;",4,"ngIf"],[3,"configChange","modalHide","config","options"],[3,"innerHtml"],["type","danger"],["cdkDrag","",1,"question","row",3,"ngClass"],["class","col-md-12",4,"ngIf"],["style","padding-top: 30px;",3,"collapse",4,"ngIf"],[1,"col-md-12"],[1,"temp","cursor",3,"click","ngClass"],[4,"ngIf"],["placeholder","Question Label","class","width-80","required","",3,"ngModel","ngClass","ngModelChange",4,"ngIf"],["class","icon-trash cursor","style","float: right; padding: 5px 0px 0px 5px;",3,"click",4,"ngIf"],[2,"float","right"],[1,"testy"],[3,"ngClass"],["placeholder","Question Label","required","",1,"width-80",3,"ngModelChange","ngModel","ngClass"],[1,"icon-trash","cursor",2,"float","right","padding","5px 0px 0px 5px",3,"click"],[2,"padding-top","30px",3,"collapse"],[1,"d-flex"],[1,"col-md-3"],["placeholder","Variable Name","required","",3,"ngModel","ngClass","ngModelChange",4,"ngIf"],["placeholder","Question Type","required","",3,"ngModel","ngClass","ngModelChange",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"col-md-3",2,"text-align","right"],["color","#0C5776","defaultBgColor","#fff","size","small",3,"change","ngModelChange","ngModel"],["class","col-md-12","style","padding-top: 15px;",4,"ngIf"],["placeholder","Variable Name","required","",3,"ngModelChange","ngModel","ngClass"],["placeholder","Question Type","required","",3,"ngModelChange","ngModel","ngClass"],["value","RADIO"],["value","DROPDOWN"],["value","CHECKBOXES"],["value","INPUT",4,"ngIf"],["value","NUMBER_INPUT",4,"ngIf"],["value","INPUT"],["value","NUMBER_INPUT"],["type","number","min","1","max","100","step",".01","oninput","(validity.valid && (value.lastIndexOf('0')==value.length-1 && value.lastIndexOf('0') !== value.indexOf('.')+1 ? value=parseFloat(value):true)) || (value='')","placeholder","Weighting Factor","required","",3,"ngModelChange","ngModel","ngClass"],[1,"col-md-12",2,"padding-top","15px"],["class","answer row",4,"ngFor","ngForOf"],["class","answer",4,"ngIf"],[1,"answer","row"],["cdkDrag","",1,"col-md-10","padding-left-0"],[2,"width","100%"],[2,"width","15px"],[2,"width","20px"],[1,"set1-grip","handle"],["placeholder","Answer Label","class","width-80","required","",3,"ngModel","ngClass","ngModelChange",4,"ngIf"],["class","col-md-2 padding-right-0","style","text-align: right;",4,"ngIf"],["placeholder","Answer Label","required","",1,"width-80",3,"ngModelChange","ngModel","ngClass"],[1,"col-md-2","padding-right-0",2,"text-align","right"],["type","number","min","0","max","5","oninput","validity.valid||(value='')","placeholder","Value","style","width: 66px;","required","",3,"ngModel","ngClass","ngModelChange",4,"ngIf"],["type","number","min","0","max","5","oninput","validity.valid||(value='')","placeholder","Value","required","",2,"width","66px",3,"ngModelChange","ngModel","ngClass"],[1,"answer"],[1,"set1-add_circle-line","answer-add","cursor",3,"click"],["placeholder","Question Label","class","width-80",3,"ngModel","ngModelChange",4,"ngIf"],["placeholder","Question Label",1,"width-80",3,"ngModelChange","ngModel"],["type","number","step",".01","min","1","max","100","oninput","(validity.valid && (value.lastIndexOf('0') == value.length-1 && value.lastIndexOf('0') !== value.indexOf('.')+1 ? value=parseFloat(value):true)) || (value='')","placeholder","Weighting Factor",3,"ngModelChange","ngModel"],[2,"text-align","right"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){1&i&&(e.DNE(0,fi,2,1,"alert",0),e.j41(1,"div",1),e.bIt("cdkDropListDropped",function(a){return n.drop(a,"questions")}),e.DNE(2,Xi,5,5,"div",2),e.j41(3,"div",3)(4,"div")(5,"span",4),e.bIt("click",function(){return n.addQuestion()}),e.k0s()(),e.EFF(6," Add question "),e.k0s(),e.DNE(7,Ui,3,1,"div",5),e.k0s(),e.j41(8,"fico-modal",6),e.mxI("configChange",function(a){return e.DH7(n.modalConfig,a)||(n.modalConfig=a),a}),e.bIt("modalHide",function(){return n.onModalHide()}),e.nrm(9,"p",7),e.k0s()),2&i&&(e.Y8G("ngIf",n.alertMsg),e.R7$(2),e.Y8G("ngForOf",n.survey.questions),e.R7$(5),e.Y8G("ngIf",!n.sessionService.isPSEUser()),e.R7$(),e.R50("config",n.modalConfig),e.Y8G("options",n.modalOptions),e.R7$(),e.Y8G("innerHtml",n.modalBody,e.npT))},dependencies:[g.YU,g.Sq,g.bT,b.xH,b.y7,b.me,b.Q0,b.wz,b.BC,b.YS,b.VZ,b.zX,b.vS,z.I,re.S,ge,Ye.D,Be,Ve],styles:[".survey[_ngcontent-%COMP%]{color:#555}.question[_ngcontent-%COMP%]{border:1px solid #555555;border-radius:4px;background:#fff;padding:10px 0;margin-bottom:10px}.question[_ngcontent-%COMP%]:hover{cursor:move}.answer[_ngcontent-%COMP%]{border-bottom:1px dotted grey;margin:0!important;padding:5px 0}.padding-left-0[_ngcontent-%COMP%]{padding-left:0}.padding-right-0[_ngcontent-%COMP%]{padding-right:0}.handle[_ngcontent-%COMP%]{cursor:grab}label[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;margin-right:0;margin-bottom:0;font-weight:800}input[_ngcontent-%COMP%]{height:30px}.question-add[_ngcontent-%COMP%]{font-size:50px}.cursor[_ngcontent-%COMP%]{opacity:.6}.cursor[_ngcontent-%COMP%]:hover{cursor:pointer;opacity:1}.testy[_ngcontent-%COMP%]{text-transform:uppercase;padding-top:4px;border-radius:4px;font-size:10px;font-weight:800}.temp[_ngcontent-%COMP%]{height:14px;width:14px;margin-right:8px}.row[_ngcontent-%COMP%]{margin:0 0 10px}.inline-containers[_ngcontent-%COMP%]{display:inline-block}.width-80[_ngcontent-%COMP%]{width:80%}.error[_ngcontent-%COMP%]{border:1px solid #A94442!important}input.saved.ng-invalid[_ngcontent-%COMP%], select.saved.ng-invalid[_ngcontent-%COMP%]{border:1px solid #f00}.icon-lock-on[_ngcontent-%COMP%]{margin-right:4px}"]})}}return o}
1)();function Bi(o,s){1&o&&(e.j41(0,"div",5)(1,"label",6),e.EFF(2,"Instructions"),e.k0s(),e.j41(3,"ul")(4,"li"),e.EFF(5,"Configure as many Impact and Likelihood questions as you wish."),e.k0s(),e.j41(6,"li"),e.EFF(7,"Configure as many answers per question as you wish."),e.k0s(),e.j41(8,"li"),e.EFF(9,"Assign each answer a point value from 0 to 5."),e.k0s(),e.j41(10,"li"),e.EFF(11,"Lower ratings are good; higher ratings are bad."),e.k0s(),e.j41(12,"li"),e.EFF(13,"The ISS Cyber Risk Score is automatically included as a Likelihood factor."),e.k0s(),e.j41(14,"li"),e.EFF(15,"Assign a weight to each Impact and Likelihood question, as well as the ISS Cyber Risk Score."),e.k0s(),e.j41(16,"li"),e.EFF(17,"Track non-risk vendor information by configuring Metadata questions."),e.k0s(),e.j41(18,"li"),e.EFF(19,"Toggle questions as Active or not to toggle their visibility on the vendor form"),e.k0s(),e.j41(20,"li"),e.EFF(21,"Questions and answers may not be edited once a question has been answered for an active vendor"),e.k0s()()())}function Yi(o,s){if(1&o&&(e.j41(0,"tab",8),e.nrm(1,"survey-config",9),e.k0s()),2&o){const t=s.$implicit;e.Y8G("heading",t.name),e.R7$(),e.Y8G("survey",t)}}function Hi(o,s){if(1&o&&(e.j41(0,"tabset"),e.DNE(1,Yi,2,2,"tab",7),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",t.surveys)}}let zi=(()=>{class o{constructor(t){this.accountService=t}ngOnInit(){this.settingsSubcription=this.accountService.lastUpdated.subscribe(()=>{this.surveys=null,this.renderComponent()})}ngOnDestroy(){this.settingsSubcription.unsubscribe()}renderComponent(){var t=this;return(0,f.A)(function*(){t.surveys=yield t.accountService.getAccountSurveys()})()}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["tprm-config"]],standalone:!1,decls:12,vars:3,consts:[["panelPopover",""],["type","button","placement","left","containerClass","customClass2","triggers","focus",1,"float-end","info-btn","hover",3,"popover"],[1,"icon-info-a"],[3,"display"],[4,"ngIf"],[1,"panelPopover"],[1,"card-title"],["class","tab",3,"heading",4,"ngFor","ngForOf"],[1,"tab",3,"heading"],[3,"survey"]],template:function(i,n){if(1&i&&(e.j41(0,"h3"),e.EFF(1,"Vendor Management Configuration"),e.k0s(),e.j41(2,"p"),e.EFF(3," Configure your Impact Rating and Likelihood Rating questions to calibrate the ISS Adjusted Risk Rating to your organization\u2019s subjective measurement of vendor risk.\n"),e.k0s(),e.j41(4,"p"),e.EFF(5," Each of your managed vendors is assessed an Adjusted Risk Rating and is automatically placed in a Risk Tier based on the vendor\u2019s assessed Impact Rating and Likelihood Rating.\n"),e.k0s(),e.j41(6,"button",1),e.nrm(7,"i",2),e.k0s(),e.DNE(8,Bi,22,0,"ng-template",null,0,e.C5r),e.nrm(10,"loading",3),e.DNE(11,Hi,2,1,"tabset",4)),2&i){const r=e.sdS(9);e.R7$(6),e.Y8G("popover",r),e.R7$(4),e.Y8G("display",!n.surveys),e.R7$(),e.Y8G("ngIf",n.surveys)}},dependencies:[g.Sq,g.bT,_e.Hc,E.q,M.V6,M.fw,Vi],styles:["h3[_ngcontent-%COMP%]{margin-top:0}.tab[_ngcontent-%COMP%]{padding:20px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;background:#f2f2f2} tprm-config .nav-tabs>li.active>a, tprm-config .nav-tabs>li.active>a:focus, tprm-config .nav-tabs>li.active>a:hover{background:#f2f2f2!important} .tab-container .nav-tabs>li.active>a{border-bottom:1px solid #F2F2F2!important;border-left:1px solid #DDD!important;border-top:1px solid #DDD!important;border-right:1px solid #DDD!important} .popover.customClass2, .popover.customClass2 .popover-content{min-width:610px;padding:10px;text-align:left} .popover.customClass2 .popover-content ul{padding:10px 30px}.info-btn[_ngcontent-%COMP%]{background:none;border:none;height:16px;line-height:16px;position:relative;margin-left:6px;width:16px;padding:0;color:#555}.info-btn[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:16px;width:16px}.info-btn[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{color:#555;font-size:16px}"]})}}return o})();var He=h(57333),Wi=h(93793);function Qi(o,s){if(1&o){const t=e.RV6();e.j41(0,"tr")(1,"td",6),e.EFF(2),e.k0s(),e.j41(3,"td",7),e.EFF(4),e.nI1(5,"utcDate"),e.nI1(6,"utcDate"),e.k0s(),e.j41(7,"td",7)(8,"b"),e.EFF(9),e.k0s(),e.EFF(10," / *month"),e.k0s(),e.j41(11,"td",8)(12,"olt-ui-switch",15),e.mxI("ngModelChange",function(n){const r=c.eBV(t).$implicit;
1return e.DH7(r.renewal_status,n)||(r.renewal_status=n),c.Njj(n)}),e.bIt("change",function(n){const r=c.eBV(t),a=r.$implicit,l=r.index,d=e.XpG(2);return c.Njj(d.onDataFeedSubscriptionActiveStatusChange(n,a,l))}),e.k0s()()()}if(2&o){const t=s.$implicit;e.R7$(2),e.SpI(" ",t.data_feed_name," "),e.R7$(2),e.SpI(" ",t.renewal_date?"Renews on "+e.i5U(5,4,t.renewal_date,"LLL d, yyyy"):t.end_date?"Ends on "+e.i5U(6,7,t.end_date,"LLL d, yyyy"):"--"," "),e.R7$(5),e.SpI("$",t.monthly_price),e.R7$(3),e.R50("ngModel",t.renewal_status)}}function Ki(o,s){if(1&o&&(e.qex(0),e.j41(1,"table",4)(2,"tr",5)(3,"th",6),e.EFF(4,"Data Feed"),e.k0s(),e.j41(5,"th",7),e.EFF(6,"Renewal Date"),e.k0s(),e.j41(7,"th",7),e.EFF(8,"Price"),e.k0s(),e.j41(9,"th",8),e.EFF(10,"Auto-Renew"),e.k0s()(),e.DNE(11,Qi,13,10,"tr",9),e.k0s(),e.j41(12,"div",10)(13,"div",11)(14,"div",12),e.EFF(15," (*) Data feed subscriptions will be charged on an annual basis. "),e.k0s(),e.j41(16,"div",13)(17,"span",14),e.EFF(18,"Total: "),e.j41(19,"b"),e.EFF(20),e.nI1(21,"number"),e.k0s(),e.EFF(22," / *month"),e.k0s()()()(),e.bVm()),2&o){const t=e.XpG();e.R7$(11),e.Y8G("ngForOf",t.allDataFeedsSubscriptions),e.R7$(9),e.SpI("$",e.i5U(21,2,t.totalDataFeedsSubscriptionsCost,"1.2"))}}let qi=(()=>{class o{constructor(t,i,n){this.accountService=t,this.dataFeedsService=i,this.toasterService=n,this.accountDataFeedsSubscriptons=[],this.allDataFeedsSubscriptions=[],this.isDataFeedActionComplete=!0,this.indexOfModifyingDataFeedSubscription=null,this.totalDataFeedsSubscriptionsCost=0,this.modalConfig={},this.modalOptions={footer:!0,footerBtnDisabled:!1,footerBtnLabel:"Ok",title:"",size:"modal-medium"}}ngOnInit(){var t=this;this.settingsSubcription=this.accountService.lastUpdated.subscribe((0,f.A)(function*(){t.refreshComponentData()}))}refreshComponentData(){var t=this;return(0,f.A)(function*(){t.accountDataFeedsSubscriptons=[],yield t.loadDataFeedsSubscriptionsTable(),t.allDataFeedsSubscriptions=[],t.getAllDataFeedsSubscriptions()})()}loadDataFeedsSubscriptionsTable(){var t=this;return(0,f.A)(function*(){try{const i=yield t.dataFeedsService.getAccountDataFeedsSubscriptions();t.accountDataFeedsSubscriptons=i.map(n=>({data_feed_name:n.name,start_date:n.start_date,end_date:n.end_date,renewal_date:n.renewal_date?n.end_date:null}))}catch{t.toasterService.show("error",{message:"\n An error occurred while attempting to retrieve your data feeds subscriptions.\n "})}})()}getAllDataFeedsSubscriptions(){var t=this;return(0,f.A)(function*(){try{t.totalDataFeedsSubscriptionsCost=0;let i=yield t.dataFeedsService.getAllDataFeedsSubscriptions();t.allDataFeedsSubscriptions=i.map(n=>{const r=t.accountDataFeedsSubscriptons.reduce((a,l)=>(l.data_feed_name===n.name&&(t.totalDataFeedsSubscriptionsCost+=Number(n.monthly_price),a.renewalDate=l.renewal_date,a.endDate=l.end_date),a),{renewalDate:null,endDate:null});return{data_feed_name:n.name,data_feed_key:n.key,renewal_date:r.renewalDate?r.renewalDate:null,monthly_price:n.monthly_price,end_date:r.endDate,renewal_status:!!r.renewalDate}})}catch{t.toasterService.show("error",{message:"\n An error occurred while attempting to retrieve your data feeds subscriptions.\n "})}})()}onDataFeedSubscriptionActiveStatusChange(t,i,n){var r=this;return(0,f.A)(function*(){r.indexOfModifyingDataFeedSubscription=n,r.modalOptions.title=(t?"Activate":"Deactivate")+" annual renewal for data feed subscription?",r.modalBody=t?`By <b>activating</b>, your <b>${i.data_feed_name}</b> data feed subscription will be automatically renewed on an annual basis. Are you sure?`:`By <b>deactivating</b>, your <b>${i.data_feed_name}</b> data feed subscription will no longer be annually renewed after expiration. Are you sure?`,r.modalOptions.footerBtnFn=(0,f.A)(function*(){try{r.indexOfModifyingDataFeedSubscription=null;const a={name:i.data_feed_name,key:i.data_feed_key,status:t},l=yield r.dataFeedsService.updateAccountDataFeedsSubscriptionRenewalStatus(a);i.renewal_date=l.renewal_date,i.start_date||(r.totalDataFeedsSubscriptionsCost+=Number(i.monthly_price),i.start_date=l.start_date,i.end_date=l.end_date),r.toasterService.show("success",{message:"Your data feeds subscription renewal status was successfully changed!"})}catch{r.indexOfModifyingDataFeedSubscription=n,r.toasterService.show("error",{message:"\n An error occurred while attempting to update your data feeds subscription renewal status.\n "})}finally{r.onModalHide()}}),r.modalConfig.show()})()}onModalHide(){"object"!=typeof this.indexOfModifyingDataFeedSubscription&&this.toggleDataFeedSubscriptonRenewalStatus(this.indexOfModifyingDataFeedSubscription)}toggleDataFeedSubscriptonRenewalStatus(t){this.allDataFeedsSubscriptions[t].renewal_status=!this.allDataFeedsSubscriptions[t].renewal_status}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(y.D),e.rXU(He.B),e.rXU(he.W))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["data-feeds"]],standalone:!1,decls:9,vars:5,consts:[[3,"display"],[4,"ngIf"],[3,"configChange","modalHide","config","options"],[3,"innerHtml"],[2,"width","100%"],[2,"border-bottom","1px solid #bdc3c7"],[2,"padding","12px 12px 12px 0px"],[2,"padding","12px"],[2,"padding","12px 0px 12px 0px"],[4,"ngFor","ngForOf"],[2,"border-top","1px solid #bdc3c7"],[2,"margin-top","15px"],[2,"float","left"],[2,"float","right"],[2,"margin-right","15px"],["color","#0C5776","defaultBgColor","#FFFFFF","size","small",3,"ngModelChange","change","ngModel"]],template:function(i,n){1&i&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"Data Feeds Subscriptions"),e.k0s(),e.j41(3,"p"),e.EFF(4," The table below lists the various data feeds subscriptions associated with your account. "),e.k0s(),e.nrm(5,"loading",0),e.DNE(6,Ki,23,5,"ng-container",1),e.j41(7,"fico-modal",2),e.mxI("configChange",function(a){return e.DH7(n.modalConfig,a)||(n.modalConfig=a),a}),e.bIt("modalHide",function(){return n.onModalHide()}),e.nrm(8,"p",3),e.k0s()()),2&i&&(e.R7$(5),e.Y8G("display",!n.allDataFeedsSubscriptions.length),e.R7$(),e.Y8G("ngIf",n.allDataFeedsSubscriptions.length),e.R7$(),e.R50("config",n.modalConfig),e.Y8G("options",n.modalOptions),e.R7$(),e.Y8G("innerHtml",n.modalBody,e.npT))},dependencies:[g.Sq,g.bT,b.BC,b.vS,E.q,z.I,re.S,g.QX,Wi.B],styles:["h3[_ngcontent-%COMP%]{margin-top:0}.action-icon[_ngcontent-%COMP%]{font-size:25px}.row[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:-30px;padding-right:14px}.tag[_ngcontent-%COMP%]{margin:5px 5px 0 0;padding:2px 10px} users-table .ag-theme-balham .ag-row:hover{background-color:#f2f2f2}#data-feeds-table[_ngcontent-%COMP%]{display:flex;flex-direction:row}#data-feeds-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden}"]})}}return o}
1)();function Zi(o,s){1&o&&e.nrm(0,"landscape-navigation")}function Ji(o,s){if(1&o){const t=e.RV6();e.j41(0,"tab",12),e.bIt("selectTab",function(){c.eBV(t);const n=e.XpG().$implicit,r=e.XpG();return c.Njj(r.onSelect(n.route))}),e.k0s()}if(2&o){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("heading",t.label)("active",i.activeTab===t.label)}}function en(o,s){if(1&o&&(e.qex(0),e.DNE(1,Ji,1,2,"tab",11),e.bVm()),2&o){const t=s.$implicit;e.R7$(),e.Y8G("ngIf",t.show)}}function tn(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"password"),e.k0s())}function nn(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"users-table"),e.k0s())}function sn(o,s){1&o&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"Account Subscriptions"),e.k0s(),e.nrm(3,"subscriptions-table"),e.k0s())}function on(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"data-feeds"),e.k0s())}function rn(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"tprm-config"),e.k0s())}function an(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"gateway-keys"),e.k0s())}function ln(o,s){1&o&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"AWS Marketplace"),e.k0s(),e.nrm(3,"marketplace-entitlements"),e.k0s())}function cn(o,s){1&o&&(e.j41(0,"div")(1,"h3"),e.EFF(2,"Integrations"),e.k0s(),e.nrm(3,"admin-integrations"),e.k0s())}function dn(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"reports"),e.k0s())}function hn(o,s){1&o&&(e.j41(0,"div"),e.nrm(1,"score-alerts"),e.k0s())}let I=(()=>{class o{constructor(t,i,n,r){this.sessionService=t,this.route=i,this.router=n,this.applicationService=r,this.vendorManagementAccess=!1,this.esgCyberAccess=!1,this.esgInvestorsAccess=!1,this.hasCyberAssetReviewSubscription=!1,this.tabs=[]}ngOnInit(){this.activeTab=this.route.snapshot.data.active_tab,this.sessionSubscription=this.sessionService.session$.subscribe(()=>{this.apiEnabled=this.sessionService.isApiEnabled(),this.canViewDuns=this.sessionService.getSession().canViewDuns,this.hasAwsMarketplaceEntitlements=this.sessionService.getSession().hasAwsMarketplaceEntitlements,this.vendorManagementAccess=this.sessionService.isVendorManagementAccess(),this.esgCyberAccess=this.sessionService.hasEsgCyberSubscription(),this.esgInvestorsAccess=this.sessionService.hasEsgInvestorsSubscription(),this.hasCyberAssetReviewSubscription=this.sessionService.isCyberAssetReviewAccess(),this.isEnterpriseFreemium=this.sessionService.isEnterpriseFreemium(),this.isEnterpriseSelfAssessment=this.sessionService.isEnterpriseSelfAssessment(),this.canViewIntegrations=this.sessionService.canAccessWithRoles([x.X.ACCOUNT_ADMIN,x.X.SYSTEM_ADMIN]),this.isEnterprise=this.sessionService.doesContainSub(w.Y.ENTERPRISE_FREEMIUM)||this.sessionService.doesContainSub(w.Y.ENTERPRISE_SELF_ASSESSMENT),this.authenticateTab(),this.tabs=[{label:"Account Subscriptions",route:"/admin/account-subscriptions",show:!0},{label:"Users",route:"/admin/users",show:!0},{label:"Password",route:"/admin/password",show:!this.applicationService.isProdEnv()},{label:"Data Feeds Subscriptions",route:"/admin/data-feeds-subscriptions",show:this.esgInvestorsAccess},{label:"Vendor Mgmt",route:"/admin/tprm-config",show:this.vendorManagementAccess},{label:"API Keys",route:"/admin/api",show:this.apiEnabled},{label:"Score Alerts",route:"/admin/score-alerts",show:!this.hasCyberAssetReviewSubscription},{label:"Integrations",route:"/admin/integrations",show:this.isEnterpriseSelfAssessment&&!this.hasCyberAssetReviewSubscription&&this.canViewIntegrations},{label:"Reports",route:"/admin/reports",show:this.isEnterpriseSelfAssessment}]})}ngOnDestroy(){this.sessionSubscription.unsubscribe()}authenticateTab(){(!this.isEnterprise&&"Prefixes"===this.activeTab||this.isEnterpriseSelfAssessment&&"Reports"===this.activeTab||this.canViewDuns&&"DUNS"===this.activeTab||!this.hasAwsMarketplaceEntitlements&&"AWS Marketplace"===this.activeTab||!this.apiEnabled&&"API Keys"===this.activeTab)&&this.router.navigateByUrl("/admin/profile")}onSelect(t){this.router.navigateByUrl(t)}onFormSubmit(t){}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(k.Q),e.rXU(de.nX),e.rXU(de.Ix),e.rXU(qe.m))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["account"]],standalone:!1,decls:23,vars:13,consts:[[4,"ngIf"],[2,"background-color","#f2f2f2"],[1,"background-light-grey","account-settings"],[1,"app-max-width","title"],[1,"float-start"],[1,"normalize","float-start"],[1,"app-max-width","tab-holder"],[1,"tab-container"],["type","pills",1,"sidebar",3,"vertical"],[4,"ngFor","ngForOf"],[1,"content"],[3,"heading","active","selectTab",4,"ngIf"],[3,"selectTab","heading","active"]],template:function(i,n){1&i&&(e.DNE(0,Zi,1,0,"landscape-navigation",0),e.j41(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4)(5,"h2",5)(6,"span"),e.EFF(7,"Account Settings"),e.k0s()()()(),e.j41(8,"div",6)(9,"div",7)(10,"tabset",8),e.DNE(11,en,2,1,"ng-container",9),e.k0s(),e.j41(12,"div",10),e.DNE(13,tn,2,0,"div",0)(14,nn,2,0,"div",0)(15,sn,4,0,"div",0)(16,on,2,0,"div",0)(17,rn,2,0,"div",0)(18,an,2,0,"div",0)(19,ln,4,0,"div",0)(20,cn,4,0,"div",0)(21,dn,2,0,"div",0)(22,hn,2,0,"div",0),e.k0s()()()()()),2&i&&(e.Y8G("ngIf",n.esgCyberAccess),e.R7$(10),e.Y8G("vertical",!0),e.R7$(),e.Y8G("ngForOf",n.tabs),e.R7$(2),e.Y8G("ngIf","Password"===n.activeTab),e.R7$(),e.Y8G("ngIf","Users"===n.activeTab),e.R7$(),e.Y8G("ngIf","Account Subscriptions"===n.activeTab),e.R7$(),e.Y8G("ngIf","Data Feeds Subscriptions"===n.activeTab),e.R7$(),e.Y8G("ngIf",n.vendorManagementAccess&&"Vendor Mgmt"===n.activeTab),e.R7$(),e.Y8G("ngIf",n.apiEnabled&&"API Keys"===n.activeTab),e.R7$(),e.Y8G("ngIf",n.hasAwsMarketplaceEntitlements&&"AWS Marketplace"===n.activeTab),e.R7$(),e.Y8G("ngIf",n.isEnterpriseSelfAssessment&&n.canViewIntegrations&&"Integrations"===n.activeTab),e.R7$(),e.Y8G("ngIf",n.isEnterpriseSelfAssessment&&"Reports"===n.activeTab),e.R7$(),e.Y8G("ngIf","Score Alerts"===n.activeTab))},dependencies:[g.Sq,g.bT,Ze.x,M.V6,M.fw,et,it,st,at,ct,yt,St,Gt,zi,qi],styles:[".account-settings[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:20px 23px 20px 28px;height:60px}.account-settings[_ngcontent-%COMP%] .tab-holder[_ngcontent-%COMP%]{padding:30px 25px}.account-settings[_ngcontent-%COMP%] .tab-holder[_ngcontent-%COMP%] .tab-container[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{background:#ccc;display:table-cell;height:817px;
1min-width:200px}.account-settings[_ngcontent-%COMP%] .tab-holder[_ngcontent-%COMP%] .tab-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background-color:#fff;display:table-cell;width:1200px;padding:50px;vertical-align:top} .sidebar .nav-stacked>li{width:100%!important;color:#fff} .sidebar .nav-link{border-radius:0;text-decoration-line:none} .sidebar .nav-pills>li>a{color:#555} .sidebar .nav-pills>li>a.active{color:#fff} .sidebar .nav-pills>:not(.active)>a:hover{background-color:#ccc;color:#0c5776!important} .nav-pills>.active>a, .nav-pills>.active>a:hover, .nav-pills>.active>a:focus{background-color:#0c5776!important} .content #form-container{margin-top:35px!important;padding:0!important}h3[_ngcontent-%COMP%]{margin-top:0}.background-light-grey[_ngcontent-%COMP%]{min-height:70%} .ag-theme-balham .ag-root{border:none} .ag-theme-balham{font-weight:100} .ag-theme-balham .ag-cell{line-height:14px;font-size:14px;padding:12px} .ag-theme-balham .ag-header{background-color:#fff;color:#555;font-weight:900;font-size:12px;text-transform:uppercase} .ag-theme-balham .ag-header-cell:after, .ag-theme-balham .ag-header-group-cell:after{border-right:0px} .ag-theme-balham .ag-row-hover{background-color:#fff;cursor:default} .ag-theme-balham .ag-row-odd{background-color:#fff} .ag-theme-balham .ag-row-even{background-color:#fff} .ag-theme-balham .ag-row-selected{background-color:#f2f2f2;border-color:#dee1e3} .ag-theme-balham .ag-icon-checkbox-checked{color:#0c5776} .ag-theme-balham .ag-cell-focus, .ag-cell-no-focus[_ngcontent-%COMP%]{border:1px solid transparent!important} .ag-theme-balham .no-border.ag-cell:focus{border:1px solid transparent!important;outline:none} .ag-theme-balham .ag-icon-none:before{opacity:0;transition:opacity .2s ease 0s,border .2s ease 0s} .header_center .ag-header-cell-label .ag-header-cell-text{margin:0 auto}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:active{text-decoration:none}h2[_ngcontent-%COMP%]{margin-top:0}"]})}}return o})();var pn=h(45576),un=h(19641),gn=h(37038),_n=h(68580),fn=h(94709);const mn=[{path:"password",component:I,data:{active_tab:"Password"}},{path:"users",component:I,data:{active_tab:"Users"}},{path:"organizations",component:I,data:{active_tab:"Organizations"}},{path:"account-subscriptions",component:I,data:{active_tab:"Account Subscriptions"}},{path:"data-feeds-subscriptions",component:I,data:{active_tab:"Data Feeds Subscriptions"}},{path:"integrations",component:I,data:{active_tab:"Integrations"}},{path:"reports",component:I,data:{active_tab:"Reports"}},{path:"api",component:I,data:{active_tab:"API Keys"}},{path:"score-alerts",component:I,data:{active_tab:"Score Alerts"}},{path:"tprm-config",component:I,data:{active_tab:"Vendor Mgmt"}}];let vn=(()=>{class o{static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275mod=e.$C({type:o})}static{this.\u0275inj=c.G2t({providers:[He.B],imports:[g.MD,b.YN,b.X1,gn.H,_e.k0,_n.zE,pn.h,M.jr,fn.Y,re.G,un.$V,Ke.iI.forChild(mn),Pt.forRoot(),pe.rz.forRoot(),Ye.G.forRoot(),_i]})}}return o})()}}]);
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.