Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/Program Files/Avast Software/Avast/gui_resources/default_av/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/Avast Software/Avast/gui_resources/default_av/SensitiveData.js
//{"name":"SensitiveData","version":"1.2.467","created":"2021-03-10T09:10:56.066Z"}
import e from"./ractive.js";import{logger as t,Router as s}from"./libs.js";import{productModel as i,ipmService as n}from"./napiExtensions.js";import{windowApi as l,serviceRequest as a,eventer as o,napiTracker as r}from"./napi.js";import{nls as c}from"./i18n.js";import{plugins as d}from"./ractiveAdapter.js";import{modals as p}from"./ractiveComponents.js";const g="ais_cmp_datascan_full";const h=e.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"nui_standalone sds_standalone","data-product":[{t:2,r:"product"}]},f:[{t:7,e:"div",a:{class:"nui_main"},f:[{t:16}]}," ",{t:7,e:"Titlebar",a:{product:[{t:2,r:"product"}],title:[{t:3,x:{r:["nls","product"],s:'_0("global.product."+_1)'}}],minimizeIconTitle:[{t:3,x:{r:["nls"],s:'_0("global.minimize")'}}],closeIconTitle:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]}}]}],n:50,r:"IS_STANDALONE"},{t:4,n:51,f:[{t:16}],r:"IS_STANDALONE"}]},css:".sds_standalone {\n  --navbar-width: 0;\n  --navbar-width-visible: 0;\n}\n",data:function(){return{module:null,product:null}},computed:{IS_STANDALONE:function(){return new RegExp("module="+this.get("module")).test(location.search)}},oninit(){this.on("Titlebar.minimizeWindow",(()=>{l.minimize()})),this.on("Titlebar.closeWindow",(()=>{l.close()}))}});const _={9262:{title:"others",desc:"others",icon:"others",sortIndex:-1},9263:{title:"payroll",desc:"payroll",icon:"dollar",sortIndex:8},9264:{title:"taxreturn",desc:"taxreturn",icon:"taxreturn",sortIndex:9},9265:{title:"employment",desc:"employment",icon:"briefcase",sortIndex:7},9266:{title:"airplanetickets",desc:"airplanetickets",icon:"airplane",sortIndex:6},9267:{title:"travel",desc:"travel",icon:"globe",sortIndex:5},9271:{title:"address",desc:"address",icon:"address",sortIndex:4},allFiles:{title:"allFiles",desc:"",icon:"",sortIndex:10}},f=[9263,9264,9265,9266,9267],u={};const m=new class{getFileIcon(e){const t=e.filename,s=e.filename.split(".").pop();return s?(u[s]?u[s]instanceof Promise||(u[s]=Promise.resolve(u[s])):u[s]=this.getFileIconData(t,"large").then((e=>(u[s]=e.data,e.data))),u[s]):this.getFileIconData(t,"large").then((e=>e.data))}getFileIconData(e,t){return a("app.utils.GetShellIcon",{path:e,size:t}).then((e=>e)).catch((t=>{console.error("app.utils.GetShellIcon - "+e,JSON.stringify(t))}))}injectFileDetails(e){const t=e.filename.split("\\");e.name=t.pop(),e.folder=t.join("\\"),e.group_ids&&(e.categoryTitle=_[e.group_ids].title+".file")}getSensitiveDataCategories(){return _}addFilesManually(){return a("app.utils.SelectFile",{fileName:"",filter:"(*.pdf;*.doc;*.docx;*.xls;*.xlsx)|*.pdf;*.doc;*.docx;*.xls;*.xlsx|",multiselection:!0}).then((e=>{if("ok"===e.dialogReturnCode){const t=[];if(e.pathNameList)for(const s of e.pathNameList)t.push({filename:s,status:!0});else t.push(e.pathName);return a("app.data_scan_ui.ProtectUserSpecifiedFile",t)}}))}previewFile(e){a("app.data_scan_ui.Preview",{filename:e,mode:"external"})}getParsedResults(e,t={getAll:!1,getNotProtected:!1,createAllFilesCategory:!0,createCategories:!0,createPriorities:!0}){const s=t.createAllFilesCategory?{allFiles:{files:[]}}:{},i=[],n={high:[],low:[]};let l=0,a=0;const o=e.filelist;if(o&&o.length>0){o.forEach((e=>{_[e.group_ids]||(e.group_ids=9262),s[e.group_ids]||(s[e.group_ids]={files:[]}),0===e.new_entry?a++:l++;(t.getAll||(t.getNotProtected?1===e.new_entry:0===e.new_entry))&&(s[e.group_ids].files.push(e),t.createAllFilesCategory&&s.allFiles.files.push(e),t.createPriorities&&(f.includes(e.group_ids)?(e.priority="high",n.high.push(e)):(e.priority="low",n.low.push(e))))}));for(const e in s)s[e].id=e,t.createCategories&&(s[e].files.length>0||"allFiles"===e)?i.push(s[e]):t.createCategories||"allFiles"!==e||i.push(s[e]);return{protectedFilesCount:a,notProtectedFilesCount:l,priorities:n,categories:t.createCategories?i.sort(((e,t)=>_[t.id].sortIndex-_[e.id].sortIndex)):i}}return{notProtectedFilesCount:0,protectedFilesCount:0,categories:[],priorities:[]}}getFiles(e={getAll:!1,getNotProtected:!1,createAllFilesCategory:!0,createCategories:!0,createPriorities:!0}){return a("app.data_scan_ui.GetFileList").then((t=>this.getParsedResults(t,e))).catch((e=>{console.log(e)}))}};function v(e){return e.progress>0&&e.progress<100?"running":100===e.progress&&"1"===localStorage.getItem("sdsStarted")?"results":""}function x(){localStorage.setItem("sdsStarted","")}const b=e.extend({template:{v:3,t:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["filesToStopProtecting.length","nls","singleFile.name"],s:'_0>1?_1("sensitivedata.stopProtectingFiles",_0):_1("sensitivedata.stopProtecting.title",_2)'}}],subtitle:[{t:3,x:{r:["nls","filesToStopProtecting.length"],s:'_0("sensitivedata.stopProtecting.desc",_1)'}}]},f:[{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",v:{click:{n:"confirmStopProtecting",d:[{t:2,r:"filesToStopProtecting"}]}},a:{class:"btn"},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}," ",{t:7,e:"button",v:{click:"Modal.close"},a:{class:"btn -secondary g-margin-left--10"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.keepProtected")'}}]}]}]}]},data:function(){return{filesToStopProtecting:[],singleFile:void 0}},oninit(){const e=this.get("filesToStopProtecting");if(1===e.length){const t={filename:e[0]};m.injectFileDetails(t),this.set("singleFile",t)}this.on("Modal.close",(()=>{this.fire("close")})),this.on("confirmStopProtecting",((e,t)=>{this.fire("close"),this.fire("stopProtecting",t)}))}});const S=function(t){return e.extend({template:t,twoway:!1,data:function(){return{isStandalone:void 0,product:i.getProduct(),shieldLicensed:i.isLicensed(g),IPM_BUTTON_ELM:228,customBreadcrumbs:[{title:c("sensitivedata.sensitiveDataScan")}],subPage:void 0,progress:0,files:[],selectedFiles:[],modalDialog:void 0,protecting:{progress:0,inProgress:!1},ipmButtonsEnabled:!1,loading:!1}},computed:{ipmButtonAllowed:{set:function(){},get:function(){const e=this.get("product");return!this.get("shieldLicensed")&&this.get("ipmButtonsEnabled")&&"suite"!==e&&"premier"!==e}}},onrender(){d.kinTableScrollable.initRactive(this)},oninit(){this.listeners=[],this.listeners.push(o.on("app.data_scan_ui.onStatusChange",(e=>{"progress"===this.get("subPage")&&(this.set({progress:e.progress,issuesCount:e.issuesCount}),e.progress>=100&&this._showResults())}))),this._deselectAll=function(){this.get("protecting.inProgress")||this._selectAllFiles(!1)},this._deselectAllBind=this._deselectAll.bind(this),window.addEventListener("kin-deselectAll",this._deselectAllBind),this.on("selectAllFiles",((e,t)=>{!0===t?this._selectAllFiles(!0):this._selectAllFiles(e.node.checked)})),this.on("selectFile",((e,t)=>{const s=this.get("selectedFiles");e.node.checked?s.includes(t.filename)||s.push(t.filename):s.splice(s.indexOf(t.filename),1),this.set("selectedFiles",s)})),this.on("protectSelectedFiles",((e,t)=>{this._protectSelectedFiles(t)})),this.on("preview",((e,t)=>{m.previewFile(t)})),this.on("stopScan",(()=>{this._stopScan().then((()=>{this._showResults()}))})),this.on("done",(()=>{x(),this.get("isStandalone")?l.close():this._goBack()})),Promise.all([a("app.data_scan_ui.GetStatus"),a("app.settings.Get","avdef://config/GuiCache/IpmContent228")]).then((e=>{const t=e[0],s=e[1],i=v(t);i?("results"===i&&this._showResults(),"running"===i&&this.set({progress:t.progress,issuesCount:t.problemsCount,subPage:"progress"})):(this._startScan(),this.set("ipmButtonsEnabled",1==s))}))},_showResults(){this.set("loading",!0),m.getFiles({getNotProtected:!0,createAllFilesCategory:!0,createCategories:!1}).then((e=>{const t=e.categories[0]?e.categories[0].files:[],s=[],i=[];for(const n of t)m.injectFileDetails(n),i.push(m.getFileIcon(n).then((e=>{n.icon=e,s.push(n)})));Promise.all(i).catch((()=>{})).then((()=>{const t=e.notProtectedFilesCount;this.set({files:s,issuesCount:t,protectedFilesCount:e.protectedFilesCount,loading:!1}),0===t?this.set({subPage:"done"}):(this.set({subPage:"results"}),this._selectAllFiles(!0))}))}))},_goBack(){location.hash="SensitiveData",this.fire("goBack")},_protectSelectedFiles(e){const t=this.get("protecting");t.inProgress=!0;const s=[];for(const i of e)s.push({filename:i,status:!0});a("app.data_scan_ui.ChangeApprovedProtectionStatus",s).then((()=>{this._fakeProtectingInterval||(this._fakeProtectingInterval=setInterval((()=>{t.progress>=100?setTimeout((()=>{t.inProgress=!1,this.set("subPage","done"),this._clearFakeProtectingInterval()}),500):t.progress+=10,this.set("protecting",t)}),200))}))},_clearFakeProtectingInterval(){this._fakeProtectingInterval&&(clearInterval(this._fakeProtectingInterval),this._fakeProtectingInterval=void 0)},_selectAllFiles(e){const t=this.get("files");if(this.set("selectedFiles",[]),e){const e=t.map((e=>e.filename));this.set("selectedFiles",e)}},_startScan(){this.set("subPage","progress"),localStorage.setItem("sdsStarted","1"),a("app.data_scan_ui.Start").catch((e=>{console.log("app.data_scan_ui.Start",e)}))},_stopScan:()=>(x(),a("app.data_scan_ui.Stop").catch((e=>{console.log("app.data_scan_ui.Stop",e)}))),onteardown(){this.listeners.forEach((e=>{e()})),window.removeEventListener("kin-deselectAll",this._deselectAllBind),this._deselectAllBind=void 0,this._clearFakeProtectingInterval()}})}({v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["subPage","files.length","nls"],s:'_0==="results"?_2("sensitivedata.documentsFound",_1):_2("sensitivedata")'}}],cssCls:[{t:2,x:{r:["subPage"],s:'_0!=="done"?"-center-header":"-no-header -center-all"'}}],loading:[{t:2,r:"loading"}],backhash:"SensitiveData"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:4,f:[{t:7,e:"Crumbs",a:{section:"privacy",moduleId:"sensitivedata",customBreadcrumbs:[{t:2,r:"customBreadcrumbs"}]}}],n:50,x:{r:["IS_STANDALONE"],s:"!_0"}}]}," ",{t:7,e:"div",a:{slot:"page-content",class:[{t:2,x:{r:["subPage"],s:'_0==="progress"||_0==="done"?"kin_page-content -scan":""'}}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"kin_scan"},f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text -center"},f:[{t:2,x:{r:["nls"],s:'_0("sensitivedata.scanningDocuments")'}}]}]}," ",{t:7,e:"div",a:{class:"kin_scan__progress"},f:[{t:7,e:"kin-progress",a:{percentage:[{t:2,r:"progress"}],dotted:"true"}}]}," ",{t:7,e:"div",a:{class:"kin_scan__actions"},f:[{t:7,e:"button",a:{class:"btn -secondary -medium -submit","data-test":"sds_progress_stopBtn"},v:{click:"stopScan"},f:[{t:3,x:{r:["nls"],s:'_0("global.stopScan")'}}]}]}]}],n:50,x:{r:["subPage"],s:'_0==="progress"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["subPage"],s:'_0==="done"'},f:[{t:7,e:"kin-icon",a:{name:"circle-ok",class:"kin_scan__icon",size:"96"}}," ",{t:7,e:"div",a:{class:"kin_scan__result"},f:[{t:4,f:[{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.results.noNewSensitiveDocumentsFound")'}}],n:50,x:{r:["protectedFilesCount"],s:"_0>0"}},{t:4,n:51,f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.results.noSensitiveDocumentsFound")'}}],x:{r:["protectedFilesCount"],s:"_0>0"}}]}],n:50,x:{r:["issuesCount"],s:"_0===0"}},{t:4,n:51,f:[{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("sensitivedata.documentsProtected",_1)'}}]}," ",{t:7,e:"p",a:{class:"kin_scan__subtitle -overlay"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("sensitivedata.documentsProtected.desc",_1)'}}]}],x:{r:["issuesCount"],s:"_0===0"}}]}," ",{t:7,e:"div",a:{class:"kin_scan__actions"},f:[{t:7,e:"button",a:{class:"btn -medium -submit","data-test":"sds_progress_doneBtn"},v:{click:"done"},f:[{t:2,x:{r:["nls"],s:'_0("global.done")'}}]}]}]},{t:4,n:50,x:{r:["subPage"],s:'(!(_0==="done"))&&(_0==="results")'},f:[" ",{t:7,e:"kin-view",a:{actionbar:"true"},f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text -center"},f:[{t:4,f:[{t:3,x:{r:["nls","files.length"],s:'_0("sensitivedata.documentsFound.desc",_1)'}}],n:50,x:{r:["subPage"],s:'_0==="results"'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"kin-table",a:{datalength:[{t:2,r:"files.length"}],dataname:"files",selecteditems:[{t:2,r:"selectedFiles.length"}],inactive:[{t:2,r:"protecting.inProgress"}],loading:[{t:2,r:"loading"}],scrollrootselector:"kin-view"},f:[{t:7,e:"div",a:{slot:"table-header",role:"row",class:"sdt_scan_table__header"},f:[{t:7,e:"input",v:{click:"selectAllFiles"},a:{type:"checkbox",class:["checkbox ",{t:4,f:["-some-checked"],n:50,x:{r:["files.length","selectedFiles.length"],s:"_0!==_1&&_1>0"}}," ",{t:4,f:["-checked"],n:50,x:{r:["files.length","selectedFiles.length"],s:"_0===_1&&_1>0"}}],disabled:[{t:2,x:{r:["files.length","protecting.inProgress"],s:"_0===0||_1"}}],checked:[{t:2,x:{r:["selectedFiles.length"],s:"_0>0"}}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectAllItems")'}}]}}," ",{t:7,e:"div"}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.vulnerableDocument")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("global.location")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.type")'}}]}," ",{t:7,e:"div"}]}," ",{t:7,e:"div",a:{slot:"table-body"},f:[{t:4,f:[{t:7,e:"div",a:{role:"row",class:"kin_table__row sdt_scan_table__row","aria-rowindex":[{t:2,r:"@index"}]},f:[{t:7,e:"input",v:{click:{n:"selectFile",d:[{t:2,r:"."}]}},a:{type:"checkbox",class:"checkbox",checked:[{t:2,x:{r:["selectedFiles","./filename"],s:"_0.includes(_1)?true:false"}}],disabled:[{t:2,r:"protecting.inProgress"}],id:["sds-scanned-item-",{t:2,r:"@index"}],title:[{t:2,x:{r:["nls","global.selectItem"],s:"_0(_1)"}}]}}," ",{t:7,e:"div",f:[{t:7,e:"img",a:{class:"kin-img",height:"24px",src:["data:image/png;base64,",{t:2,r:"icon"}]}}]}," ",{t:7,e:"div",a:{class:"kin_table__name"},f:[{t:7,e:"label",a:{for:["sds-scanned-item-",{t:2,r:"@index"}],id:["name-tooltip-opener-",{t:2,r:"@index"}],class:"g-ellipsis"},f:[{t:2,r:"name"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#name-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"name"}]}]}," ",{t:7,e:"div",f:[{t:7,e:"p",a:{id:["path-tooltip-opener-",{t:2,r:"@index"}],class:"p g-ellipsis"},f:[{t:2,r:"folder"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#path-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"folder"}]}]}," ",{t:7,e:"div",f:[{t:7,e:"p",a:{id:["type-tooltip-opener-",{t:2,r:"@index"}],class:"p g-ellipsis"},f:[{t:3,x:{r:["nls","categoryTitle"],s:'_0("sensitivedata."+_1)'}}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#type-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:3,x:{r:["nls","categoryTitle"],s:'_0("sensitivedata."+_1)'}}]}]}," ",{t:7,e:"div",a:{class:"kin_table__actions -overlay"},f:[{t:4,f:[{t:7,e:"kin-button",a:{id:["preview-tooltip-opener-",{t:2,r:"@index"}],class:"g-margin-right--5",icononly:0,title:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.open")'}}," ",{t:2,r:"name"}],type:"blank",size:"small"},v:{click:{n:"preview",d:[{t:2,r:"filename"}]}},f:[{t:7,e:"kin-icon",a:{name:"search",size:"16"}}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#preview-tooltip-opener-",{t:2,r:"@index"}],cssCls:"-link",alignment:"center"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.open")'}}]}],n:50,r:"offer_preview"}]}]}],n:52,r:"rows_files"}]}]}]}," ",{t:7,e:"div",a:{slot:"view-actions"},f:[{t:8,r:"actions"}]}]}]}],x:{r:["subPage"],s:'_0==="progress"'}}]}]}," "],p:{actions:[{t:4,f:[{t:7,e:"Progress",a:{percentage:[{t:2,r:"protecting.progress"}],cssCls:"kin_actions__progress"}}," ",{t:7,e:"h4",a:{class:"h4"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.protecting")'}}]}],n:50,r:"protecting.inProgress"},{t:4,n:51,f:[{t:4,n:50,x:{r:["selectedFiles.length","protecting.inProgress"],s:"_0===0&&!_1"},f:[{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("sensitivedata.documentsSelected",_1)'}}]}," ",{t:7,e:"kin-button",a:{size:"small"},v:{click:{n:"selectAllFiles",d:[{t:2,x:{r:[],s:"true"}}]}},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.selectAll")'}}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:7,e:"button",a:{class:"a"},v:{click:"done"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.skipForNow")'}}]}]}]},{t:4,n:50,x:{r:["selectedFiles.length","protecting.inProgress"],s:"!(_0===0&&!_1)"},f:[" ",{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("sensitivedata.documentsSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"Ipm",a:{id:[{t:2,r:"IPM_BUTTON_ELM"}],condition:[{t:2,r:"ipmButtonAllowed"}]},f:[{t:7,e:"kin-button",a:{id:"sds_protect",size:"small","data-test":"sds_table_mainCTA"},v:{click:{n:"protectSelectedFiles",d:[{t:2,r:"selectedFiles"}]}},f:[{t:7,e:"span",f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.protectAll")'}}],n:50,x:{r:["files.length","selectedFiles.length"],s:"_0===_1"}},{t:4,n:51,f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.protectSelected")'}}],x:{r:["files.length","selectedFiles.length"],s:"_0===_1"}}]}]}," ",{t:4,f:[{t:7,e:"Tooltip",a:{openerSelector:"#sds_protect",position:"top",alignment:"center",margin:"10",cssCls:"g-align--center -arrow-bottom"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.protectAll.desc")'}}]}],n:50,x:{r:["protecting.inProgress"],s:"!_0"}}]}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:3,x:{r:["nls"],s:'_0("global.escToDeselect")'}}]}]}],r:"protecting.inProgress"}]}}),k=function(s){return e.extend({template:s,components:{StopProtectingModal:b},twoway:!1,data:()=>({UPSELL_ANIMATION:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAMAAAAKqCSwAAAAjVBMVEUAAAChtOeVrd+PptmN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RDp/gtBgEtCUdnI0/qCxWtLEUWLuA/4kEZpoU//+KeryFRgbR0MGBqW6Uxfi5VcJ/gtYqTewfB0QAIaEaD+C0c7ni4l0WKoT9NUGfDWE5foLP4rTlGC5ARj9v+YB1//99+/7Dp0yjCmcZ13JAAAAAElFTkSuQmCC",isStandalone:void 0,innerUpsell:void 0,shieldLicensed:i.isLicensed(g),shieldEnabled:i.isEnabled(g),files:[],selectedFiles:[],modalDialog:void 0,loading:!0,scanState:null,enabledSwitchDisabled:!1}),onrender(){d.kinTableScrollable.initRactive(this)},oninit(){this.log=t.createLogger("sensitiveData"),this.listeners=[],this.listeners.push(o.on("app.dataScan.ConfigChange",(()=>{this._initFiles()}))),this.observe("files",(e=>{const t=e.map((e=>e.filename)),s=this.get("selectedFiles").filter((e=>t.includes(e)));this.set("selectedFiles",s),this.fire("protectedFilesCount",e.length)})),this._updateFeature(),this.listeners.push(o.on(`product.change.feature.${g}`,(e=>{this._updateFeature(e)}))),this.on("toggleSdtSwitch",((e,t)=>{t?p.stopOptions().then((e=>{this._toggleStatus(t,e.time)})).catch((()=>{this.log.info("no stop option selected.. doing nothing")})):this._toggleStatus(t)})),this._deselectAll=()=>{this._selectAllFiles(!1)},this._deselectAllBind=this._deselectAll.bind(this),window.addEventListener("kin-deselectAll",this._deselectAllBind),this.on("selectAllFiles",(e=>{this._selectAllFiles(e.node.checked)})),this.on("selectFile",((e,t)=>{const s=this.get("selectedFiles");e.node.checked?s.includes(t.filename)||s.push(t.filename):s.splice(s.indexOf(t.filename),1),this.set("selectedFiles",s)})),this.on("startScan",(()=>{location.hash="SensitiveData/Scan"})),this.on("askStopProtecting",((e,t)=>{this.set("modalDialog",{type:"stopProtecting",filesToStopProtecting:t})})),this.on("StopProtectingModal.stopProtecting",((e=[])=>{this.stopProtecting(e)})),this.on("StopProtectingModal.close",((e=[])=>{this.set("modalDialog",void 0)})),this.on("preview",((e,t)=>{m.previewFile(t)})),this.on("addFiles",(()=>{m.addFilesManually()})),a("app.data_scan_ui.GetStatus").then((e=>{this.set("scanState",v(e))})),this.listeners.push(o.on("app.data_scan_ui.onStatusChange",(e=>{this.set("scanState",v(e))}))),this._initFiles()},_toggleStatus(e,t){let s;this.set("enabledSwitchDisabled",!0),s=e?i.disableFeature(g,t):i.enableFeature(g),s.catch((e=>{this.log.error("error when switching shield",e),this.set("enabledSwitchDisabled",!1)}))},_initFiles(){m.getFiles({getNotProtected:!1,createAllFilesCategory:!0,createCategories:!1}).then((e=>{const t=e.categories[0]?e.categories[0].files:[],s=[],i=[];for(const n of t)m.injectFileDetails(n),i.push(m.getFileIcon(n).then((e=>{n.icon=e,s.push(n)})));Promise.all(i).then((()=>{})).catch((()=>{})).then((()=>{this.set({files:s,loading:!1})}))}))},_updateFeature(e){if(this.set("enabledSwitchDisabled",!1),e)return this.set({shieldEnabled:e.enabled,shieldLicensed:e.licensed}),Promise.resolve();this.set("shieldLicensed",i.isLicensed(g)),this.set("shieldEnabled",i.isEnabled(g))},stopProtecting(e){const t=[];for(const s of e)t.push({filename:s,status:!1});a("app.data_scan_ui.ChangeApprovedProtectionStatus",t)},_selectAllFiles(e){const t=this.get("files");if(e){const e=t.map((e=>e.filename));this.set("selectedFiles",e)}else this.set("selectedFiles",[])},onteardown(){window.removeEventListener("kin-deselectAll",this._deselectAllBind),this.listeners.forEach((e=>e()))}})}({v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("sensitivedata")'}}],cssCls:"sdt",settingsUrl:[{t:2,x:{r:["IS_STANDALONE"],s:'_0?"":"#Settings/SensitiveData"'}}],upsell:[{t:2,x:{r:["shieldLicensed","innerUpsell"],s:"!_0&&!_1"}}],inactive:[{t:2,x:{r:["shieldEnabled"],s:"!_0"}}],inactiveMsg:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.inactive.tooltip")'}}],backHash:"#privacy"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:4,f:[{t:7,e:"Crumbs",a:{section:"privacy",moduleId:"sensitivedata",customBreadcrumbs:"true"}}],n:50,x:{r:["IS_STANDALONE"],s:"!_0"}}]}," ",{t:7,e:"div",a:{slot:"controls"},f:[{t:4,f:[{t:7,e:"Switch",a:{attr:"{id:'sensitivedata-switch'}",checked:[{t:2,r:"shieldEnabled"}],disabled:[{t:2,r:"enabledSwitchDisabled"}],preventToggle:"true",title:[{t:2,x:{r:["nls"],s:'_0("sensitivedata")'}}],cssCls:"-medium"},v:{domClick:"toggleSdtSwitch"}}],n:50,x:{r:["IS_STANDALONE"],s:"!_0"}}]}," ",{t:4,f:[{t:7,e:"div",a:{slot:"upsell"},f:[{t:7,e:"Upsell",a:{desc:[{t:3,x:{r:["nls"],s:'_0("upsell.desc.sensitiveData")'}}],animation:[{t:2,r:"UPSELL_ANIMATION"}]}}]}],n:50,x:{r:["shieldLicensed","innerUpsell"],s:"!_0&&!_1"}}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:7,e:"kin-view",a:{loading:[{t:2,r:"loading"}]},f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"cta"},f:[{t:7,e:"kin-button",v:{click:"startScan"},a:{processing:[{t:2,x:{r:["scanState"],s:'_0==="running"'}}],"data-test":"sds_start"},f:[{t:7,e:"span",f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.scanRunning")'}}],n:50,x:{r:["scanState"],s:'_0==="running"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["scanState"],s:'_0==="results"'},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.scanResults")'}}]},{t:4,n:50,x:{r:["scanState"],s:'!(_0==="results")'},f:[" ",{t:3,x:{r:["nls"],s:'_0("sensitivedata.scanForSensitiveDocs.btn")'}}]}],x:{r:["scanState"],s:'_0==="running"'}}]}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"kin-table",a:{datalength:[{t:2,r:"files.length"}],dataname:"files",selecteditems:[{t:2,r:"selectedFiles.length"}],scrollrootselector:"kin-view"},f:[{t:7,e:"div",a:{slot:"table-header",role:"row",class:"sdt_table__header"},f:[{t:7,e:"input",v:{click:"selectAllFiles"},a:{type:"checkbox",class:["checkbox ",{t:4,f:["-some-checked"],n:50,x:{r:["files.length","selectedFiles.length"],s:"_0!==_1&&_1>0"}}," ",{t:4,f:["-checked"],n:50,x:{r:["files.length","selectedFiles.length"],s:"_0===_1&&_1>0"}}],disabled:[{t:2,x:{r:["files.length"],s:"_0===0"}}],checked:[{t:2,x:{r:["selectedFiles.length"],s:"_0>0"}}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectAllItems")'}}]}}," ",{t:7,e:"div"}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.protectedDocumentLabel")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("global.location")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.type")'}}]}," ",{t:7,e:"div"}]}," ",{t:7,e:"div",a:{slot:"table-body"},f:[{t:4,f:[{t:7,e:"div",a:{role:"row",class:"kin_table__row sdt_table__row","data-test":["table-row-",{t:2,r:"@index"}],"aria-rowindex":[{t:2,r:"@index"}]},f:[{t:7,e:"input",v:{click:{n:"selectFile",d:[{t:2,r:"."}]}},a:{type:"checkbox",class:"checkbox",checked:[{t:2,x:{r:["selectedFiles","filename"],s:"_0.includes(_1)"}}],id:["sds-files-",{t:2,r:"@index"}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectItem")'}}]}}," ",{t:7,e:"div",a:{class:"kin_table__icon"},f:[{t:7,e:"img",a:{height:"24px",class:"kin-img",src:["data:image/png;base64,",{t:2,r:"icon"}]}}," ",{t:7,e:"kin-icon",a:{name:"badge-ok",size:"16",class:"sdt_file-tick-icon"}}]}," ",{t:7,e:"div",a:{class:"kin_table__name",dir:"ltr"},f:[{t:7,e:"label",a:{id:["name-tooltip-opener-",{t:2,r:"@index"}],class:"g-ellipsis",for:["sds-files-",{t:2,r:"@index"}]},f:[{t:2,r:"name"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#name-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"name"}]}]}," ",{t:7,e:"div",a:{dir:"ltr"},f:[{t:7,e:"p",a:{id:["path-tooltip-opener-",{t:2,r:"@index"}],class:"p g-ellipsis"},f:[{t:2,r:"folder"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#path-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"folder"}]}]}," ",{t:7,e:"div",f:[{t:7,e:"p",a:{id:["type-tooltip-opener-",{t:2,r:"@index"}],class:"p g-ellipsis"},f:[{t:3,x:{r:["nls","categoryTitle"],s:'_0("sensitivedata."+_1)'}}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#type-tooltip-opener-",{t:2,r:"@index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:3,x:{r:["nls","categoryTitle"],s:'_0("sensitivedata."+_1)'}}]}]}," ",{t:7,e:"div",a:{class:"kin_table__actions -overlay"},f:[{t:4,f:[{t:7,e:"kin-button",a:{id:["preview-tooltip-opener-",{t:2,r:"@index"}],type:"blank",size:"small",icononly:0,class:"g-margin-right--5",title:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.open")'}}," ",{t:2,r:"name"}]},v:{click:{n:"preview",d:[{t:2,r:"filename"}]}},f:[{t:7,e:"kin-icon",a:{size:"16",name:"search"}}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#preview-tooltip-opener-",{t:2,r:"@index"}],cssCls:"-link",alignment:"center"},f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.open")'}}]}],n:50,r:"offer_preview"}," ",{t:7,e:"kin-button",a:{id:["stopProtecting-tooltip-opener-",{t:2,r:"@index"}],type:"blank",size:"small",icononly:0,title:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}," ",{t:2,r:"name"}]},v:{click:{n:"askStopProtecting",d:["[",{t:2,r:"filename"},"]"]}},f:[{t:7,e:"kin-icon",a:{size:"10",name:"icon-s-controls-close"}}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#stopProtecting-tooltip-opener-",{t:2,r:"@index"}],position:"top",alignment:"center"},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}]}]}],n:52,r:"rows_files"}]}," ",{t:7,e:"div",a:{slot:"table-empty-icon",class:"svg -empty-table"}}," ",{t:7,e:"div",a:{slot:"table-empty"},f:[{t:7,e:"p",f:[{t:3,x:{r:["nls"],s:'_0("sensitivedata.empty.desc")'}}]}]}]}," ",{t:4,f:[{t:7,e:"StopProtectingModal",a:{filesToStopProtecting:[{t:2,r:"modalDialog.filesToStopProtecting"}]}}],n:50,x:{r:["modalDialog","modalDialog.type"],s:'_0&&_1==="stopProtecting"'}}]}," ",{t:7,e:"div",a:{slot:"view-actions"},f:[{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("sensitivedata.documentsSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"kin-button",a:{size:"small"},v:{click:{n:"askStopProtecting",d:[{t:2,r:"selectedFiles"}]}},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:3,x:{r:["nls"],s:'_0("global.escToDeselect")'}}]}]}]}]}]}]}),A=/module=SensitiveData/.test(location.search),w=e.extend({template:{v:3,t:[{t:7,e:"Standalone",a:{module:"SensitiveData",product:[{t:2,r:"product"}],title:[{t:3,x:{r:["nls","product"],s:'_0("global.product."+_1)'}}],minimizeIconTitle:[{t:3,x:{r:["nls"],s:'_0("global.minimize")'}}],closeIconTitle:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]},f:[{t:4,f:[{t:7,e:"Scan",a:{isStandalone:[{t:2,r:"IS_STANDALONE"}]}}],n:50,x:{r:["pageState"],s:'_0==="Scan"'}},{t:4,n:51,f:[{t:7,e:"Files",a:{isStandalone:[{t:2,r:"IS_STANDALONE"}],innerUpsell:[{t:2,r:"params.innerUpsell"}]}}],x:{r:["pageState"],s:'_0==="Scan"'}}]}]},css:".sdt_table__header,\n.sdt_table__row {\n  grid-template-columns: 5% 25% 39% 21% 10%;\n}\n.avs .sdt_scan_table__header,\n.avs .sdt_scan_table__row {\n  grid-template-columns: 4% 26% 40% 25% 5%;\n}\n.sdt_file-tick-icon {\n  position: absolute;\n  top: 22px;\n  left: 22px;\n}\n.sdt_table__name {\n  width: 35%;\n}\n.sdt_table__def {\n  width: 60%;\n  max-width: 0;\n}\n.sdt_table__def span {\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  max-width: 100%;\n  display: block;\n}\n",router:new s,components:{Scan:S,Files:k,Standalone:h},data:()=>({IS_STANDALONE:A,product:i.getProduct(),pageState:void 0,titlebarTitle:void 0}),oninit(){if(this.on("Upsell.init",(()=>{r.event("Upsell","View")})),this.on("Upsell.buy",(()=>{n.openWindow(343)})),this.router.on("/",(()=>{this.get("params.scanAutoStart")?this.set("pageState","Scan"):this.set("pageState","Files")})),this.router.on("/Scan",(()=>{console.log("hash SensitiveData/Scan"),this.set("pageState","Scan")})),A){const e=this.updateRouter.bind(this);window.addEventListener("hashchange",e),this.offHashChange=window.removeEventListener.bind(window,"hashchange",e),this.router.on("/:level1/:level2",(e=>{"SensitiveData"===e.level1&&this.router.emit("/"+e.level2)})),this.updateRouter()}},onteardown(){this.router.removeAllListeners(),this.offHashChange&&this.offHashChange()},updateRouter(){this.router.emit(window.location.hash)}}),F=t.createLogger("sensitivedata.detectionDialog"),P=/[\/|\\]/g,C="block",y="allow",D="ignore";const N={error:{name:"icon-l-sensitive-data"},ok:{name:"icon-s-status-check"}},L={title:"sensitivedata",desc:"sensitivedata.settings.desc",restrictAccess:"sensitivedata.settings.restrictAccess",restrictAccessDesc:"sensitivedata.settings.restrictAccess.desc",viewAllowedAndBlockedApps:"settings.viewAllowedAndBlockedApps"},I={restrictAccess:{label:c(L.restrictAccess),desc:c(L.restrictAccessDesc),path:"sds://SensitiveDataScan/Common/RestrictAccess",track:{subject:"Restrict document access"},search:{title:L.restrictAccess,desc:L.restrictAccessDesc}},allowedAndBlockedAppsLink:{id:"sds_settings_allowedAndBlockedAppsLink",search:L.viewAllowedAndBlockedApps}},T={title:L.title,desc:L.desc,items:I},B=e.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{component:[{t:2,r:"component"}],ipmBuyElm:[{t:2,r:"ipmBuyElm"}],title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],stopOptions:[{t:2,r:"stopOptions"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.restrictAccess"}]}}," ",{t:7,e:"div",a:{id:[{t:2,r:"properties.allowedAndBlockedAppsLink.id"},"__container"]},f:[{t:7,e:"SettingsWhiteAndBlackList"}]}]}]},data:function(){return{STRINGS:L,component:g,ipmBuyElm:343,stopOptions:{},properties:I}}}),E=function(t){return e.components.DetectionDialog.extend({asyncLoad:!0,gaTrack:r,oninit:function(){this._super(),F.info("oninit"),this._data=this.getData(),this.set("config",this.getConfig()),window.setTimeout(this.ready.bind(this),0)},windowClose(e){l.broadcastEvent("settings.blockedAndAllowedApps.changed",{updateDelay:1e3}).finally((()=>{l.close(e)}))},getData(){const e=this.get("params.appname"),t=this.get("params.filename");return{appName:e?e.split(P).pop():"---",appPath:e,fileName:t?t.split(P).pop():"---",filePath:t}},getConfig(){F.info("getConfig");const e={icon:{name:t.error.name},title:c("sensitivedata.protectedfile"),text:c("sensitivedata.detected",this._data.appName,this._data.fileName),actionText:c("sensitivedata.whatToDo"),actions:[],details:this.getDetails(),closeResponse:{returnCode:D},color:"red"};return e.actions.push({label:c("sensitivedata.blockDetectedApp"),nextConfig:this.getBlockedConfig()}),e.actions.push({label:c("sensitivedata.allowDetectedApp"),nextConfig:this.getAllowedConfig()}),e},getBlockedConfig(){return F.info("getting the blocked config"),{icon:{name:t.ok.name},title:c("sensitivedata.appBlocked.title"),text:c("sensitivedata.appBlocked.desc",this._data.appName,this._data.fileName),actionText:c("sensitivedata.weAlwaysBlock"),actions:[{label:c("global.gotIt")}],details:this.getDetails(),status:{text:c("sensitivedata.blocked")},closeResponse:{returnCode:C},color:"green"}},getAllowedConfig(){return F.info("getting the allowed config"),{icon:{name:t.ok.name},title:c("sensitivedata.appAllowed.title"),text:c("sensitivedata.appAllowed.desc",this._data.appName,this._data.fileName),actionText:c("sensitivedata.weAlwaysAllow"),actions:[{label:c("global.gotIt")}],details:this.getDetails(),status:{text:c("sensitivedata.allowed")},closeResponse:{returnCode:y},color:"green"}},getDetails(){return F.info("getting details"),[{title:c("global.appName"),value:this._data.appPath,testValue:"threatName"},{title:c("global.filePath"),value:this._data.filePath,testValue:"file"},{title:c("global.detectedBy"),value:c("sensitivedata"),testValue:"detectedBy_SensitiveDatashield"}]}})}(N);export default w;export{m as ServiceProxy,E as detection,B as settings,T as settingsSearchStrings};const R={name:"SensitiveData",version:"1.2.467",created:"2021-03-10T09:10:56.066Z"};export{R as metadata};