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/1.0.663/ |
//{"name":"AntiRansomware","version":"1.2.541","created":"2021-09-06T10:49:09.674Z"} import t from"./ractive.js";import{serviceRequest as e,eventer as n,napiTracker as o,windowApi as s}from"./napi.js";import{productModel as l,ipmService as i,soundService as a}from"./napiExtensions.js";import{logger as r,svelte3Adapter as c}from"./libs.js";import{modals as d}from"./ractiveComponents.js";import{nls as u,moment as m}from"./i18n.js";import{svelteComponents as p}from"./Settings.js";var f=".arw_table__header,\n.arw_table__row {\n grid-template-columns: 3.5rem 5% 25% auto 5%;\n}\n.arw .arw_folder-tick-icon,\n[slot] .arw_folder-tick-icon {\n position: absolute;\n top: 22px;\n left: 22px;\n}\n";const h=function(n){return t.extend({twoway:!1,template:n,css:f,data:()=>({protectedFolders:[],selectedFolders:[],modalDialog:void 0,lastFolderName:"",removeFolderName:void 0,loading:!0}),computed:{lastFolderNameTrimmed:function(){const t=this.get("lastFolderName");return t.slice(0,30)+(t.length>30?"...":"")}},oninit(){this.deselectAll=function(){this._selectAllFolders(!1)},this._deselectAllBind=this.deselectAll.bind(this),window.addEventListener("kin-deselectAll",this._deselectAllBind),this.observe("protectedFolders",(t=>{const e=t.map((t=>t.path)),n=this.get("selectedFolders").filter((t=>e.includes(t)));this.set("selectedFolders",n),this.fire("selectedFoldersCount",n.length),this.fire("protectedFoldersCount",t.length)})),this.on("addFolder",this.addFolder),this.on("askRemoveFolder",((t,e)=>{this.set({folderToRemove:e.path,lastFolderName:e.folderName,modalDialog:"removeFolder"})})),this.on("askRemoveSelectedFolders",(()=>{const t=this.get("selectedFolders");if(1===t.length){const e=t[0],n=this.get("protectedFolders").find((t=>e===t.path)).folderName;this.set({folderToRemove:e,lastFolderName:n,modalDialog:"removeFolder"})}else this.set("modalDialog","removeSelectedFolders")})),this.on("removeFolders",((t,e)=>{const n=this.get("protectedFolders").filter((t=>!e.includes(t.path)));this.set("protectedFolders",n),this._saveData(),this.closeModal()})),this.on("closeModal",this.closeModal),this.on("Modal.close",this.closeModal),this.on("selectAllFolders",(t=>{this._selectAllFolders(t.node.checked)})),this.on("selectFolder",((t,e)=>{const n=this.get("selectedFolders");t.node.checked?n.includes(e.path)||n.push(e.path):n.splice(n.indexOf(e.path),1),this.set("selectedFolders",n),this.fire("selectedFoldersCount",n.length)})),e("app.antiransomware.GetPaths").then((t=>{t&&"function"==typeof t.push||(t=[]),this.set("protectedFolders",t.map((t=>({path:t,folderName:this._getLastFolderName(t)})))),this.set("loading",!1)})).catch((t=>{console.error("error while reading protected folders. err:"+t)}))},_saveData(){const t=this.get("protectedFolders").map((t=>t.path));e("app.antiransomware.SetPaths",t).catch((t=>{console.error("error while setting protected folders. err:"+t)}))},_getLastFolderName(t){const e=t.split(/[\/|\\]/);let n="";do{n=e.pop()}while(n.length<1&&e.length>0);return n},addFolder(){return e("app.utils.SelectFolder").then((t=>{if(!t)return;const n={path:t.replace(/\"/g,""),folderName:""};n.folderName=this._getLastFolderName(n.path);const o=this.get("protectedFolders").reduce(((t,e)=>e.path===n.path?e:t),null);if(o)return this.set("lastFolderName",o.folderName),void this.set("modalDialog","alreadyProtected");e("app.antiransomware.CheckPath",n.path).then((t=>{if(!t)return void this.set("modalDialog","cannotAdd");const e=this.get("protectedFolders");e.push(n),this.set("protectedFolders",e),this._saveData()})).catch((t=>{console.error("error while checking new path, err:"+t)}))})).catch((()=>{}))},_selectAllFolders(t){const e=this.get("protectedFolders");if(t){const t=e.map((t=>t.path));this.set("selectedFolders",t),this.fire("selectedFoldersCount",t.length)}else this.set("selectedFolders",[]),this.fire("selectedFoldersCount",0)},closeModal(){this.set("modalDialog",void 0)},onteardown(){window.removeEventListener("kin-deselectAll",this._deselectAllBind),this._deselectAllBind=void 0}})}({v:3,t:[{t:7,e:"kin-table",a:{datalength:[{t:2,r:"protectedFolders.length"}],selecteditems:[{t:2,r:"selectedFolders.length"}],loading:[{t:2,r:"loading"}]},f:[{t:7,e:"div",a:{slot:"table-header",role:"row",class:"arw_table__header"},f:[{t:7,e:"input",v:{click:"selectAllFolders"},a:{type:"checkbox",class:["checkbox ",{t:4,f:["-checked"],n:50,x:{r:["protectedFolders.length","selectedFolders.length"],s:"_0===_1&&_1>0"}}],disabled:[{t:2,x:{r:["protectedFolders.length"],s:"_0===0"}}],checked:[{t:2,x:{r:["selectedFolders.length"],s:"_0>0"}}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectAllItems")'}}," - ",{t:2,x:{r:["nls"],s:'_0("antiransomware.protectedFolders.title")'}}]},m:[{t:4,f:['aria-checked="mixed"'],n:50,x:{r:["protectedFolders.length","selectedFolders.length"],s:"_0!==_1&&_1>0"}}]}," ",{t:7,e:"div"}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.protectedFolders.title")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("global.location")'}}]}," ",{t:7,e:"div"}]}," ",{t:7,e:"div",a:{slot:"table-body"},f:[{t:4,f:[{t:7,e:"div",a:{role:"row",class:["arw_table__row kin_table__row ",{t:2,x:{r:["selectedFolders","./path"],s:'_0.includes(_1)?"-selected":""'}}],"aria-rowindex":[{t:2,r:"@index"}],"data-test":["table-row-",{t:2,r:"@index"}]},f:[{t:7,e:"input",v:{click:{n:"selectFolder",d:[{t:2,r:"."}]}},a:{type:"checkbox",class:"checkbox",id:["folderName-",{t:2,r:"@index"}],checked:[{t:2,x:{r:["selectedFolders","./path"],s:"_0.includes(_1)"}}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectItem")'}}]}}," ",{t:7,e:"div",a:{class:"kin_table__icon"},f:[{t:7,e:"kin-icon",a:{name:"icon-m-scan-folder",size:"24"}}," ",{t:7,e:"kin-icon",a:{name:"badge-ok",size:"16",class:"arw_folder-tick-icon"}}]}," ",{t:7,e:"div",a:{class:"kin_table__name",dir:"ltr"},f:[{t:7,e:"kin-tooltip",a:{ellipsis:"true","data-test":"kin_table-item-name"},f:[{t:7,e:"label",a:{for:["folderName-",{t:2,r:"@index"}],slot:"tooltip-activator"},f:[{t:2,r:"folderName"}]}," ",{t:7,e:"div",a:{slot:"tooltip"},f:[{t:2,r:"folderName"}]}]}]}," ",{t:7,e:"div",a:{dir:"ltr"},f:[{t:7,e:"kin-tooltip",a:{ellipsis:"true","data-test":"kin_table-item-description"},f:[{t:7,e:"div",a:{slot:"tooltip-activator"},f:[{t:2,r:"path"}]}," ",{t:7,e:"div",a:{slot:"tooltip"},f:[{t:2,r:"path"}]}]}]}," ",{t:7,e:"div",a:{class:"kin_table__actions"},f:[{t:4,f:[{t:7,e:"kin-tooltip",f:[{t:7,e:"div",a:{slot:"tooltip-activator"},f:[{t:7,e:"kin-button",v:{click:{n:"askRemoveFolder",d:[{t:2,r:"."}]}},a:{type:"blank","data-test":"requestDeleteConfirm",size:"tiny",icononly:0},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-close",size:"10"}}]}]}," ",{t:7,e:"div",a:{slot:"tooltip",class:"g-nowrap"},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}]}],n:50,x:{r:["selectedFolders.length"],s:"_0===0"}}]}]}],n:52,r:"protectedFolders"}]}," ",{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("antiransomware.empty.desc.1")'}}]}," ",{t:7,e:"p",f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.empty.desc.2")'}}]}]}]}," ",{t:4,f:[{t:4,f:[{t:7,e:"Modal",a:{cssCls:"nui_modal",autoClose:0,title:[{t:3,x:{r:["nls","lastFolderNameTrimmed"],s:'_0("antiransomware.alreadyProtected.title",_1)'}}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.alreadyProtected.desc")'}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"kin-button",v:{click:"closeModal"},f:[{t:3,x:{r:["nls"],s:'_0("global.gotIt")'}}]}]}]}],n:50,x:{r:["modalDialog"],s:'_0==="alreadyProtected"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["modalDialog"],s:'_0==="cannotAdd"'},f:[{t:7,e:"Modal",a:{cssCls:"nui_modal",autoClose:0,title:[{t:3,x:{r:["nls"],s:'_0("antiransomware.cannotAdd.title")'}}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.cannotAdd.desc")'}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"kin-button",a:{type:"secondary"},v:{click:"closeModal"},f:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]}]}]}]},{t:4,n:50,x:{r:["modalDialog"],s:'(!(_0==="cannotAdd"))&&(_0==="removeFolder")'},f:[" ",{t:7,e:"Modal",a:{cssCls:"nui_modal",autoClose:0,title:[{t:3,x:{r:["nls","lastFolderNameTrimmed"],s:'_0("antiransomware.stopProtectingFolderName.title",_1)'}}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.stopProtectingFolder.desc")'}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"kin-button",a:{"data-test":"modal_confirm"},v:{click:{n:"removeFolders",d:[{t:2,x:{r:["folderToRemove"],s:"[_0]"}}]}},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}," ",{t:7,e:"kin-button",a:{type:"secondary"},v:{click:"closeModal"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.keepProtected")'}}]}]}]}]},{t:4,n:50,x:{r:["modalDialog"],s:'(!(_0==="cannotAdd"))&&((!(_0==="removeFolder"))&&(_0==="removeSelectedFolders"))'},f:[" ",{t:7,e:"Modal",a:{cssCls:"nui_modal",autoClose:0,title:[{t:3,x:{r:["nls","selectedFolders.length"],s:'_0("antiransomware.stopProtectingFolders.title",_1)'}}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","selectedFolders.length"],s:'_0("antiransomware.stopProtectingFolders.desc",_1)'}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"kin-button",a:{"data-test":"modal_confirm"},v:{click:{n:"removeFolders",d:[{t:2,r:"selectedFolders"}]}},f:[{t:3,x:{r:["nls"],s:'_0("global.stopProtecting")'}}]}," ",{t:7,e:"kin-button",a:{type:"secondary"},v:{click:"closeModal"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.keepProtected")'}}]}]}]}]}],x:{r:["modalDialog"],s:'_0==="alreadyProtected"'}}],n:50,r:"modalDialog"}]}),g=t.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("antiransomware")'}}],cssCls:"arw",settingsUrl:"#Settings/AntiRansomware",inactive:[{t:2,x:{r:["ransomwareEnabled"],s:"!_0"}}],inactiveMsg:[{t:3,x:{r:["nls"],s:'_0("antiransomware.inactive.tooltip")'}}],backHash:"#security"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{customBreadcrumbs:["[{title: ",{t:3,x:{r:["nls"],s:'_0("security")'}},", url: '#security', section: true}, {title:'",{t:3,x:{r:["nls"],s:'_0("antiransomware")'}},"'}]"]}}]}," ",{t:7,e:"div",a:{slot:"controls"},f:[{t:7,e:"kin-switch",a:{"data-test":"antiransomware-switch","kin-checked":[{t:2,r:"ransomwareEnabled"}],processing:[{t:2,r:"enabledSwitchDisabled"}],title:[{t:2,x:{r:["nls"],s:'_0("antiransomware")'}}]},v:{click:"toggleRswSwitch"}}]}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:7,e:"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("antiransomware.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"cta"},f:[{t:7,e:"kin-button",v:{click:"addFolder"},f:[{t:3,x:{r:["nls"],s:'_0("antiransomware.protectNewFolder")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"ProtectedFolders"}]}," ",{t:7,e:"div",a:{slot:"view-actions"},f:[{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedFoldersCount"],s:'_0("antiransomware.foldersSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"kin-button",a:{size:"small"},v:{click:"askRemoveSelectedFolders"},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")'}}]}]}]}]}]}]},css:f,components:{ProtectedFolders:h},data:()=>({UPSELL_ANIMATION:"data:image/png;base64,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",ransomwareEnabled:l.isEnabled("ais_shl_rsw"),product:l.getProduct(),loading:!0,selectedFoldersCount:0}),oninit(){this.log=r.createLogger("antiransomware"),this.listeners=[],this.listeners.push(n.on("product.change.feature.ais_shl_rsw",(t=>{this.updateFeature(t)}))),this.updateFeature(),this.on("toggleRswSwitch",(()=>{this.get("ransomwareEnabled")?d.stopOptions().then((t=>this._toggleStatus(t.time))).catch((()=>{this.log.info("no stop option selected.. doing nothing")})):l.isPassiveMode()?d.passiveMode(l.getPassiveModeInfo()).then((()=>this._toggleStatus())):this._toggleStatus()})),this.on("Upsell.init",(()=>{o.event("Upsell","View")})),this.on("Upsell.buy",(()=>{i.openWindow(343)})),this.on("addFolder",(()=>{this.findComponent("ProtectedFolders").addFolder()})),this.on("askRemoveSelectedFolders",(()=>{this.findComponent("ProtectedFolders").fire("askRemoveSelectedFolders")})),this.on("ProtectedFolders.selectedFoldersCount",(t=>{this.set("selectedFoldersCount",t)}))},_toggleStatus:t=>l.toggleFeature("ais_shl_rsw",t).catch((t=>{console.error("Toggling ais_shl_rsw failed",t)})),updateFeature(t){if(this.set("enabledSwitchDisabled",!1),t)this.set({ransomwareEnabled:t.enabled,loading:!1});else{const t=l.getFeature("ais_shl_rsw");this.set({ransomwareEnabled:t.enabled,loading:!1})}},onteardown(){this.listeners.forEach((t=>t()))}});function w(){}function _(t){return t()}function b(){return Object.create(null)}function v(t){t.forEach(_)}function x(t){return"function"==typeof t}function y(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function k(t,e,n,o){if(t){const s=F(t,e,n,o);return t[0](s)}}function F(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function A(t,e,n,o,s,l,i){const a=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,l);if(a){const s=F(e,n,o,i);t.p(s,a)}}function T(t){return t&&x(t.destroy)?t.destroy:w}function S(t,e){t.appendChild(e)}function $(t,e,n){t.insertBefore(e,n||null)}function N(t){t.parentNode.removeChild(t)}function C(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function E(t){return document.createElement(t)}function M(t){return document.createTextNode(t)}function D(){return M(" ")}function L(){return M("")}function P(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function j(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function I(t,e,n){e in t?t[e]=n:j(t,e,n)}function W(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function G(t,e,n){t.classList[n?"add":"remove"](e)}let B;function O(t){B=t}function U(){if(!B)throw new Error("Function called outside component initialization");return B}function q(){const t=U();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}const z=[],H=[],K=[],Y=[],V=Promise.resolve();let J=!1;function Q(t){K.push(t)}let Z=!1;const X=new Set;function tt(){if(!Z){Z=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];O(e),et(e.$$)}for(O(null),z.length=0;H.length;)H.pop()();for(let t=0;t<K.length;t+=1){const e=K[t];X.has(e)||(X.add(e),e())}K.length=0}while(z.length);for(;Y.length;)Y.pop()();J=!1,Z=!1,X.clear()}}function et(t){if(null!==t.fragment){t.update(),v(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Q)}}const nt=new Set;let ot;function st(){ot={r:0,c:[],p:ot}}function lt(){ot.r||v(ot.c),ot=ot.p}function it(t,e){t&&t.i&&(nt.delete(t),t.i(e))}function at(t,e,n,o){if(t&&t.o){if(nt.has(t))return;nt.add(t),ot.c.push((()=>{nt.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ct(t){t&&t.c()}function dt(t,e,n,o){const{fragment:s,on_mount:l,on_destroy:i,after_update:a}=t.$$;s&&s.m(e,n),o||Q((()=>{const e=l.map(_).filter(x);i?i.push(...e):v(e),t.$$.on_mount=[]})),a.forEach(Q)}function ut(t,e){const n=t.$$;null!==n.fragment&&(v(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function mt(t,e){-1===t.$$.dirty[0]&&(z.push(t),J||(J=!0,V.then(tt)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function pt(t,e,n,o,s,l,i=[-1]){const a=B;O(t);const r=t.$$={fragment:null,ctx:null,props:l,update:w,not_equal:s,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:b(),dirty:i,skip_bound:!1};let c=!1;if(r.ctx=n?n(t,e.props||{},((e,n,...o)=>{const l=o.length?o[0]:n;return r.ctx&&s(r.ctx[e],r.ctx[e]=l)&&(!r.skip_bound&&r.bound[e]&&r.bound[e](l),c&&mt(t,e)),n})):[],r.update(),c=!0,v(r.before_update),r.fragment=!!o&&o(r.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);r.fragment&&r.fragment.l(t),t.forEach(N)}else r.fragment&&r.fragment.c();e.intro&&it(t.$$.fragment),dt(t,e.target,e.anchor,e.customElement),tt()}O(a)}class ft{$destroy(){ut(this,1),this.$destroy=w}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},gt=/^\s+|\s+$/g,wt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,bt=/^0o[0-7]+$/i,vt=parseInt,xt="object"==typeof ht&&ht&&ht.Object===Object&&ht,yt="object"==typeof self&&self&&self.Object===Object&&self,kt=xt||yt||Function("return this")(),Ft=Object.prototype.toString,At=Math.max,Tt=Math.min,St=function(){return kt.Date.now()};function $t(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Nt(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==Ft.call(t)}(t))return NaN;if($t(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$t(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(gt,"");var n=_t.test(t);return n||bt.test(t)?vt(t.slice(2),n?2:8):wt.test(t)?NaN:+t}var Ct=function(t,e,n){var o,s,l,i,a,r,c=0,d=!1,u=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=o,l=s;return o=s=void 0,c=e,i=t.apply(l,n)}function f(t){return c=t,a=setTimeout(g,e),d?p(t):i}function h(t){var n=t-r;return void 0===r||n>=e||n<0||u&&t-c>=l}function g(){var t=St();if(h(t))return w(t);a=setTimeout(g,function(t){var n=e-(t-r);return u?Tt(n,l-(t-c)):n}(t))}function w(t){return a=void 0,m&&o?p(t):(o=s=void 0,i)}function _(){var t=St(),n=h(t);if(o=arguments,s=this,r=t,n){if(void 0===a)return f(r);if(u)return a=setTimeout(g,e),p(r)}return void 0===a&&(a=setTimeout(g,e)),i}return e=Nt(e)||0,$t(n)&&(d=!!n.leading,l=(u="maxWait"in n)?At(Nt(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=r=s=a=void 0},_.flush=function(){return void 0===a?i:w(St())},_};const{window:Et}=rt;function Mt(t,e,n){const o=t.slice();return o[49]=e[n],o}function Dt(t,e,n){const o=t.slice();return o[52]=e[n],o}function Lt(t,e,n){const o=t.slice();return o[55]=e[n],o[57]=n,o}const Pt=t=>({}),jt=t=>({});function It(t){let e,n,o,s,l,i,a,r,c,d,m,p,f,h,g,w,_,b,x,y,F,C,M,L=t[0].icon&&Wt(t),I=t[0].title&&Ot(t);const W=t[30].default,B=k(W,t,t[29],null);let O=t[0].text&&Ut(t),U=t[0].actionText&&qt(t);const q=t[30]["custom-content"],z=k(q,t,t[29],jt);let H=!t[3]&&t[0].actions&&t[0].actions.length&&zt(t),K=t[3]&&Zt(t),Y=t[0].dontShowAgain&&te(t),V=t[0].details&&t[0].details.length&&ee(t),J=t[2]&&se(t),Q=(t[11]||t[14]>1)&&_e(t);return{c(){e=E("div"),n=E("div"),o=E("h1"),o.innerHTML='<span class="logo -white -width-70"></span>',s=D(),l=E("div"),i=E("button"),a=D(),r=E("div"),L&&L.c(),c=D(),I&&I.c(),d=D(),B&&B.c(),m=D(),O&&O.c(),p=D(),U&&U.c(),f=D(),z&&z.c(),h=D(),H&&H.c(),g=D(),K&&K.c(),w=D(),Y&&Y.c(),_=D(),V&&V.c(),b=D(),J&&J.c(),x=D(),Q&&Q.c(),j(o,"class","nui_logo"),j(i,"class","nui_controls__item -close nui_caption_client g-cursor--pointer"),j(i,"title",u("global.closeModalWindow")),j(l,"class","nui_controls"),j(n,"class","nui_titlebar -toaster nui_caption"),j(r,"class","sve_toaster__main"),G(r,"-auto-v-scroll",t[10]),j(e,"class",y="sve_toaster -detection "+(t[0].color?"-"+t[0].color:"")),R(e,"width",t[1]+"px")},m(u,v){$(u,e,v),S(e,n),S(n,o),S(n,s),S(n,l),S(l,i),S(e,a),S(e,r),L&&L.m(r,null),S(r,c),I&&I.m(r,null),S(r,d),B&&B.m(r,null),S(r,m),O&&O.m(r,null),S(r,p),U&&U.m(r,null),S(r,f),z&&z.m(r,null),S(r,h),H&&H.m(r,null),S(r,g),K&&K.m(r,null),S(r,w),Y&&Y.m(r,null),S(r,_),V&&V.m(r,null),S(e,b),J&&J.m(e,null),S(e,x),Q&&Q.m(e,null),F=!0,C||(M=[P(i,"click",t[19]),T(t[24].call(null,e))],C=!0)},p(t,n){t[0].icon?L?L.p(t,n):(L=Wt(t),L.c(),L.m(r,c)):L&&(L.d(1),L=null),t[0].title?I?I.p(t,n):(I=Ot(t),I.c(),I.m(r,d)):I&&(I.d(1),I=null),B&&B.p&&536870912&n[0]&&A(B,W,t,t[29],n,null,null),t[0].text?O?O.p(t,n):(O=Ut(t),O.c(),O.m(r,p)):O&&(O.d(1),O=null),t[0].actionText?U?U.p(t,n):(U=qt(t),U.c(),U.m(r,f)):U&&(U.d(1),U=null),z&&z.p&&536870912&n[0]&&A(z,q,t,t[29],n,Pt,jt),!t[3]&&t[0].actions&&t[0].actions.length?H?H.p(t,n):(H=zt(t),H.c(),H.m(r,g)):H&&(H.d(1),H=null),t[3]?K?K.p(t,n):(K=Zt(t),K.c(),K.m(r,w)):K&&(K.d(1),K=null),t[0].dontShowAgain?Y?Y.p(t,n):(Y=te(t),Y.c(),Y.m(r,_)):Y&&(Y.d(1),Y=null),t[0].details&&t[0].details.length?V?V.p(t,n):(V=ee(t),V.c(),V.m(r,null)):V&&(V.d(1),V=null),1024&n[0]&&G(r,"-auto-v-scroll",t[10]),t[2]?J?J.p(t,n):(J=se(t),J.c(),J.m(e,x)):J&&(J.d(1),J=null),t[11]||t[14]>1?Q?Q.p(t,n):(Q=_e(t),Q.c(),Q.m(e,null)):Q&&(Q.d(1),Q=null),(!F||1&n[0]&&y!==(y="sve_toaster -detection "+(t[0].color?"-"+t[0].color:"")))&&j(e,"class",y),(!F||2&n[0])&&R(e,"width",t[1]+"px")},i(t){F||(it(B,t),it(z,t),F=!0)},o(t){at(B,t),at(z,t),F=!1},d(t){t&&N(e),L&&L.d(),I&&I.d(),B&&B.d(t),O&&O.d(),U&&U.d(),z&&z.d(t),H&&H.d(),K&&K.d(),Y&&Y.d(),V&&V.d(),J&&J.d(),Q&&Q.d(),C=!1,v(M)}}}function Wt(t){let e;function n(t,e){return t[0].icon.base64data?Gt:Rt}let o=n(t),s=o(t);return{c(){e=E("div"),s.c(),j(e,"class","sve_toaster__icon__container")},m(t,n){$(t,e,n),s.m(e,null)},p(t,l){o===(o=n(t))&&s?s.p(t,l):(s.d(1),s=o(t),s&&(s.c(),s.m(e,null)))},d(t){t&&N(e),s.d()}}}function Rt(t){let e,n,o,s,l,i,a,r=t[0].icon.color&&Bt(t);return{c(){e=E("kin-icon"),o=D(),s=E("kin-icon"),i=D(),r&&r.c(),a=L(),I(e,"illustration","true"),I(e,"name",n="ok"==t[0].icon.color?"i-detection-ok":"critical"==t[0].icon.color?"i-detection-critical":""),I(e,"size","144"),I(e,"width","264"),I(e,"class","sve_toaster__icon__bg"),I(s,"class","sve_toaster__icon"),I(s,"name",l=t[0].icon.name),I(s,"size","72")},m(t,n){$(t,e,n),$(t,o,n),$(t,s,n),$(t,i,n),r&&r.m(t,n),$(t,a,n)},p(t,o){1&o[0]&&n!==(n="ok"==t[0].icon.color?"i-detection-ok":"critical"==t[0].icon.color?"i-detection-critical":"")&&I(e,"name",n),1&o[0]&&l!==(l=t[0].icon.name)&&I(s,"name",l),t[0].icon.color?r?r.p(t,o):(r=Bt(t),r.c(),r.m(a.parentNode,a)):r&&(r.d(1),r=null)},d(t){t&&N(e),t&&N(o),t&&N(s),t&&N(i),r&&r.d(t),t&&N(a)}}}function Gt(t){let e,n,o;return{c(){e=E("img"),j(e,"class","kin-img"),j(e,"height","60"),e.src!==(n="data:image/png;base64,"+t[0].icon.base64data)&&j(e,"src",n),j(e,"alt",o=t[0].title)},m(t,n){$(t,e,n)},p(t,s){1&s[0]&&e.src!==(n="data:image/png;base64,"+t[0].icon.base64data)&&j(e,"src",n),1&s[0]&&o!==(o=t[0].title)&&j(e,"alt",o)},d(t){t&&N(e)}}}function Bt(t){let e,n;return{c(){e=E("kin-icon"),I(e,"class","sve_toaster__icon__status"),I(e,"name",n="ok"==t[0].icon.color?"icon-s-fill-secured":"icon-s-fill-unsecured"),I(e,"size","32")},m(t,n){$(t,e,n)},p(t,o){1&o[0]&&n!==(n="ok"==t[0].icon.color?"icon-s-fill-secured":"icon-s-fill-unsecured")&&I(e,"name",n)},d(t){t&&N(e)}}}function Ot(t){let e,n=t[0].title+"";return{c(){e=E("h2"),j(e,"class","sve_toaster__title h2")},m(t,o){$(t,e,o),e.innerHTML=n},p(t,o){1&o[0]&&n!==(n=t[0].title+"")&&(e.innerHTML=n)},d(t){t&&N(e)}}}function Ut(t){let e,n=t[0].text+"";return{c(){e=E("p"),j(e,"class","sve_toaster__text p")},m(t,o){$(t,e,o),e.innerHTML=n},p(t,o){1&o[0]&&n!==(n=t[0].text+"")&&(e.innerHTML=n)},d(t){t&&N(e)}}}function qt(t){let e,n,o=t[0].actionText+"";return{c(){e=E("p"),n=M(o),j(e,"class","sve_toaster__text p -small -secondary")},m(t,o){$(t,e,o),S(e,n)},p(t,e){1&e[0]&&o!==(o=t[0].actionText+"")&&W(n,o)},d(t){t&&N(e)}}}function zt(t){let e,n,o,s,l,i,a,r,c,d,u,m,p=t[0].actions[0].label+"",f=null!=t[9]&&Ht(t),h=1===t[0].actions.length&&t[14]>1&&t[15]&&Kt(t);function g(t,e){return 2!==t[0].actions.length||t[0].hideSecondAction?t[0].actions.length>2||t[0].hideSecondAction&&t[0].actions.length>1?Yt:void 0:Vt}let w=g(t),_=w&&w(t),b=t[0].errorText&&Qt(t);return{c(){e=E("div"),n=E("kin-button"),o=E("span"),s=M(p),l=D(),f&&f.c(),a=D(),h&&h.c(),r=D(),_&&_.c(),c=D(),b&&b.c(),d=L(),I(n,"processing",t[8]),I(n,"data-test",i="dd_primary_"+t[0].actions[0].labelTest||"dd_primary_btn"),j(e,"class","sve_toaster__btns")},m(i,p){$(i,e,p),S(e,n),S(n,o),S(o,s),S(o,l),f&&f.m(o,null),S(e,a),h&&h.m(e,null),S(e,r),_&&_.m(e,null),$(i,c,p),b&&b.m(i,p),$(i,d,p),u||(m=P(n,"click",t[31]),u=!0)},p(t,l){1&l[0]&&p!==(p=t[0].actions[0].label+"")&&W(s,p),null!=t[9]?f?f.p(t,l):(f=Ht(t),f.c(),f.m(o,null)):f&&(f.d(1),f=null),256&l[0]&&I(n,"processing",t[8]),1&l[0]&&i!==(i="dd_primary_"+t[0].actions[0].labelTest||"dd_primary_btn")&&I(n,"data-test",i),1===t[0].actions.length&&t[14]>1&&t[15]?h?h.p(t,l):(h=Kt(t),h.c(),h.m(e,r)):h&&(h.d(1),h=null),w===(w=g(t))&&_?_.p(t,l):(_&&_.d(1),_=w&&w(t),_&&(_.c(),_.m(e,null))),t[0].errorText?b?b.p(t,l):(b=Qt(t),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null)},d(t){t&&N(e),f&&f.d(),h&&h.d(),_&&_.d(),t&&N(c),b&&b.d(t),t&&N(d),u=!1,m()}}}function Ht(t){let e,n,o;return{c(){e=M("("),n=M(t[9]),o=M(")")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p(t,e){512&e[0]&&W(n,t[9])},d(t){t&&N(e),t&&N(n),t&&N(o)}}}function Kt(t){let e,n,o,s,l,i,a,r=u("detection.action.closeAll")+"";return{c(){e=E("kin-button"),n=M(r),o=M("\n\t\t\t\t\t\t\t("),s=M(t[14]),l=M(")"),I(e,"class","g-margin-left--10"),I(e,"kin-disabled",t[8]),I(e,"data-test","closeAll"),I(e,"type","secondary")},m(r,c){$(r,e,c),S(e,n),S(e,o),S(e,s),S(e,l),i||(a=P(e,"click",t[19]),i=!0)},p(t,n){16384&n[0]&&W(s,t[14]),256&n[0]&&I(e,"kin-disabled",t[8])},d(t){t&&N(e),i=!1,a()}}}function Yt(t){let e,n,o,s,l,i,a,r,c=u("global.moreOptions")+"",d=t[0].actions,m=[];for(let u=0;u<d.length;u+=1)m[u]=Jt(Lt(t,d,u));return{c(){e=E("kin-dropdown"),n=E("div"),o=E("kin-button"),s=M(c),l=D(),i=E("kin-icon"),a=D(),r=E("div");for(let t=0;t<m.length;t+=1)m[t].c();I(i,"class","g-margin-left--5"),I(i,"name","icon-s-controls-arrow-down"),I(i,"size","16"),I(o,"type","secondary"),I(o,"data-test","dd_dropdown_btn"),j(n,"slot","dropdown-activator"),I(e,"class","g-margin-left--10")},m(t,c){$(t,e,c),S(e,n),S(n,o),S(o,s),S(o,l),S(o,i),S(e,a),S(e,r);for(let e=0;e<m.length;e+=1)m[e].m(r,null)},p(t,e){if(8388609&e[0]){let n;for(d=t[0].actions,n=0;n<d.length;n+=1){const o=Lt(t,d,n);m[n]?m[n].p(o,e):(m[n]=Jt(o),m[n].c(),m[n].m(r,null))}for(;n<m.length;n+=1)m[n].d(1);m.length=d.length}},d(t){t&&N(e),C(m,t)}}}function Vt(t){let e,n,o,s,l,i=t[0].actions[1].label+"";return{c(){e=E("kin-button"),n=M(i),I(e,"class","g-margin-left--10"),I(e,"kin-disabled",t[8]),I(e,"data-test",o="dd_secondary_"+t[0].actions[1].labelTest||"dd_secondary_btn"),I(e,"type","secondary")},m(o,i){$(o,e,i),S(e,n),s||(l=P(e,"click",t[32]),s=!0)},p(t,s){1&s[0]&&i!==(i=t[0].actions[1].label+"")&&W(n,i),256&s[0]&&I(e,"kin-disabled",t[8]),1&s[0]&&o!==(o="dd_secondary_"+t[0].actions[1].labelTest||"dd_secondary_btn")&&I(e,"data-test",o)},d(t){t&&N(e),s=!1,l()}}}function Jt(t){let e,n=0!==t[57]&&function(t){let e,n,o,s,l,i,a=t[55].label+"";function r(){return t[33](t[57])}return{c(){e=E("kin-dropdown-item"),n=M(a),o=D(),I(e,"data-test",s="dd_dropdown_"+t[55].labelTest||"dd_dropdown_"+t[57])},m(t,s){$(t,e,s),S(e,n),S(e,o),l||(i=P(e,"click",r),l=!0)},p(o,l){t=o,1&l[0]&&a!==(a=t[55].label+"")&&W(n,a),1&l[0]&&s!==(s="dd_dropdown_"+t[55].labelTest||"dd_dropdown_"+t[57])&&I(e,"data-test",s)},d(t){t&&N(e),l=!1,i()}}}(t);return{c(){n&&n.c(),e=L()},m(t,o){n&&n.m(t,o),$(t,e,o)},p(t,e){0!==t[57]&&n.p(t,e)},d(t){n&&n.d(t),t&&N(e)}}}function Qt(t){let e,n,o=t[0].errorText+"";return{c(){e=E("p"),n=M(o),j(e,"class","g-margin-top--5 g-margin-bottom--10 p -small -secondary -text color-danger")},m(t,o){$(t,e,o),S(e,n)},p(t,e){1&e[0]&&o!==(o=t[0].errorText+"")&&W(n,o)},d(t){t&&N(e)}}}function Zt(t){let e,n,o,s=(t[5]||t[4]&&t[4].text)&&Xt(t);return{c(){e=E("div"),n=E("kin-progress"),o=D(),s&&s.c(),I(n,"percentage","-1"),j(e,"class","sve_toaster__progress")},m(t,l){$(t,e,l),S(e,n),S(e,o),s&&s.m(e,null)},p(t,n){t[5]||t[4]&&t[4].text?s?s.p(t,n):(s=Xt(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&N(e),s&&s.d()}}}function Xt(t){let e,n,o=(t[5]||t[4].text)+"";return{c(){e=E("p"),n=M(o),j(e,"class","g-margin-top--10 p -small -secondary")},m(t,o){$(t,e,o),S(e,n)},p(t,e){48&e[0]&&o!==(o=(t[5]||t[4].text)+"")&&W(n,o)},d(t){t&&N(e)}}}function te(t){let e,n,o,s,l,i,a,r=t[0].dontShowAgain.label+"";return{c(){e=E("p"),n=E("input"),o=D(),s=E("label"),l=M(r),j(n,"type","checkbox"),j(n,"id","detection_dontShowAgain"),j(n,"class","checkbox"),j(s,"for","detection_dontShowAgain"),j(s,"class","g-margin-left--5"),j(e,"class","sve_toaster__text p g-margin-top--10")},m(r,c){$(r,e,c),S(e,n),S(e,o),S(e,s),S(s,l),i||(a=P(n,"click",t[34]),i=!0)},p(t,e){1&e[0]&&r!==(r=t[0].dontShowAgain.label+"")&&W(l,r)},d(t){t&&N(e),i=!1,a()}}}function ee(t){let e,n,o;function s(t,e){return t[2]?oe:ne}let l=s(t),i=l(t);return{c(){e=E("button"),i.c(),j(e,"class","span -small -secondary g-cursor--pointer g-margin-top--10"),j(e,"data-test","btn_toggleDetails")},m(s,l){$(s,e,l),i.m(e,null),n||(o=P(e,"click",t[20]),n=!0)},p(t,n){l===(l=s(t))&&i?i.p(t,n):(i.d(1),i=l(t),i&&(i.c(),i.m(e,null)))},d(t){t&&N(e),i.d(),n=!1,o()}}}function ne(t){let e,n,o,s=u("global.showDetails")+"";return{c(){e=M(s),n=D(),o=E("kin-icon"),I(o,"name","icon-s-controls-arrow-down"),I(o,"size","16")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p:w,d(t){t&&N(e),t&&N(n),t&&N(o)}}}function oe(t){let e,n,o,s=u("global.hideDetails")+"";return{c(){e=M(s),n=D(),o=E("kin-icon"),I(o,"name","icon-s-controls-arrow-up"),I(o,"size","16")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p:w,d(t){t&&N(e),t&&N(n),t&&N(o)}}}function se(t){let e,n,o,s,l,i=t[0].details,a=[];for(let u=0;u<i.length;u+=1)a[u]=re(Dt(t,i,u));let r=t[4]&&ce(t),c=t[6]&&ue(t),d=t[7]&&me(t);return{c(){e=E("div"),n=E("dl");for(let t=0;t<a.length;t+=1)a[t].c();o=L(),r&&r.c(),s=L(),c&&c.c(),l=L(),d&&d.c(),j(n,"class","desclist -short"),j(e,"class","sve_toaster__details")},m(t,i){$(t,e,i),S(e,n);for(let e=0;e<a.length;e+=1)a[e].m(n,null);S(n,o),r&&r.m(n,null),S(n,s),c&&c.m(n,null),S(n,l),d&&d.m(n,null)},p(t,e){if(1&e[0]){let s;for(i=t[0].details,s=0;s<i.length;s+=1){const l=Dt(t,i,s);a[s]?a[s].p(l,e):(a[s]=re(l),a[s].c(),a[s].m(n,o))}for(;s<a.length;s+=1)a[s].d(1);a.length=i.length}t[4]?r?r.p(t,e):(r=ce(t),r.c(),r.m(n,s)):r&&(r.d(1),r=null),t[6]?c?c.p(t,e):(c=ue(t),c.c(),c.m(n,l)):c&&(c.d(1),c=null),t[7]?d?d.p(t,e):(d=me(t),d.c(),d.m(n,null)):d&&(d.d(1),d=null)},d(t){t&&N(e),C(a,t),r&&r.d(),c&&c.d(),d&&d.d()}}}function le(t){let e,n,o,s=t[52].title+"";function l(t,e){return"scoreMeter"===t[52].type&&4>t[52].value?ae:ie}let i=l(t),a=i(t);return{c(){e=E("dt"),n=M(s),a.c(),o=L()},m(t,s){$(t,e,s),S(e,n),a.m(t,s),$(t,o,s)},p(t,e){1&e[0]&&s!==(s=t[52].title+"")&&W(n,s),i===(i=l(t))&&a?a.p(t,e):(a.d(1),a=i(t),a&&(a.c(),a.m(o.parentNode,o)))},d(t){t&&N(e),a.d(t),t&&N(o)}}}function ie(t){let e,n,o,s=t[52].value+"";return{c(){e=E("dd"),n=M(s),j(e,"data-test",o=t[52].testValue)},m(t,o){$(t,e,o),S(e,n)},p(t,l){1&l[0]&&s!==(s=t[52].value+"")&&W(n,s),1&l[0]&&o!==(o=t[52].testValue)&&j(e,"data-test",o)},d(t){t&&N(e)}}}function ae(t){let e,n,o,s,l,i,a,r,c;return{c(){e=E("dd"),n=E("div"),o=E("div"),s=D(),l=E("div"),i=D(),a=E("div"),c=D(),j(n,"class",r="scoremeter -val-"+t[52].value)},m(t,r){$(t,e,r),S(e,n),S(n,o),S(n,s),S(n,l),S(n,i),S(n,a),S(e,c)},p(t,e){1&e[0]&&r!==(r="scoremeter -val-"+t[52].value)&&j(n,"class",r)},d(t){t&&N(e)}}}function re(t){let e,n=t[52].value&&le(t);return{c(){n&&n.c(),e=L()},m(t,o){n&&n.m(t,o),$(t,e,o)},p(t,o){t[52].value?n?n.p(t,o):(n=le(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&N(e)}}}function ce(t){let e,n,o,s,l,i=t[4].text+"",a=t[4].action&&de(t);return{c(){e=E("dt"),e.textContent=`${u("global.status")}`,n=E("dd"),o=M(i),s=D(),a&&a.c(),l=D(),j(n,"data-test","status")},m(t,i){$(t,e,i),$(t,n,i),S(n,o),S(n,s),a&&a.m(n,null),S(n,l)},p(t,e){16&e[0]&&i!==(i=t[4].text+"")&&W(o,i),t[4].action?a?a.p(t,e):(a=de(t),a.c(),a.m(n,l)):a&&(a.d(1),a=null)},d(t){t&&N(e),t&&N(n),a&&a.d()}}}function de(t){let e,n,o,s,l,i,a=t[4].actionLabel+"";return{c(){e=M("| "),n=E("button"),o=M(a),j(n,"class","a"),j(n,"data-test",s="scn_"+t[4].actionLabelGa)},m(s,a){$(s,e,a),$(s,n,a),S(n,o),l||(i=P(n,"click",t[21]),l=!0)},p(t,e){16&e[0]&&a!==(a=t[4].actionLabel+"")&&W(o,a),16&e[0]&&s!==(s="scn_"+t[4].actionLabelGa)&&j(n,"data-test",s)},d(t){t&&N(e),t&&N(n),l=!1,i()}}}function ue(t){let e,n,o,s,l,i,a,r,c=t[6].text+"";return{c(){e=E("dt"),e.textContent=`${u("global.option")}`,n=E("dd"),o=E("button"),s=M(c),i=D(),j(o,"class","a"),j(o,"data-test",l="scn_"+t[6].actionLabelGa),j(n,"data-test","option")},m(l,c){$(l,e,c),$(l,n,c),S(n,o),S(o,s),S(n,i),a||(r=P(o,"click",t[22]),a=!0)},p(t,e){64&e[0]&&c!==(c=t[6].text+"")&&W(s,c),64&e[0]&&l!==(l="scn_"+t[6].actionLabelGa)&&j(o,"data-test",l)},d(t){t&&N(e),t&&N(n),a=!1,r()}}}function me(t){let e,n=t[7],o=[];for(let s=0;s<n.length;s+=1)o[s]=we(Mt(t,n,s));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=L()},m(t,n){for(let e=0;e<o.length;e+=1)o[e].m(t,n);$(t,e,n)},p(t,s){if(33554560&s[0]){let l;for(n=t[7],l=0;l<n.length;l+=1){const i=Mt(t,n,l);o[l]?o[l].p(i,s):(o[l]=we(i),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(t){C(o,t),t&&N(e)}}}function pe(t){let e;return{c(){e=E("dt"),e.textContent=`${u("global.options")}`},m(t,n){$(t,e,n)},p:w,d(t){t&&N(e)}}}function fe(t){let e,n,o=t[49].title+"";return{c(){e=E("dt"),n=M(o)},m(t,o){$(t,e,o),S(e,n)},p(t,e){128&e[0]&&o!==(o=t[49].title+"")&&W(n,o)},d(t){t&&N(e)}}}function he(t){let e,n,o,s,l,i,a,r,c,d=t[49].label+"";function u(){return t[35](t[49])}return{c(){e=E("input"),s=D(),l=E("label"),i=M(d),j(e,"type","checkbox"),j(e,"class","checkbox"),e.checked=n=t[49].value,j(e,"id",o="form_checkbox_"+t[49].valueName),j(l,"for",a="form_checkbox_"+t[49].valueName),j(l,"class","g-margin-left--5")},m(t,n){$(t,e,n),$(t,s,n),$(t,l,n),S(l,i),r||(c=P(e,"click",u),r=!0)},p(s,r){t=s,128&r[0]&&n!==(n=t[49].value)&&(e.checked=n),128&r[0]&&o!==(o="form_checkbox_"+t[49].valueName)&&j(e,"id",o),128&r[0]&&d!==(d=t[49].label+"")&&W(i,d),128&r[0]&&a!==(a="form_checkbox_"+t[49].valueName)&&j(l,"for",a)},d(t){t&&N(e),t&&N(s),t&&N(l),r=!1,c()}}}function ge(t){let e,n,o,s=t[49].label+"";return{c(){e=E("label"),n=M(s),j(e,"for",o="form_checkbox_"+t[49].valueName)},m(t,o){$(t,e,o),S(e,n)},p(t,l){128&l[0]&&s!==(s=t[49].label+"")&&W(n,s),128&l[0]&&o!==(o="form_checkbox_"+t[49].valueName)&&j(e,"for",o)},d(t){t&&N(e)}}}function we(t){let e,n,o;function s(t,e){return t[49].title?fe:pe}let l=s(t),i=l(t),a="checkbox"===t[49].type&&he(t),r="label"===t[49].type&&ge(t);return{c(){i.c(),e=E("dd"),a&&a.c(),n=D(),r&&r.c(),o=D()},m(t,s){i.m(t,s),$(t,e,s),a&&a.m(e,null),S(e,n),r&&r.m(e,null),S(e,o)},p(t,c){l===(l=s(t))&&i?i.p(t,c):(i.d(1),i=l(t),i&&(i.c(),i.m(e.parentNode,e))),"checkbox"===t[49].type?a?a.p(t,c):(a=he(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),"label"===t[49].type?r?r.p(t,c):(r=ge(t),r.c(),r.m(e,o)):r&&(r.d(1),r=null)},d(t){i.d(t),t&&N(e),a&&a.d(),r&&r.d()}}}function _e(t){let e,n,o,s,l=t[11]&&be(t),i=t[14]>1&&ve(t);return{c(){e=E("div"),n=E("div"),l&&l.c(),o=D(),s=E("div"),i&&i.c(),j(e,"class","sve_toaster__footer")},m(t,a){$(t,e,a),S(e,n),l&&l.m(n,null),S(e,o),S(e,s),i&&i.m(s,null)},p(t,e){t[11]?l?l.p(t,e):(l=be(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),t[14]>1?i?i.p(t,e):(i=ve(t),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(t){t&&N(e),l&&l.d(),i&&i.d()}}}function be(t){let e,n,o,s,l,i,a,r,c,d,m,p,f=t[12]?"/"+t[12]:"";return{c(){e=E("span"),n=M(t[11]),o=M(f),s=D(),l=E("kin-tooltip"),i=E("span"),i.innerHTML='<kin-icon name="icon-m-action-info" size="20"></kin-icon>',a=D(),r=E("div"),c=E("h4"),c.textContent=`${u("detection.alertid.title")}`,d=D(),m=E("p"),m.textContent=`${u("detection.alertid.desc")}`,p=E("p"),j(e,"class","span -small -secondary"),j(e,"data-test","dd_alertid_text"),j(i,"slot","tooltip-activator"),j(c,"class","h4 -margins"),j(m,"class","p -small"),j(r,"slot","tooltip"),I(l,"severity","highlight")},m(t,u){$(t,e,u),S(e,n),S(e,o),$(t,s,u),$(t,l,u),S(l,i),S(l,a),S(l,r),S(r,c),S(r,d),S(r,m),S(r,p)},p(t,e){2048&e[0]&&W(n,t[11]),4096&e[0]&&f!==(f=t[12]?"/"+t[12]:"")&&W(o,f)},d(t){t&&N(e),t&&N(s),t&&N(l)}}}function ve(t){let e,n,o,s,l,i,a,r,c,d,m,p,f,h=t[13]+1+"";return{c(){e=E("span"),e.textContent=`${u("detection.more.detections")}`,n=D(),o=E("kin-button"),s=E("kin-icon"),l=D(),i=M(h),a=M("\n\t\t\t\t\t\t/\n\t\t\t\t\t\t"),r=E("kin-button"),c=M(t[14]),d=D(),m=E("kin-icon"),j(e,"class","span -small -secondary"),I(s,"name","icon-s-controls-arrow-left"),I(s,"size","16"),I(s,"rtlflip","true"),I(o,"type","blank"),I(o,"size","small"),I(o,"class","sve_toaster__paginator g-margin-left--5"),I(o,"data-test","dd_prev_btn"),I(m,"name","icon-s-controls-arrow-right"),I(m,"size","16"),I(m,"rtlflip","true"),I(r,"type","blank"),I(r,"size","small"),I(r,"class","sve_toaster__paginator"),I(r,"data-test","dd_next_btn")},m(u,h){$(u,e,h),$(u,n,h),$(u,o,h),S(o,s),S(o,l),S(o,i),$(u,a,h),$(u,r,h),S(r,c),S(r,d),S(r,m),p||(f=[P(o,"click",t[17]),P(r,"click",t[18])],p=!0)},p(t,e){8192&e[0]&&h!==(h=t[13]+1+"")&&W(i,h),16384&e[0]&&W(c,t[14])},d(t){t&&N(e),t&&N(n),t&&N(o),t&&N(a),t&&N(r),p=!1,v(f)}}}function xe(t){let e,n,o,s,l=t[0]&&It(t);return{c(){l&&l.c(),e=L()},m(i,a){l&&l.m(i,a),$(i,e,a),n=!0,o||(s=P(Et,"keydown",t[16]),o=!0)},p(t,n){t[0]?l?(l.p(t,n),1&n[0]&&it(l,1)):(l=It(t),l.c(),it(l,1),l.m(e.parentNode,e)):l&&(st(),at(l,1,1,(()=>{l=null})),lt())},i(t){n||(it(l),n=!0)},o(t){at(l),n=!1},d(t){l&&l.d(t),t&&N(e),o=!1,s()}}}function ye(t,e,n){let l,i,r,c,d,u,p,{$$slots:f={},$$scope:h}=e;const g=q();let w,_,b,v,x,y,{windowWidth:k=600}=e,{config:F=null}=e,{windowClose:A=null}=e,T=!1,S=null,$=null,N=!1,C=!1,E=!1,M=!1;var D;function L(t=!1){const e=F&&F.closeResponse;A?A(e):(g("close",e),(t||u<=1)&&s.close())}function P(t){j(F.actions[t],t)}function j(t,e){const s=t.action&&t.action(),l=Date.now();if($&&$(),null==s)null==t.nextConfig?L():I(t.nextConfig,l,t.minDuration);else{const o=1===e&&2===F.actions.length&&!F.hideSecondAction;t.status||0!==e&&!o?(n(4,w=t.status),n(5,_=void 0),n(6,b=t.option),n(3,N=!0)):n(8,C=!0),s.then((e=>{I(e,l,t.minDuration)})).catch((e=>{I(e,l,t.minDuration)}))}t.labelGa&&o.event("DetectionDialog","Click",t.labelGa)}function I(t,e,o){const s=Math.max(o-(Date.now()-e),0);if(S&&S(),s>0){const e=window.setTimeout((()=>{!t&&u>0?L():n(0,F=t),S&&S()}),s);S=()=>{window.clearTimeout(e),S=null}}else!t&&u>0?L():n(0,F=t)}function W(t){t?(n(3,N=F.progress),n(4,w=F.status),n(5,_=F.progressStatusText),n(6,b=F.option),n(7,v=F.formItems),n(8,C=!1),function(){if($&&$(),F.actions&&F.actions.length&&F.actions[0].countdown){n(9,x=F.actions[0].countdown);const t=window.setInterval((function(){x?n(9,x--,x):j(F.actions[0],0)}),1e3);$=function(){window.clearInterval(t),n(9,x=null),$=null}}}()):L()}function R(t){const e=Math.max(400,t.scrollHeight);M&&(M=!1,n(10,E=e>window.screen.availHeight)),s.resize(k,Math.min(e,window.screen.availHeight))}function G(t){t.value=!t.value,g("formItemUpdated",t)}D=()=>{a.play("threat")},U().$$.on_mount.push(D),function(t){U().$$.on_destroy.push(t)}((()=>{S&&S(),$&&$(),y&&y.cancel()}));return t.$$set=t=>{"windowWidth"in t&&n(1,k=t.windowWidth),"config"in t&&n(0,F=t.config),"windowClose"in t&&n(26,A=t.windowClose),"$$scope"in t&&n(29,h=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty[0]&&W(F),1&t.$$.dirty[0]&&n(27,l=F&&F.trackerTitle),134217728&t.$$.dirty[0]&&function(t){const e=s.getUrlParams();null!=t&&o.view(e.module+"_"+e.view+(t?"_"+t:""))}(l),1&t.$$.dirty[0]&&n(28,i=F&&F.detectionInfo||{}),268435456&t.$$.dirty[0]&&n(11,r=i.id||""),268435456&t.$$.dirty[0]&&n(12,c=i.timestamp&&m(i.timestamp).format("YYMMDD.HHmmZZ")||""),268435456&t.$$.dirty[0]&&n(13,d=i.index||0),268435456&t.$$.dirty[0]&&n(14,u=i.total||0),268435456&t.$$.dirty[0]&&n(15,p=i.showCloseAllBtn||!1)},[F,k,T,N,w,_,b,v,C,x,E,r,c,d,u,p,function(t){const e=F.actions;e&&e.length&&e.some(((e,n)=>{if(e.shortcut&&e.shortcut.code===t.code&&!!e.shortcut.ctrlKey===t.ctrlKey&&!!e.shortcut.shiftKey===t.shiftKey&&!!e.shortcut.altKey===t.altKey&&!!e.shortcut.metaKey===t.metaKey)return j(e,n),!0}))},function(){g("prev")},function(){g("next")},function(){!function(t=!1){o.event("DetectionDialog","Close"),g("ignore"),L(t)}(!0)},function(){n(2,T=!T),M=!0},function(){const t=w.actionLabelGa,e=w.action;t&&o.event("DetectionDialog","Click",t),"function"==typeof e?e():console.error("[SvelteComponents] {DetectionDialog} StatusAction is not function")},function(){const t=b.actionLabelGa,e=b.action;t&&o.event("DetectionDialog","Click",t),"function"==typeof e?e():console.error("[SvelteComponents] {DetectionDialog} OptionAction is not function")},P,function(t){R(t),y=Ct(R.bind(this,t),25);const e=new MutationObserver(y);return e.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),{destroy:e.disconnect.bind(e)}},G,A,l,i,h,f,()=>P(0),()=>P(1),t=>P(t),t=>F.dontShowAgain.action(t.target.checked),t=>G(t)]}class ke extends ft{constructor(t){super(),pt(this,t,ye,xe,y,{windowWidth:1,config:0,windowClose:26},[-1,-1])}}function Fe(t){let e,n;return e=new ke({props:{config:t[0]}}),e.$on("ignore",t[1]),{c(){ct(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.config=t[0]),e.$set(o)},i(t){n||(it(e.$$.fragment,t),n=!0)},o(t){at(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ae(t){let e,n,o=t[0]&&Fe(t);return{c(){o&&o.c(),e=L()},m(t,s){o&&o.m(t,s),$(t,e,s),n=!0},p(t,[n]){t[0]?o?(o.p(t,n),1&n&&it(o,1)):(o=Fe(t),o.c(),it(o,1),o.m(e.parentNode,e)):o&&(st(),at(o,1,1,(()=>{o=null})),lt())},i(t){n||(it(o),n=!0)},o(t){at(o),n=!1},d(t){o&&o.d(t),t&&N(e)}}}const Te=/[/|\\]/g;function Se(t,n,o){const l=r.createLogger("antiransomware.detection"),i=s.getUrlParams().alertId,a=new Date,c="ignore",d="allow",m="block";let p=null,f={};function h(t){e("ransomwareDetection.UserChoice",t).catch((t=>{l.error("failed to store user choice",t)}))}function g(t){return l.info("doUserAction: action = "+t),h(t),e("app.antiransomware.GetExcludedFiles").then((n=>{const o=f.actorPath+"<block="+(t===d?"0":"1")+">";return n&&"function"==typeof n.push||(n=[]),n.push(o),e("app.antiransomware.SetExcludedFiles",n).then((()=>(s.broadcastEvent("settings.blockedAndAllowedApps.changed"),w().then((()=>t===d?(l.info("getting the allowed config"),{color:"green",icon:{name:"icon-m-tools-ransomware",color:"ok"},title:u("antiransomware.appAllowed.title"),text:u("antiransomware.appAllowed.desc",f.actorName,f.protectedFolderName),actionText:u("antiransomware.weAlwaysAllow"),actions:[{label:u("global.gotIt"),labelTest:"dd_primary_btn_got-it"}],details:_(),status:{text:u("antiransomware.allowed"),actionText:null,actionTextGA:null,action:null},detectionInfo:{id:i,timestamp:a,index:0,total:0,showCloseAllBtn:!1}}):(l.info("getting the blocked config"),{color:"green",icon:{name:"icon-m-tools-ransomware",color:"ok"},title:u("antiransomware.appBlocked.title"),text:u("antiransomware.appBlocked.desc",f.actorName,f.protectedFolderName),actionText:u("antiransomware.weAlwaysBlock"),actions:[{label:u("global.gotIt"),labelTest:"dd_primary_btn_got-it"}],details:_(),status:{text:u("antiransomware.blocked"),actionText:null,actionTextGA:null,action:null},detectionInfo:{id:i,timestamp:a,index:0,total:0,showCloseAllBtn:!1}})))))).catch((t=>{l.error("setting excluded files failed",t)}))})).catch((t=>{l.error("getting excluded files failed",t)}))}function w(){return l.info("updating data"),(l.info("getting the protected folder"),e("app.antiransomware.GetPaths").then((t=>{l.info("..paths received");const e=f.filePath.toLowerCase();let n="";if(t.forEach((t=>{-1!==e.indexOf(t.toLowerCase())&&t.length>n.length&&(n=t)})),l.info("protectedFolder = "+n),n)return n})).catch((t=>{l.error("getting paths failed",t),s.close()}))).then((t=>{f.protectedFolderPath=t,f.protectedFolderName=function(t){const e=t&&t.split(Te);let n="";if(e)for(;n.length<1&&e.length>0;)n=e.pop();return n}(t),l.info("data updated")}))}function _(){return l.info("getting details"),[{title:u("global.appName"),value:f.actorPath,testValue:"threatName"},{title:u("antiransomware.actedVia"),value:f.actedViaPath},{title:u("global.protectedFolder"),value:f.protectedFolderPath},{title:u("global.filePath"),value:f.filePath,testValue:"file"},{title:u("global.detectedBy"),value:u("antiransomware"),testValue:"detectedBy_RansomwareShield"}]}return(l.info("loading data"),e("ransomwareDetection.GetStatus").then((t=>(l.info("data loaded"),f={filePath:t.file,fileName:t.file.split(Te).pop(),actorPath:t.actor,actorName:t.actor.split(Te).pop(),actedViaPath:t.actedVia},w()))).catch((t=>{l.error("getting status failed",t),s.close()}))).then((()=>{o(0,p=function(){const t={color:"red",icon:{name:"icon-m-tools-ransomware",color:"critical"},title:u("antiransomware.weJustProtect.title"),text:u("antiransomware.weJustProtect.desc",f.actorName,f.fileName,f.protectedFolderName),actionText:u("antiransomware.whatToDo"),actions:[],details:_(),status:{text:"-"},detectionInfo:{id:i,timestamp:a,index:0,total:0,showCloseAllBtn:!1}};return t.actions.push({label:u("antiransomware.blockDetectedApp"),labelTest:"dd_primary_btn_block",action:g.bind(this,m),status:{text:u("antiransomware.blocking")},shortcut:{code:"KeyB",ctrlKey:!0},minDuration:500}),t.actions.push({label:u("antiransomware.allowDetectedApp"),labelTest:"dd_secondary_btn_allow",action:g.bind(this,d),status:{text:u("antiransomware.allowing")},shortcut:{code:"KeyA",ctrlKey:!0},minDuration:500}),t}()),s.init({width:600,height:420})})),[p,function(){h(c)},!0]}class $e extends ft{constructor(t){super(),pt(this,t,Se,Ae,y,{handlesWindowInit:2})}get handlesWindowInit(){return this.$$.ctx[2]}}const Ne={title:"antiransomware",desc:"antiransomware.settings.desc",modeLabel:"antiransomware.settings.mode.label",smartMode:"antiransomware.settings.mode.smart.label",smartModeDesc:"antiransomware.settings.mode.smart.desc",strictMode:"antiransomware.settings.mode.strict.label",strictModeDesc:"antiransomware.settings.mode.strict.desc",trustedAppsTitle:"antiransomware.trustedApps.title",trustedAppsDesc:"antiransomware.trustedApps.desc",protectedFileTypesTitle:"antiransomware.settings.protectedFileTypes.title",fileTypesTitle:"antiransomware.settings.fileTypes",fileTypes:{music:"antiransomware.fileTypes.music",archive:"antiransomware.fileTypes.archive",database:"antiransomware.fileTypes.database",disc:"antiransomware.fileTypes.disc",document:"antiransomware.fileTypes.document",photo:"antiransomware.fileTypes.photo",video:"antiransomware.fileTypes.video"},customExtensions:"antiransomware.settings.customExtensions",customExtensionsPlaceholder:"antiransomware.settings.customExtensions.placeholder",customExtensionsDuplicates:"antiransomware.settings.customExtensions.duplicates",viewAllowedAndBlockedApps:"settings.viewAllowedAndBlockedApps",viewProtectedFolders:"antiransomware.settings.viewProtectedFolders"};function Ce(t){let e,n,o,s,l,i,a,r;return{c(){e=E("span"),n=E("kin-tooltip"),o=E("span"),o.innerHTML='<kin-icon name="icon-m-action-info" size="16"></kin-icon>',s=D(),l=E("span"),i=E("h4"),i.textContent=`${u(Ne.trustedAppsTitle)}`,a=D(),r=E("span"),r.textContent=`${u(Ne.trustedAppsDesc)}`,j(o,"slot","tooltip-activator"),j(i,"class","h4 -margins"),j(r,"class","p -small"),j(l,"slot","tooltip"),j(e,"class","settings__info")},m(t,c){$(t,e,c),S(e,n),S(n,o),S(n,s),S(n,l),S(l,i),S(l,a),S(l,r)},p:w,i:w,o:w,d(t){t&&N(e)}}}var Ee=/^\s+|\s+$/g,Me=/^[-+]0x[0-9a-f]+$/i,De=/^0b[01]+$/i,Le=/^0o[0-7]+$/i,Pe=parseInt,je="object"==typeof ht&&ht&&ht.Object===Object&&ht,Ie="object"==typeof self&&self&&self.Object===Object&&self,We=je||Ie||Function("return this")(),Re=Object.prototype.toString,Ge=Math.max,Be=Math.min,Oe=function(){return We.Date.now()};function Ue(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function qe(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==Re.call(t)}(t))return NaN;if(Ue(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ue(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ee,"");var n=De.test(t);return n||Le.test(t)?Pe(t.slice(2),n?2:8):Me.test(t)?NaN:+t}var ze=function(t,e,n){var o,s,l,i,a,r,c=0,d=!1,u=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=o,l=s;return o=s=void 0,c=e,i=t.apply(l,n)}function f(t){return c=t,a=setTimeout(g,e),d?p(t):i}function h(t){var n=t-r;return void 0===r||n>=e||n<0||u&&t-c>=l}function g(){var t=Oe();if(h(t))return w(t);a=setTimeout(g,function(t){var n=e-(t-r);return u?Be(n,l-(t-c)):n}(t))}function w(t){return a=void 0,m&&o?p(t):(o=s=void 0,i)}function _(){var t=Oe(),n=h(t);if(o=arguments,s=this,r=t,n){if(void 0===a)return f(r);if(u)return a=setTimeout(g,e),p(r)}return void 0===a&&(a=setTimeout(g,e)),i}return e=qe(e)||0,Ue(n)&&(d=!!n.leading,l=(u="maxWait"in n)?Ge(qe(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=r=s=a=void 0},_.flush=function(){return void 0===a?i:w(Oe())},_};const He={music:{ext:["m3u","m4a","mp3","wma","ogg","wav"]},archive:{ext:["7z","rar","zip"]},database:{ext:["sqlite","sqlite3"]},disc:{ext:["iso","img","nrg","tc"]},document:{ext:["doc","docx","odt","rtf","wpd","wps","csv","key","pdf","pps","ppt","pptm","pptx","ps","psd","vcf","xlr","xls","xlsx","xlsm","xlsx","ods","odp","indd","dwg","dxf","kml","kmz","gpx","txt","cad","dwg","wmf"]},photo:{ext:["3fr","ari","arw","bay","bmp","cr2","crw","cxi","dcr","dng","eip","erf","fff","gif","iiq","j6i","k25","kdc","mef","mfw","mos","mrw","nef","nrw","orf","pef","png","raf","raw","rw2","rwl","rwz","sr2","srf","srw","x3f","jpg","jpeg","tga","tiff","tif","ai"]},video:{ext:["3g2","3gp","asf","avi","flv","m4v","mkv","mov","mp4","mpg","rm","swf","vob","wmv"]}},Ke=/[,|.|;| ]+/;let Ye=[];const Ve=t.extend({template:{v:3,t:[{t:4,f:[{t:4,f:[{t:7,e:"p",a:{class:"p -small -secondary -margins g-margin-top--15"},f:[{t:3,x:{r:["nls","STRINGS.protectedFileTypesTitle"],s:"_0(_1)"}}]}],n:50,x:{r:["hideLabel"],s:"!_0"}}," ",{t:7,e:"table",a:{class:"table -compact g-margin-top--15"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"5%"}}," ",{t:7,e:"col",a:{width:"95%"}}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"th",a:{colspan:"2"},f:[{t:3,x:{r:["nls","STRINGS.fileTypesTitle"],s:"_0(_1)"}}]}]}],n:50,x:{r:["hideTableHeader"],s:"!_0"}}," ",{t:4,f:[{t:7,e:"tr",a:{class:"-hoverable"},f:[{t:7,e:"td",f:[{t:7,e:"input",a:{type:"checkbox",class:"checkbox",checked:[{t:2,r:"selected"}],id:["arw_",{t:2,r:"extName"}],"data-test":["arw_",{t:2,r:"extName"}]},v:{change:{n:"categoryCheckboxChanged",d:[{t:2,r:"extName"}]}}}]}," ",{t:7,e:"td",f:[{t:7,e:"kin-tooltip",f:[{t:7,e:"label",a:{slot:"tooltip-activator",class:"checkbox__label -clickable g-nowrap",for:["arw_",{t:2,r:"extName"}],"data-test":["arw_",{t:2,r:"extName"},"-label"]},f:[{t:7,e:"kin-icon",a:{name:["icon-m-file-",{t:2,r:"extName"}],size:"24",class:"g-margin-right--10"}}," ",{t:3,x:{r:["nls","extName","STRINGS.fileTypes"],s:"_0(_2[_1])"}}]}," ",{t:7,e:"div",a:{slot:"tooltip"},f:[{t:2,r:"strExtList"}]}]}]}]}],n:52,i:"extName",r:"allFileTypes"}]}," ",{t:7,e:"p",a:{class:"arw_custom-extensions p -small g-font--bold -margins g-margin-top--20"},f:[{t:3,x:{r:["nls","STRINGS.customExtensions"],s:"_0(_1)"}}]}," ",{t:7,e:"input",a:{id:"custom-extensions",class:"input -full -field",type:"text",placeholder:[{t:3,x:{r:["nls","STRINGS.customExtensionsPlaceholder"],s:"_0(_1)"}}],value:[{t:2,r:"customExtensions"}],spellcheck:"false"},v:{keypress:"customKeyPress",input:"checkExtensionsDuplicity",paste:"pasteCustomExtensions"}}," ",{t:7,e:"p",a:{class:"p -small color-ok -text g-margin-top--15"},m:[{t:4,f:['style="visibility: hidden"'],n:50,x:{r:["duplicateExtensions"],s:"!_0"}}],f:[{t:3,x:{r:["nls","STRINGS.customExtensionsDuplicates"],s:"_0(_1)"}}]}],n:50,x:{r:["loading"],s:"!_0"}}]},data:()=>({allFileTypes:He,customExtensions:"",duplicateExtensions:!1,loading:!0,STRINGS:Ne,hideLabel:!1,hideTableHeader:!1}),oninit(){this.on("categoryCheckboxChanged",(t=>{if(!t.context.selected){const e=t.context.strExtList.split(Ke),n=Array.from(new Set(this.get("customExtensions").split(Ke))),o=e.filter((t=>n.includes(t))),s=n.filter((t=>!o.includes(t)));this.set("customExtensions",s.join(", ")),this._checkExtensionsDuplicity()}})),this.on("customKeyPress",(t=>{const e=String.fromCharCode(t.original.charCode||t.original.which);if(new RegExp(/[\\|\/|:|\*|\?|"|<|>|\|]/).test(e))return t.original.preventDefault(),!1;this._checkExtensionsDuplicity()})),this.on("pasteCustomExtensions",(()=>!this._checkExtensionsDuplicity())),this.on("checkExtensionsDuplicity",(()=>{this._checkExtensionsDuplicity()})),e("app.antiransomware.GetExtensions").then((t=>{Array.isArray(t)||(t=[]),t=t.filter((t=>!t.includes("rswcat_")&&"_noExtensions"!==t));let n=this.get("allFileTypes");e("app.antiransomware.GetDefaultExtensions").then((e=>{if(e.length>0&&e[0].includes("rswcat_")){n={};let t="";e.forEach((e=>{e.includes("rswcat_")?t=e.replace("rswcat_",""):(void 0===n[t]&&(n[t]={ext:[]}),n[t].ext.push(e))})),void 0!==n.rswcat_custom&&delete n.rswcat_custom}this._selectFileCategories(n,t)})).catch((()=>{console.log("Get default extensions failed, used hardcoded one"),this._selectFileCategories(n,t)}))})),this.observe("allFileTypes",ze(this._saveData,1e3).bind(this),{init:!1})},onteardown(){this._saveData()},_selectFileCategories(t,e){for(const o in t){t[o].selected=!1,t[o].strExtList=t[o].ext.join(", ");let n=e.length;for(;n--;)if(-1!==t[o].ext.indexOf(e[n])){t[o].selected=!0;break}}this.set("allFileTypes",t),Ye=function(){let e=[];for(const n in t)e=e.concat(t[n].ext);return e}();const n=e.filter((t=>!Ye.includes(t)));this.set("customExtensions",n.join(", ")),this.set("duplicateExtensions",!1),this.set("loading",!1)},_checkExtensionsDuplicity:ze((function(){const t=this.get("customExtensions").split(Ke).filter((t=>Ye.includes(t)));if(this.set("duplicateExtensions",t.length>0),t.length<1)return!1;const e=this.get("allFileTypes");let n=!1;for(const o in e){if(!0===e[o].selected)continue;let s=t.length;for(;s--;)if(-1!==e[o].ext.indexOf(t[s])){e[o].selected=!0,n=!0;break}}return n&&this.set("allFileTypes",e),!1}),300),_saveData:function(){let t=[];const n=this.get("allFileTypes");for(const e in n)n[e].selected&&t.push.apply(t,n[e].ext);if(this.get("customExtensions").length){const e=this.get("customExtensions").split(Ke);t=t.concat(e.filter((t=>!Ye.includes(t))))}t.length||t.push("_noExtensions"),e("app.antiransomware.SetExtensions",t).catch((t=>{console.error("Unable to set extensions",t)}))}});function Je(t){let e,n,o;return{c(){e=E("div")},m(s,l){$(s,e,l),n||(o=T(t[0].call(null,e)),n=!0)},p:w,i:w,o:w,d(t){t&&N(e),n=!1,o()}}}function Qe(t,e,n){let{hideLabel:o=null}=e,{hideTableHeader:s=null}=e;return t.$$set=t=>{"hideLabel"in t&&n(1,o=t.hideLabel),"hideTableHeader"in t&&n(2,s=t.hideTableHeader)},[function(t,e){const n=c(Ve,{target:t,data:{hideLabel:o,hideTableHeader:s}});return{destroy:()=>n.$destroy()}},o,s]}class Ze extends ft{constructor(t){super(),pt(this,t,Qe,Je,y,{hideLabel:1,hideTableHeader:2})}}function Xe(t){let e,n,o,s,l,i,a,r,c;return e=new t[1]({props:{property:en.mode}}),o=new t[2]({}),r=new Ze({}),{c(){ct(e.$$.fragment),n=D(),ct(o.$$.fragment),s=D(),l=E("a"),l.textContent=`${u(Ne.viewProtectedFolders)}`,i=D(),a=E("div"),ct(r.$$.fragment),j(l,"id","antiransomware_settings_viewProtectedFolders"),j(l,"class","a -small"),j(l,"href","#AntiRansomware"),j(a,"id",en.protectedFileTypes.id+"__container")},m(t,d){dt(e,t,d),$(t,n,d),dt(o,t,d),$(t,s,d),$(t,l,d),$(t,i,d),$(t,a,d),dt(r,a,null),c=!0},p:w,i(t){c||(it(e.$$.fragment,t),it(o.$$.fragment,t),it(r.$$.fragment,t),c=!0)},o(t){at(e.$$.fragment,t),at(o.$$.fragment,t),at(r.$$.fragment,t),c=!1},d(t){ut(e,t),t&&N(n),ut(o,t),t&&N(s),t&&N(l),t&&N(i),t&&N(a),ut(r)}}}function tn(t){let e,n;return e=new t[0]({props:{component:"ais_shl_rsw",ipmBuyElm:{IPM_BUY_ELM:343},title:u(Ne.title),desc:u(Ne.desc),stopOptions:t[3],$$slots:{default:[Xe]},$$scope:{ctx:t}}}),{c(){ct(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,[n]){const o={};16&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(it(e.$$.fragment,t),n=!0)},o(t){at(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}const en={mode:{id:"antiransomware_settings_mode",label:u(Ne.modeLabel),options:[{label:u(Ne.smartMode),desc:u(Ne.smartModeDesc),descCompo:class extends ft{constructor(t){super(),pt(this,t,null,Ce,y,{})}},value:1},{label:u(Ne.strictMode),desc:u(Ne.strictModeDesc),value:2}],load:()=>e("app.antiransomware.GetProtectionMode").then((t=>({locked:!1,value:t}))),change:t=>e("app.antiransomware.SetProtectionMode",t),search:{title:Ne.modeLabel,others:[Ne.smartMode,Ne.smartModeDesc,Ne.strictMode,Ne.strictModeDesc]}},protectedFileTypes:{id:"antiransomware_settings_protectedFileTypes",search:{title:Ne.protectedFileTypesTitle,others:[Ne.fileTypes.music,Ne.fileTypes.archive,Ne.fileTypes.database,Ne.fileTypes.disc,Ne.fileTypes.document,Ne.fileTypes.photo,Ne.fileTypes.video,Ne.customExtensions]}},allowedAndBlockedApps:{search:Ne.viewAllowedAndBlockedApps},viewProtectedFolders:{id:"antiransomware_settings_viewProtectedFolders",search:Ne.viewProtectedFolders}},nn={title:Ne.title,desc:Ne.desc,items:en};function on(t){const{Container:e,Radio:n,WhiteAndBlackList:o}=p;return[e,n,o,{}]}class sn extends ft{constructor(t){super(),pt(this,t,on,tn,y,{})}}export default g;export{$e as detection,sn as settings,nn as settingsSearchStrings};const ln={name:"AntiRansomware",version:"1.2.541",created:"2021-09-06T10:49:09.674Z"};export{ln as metadata};