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/DataShredder.js
//{"name":"DataShredder","version":"1.2.218","created":"2021-03-09T09:30:18.006Z"}
import t from"./ractive.js";import{Router as e,logger as s}from"./libs.js";import{eventer as i,napiTracker as r,serviceRequest as n}from"./napi.js";import{productModel as a,ipmService as o}from"./napiExtensions.js";import{nls as l}from"./i18n.js";import{modals as d}from"./ractiveComponents.js";const h="DataShredder",c={progress:0},g={5:"ERROR_ACCESS_DENIED",19:"ERROR_WRITE_PROTECT",32:"ERROR_SHARING_VIOLATION",1300:"ERROR_NOT_ALL_ASSIGNED"},f=t.extend({router:new e,template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,r:"heading.title"}],cssCls:["dts ",{t:2,r:"kinPageClass"}],settingsUrl:[{t:2,x:{r:["licensed"],s:'_0?"#Settings/DataShredder":""'}}],upsell:[{t:2,x:{r:["licensed"],s:"!_0"}}],backHash:"#privacy",loading:[{t:2,r:"loading"}]},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{section:"privacy",moduleId:"datashredder",customBreadcrumbs:[{t:2,r:"customBreadcrumbs"}]}}]}," ",{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.dataShredder")'}}],animation:[{t:2,r:"UPSELL_ANIMATION"}]}}]}],n:50,x:{r:["licensed"],s:"!_0"}}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"kin_page-content -scan-with-header"},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,r:"heading.subtitle"}]}," ",{t:7,e:"div",a:{class:"kin_scan__progress"},f:[{t:7,e:"kin-progress",a:{percentage:[{t:2,r:"status.progress"}],dotted:"true"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"kin_scan__result"},f:[{t:7,e:"p",a:{class:"kin_scan__subtitle -overlay"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.stopping")'}}]}]}],n:50,x:{r:["status.state","STATES.stopping"],s:"_0===_1"}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"kin_scan__result"},f:[{t:7,e:"p",a:{class:"kin_scan__subtitle -overlay"},f:[{t:3,r:"action"}]}]}," ",{t:7,e:"div",a:{class:"kin_scan__actions"},f:[{t:7,e:"button",a:{class:"btn -secondary -medium -submit"},v:{click:"stopShredding"},f:[{t:2,x:{r:["nls"],s:'_0("global.stop")'}}]}]}],x:{r:["status.state","STATES.stopping"],s:"_0===_1"}}]}],n:50,x:{r:["STATES.running","status.state","STATES.stopping"],s:"_1===_0||_1===_2"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["status.state","STATES.finished"],s:"_0===_1"},f:[{t:7,e:"div",a:{class:"kin_page-content -scan"},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:2,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.filesShreddedSuccessfully",_1)'}}]}],n:50,x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"},f:[{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:2,x:{r:["nls","selectedPartitionLabel"],s:'_0("datashredder.operationDone.partition",_1)'}}]}]},{t:4,n:50,x:{r:["TARGET_TYPES.partition","target","TARGET_TYPES.freespace"],s:"(!(_1===_0))&&(_1===_2)"},f:[" ",{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.operationDone.freespace")'}}]}]},{t:4,n:50,x:{r:["TARGET_TYPES.partition","target","TARGET_TYPES.freespace"],s:"(!(_1===_0))&&(!(_1===_2))"},f:[" ",{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.operationDone")'}}]}]}],x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}}," ",{t:7,e:"p",a:{class:"kin_scan__subtitle -overlay"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.operationDone.desc")'}}]}]}," ",{t:7,e:"div",a:{class:"kin_scan__actions"},f:[{t:7,e:"button",a:{class:"btn -medium -submit"},v:{click:"confirmEnd"},f:[{t:2,x:{r:["nls"],s:'_0("global.done")'}}]}]}]}]},{t:4,n:50,x:{r:["STATES.finished","status.state","STATES.failed"],s:"(!(_1===_0))&&(_1===_2)"},f:[" ",{t:7,e:"div",a:{class:"kin_page-content -scan"},f:[{t:7,e:"kin-icon",a:{name:"circle-error",class:"kin_scan__icon",size:"96"}}," ",{t:7,e:"div",a:{class:"kin_scan__result"},f:[{t:7,e:"h1",a:{class:"h1 kin_scan__title -overlay"},f:[{t:2,r:"errorInfo"}]}," ",{t:7,e:"p",a:{class:"kin_scan__subtitle -overlay"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.errorLog")'}},": ",{t:7,e:"button",v:{click:"openErrorLog"},a:{class:"a","data-test":"dts_error-log"},f:[{t:2,r:"status.errorPath"}]}]}," ",{t:7,e:"div",a:{class:"kin_scan__actions"},f:[{t:7,e:"button",a:{class:"btn -medium -submit"},v:{click:"confirmEnd"},f:[{t:2,x:{r:["nls"],s:'_0("global.done")'}}]}," ",{t:4,f:[{t:7,e:"button",v:{click:"showErrorFilesModal"},a:{class:"btn -secondary -medium g-margin-left--5","data-test":"dts_error-files"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.error.showFiles")'}}]}],n:50,r:"status.errorPath"}]}]}]}]}],x:{r:["STATES.running","status.state","STATES.stopping"],s:"_1===_0||_1===_2"}}],n:50,x:{r:["screen"],s:'_0==="scan"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["screen"],s:'_0==="table"'},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:2,x:{r:["nls"],s:'_0("datashredder.filesForShredding.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:8,r:"shred_files_table"}]}," ",{t:7,e:"div",a:{slot:"view-actions"},f:[{t:4,f:[{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.filesSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"button",a:{class:"btn -small"},v:{click:{n:"selectAllFiles",d:[{t:2,x:{r:[],s:"true"}}]}},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.selectAll")'}}]}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:7,e:"button",v:{click:"cancelFileShredding"},a:{class:"a"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.skipForNow")'}}]}]}],n:50,x:{r:["selectedFiles.length"],s:"_0===0"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["showProgressInfo","fakeProgressRunning","status.state","STATES.running"],s:"_0&&(_1||_2===_3)"},f:[{t:7,e:"div",f:[{t:7,e:"Progress",a:{asymptotic:"true",percentage:[{t:2,r:"status.progress"}],cssCls:"kin_actions__progress"}}," ",{t:7,e:"h4",a:{class:"h4"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredding")'}}]}]}]},{t:4,n:50,x:{r:["showProgressInfo","fakeProgressRunning","status.state","STATES.running"],s:"!(_0&&(_1||_2===_3))"},f:[" ",{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.filesSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"button",a:{class:"btn -small","data-test":"dts_table_mainCTA"},v:{click:"shredSelectedFiles"},f:[{t:4,f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredAll")'}}],n:50,x:{r:["addedFiles.length","selectedFiles.length"],s:"_0===_1"}},{t:4,n:51,f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredSelected")'}}],x:{r:["addedFiles.length","selectedFiles.length"],s:"_0===_1"}}]}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:3,x:{r:["nls"],s:'_0("global.escToDeselect")'}}]}]}],x:{r:["selectedFiles.length"],s:"_0===0"}}]}]}]},{t:4,n:50,x:{r:["screen"],s:'(!(_0==="table"))&&(_0==="main")'},f:[" ",{t:7,e:"kin-view",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("datashredder.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"section",a:{class:"dts_cubes sixpack"},f:[{t:7,e:"div",a:{class:"sixpack__2"},f:[{t:7,e:"button",a:{class:"cube -blank -full","data-test":"dts_files"},v:{click:{n:"selectTarget",d:[{t:2,r:"TARGET_TYPES.files"}]}},f:[{t:7,e:"div",a:{class:"cube__icon g-margin-bottom--10"},f:[{t:7,e:"kin-icon",a:{name:"icon-l-documents",class:"color-secondary -text"}}]}," ",{t:7,e:"span",a:{class:"btn -secondary"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.selectFiles")'}}]}," ",{t:7,e:"span",a:{class:"cube__label"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredFiles")'}}," ",{t:7,e:"span",a:{class:"cube__desc"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredFiles.desc")'}}]}]}]}]}," ",{t:7,e:"div",a:{class:"sixpack__2"},f:[{t:7,e:"button",a:{class:"cube -blank -full","data-test":"dts_partition"},v:{click:{n:"selectTarget",d:[{t:2,r:"TARGET_TYPES.partition"}]}},f:[{t:7,e:"div",a:{class:"cube__icon g-margin-bottom--10"},f:[{t:7,e:"kin-icon",a:{name:"icon-l-hdd",class:"color-secondary -text"}}]}," ",{t:7,e:"span",a:{class:"btn -secondary"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.selectDisk")'}}]}," ",{t:7,e:"span",a:{class:"cube__label"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredPartition")'}}," ",{t:7,e:"span",a:{class:"cube__desc"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredPartition.desc")'}}]}]}]}]}," ",{t:7,e:"div",a:{class:"sixpack__2"},f:[{t:7,e:"button",a:{class:"cube -blank -full","data-test":"dts_space"},v:{click:{n:"selectTarget",d:[{t:2,r:"TARGET_TYPES.freespace"}]}},f:[{t:7,e:"div",a:{class:"cube__icon g-margin-bottom--10"},f:[{t:7,e:"kin-icon",a:{name:"icon-l-bin",class:"color-secondary -text"}}]}," ",{t:7,e:"span",a:{class:"btn -secondary"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.selectFiles")'}}]}," ",{t:7,e:"span",a:{class:"cube__label"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace")'}}," ",{t:7,e:"span",a:{class:"cube__desc"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace.desc")'}}]}]}]}]}]}]}]}]}],x:{r:["screen"],s:'_0==="scan"'}}]}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:4,f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredPartition.modal.title")'}}],n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.freespace"],s:"_0===_1"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace.modal.title")'}}]}],x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}}]},f:[{t:7,e:"p",a:{class:"modal__subtitle"},f:[{t:4,f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredPartition.modal.desc")'}}],n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.freespace"],s:"_0===_1"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace.modal.desc")'}}]}],x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"selectlist__wrap g-margin-top--20"},f:[{t:7,e:"div",a:{class:"dts_label"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.driveName")'}}]}," ",{t:4,f:[{t:7,e:"button",v:{click:{n:"selectDrive",d:[{t:2,r:"."}]}},a:{class:"selectlist","data-test":["dts_select-drive-",{t:2,r:"./id"}]},f:[{t:7,e:"div",a:{class:"selectlist__item dts_item"},f:[{t:7,e:"div",a:{class:"color-white -text"},f:[{t:2,r:"label"}]}," ",{t:7,e:"div",a:{class:"dts_item__actions"},f:[{t:4,f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredIt")'}}],n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.freespace"],s:"_0===_1"},f:[{t:2,x:{r:["nls"],s:'_0("datashredder.shredDeletedFiles")'}}]}],x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}}," ",{t:7,e:"kin-button",v:{click:{n:"selectDrive",d:[{t:2,r:"."}]}},a:{size:"small",icononly:"true",type:"blank"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-arrow-right",size:"16",rtlflip:"true"}}]}]}]}]}],r:"drives"}]}],n:50,r:"drives"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"modal__subtitle"},f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("datashredder.noPartitionAvailable")'}}],n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.freespace"],s:"_0===_1"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.noDiskAvailable")'}}]}],x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"}}]}],r:"drives"}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",v:{click:"close"},a:{class:"btn -secondary -margins g-margin-top--20","data-test":"dts_cancel"},f:[{t:3,x:{r:["nls"],s:'_0("global.cancel")'}}]}]}]}],n:50,x:{r:["drives"],s:"_0!=null"}},{t:4,f:[{t:7,e:"Modal",a:{title:[{t:4,f:[{t:4,f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.shredSelectedFiles.confirm",_1)'}}],n:50,x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.partition"],s:"_0===_1"},f:[{t:3,x:{r:["nls"],s:'_0("datashredder.shredPartition.desc")'}}]},{t:4,n:50,x:{r:["TARGET_TYPES.partition","target","TARGET_TYPES.freespace"],s:"(!(_1===_0))&&(_1===_2)"},f:[" ",{t:3,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace.desc")'}}]}],x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}}],n:50,x:{r:["confirmationLoading"],s:"!_0"}}]},f:[{t:7,e:"p",a:{class:"modal__subtitle"},f:[{t:4,f:[{t:3,x:{r:["nls","ssdsWithoutTrim"],s:'_0("datashredder.ssdAndNoTrimConfirmation",_1)'}}],n:50,r:"ssdsWithoutTrim"},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.shredSelectedFiles.confirm.desc",_1)'}}]},{t:4,n:50,x:{r:["TARGET_TYPES.files","target","TARGET_TYPES.partition"],s:"(!(_1===_0))&&(_1===_2)"},f:[" ",{t:3,x:{r:["nls"],s:'_0("datashredder.shredPartition.confirm")'}}]},{t:4,n:50,x:{r:["TARGET_TYPES.files","TARGET_TYPES.partition","target","TARGET_TYPES.freespace"],s:"(!(_2===_0))&&((!(_2===_1))&&(_2===_3))"},f:[" ",{t:3,x:{r:["nls"],s:'_0("datashredder.shredFreeSpace.confirm")'}}]}],r:"ssdsWithoutTrim"}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",v:{click:"confirm"},a:{disabled:[{t:2,r:"confirmationLoading"}],class:[{t:2,x:{r:["confirmationLoading"],s:'_0?"-running":""'}}," btn -critical -margins g-margin-top--20"],"data-test":"dts_confirm-delete"},f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("global.yes")'}}],n:50,r:"ssdsWithoutTrim"},{t:4,n:51,f:[{t:4,n:50,x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"},f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.shredSelectedFiles.confirm.btn",_1)'}}]},{t:4,n:50,x:{r:["target","TARGET_TYPES.files"],s:"!(_0===_1)"},f:[" ",{t:3,x:{r:["nls"],s:'_0("datashredder.yesDelete")'}}]}],r:"ssdsWithoutTrim"}]}," ",{t:7,e:"button",v:{click:"close"},a:{disabled:[{t:2,r:"confirmationLoading"}],class:"btn -secondary -margins g-margin-top--20 g-margin-left--10","data-test":"dts_close-delete"},f:[{t:4,f:[{t:3,x:{r:["nls","selectedFiles.length"],s:'_0("datashredder.shredSelectedFiles.cancel.btn",_1)'}}],n:50,x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}},{t:4,n:51,f:[{t:3,x:{r:["nls"],s:'_0("global.no")'}}],x:{r:["target","TARGET_TYPES.files"],s:"_0===_1"}}]}]}]}],n:50,r:"showShreddingConfirmation"},{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls"],s:'_0("datashredder.error.filesModal.title")'}}],scrollable:0},v:{close:"ErrorFilesModal.close"},f:[{t:7,e:"div",a:{class:"modal g-align--left"},f:[{t:4,f:[{t:7,e:"p",f:[{t:4,f:[{t:4,f:[{t:2,r:"filePath"},{t:7,e:"br"}],n:50,r:"filePath"}],n:52,r:"status.errors"}]}],n:50,r:"status.errorPath"}]}," ",{t:7,e:"div",a:{class:"modal__footer"},f:[{t:7,e:"button",v:{click:"ErrorFilesModal.close"},a:{class:"btn -margins g-margin-top--20","data-test":"dts_error-files-close"},f:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]}]}]}],n:50,r:"showErrorFilesModal"}],p:{shred_files_table:[{t:7,e:"kin-table",a:{datalength:[{t:2,r:"addedFiles.length"}],selecteditems:[{t:2,r:"selectedFiles.length"}],inactive:[{t:2,x:{r:["status.state","STATES.running"],s:"_0===_1"}}]},f:[{t:7,e:"div",a:{slot:"table-header",role:"row",class:"dts_table__header"},f:[{t:7,e:"input",v:{click:"selectAllFiles"},a:{type:"checkbox",class:["checkbox ",{t:4,f:["-some-checked"],n:50,x:{r:["addedFiles.length","selectedFiles.length"],s:"_0!==_1&&_1>0"}}," ",{t:4,f:["-checked"],n:50,x:{r:["addedFiles.length","selectedFiles.length"],s:"_0===_1&&_1>0"}}],disabled:[{t:2,x:{r:["addedFiles.length","status.state","STATES.running"],s:"_0===0||_1===_2"}}],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("datashredder.filename")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("global.location")'}}]}]}," ",{t:7,e:"div",a:{slot:"table-body"},f:[{t:4,f:[{t:7,e:"div",a:{role:"row",class:"kin_table__row","data-test":["table-row-",{t:2,r:"@index"}],"aria-rowindex":[{t:2,r:"@index"}]},f:[{t:7,e:"input",a:{disabled:[{t:2,x:{r:["status.state","STATES.running"],s:"_0===_1"}}],type:"checkbox",class:"checkbox",checked:[{t:2,x:{r:["selectedFiles","./path"],s:"_0.includes(_1)?true:false"}}],id:["dts-item-",{t:2,r:"@index"}],title:[{t:2,x:{r:["nls","global.selectItem"],s:"_0(_1)"}}]},v:{click:{n:"selectFile",d:[{t:2,r:"."}]}}}," ",{t:7,e:"div",f:[{t:4,f:[{t:7,e:"Icon",a:{name:"folder",cssCls:"dts_file-icon"}}],n:50,r:"isFolder"},{t:4,n:51,f:[{t:7,e:"ImgIcon",a:{src:["data:image/png;base64,",{t:2,r:"icon"}],cssCls:"dts_file-icon"}}],r:"isFolder"}]}," ",{t:7,e:"div",a:{class:"kin_table__name"},f:[{t:7,e:"label",a:{for:["dts-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:"path"}]}," ",{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:"path"}]}]}]}],n:52,r:"addedFiles"}]}]}]}},css:"[slot='table-header'],\n.kin_table__row {\n  grid-template-columns: 4% 26% 70%;\n}\n.dts_file-icon {\n  width: 20px;\n  height: 20px;\n  font-size: 16px;\n}\n.dts_label {\n  text-align: left;\n  margin-left: 5px;\n  margin-bottom: 5px;\n}\n.dts_item {\n  width: 100%;\n  display: flex;\n}\n.dts_item__actions {\n  margin-left: auto;\n}\n.dts_cubes {\n  text-align: center;\n  padding-top: 12vh;\n}\n.dts_crop span {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  display: block;\n  max-width: 90%;\n  margin: 0 auto;\n  direction: rtl;\n}\n.dts_algorythm {\n  line-height: 4rem;\n}\n.dts_algorythm input {\n  width: 8rem;\n}\n.dts_scan__desc {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  text-align: center;\n}\n",twoway:!1,data:function(){return{UPSELL_ANIMATION:"data:image/png;base64,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",status:c,target:null,showProgressInfo:!1,loading:!0,actionMap:{},product:a.getProduct(),licensed:a.isLicensed("datashredder"),selectedFiles:[],selectedPartitionLabel:null,addedFiles:[],fakeProgressRunning:!1}},computed:{screen:function(){const t=this.get("addedFiles").length>0,e=this.get("status.state"),s=this.get("STATES");return s&&(this.get("showProgressInfo")||t)?!t||t&&(e===s.finished||e===s.failed||e===s.stopping)?"scan":"table":"main"},heading:function(){const t=this.get("target"),e=this.get("screen"),s={title:"",subtitle:""};return"table"===e?s.title=l("datashredder.filesForShredding",this.get("selectedFiles").length):"scan"!==e?s.title=l("datashredder"):t===this.get("TARGET_TYPES.partition")?(s.title=l("datashredder.shredPartition"),s.subtitle=l("datashredder.shredding.partition",this.get("selectedPartitionLabel"))):t===this.get("TARGET_TYPES.freespace")&&(s.title=l("datashredder.shredFreeSpace"),s.subtitle=l("datashredder.shreddingFreeSpace")),s},kinPageClass:function(){const t=this.get("screen"),e=this.get("status"),s=this.get("STATES");return"table"===t?"-center-header":"scan"===t?e.state===s.running||e.state===s.stopping?"-center-header":"-no-header -center-all":""},customBreadcrumbs:function(){return"table"===this.get("screen")?[{title:l("datashredder.filesForShredding",this.get("selectedFiles").length)}]:[]},action:function(){const t=this.get("actionMap."+this.get("status.action")),e=t&&t.key,s=t&&t.withSubject&&this.get("status.subject");let i="";return e&&(this.log.debug("updating action "+e+", subject "+s),i=l("datashredder.action."+e,s),i=i.replace("</span>","&lrm;</span>")),i},errorInfo:function(){let t=g[this.get("status.errorCode")];return t||(t="operationFailed"),l("datashredder."+t)}},oninit(){this._deselectAll=function(){this.get("showProgressInfo")||this._selectAllFiles(!1)},this._deselectAllBind=this._deselectAll.bind(this),window.addEventListener("kin-deselectAll",this._deselectAllBind),this.log=s.createLogger("datashredder"),this.log.debug("oninit"),this.offProductChanged=i.on("product.change.state.product",(t=>{this.log.debug("product changed; product: "+t),this.set("product",t)})),this.offFeatureChanged=i.on("product.change.feature.datashredder",(t=>{this.log.debug("feature changed; data: "+JSON.stringify(t)),void 0!==t.licensed&&this.set("licensed",t.licensed)})),this.observe("licensed",((t,e)=>{this.log.info('licensed changed from "'+e+'" to "'+t+'"'),t?this.initialize():this.terminate()})),this.on("Upsell.init",(()=>{r.event("Upsell","View")})),this.on("Upsell.buy",(()=>{o.openWindow(343)})),this.on("cancelFileShredding",(()=>{this.resetShredder()})),this.on("shredSelectedFiles",(()=>{const t='"'+this.get("selectedFiles").join('";"')+'"';this.set("target",this.get("TARGET_TYPES.files")),this.confirmShredding(t).then((t=>{this.startShredding(t)})).catch((()=>{this.log.info("user cancelled confirm dialog")}))})),this.on("selectAllFiles",((t,e)=>{!0===e?this._selectAllFiles(!0):this._selectAllFiles(t.node.checked)})),this.on("selectFile",((t,e)=>{const s=this.get("selectedFiles");t.node.checked?s.includes(e.path)||s.push(e.path):s.splice(s.indexOf(e.path),1),this.set("selectedFiles",s)})),this.router.on("/",(()=>{location.hash==="#"+h&&this.resetShredder()})),this.router.on("/:action/:pathList",(t=>{this.log.info("action via routing detected"),t&&t.pathList&&(t.pathList=decodeURIComponent(t.pathList)),this.get("loading")?(this.log.info("module still loading.. holding the action until done"),this.observeOnce("loading",(e=>{e?this.log.warn("loading change detected but still loading.. the action will not be performed"):(this.log.info("loading done.. performing the action"),this.performRouteAction(t))}))):this.performRouteAction(t)})),this.on("selectTarget",this.onSelectTarget.bind(this)),this.on("stopShredding",this.onStopShredding.bind(this)),this.on("confirmEnd",this.onConfirmEnd.bind(this)),this.on("openErrorLog",this.onOpenErrorLog.bind(this)),this.on("showErrorFilesModal",(()=>this.set("showErrorFilesModal",!0))),this.on("ErrorFilesModal.close",(()=>{this.set("showErrorFilesModal",!1)})),this.initialize()},onteardown(){this.log.debug("onteardown"),this.terminate(),this.offProductChanged&&this.offProductChanged(),this.offFeatureChanged&&this.offFeatureChanged(),window.removeEventListener("kin-deselectAll",this._deselectAllBind),this._deselectAllBind=void 0},initialize(){this.get("licensed")?(this.offStatusChanged=i.on("shredder.onStatusChanged",this.onStatusChanged.bind(this)),Promise.all([n("app.shredder.TARGET_TYPES"),n("app.shredder.STATES"),n("app.shredder.ACTIONS")]).then((t=>{this.log.info("all init requests done");const e=t[2],s={},i=["shreddingFile","shreddingDir","shreddingPartition","cleaning"];this.set("TARGET_TYPES",t[0]),this.set("STATES",t[1]),this.set("ACTIONS",e);for(const r in e)s[e[r]]={key:r,withSubject:-1!==i.indexOf(r)};this.set("actionMap",s),this.pollStatus().then((()=>{this.set("loading",!1)})).catch((()=>{this.set("loading",!1)}))})).catch((()=>{this.log.warn("some init request failed"),this.set("loading",!1)}))):this.set("loading",!1)},terminate(){this.offStatusChanged&&this.offStatusChanged(),this.offStatusChanged=null},onConfirmEnd(){this.log.debug("end confirmed"),this.set("loading",!0),n("app.shredder.Stop").then((()=>{this.set("loading",!1),this.setProgressInfoVisibility(!1),this.resetShredder()}))},setProgressInfoVisibility(t){this.log.info((t?"displaying":"hiding")+" progress info"),this.set("showProgressInfo",t)},resetShredder(){this.log.debug("resetting shredder"),this.set({target:null,selectedPartitionLabel:null,selectedFiles:[],addedFiles:[],status:{progress:0,action:"",state:""}}),location.hash="#"+h},onStatusChanged(t){this.log.info("status changed"),this.log.debug("status data: "+JSON.stringify(t));const e=this.get("STATES");for(const s in t)"progress"===s?setTimeout((()=>{const e=this.get("status.progress");this.set("status.progress",Math.max(e,t[s]))})):this.set("status."+s,t[s]);if(null!=t.state)switch(t.state){case e.failed:this.setProgressInfoVisibility(!0),this.getShredderResult().then((t=>{this.set("status.errors",t.errors)}));break;case e.running:case e.stopping:case e.finished:this.setProgressInfoVisibility(!0);break;case e.stopped:this.setProgressInfoVisibility(!1)}},getShredderResult(){return new Promise(((t,e)=>{n("app.shredder.GetResult").then((e=>{this.log.debug("shredder result polled: "+JSON.stringify(e)),t(e)})).catch((t=>{this.log.error("error while executing app.shredder.GetResult",t),e()}))}))},onSelectTarget(t,e){if(this.log.info("target "+e+" selected"),this.isInProgress())this.log.info("..but shredder is running.. so doing nothing");else switch(this.set("target",e),this.log.debug("gonna open a dialog to select what to shred"),e){case this.get("TARGET_TYPES.files"):this.openFileDialog();break;case this.get("TARGET_TYPES.partition"):case this.get("TARGET_TYPES.freespace"):this.openPartitionOrFreespaceDialog(e).then(this.startShredding.bind(this)).catch((()=>{this.log.info("user cancelled confirm dialog")}));break;default:this.log.warn("target not found among the supported ones")}},startShredding(t){if(t){const e=this.get("target");this.log.info("starting shredding; target: "+e+", pathList: "+t);const s=e===this.get("TARGET_TYPES.files");s&&this.startFakeProgress(),setTimeout((()=>{s&&this.stopFakeProgress(),n("app.shredder.Start",{targetType:e,pathList:t}).then((()=>{this.log.info("shredding successfully started; target: "+e+", pathList: "+t)})).catch((t=>{this.log.error("error while executing app.shredder.Start; error: "+JSON.stringify(t)),d.inform(l("datashredder.start.error"))}))}),s?2e3:0)}else this.log.warn("no path list.. cannot start shredding"),this.resetShredder()},startFakeProgress(){this.set({showProgressInfo:!0,fakeProgressRunning:!0,status:{progress:0,action:"",state:this.get("STATES.running")}})},stopFakeProgress(){this.set("fakeProgressRunning",!1)},addFilesToShred(t){if(t){const e=[],s=[],i=t.split('";"');for(let t of i){t=t.replace(/"/g,""),t=t.replace(/\\\\/g,"\\");const i={name:this._getFileName(t),path:t,isFolder:this._isFolder(t)},r=n("app.utils.GetShellIcon",{path:t,size:"large"}).then((t=>{i.icon=t.data})).catch((e=>{console.error("app.utils.GetShellIcon - "+t,JSON.stringify(e))})).then((()=>{e.push(i)}));s.push(r)}Promise.all(s).catch((()=>{})).then((()=>{this.set("addedFiles",e);const t=e.map((t=>t.path));this.set("selectedFiles",t),location.hash="#"+h+"/FileShredding"}))}},_isFolder:t=>!/[.]/.exec(t),_getFileName:t=>t.split(/[/|\\]/g).pop(),_selectAllFiles(t){const e=this.get("addedFiles");if(this.set("selectedFiles",[]),t){const t=e.map((t=>t.path));this.set("selectedFiles",t)}},openFileDialog(){return this.log.info("opening file/folder dialog"),n("app.utils.SelectFolders").then((t=>{this.log.debug("file/filter dialog result: "+JSON.stringify(t));const e="ok"===t.dialogReturnCode?t.paths:null;e?(this.log.info("selected files/folders "+e),this.addFilesToShred(e)):(this.log.info("no files/folders selected"),this.resetShredder())})).catch((t=>{this.log.error("error while executing app.shredder.SelectFolders",t)}))},openPartitionOrFreespaceDialog(t){this.log.info("opening drive/partition dialog");const e=t===this.get("TARGET_TYPES.partition");return this.stopDrivePolling=this.startDrivePolling(e),new Promise((t=>{this.once("selectDrive",((e,s)=>{this.log.debug("drive/partition selected; data: "+JSON.stringify(s)),this.set("selectedPartitionLabel",s.label),t(s.id)})),this.once("close *.close",(()=>{this.log.debug("drive/partition closed"),t()}))})).then((t=>{if(this.stopDrivePolling(),t)return this.log.info("selected drive/partition: "+t),this.confirmShredding(t);this.log.info("no drive/partition selected"),this.resetShredder()}))},confirmShredding(t){return this.log.info("opening shredding confirmation dialog; pathList: "+t),new Promise(((e,s)=>{let i,r;this.set("showShreddingConfirmation",!0),i=this.once("confirm",(()=>{this.log.info("shredding confirmed; pathList: "+t),n(),this.set("confirmationLoading",!0),this.confirmSsdIfNeeded(t).then((()=>{a(),e(t)})).catch((()=>{a(),s()}))})).cancel,r=this.once("close *.close",(()=>{this.log.info("shredding not confirmed; pathList: "+t),n(),a(),s()})).cancel;const n=()=>{i&&i(),r&&r(),i=null,r=null},a=()=>{this.log.debug("resetting confirmation modal"),this.set("showShreddingConfirmation",null),this.set("confirmationLoading",!1),this.set("ssdsWithoutTrim",null)}}))},confirmSsdIfNeeded(t){return this.log.info("gonna decide whether the SSD shredding confirmation is needed or not; pathList: "+t),new Promise(((e,s)=>{let i,r;this.get("target")===this.get("TARGET_TYPES.files")?this.getSsdsWithoutTrim(t).then((t=>{t.length?(this.log.info("SSD shredding confirmation needed"),i=this.once("confirm",(()=>{this.log.info("SSD shredding confirmed"),n(),e()})).cancel,r=this.once("close *.close",(()=>{this.log.info("SSD shredding not confirmed"),n(),s()})).cancel,this.set("ssdsWithoutTrim",t.join(", ")),this.set("confirmationLoading",!1)):(this.log.info("SSD confirmation dialog not needed"),e())})):(this.log.info("SSD confirmation dialog not needed for this target"),e());const n=()=>{i&&i(),r&&r(),i=null,r=null}}))},getSsdsWithoutTrim(t){return this.log.info("looking for SSDs without trim support; pathList: "+t),new Promise((e=>{this.pollDrives().then((s=>{this.log.debug("collecting the SSDs without trim; pathList: "+t);const i=t.split(";"),r=[];s.forEach((t=>{t.ssd&&!t.trim&&(this.log.debug(t.label+" is SSD without trim"),t.label?i.some((e=>{this.log.debug("..is "+e+"on it?");const s=/^\[-(\w)\]/.exec(t.label),i=s&&s[1];if(0===e.indexOf('"'+i+":"))return this.log.debug("..yes, it is!"),r.push(i||t.id),!0;this.log.debug("..no, it is not!")})):this.log.warn("drive "+t.id+" has no label.. excluding from SSDs"))})),this.log.info("SSDs without trim function: "+JSON.stringify(r)),e(r)})).catch((t=>{this.log.warn("getting drives failed.. returning no SSDs; error: "+t),e([])}))}))},startDrivePolling(t){this.log.info("starting drive polling"),this.stopDrivePolling&&this.stopDrivePolling();const e=()=>{this.pollDrives().then((e=>{t&&(e=e.filter((t=>!t.systemVolume))),this.stopDrivePolling?this.set("drives",e):this.log.debug("..not setting the drives cuz polling has been stopped")}))},s=setInterval(e,1e4);return e(),()=>{this.log.debug("stopping drive polling"),clearInterval(s),this.stopDrivePolling=null,this.set("drives",null)}},pollDrives(){return this.log.debug("polling drives"),new Promise(((t,e)=>{n("app.utils.GetDriveList").then((e=>{this.log.debug("drives polled; drives: "+JSON.stringify(e)),t(e)})).catch((t=>{this.log.error("error while executing app.utils.GetDriveList",t),e()}))}))},pollStatus(){return this.log.debug("polling status"),new Promise(((t,e)=>{n("app.shredder.GetStatus").then((e=>{this.log.debug("status polled; data: "+JSON.stringify(e)),this.onStatusChanged(e),t(e)})).catch((t=>{this.log.error("error while executing app.shredder.GetStatus; error: "+JSON.stringify(t)),e()}))}))},onStopShredding(){this.log.info("gonna stop shredding");const t=()=>{this.log.info("stopping the process"),n("app.shredder.Stop").then((()=>{this.log.info("shredding stopped")})).catch((t=>{this.log.error("error while executing app.shredder.Stop; error: "+JSON.stringify(t)),d.inform(l("datashredder.stop.error"))}))};return this.isInProgress()?this.get("target")===this.get("TARGET_TYPES.partition")?(this.log.info("shredding partition.. requiring stop confirmation"),d.confirm(l("datashredder.shredPartition.stopConfirmation"),{title:l("datashredder.shredPartition.stopConfirmation.title"),ok:l("global.yes"),cancel:l("global.no")}).then((()=>{this.log.info("stop request confirmed"),t()})).catch((()=>{this.log.info("stop request rejected.. doing nothing")}))):t():this.log.info("..but it is not running.. so doing nothing"),Promise.resolve()},isInProgress(){return this.get("status.state")===this.get("STATES.running")||this.get("status.state")===this.get("STATES.stopping")},performRouteAction(t){"Run"===t.action?(this.log.info("shredding performed from context menu; pathList: "+t.pathList),this.addFilesToShred(t.pathList)):this.log.warn("unknown route; params: "+JSON.stringify(t))},onOpenErrorLog(){const t=this.get("status.errorPath");this.log.info("opening error log; errorPath: "+t),t&&n("app.utils.OpenWithDefaultProgram",{filename:t,preventFail:!0})}});const p={title:"datashredder",desc:"datashredder.settings.desc",showInContextMenu:"datashredder.settings.showInContextMenu",algorithmLabel:"datashredder.settings.algorithm.label",algorithmGutman:"datashredder.settings.algorithm.gutman",algorithmDod:"datashredder.settings.algorithm.dod",algorithmRandom:"datashredder.settings.algorithm.random",withPasses:"datashredder.settings.algorithm.withPasses",numberOfPasses:"datashredder.settings.algorithm.numberOfPasses"},_=[{id:"0",name:l(p.algorithmGutman),passCount:26},{id:"1",name:l(p.algorithmDod),passCount:3},{id:"2",name:l(p.algorithmRandom)}],u={algorithm:["avcfg://settings/Shredder/ShredFilesAlg","avcfg://settings/Shredder/ShredFreespaceAlg","avcfg://settings/Shredder/ShredPartitionAlg"],passCount:["avcfg://settings/Shredder/ShredFilesNumpass","avcfg://settings/Shredder/ShredFreespaceNumpass","avcfg://settings/Shredder/ShredPartitionNumpass"]},m={showInContextMenu:{label:l(p.showInContextMenu),path:"avcfg://settings/Shredder/ShowInContextMenu",track:{subject:"Show in context menu"},search:p.showInContextMenu},algorithm:{label:l(p.algorithmLabel),path:u.algorithm,options:_.map((t=>({label:t.name,value:t.id}))),track:{subject:"Algorithm",valueMap:{0:"Gutman",1:"DOD",2:"Random"}},search:{title:p.algorithmLabel,others:[p.algorithmGutman,p.algorithmDod,p.algorithmRandom,p.numberOfPasses]}},passCount:{value:null,path:u.passCount,minValue:1,maxValue:100,required:!0,track:{subject:"Number of passes"}}},S={title:p.title,desc:p.desc,items:m},T=t.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)"}}],noEnable:"true"},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.showInContextMenu"}]}}," ",{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"properties.algorithm"}],labelSmall:0},f:[{t:7,e:"p",a:{class:["dts_algorythm ",{t:2,x:{r:["fixedPassCount"],s:'_0==null?"g-margin-top--10":""'}}]},f:[{t:7,e:"span",a:{class:"span -small -secondary"},f:[{t:3,x:{r:["nls","STRINGS.withPasses"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.passCount"}],inline:"true"}}],n:50,x:{r:["fixedPassCount"],s:"_0==null"}},{t:4,n:51,f:[{t:7,e:"span",a:{class:"span -small -secondary"},f:[{t:2,r:"fixedPassCount"}]}],x:{r:["fixedPassCount"],s:"_0==null"}}," ",{t:7,e:"span",a:{class:"span -small -secondary"},f:[{t:3,x:{r:["nls","STRINGS.numberOfPasses"],s:"_0(_1)"}}]}]}]}]}]},css:".dts_algorythm {\n  line-height: 4rem;\n}\n.dts_algorythm input {\n  width: 8rem;\n}\n",data:()=>({STRINGS:p,component:"datashredder",ipmBuyElm:343,properties:m}),computed:{fixedPassCount:function(){return _[this.get("properties.algorithm.value")].passCount}}}),b=[{path:"avcfg://settings/Shredder/CleanFreeSpace",label:"Shred free space: Clean free disk space",type:"checkbox"},{path:"avcfg://settings/Shredder/CleanClusterTips",label:"Shred free space: Clean cluster tips",type:"checkbox"},{path:"avcfg://settings/Shredder/CleanMFT",label:"Shred free space: Clean MFT (on NTFS)",type:"checkbox"},{path:"avcfg://settings/Shredder/CleanFAT",label:"Shred free space: Clean FAT directory entries",type:"checkbox"}];export default f;export{T as settings,b as settingsGeek,S as settingsSearchStrings};const x={name:"DataShredder",version:"1.2.218",created:"2021-03-09T09:30:18.006Z"};export{x as metadata};