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/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/Avast Software/Avast/gui_resources/1.0.663/plugins.js
//{"name":"plugins","version":"1.2.359","created":"2021-09-06T10:54:31.347Z"}
import{serviceRequest as e,debugMode as o,moduleManager as t,windowApi as n}from"./napi.js";import{settingsService as r}from"./napiExtensions.js";import i from"./napiAdapter.js";let s=!1;function c(){if("false"===localStorage.fileLogging||0===parseInt(localStorage.fileLogging))return;const o=["log","info","debug","warn","error","group","groupCollapsed"],t={group:"log",groupCollapsed:"log"},n=["warn","error"],i={};let c=!1;o.forEach((e=>{i[e]=window.console[e]})),r.getValue("avcfg://settings/Common/DebugLogging").catch((()=>!1)).then((e=>{c="1"==e})),s||(s=!0,o.forEach((o=>{i[o]=window.console[o],window.console[o]=(...r)=>{if(i[o].apply(console,r),!c&&!n.includes(o))return;if("string"==typeof r[0]&&r[0].startsWith("%c")){const e=/%c/gi,o=(r[0].match(e)||[]).length;r[0]=r[0].replace(e,""),r.splice(1,o)}const s={args:r,_consoleType:t[o]||o};let l;try{l=JSON.stringify(s)}catch(a){i.warn("fileLogging: failed to stringify args",r),l=r}const a=new Error,d=(a.stack&&a.stack.split(/\n/g))[2]||"(no source:0)",[,u,f]=d.match(/\((.+):(\d+):\d+\)$/)||d.match(/(.+):(\d+):\d+$/)||[0,"undefined",0],g={strMessage:l,strSource:u.trim(),line:+f};!window.emulatorService&&e("app.utils.WriteConsoleLog",g,!1).catch((()=>{}))}})),console.log("fileLogging enabled"))}const l=["napi","napiExtensions","i18n","libs"];function a(){o.on("enabledChanged",d),window.NAPI=i,d()}function d(){if(!o.isEnabled())return delete window.nitro,void console.log("The global nitro object is deleted.");console.log("Setting the global nitro object..");const e=l,n=e.map((e=>t.importModule(e,"debug",{silent:!0})));return Promise.allSettled(n).then((o=>{o.forEach(((o,t)=>{const n=e[t];window.nitro=window.nitro||{},"fulfilled"===o.status&&(window.nitro[n]=o.value)})),console.groupCollapsed("%c NITRO DEBUG API (window.nitro) %c","background: #f90; color: #000","background: #00689c; color: #FFF");for(const e in window.nitro)console.log(e);console.groupEnd()}))}let u=!1;function f(){return document.addEventListener("keydown",g,!1),function(){document.removeEventListener("mousedown",m,!1),document.removeEventListener("keydown",g,!1),document.querySelector("body").classList.remove("tabbed"),u=!1}}function g(e){"Tab"===e.code&&(u=!0,document.querySelector("body").classList.add("tabbed"),document.removeEventListener("keydown",g,!1),document.addEventListener("mousedown",m,!1))}function m(){u&&(document.querySelector("body").classList.remove("tabbed"),document.removeEventListener("mousedown",m,!1),document.addEventListener("keydown",g,!1))}function p(e){const o=e.querySelectorAll("a");function t(e){return e.preventDefault(),n.browse(e.target.getAttribute("href")),!1}return o.forEach((e=>{e.addEventListener("click",t,!1)})),{destroy(){o.forEach((e=>{e.removeEventListener("click",t)}))}}}function w(){const e=new CustomEvent("kin-isActionBarVisible",{detail:{isVisible:!0},bubbles:!0,cancelable:!0,composed:!0});dispatchEvent(e)}function b(e){const o={};for(const[t,n]of e)o[t]=n;return o}function v(){Object.fromEntries=Object.fromEntries||b}function E(e){const o=e.map((e=>e instanceof Promise||"function"==typeof e.then&&"function"==typeof e.catch?e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e}))):{status:"fulfilled",value:e}));return Promise.all(o)}function h(){Promise.allSettled=Promise.allSettled||E}export{p as externalLinks,c as fileLogging,a as nitroObjectSetup,v as objectFromEntriesPolyfill,h as promiseAllSettledPolyfill,w as showKinActionBar,f as tabNavigation};const y={name:"plugins",version:"1.2.359",created:"2021-09-06T10:54:31.347Z"};export{y as metadata};