p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/eset/efs/lib/webd/frontend/assets/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /opt/eset/efs/lib/webd/frontend/assets/index-7308cf87.js
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { aQ as sprintf, aR as createBrowserHistory, aS as DateTime, aT as jsxRuntimeExports, aU as React, aV as __vitePreload, aW as humanizeDuration, aX as colors, aY as filesize, aZ as t, a_ as Long, a$ as v4, b0 as combineReducers, b1 as applyMiddleware, b2 as composeWithDevTools, b3 as createStore, b4 as thunkMiddleware, b5 as Settings, b6 as instance, b7 as Backend, b8 as Browser, b9 as initReactI18next, ba as withTranslation, m as reactExports, bb as isDeepEqual, bc as connect, bd as useTranslation, be as useSelector, bf as useNavigate, bg as useLocation, bh as copy, bi as pick, bj as omit, bk as JSZip, bl as lookup, bm as Subject, bn as combineLatest, bo as G, bp as Trans, bq as useDispatch, br as scheme, bs as View, bt as parse, bu as Yc, bv as E, bw as r, bx as matchRoutes, by as useParams, bz as Navigate, bA as Route, bB as Routes, n as reactDomExports, bC as Provider, bD as HistoryRouter } from "./vendor-a489d579.js";
import { R as Row, C as Column, d as default_1, B as BasicLoading, a as default_1$1, b as default_1$2, I as IconStatusOk, c as IconStatusWarning, e as IconStatusError, f as default_1$3, g as default_1$4, h as default_1$5, i as default_1$6, j as IconLetterI, k as default_1$7, l as default_1$8, m as default_1$9, H as HeaderLink, n as default_1$a, o as IconSymbolHelp, p as default_1$b, q as default_1$c, r as IconUserUser, L as Loading, s as default_1$d, t as default_1$e, u as ConfirmationModal, v as default_1$f, T as Table, w as IconArrowExternal, x as Theme, y as default_1$g, z as default_1$h, A as IconCompanyEsetWithborder, D as default_1$i, E as default_1$j, F as default_1$k, G as default_1$l, J as default_1$m, K as IconArrowCaretRight, M as default_1$n, N as default_1$o, O as default_1$p, S as Select, P as default_1$q, Q as default_1$r, U as default_1$s, V as default_1$t, W as default_1$u, X as IconArrowCollapse, Y as IconArrowExpand, Z as IconArrowRefresh, _ as default_1$v, $ as default_1$w, a0 as IconActionClose, a1 as Dropdown, a2 as default_1$x, a3 as default_1$y, a4 as Tooltip, a5 as default_1$z, a6 as default_1$A, a7 as default_1$B, a8 as default_1$C, a9 as default_1$D, aa as default_1$E, ab as default_1$F, ac as default_1$G, ad as IconFileClean, ae as default_1$H, af as default_1$I, ag as PlaceholderScreen, ah as default_1$J, ai as IconArrowTriangularDown, aj as IconActionEdit, ak as default_1$K, al as Radio, am as default_1$L, an as default_1$M, ao as default_1$N, ap as default_1$O, aq as default_1$P, ar as default_1$Q, as as default_1$R, at as default_1$S, au as Headline, av as default_1$T, aw as default_1$U, ax as default_1$V, ay as default_1$W, az as default_1$X, aA as default_1$Y, aB as default_1$Z, aC as IconMenuMore, aD as default_1$_, aE as IconActionLock, aF as default_1$$, aG as default_1$10, aH as Validation, aI as hooks, aJ as default_1$11, aK as default_1$12, aL as default_1$13, aM as IconArrowCaretDown, aN as PanelExpander, aO as Radio$1, aP as default_1$14, aQ as default_1$15, aR as default_1$16, aS as ValidationError, aT as default_1$17, aU as default_1$18, aV as default_1$19, aW as default_1$1a, aX as default_1$1b, aY as default_1$1c, aZ as default_1$1d, a_ as default_1$1e, a$ as default_1$1f, b0 as default_1$1g, b1 as default_1$1h, b2 as LoginUI, b3 as default_1$1i, b4 as constants, b5 as default_1$1j } from "./zui-64ffcf4f.js";
var require_index_001 = __commonJS({
  "assets/index-7308cf87.js"(exports) {
    (function polyfill() {
      const relList = document.createElement("link").relList;
      if (relList && relList.supports && relList.supports("modulepreload")) {
        return;
      }
      for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
        processPreload(link);
      }
      new MutationObserver((mutations) => {
        for (const mutation of mutations) {
          if (mutation.type !== "childList") {
            continue;
          }
          for (const node of mutation.addedNodes) {
            if (node.tagName === "LINK" && node.rel === "modulepreload")
              processPreload(node);
          }
        }
      }).observe(document, { childList: true, subtree: true });
      function getFetchOpts(link) {
        const fetchOpts = {};
        if (link.integrity)
          fetchOpts.integrity = link.integrity;
        if (link.referrerPolicy)
          fetchOpts.referrerPolicy = link.referrerPolicy;
        if (link.crossOrigin === "use-credentials")
          fetchOpts.credentials = "include";
        else if (link.crossOrigin === "anonymous")
          fetchOpts.credentials = "omit";
        else
          fetchOpts.credentials = "same-origin";
        return fetchOpts;
      }
      function processPreload(link) {
        if (link.ep)
          return;
        link.ep = true;
        const fetchOpts = getFetchOpts(link);
        fetch(link.href, fetchOpts);
      }
    })();
    var AUTH_ACTION_KEYS = /* @__PURE__ */ ((AUTH_ACTION_KEYS2) => {
      AUTH_ACTION_KEYS2["AUTH_LOGIN_START"] = "AUTH_LOGIN_START";
      AUTH_ACTION_KEYS2["AUTH_LOGIN_OK"] = "AUTH_LOGIN_OK";
      AUTH_ACTION_KEYS2["AUTH_LOGIN_FAILED"] = "AUTH_LOGIN_FAILED";
      AUTH_ACTION_KEYS2["AUTH_LOGOUT"] = "AUTH_LOGOUT";
      AUTH_ACTION_KEYS2["AUTH_LOGOUT_TRIGGERED"] = "AUTH_LOGOUT_TRIGGERED";
      AUTH_ACTION_KEYS2["AUTH_LOGOUT_BLOCKED"] = "AUTH_LOGOUT_BLOCKED";
      AUTH_ACTION_KEYS2["AUTH_LOGIN_TOKEN_OK"] = "AUTH_LOGIN_TOKEN_OK";
      AUTH_ACTION_KEYS2["AUTH_SESSION_TIME"] = "AUTH_SESSION_TIME";
      AUTH_ACTION_KEYS2["AUTH_LOGOUT_SET_ERROR"] = "AUTH_LOGOUT_SET_ERROR";
      AUTH_ACTION_KEYS2["AUTH_IS_LOGGED"] = "AUTH_IS_LOGGED";
      AUTH_ACTION_KEYS2["AUTH_SET_IS_FRESH_LOGIN"] = "AUTH_SET_IS_FRESH_LOGIN";
      AUTH_ACTION_KEYS2["AUTH_CHANGE_PASS_PROGRESS"] = "AUTH_CHANGE_PASS_PROGRESS";
      AUTH_ACTION_KEYS2["AUTH_SET_USERNAME"] = "AUTH_SET_USERNAME";
      return AUTH_ACTION_KEYS2;
    })(AUTH_ACTION_KEYS || {});
    const DEFAULT_IDLE_TIME = 30;
    const initState$j = {
      loginRequested: false,
      isLogged: false,
      username: "",
      error: null,
      logoutBlocked: 0,
      timeLeft: DEFAULT_IDLE_TIME,
      // # of minutes left in session
      idleLimit: DEFAULT_IDLE_TIME,
      isFreshLogin: false,
      changePassword: {
        error: "",
        running: false
      }
    };
    const authReducer = (state = initState$j, action) => {
      switch (action.type) {
        case AUTH_ACTION_KEYS.AUTH_IS_LOGGED:
          return {
            ...state,
            isLogged: action.value
          };
        case AUTH_ACTION_KEYS.AUTH_LOGIN_START:
          return {
            ...state,
            loginRequested: true
          };
        case AUTH_ACTION_KEYS.AUTH_LOGIN_OK:
          return {
            ...state,
            loginRequested: false,
            isLogged: true,
            username: action.value,
            timeLeft: state.idleLimit,
            error: initState$j.error
          };
        case AUTH_ACTION_KEYS.AUTH_LOGIN_FAILED:
          return {
            ...state,
            loginRequested: false,
            error: action.value
          };
        case AUTH_ACTION_KEYS.AUTH_LOGOUT:
          return {
            ...state,
            isLogged: false,
            username: ""
          };
        case AUTH_ACTION_KEYS.AUTH_LOGOUT_TRIGGERED:
          return {
            ...state,
            isLogged: false,
            error: action.value
          };
        case AUTH_ACTION_KEYS.AUTH_LOGOUT_SET_ERROR:
          return {
            ...state,
            error: action.value
          };
        case AUTH_ACTION_KEYS.AUTH_LOGOUT_BLOCKED:
          return {
            ...state,
            // allows for multiple independent sources of logout blocking
            logoutBlocked: action.value ? state.logoutBlocked + 1 : Math.max(0, state.logoutBlocked - 1)
          };
        case AUTH_ACTION_KEYS.AUTH_SESSION_TIME:
          return {
            ...state,
            timeLeft: Math.max(0, action.value)
          };
        case AUTH_ACTION_KEYS.AUTH_SET_IS_FRESH_LOGIN:
          return {
            ...state,
            isFreshLogin: action.value
          };
        case AUTH_ACTION_KEYS.AUTH_CHANGE_PASS_PROGRESS:
          return {
            ...state,
            changePassword: {
              error: action.value.error,
              running: action.value.running
            }
          };
        case AUTH_ACTION_KEYS.AUTH_SET_USERNAME:
          return { ...state, username: action.value };
        default:
          return state;
      }
    };
    const ce_product = "efs_unix";
    const ce_product_root = "eset.local.products.efs_unix";
    const product_info_short = "ESET Server Security";
    const product_info_long = "ESET Server Security for Linux";
    const langs$2 = [
      "de",
      "en",
      "es",
      "es_419",
      "fr",
      "pl",
      "uk",
      "ja"
    ];
    const product_activation_code = "309";
    const version$1 = [
      10,
      3,
      5,
      0
    ];
    const copyright = 2024;
    const pkgid = {
      ce_product,
      ce_product_root,
      product_info_short,
      product_info_long,
      langs: langs$2,
      product_activation_code,
      version: version$1,
      copyright
    };
    var FEATURE_FLAG = /* @__PURE__ */ ((FEATURE_FLAG2) => {
      FEATURE_FLAG2["RELOAD_ON_VERSION_DIFFERENCE"] = "VITE_RELOAD_ON_VERSION_DIFFERENCE";
      return FEATURE_FLAG2;
    })(FEATURE_FLAG || {});
    const VERSION_PRODUCT_MMR = pkgid.version.slice(0, 3).join(".");
    const VERSION_PRODUCT_FOR_HELP_PAGE = pkgid.version.slice(0, 2).join("");
    const getArchitecture = (type) => {
      if (type === 1 || type === 3) {
        return " (64-bit)";
      }
      if (type === 2 || type === 4) {
        return " (32-bit)";
      }
      return "";
    };
    const checkFeatureFlag = (flag, productionReady = true) => {
      const envValue = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }[flag];
      return (productionReady || !exports.isProduction()) && (!envValue || envValue !== "false");
    };
    const getCopyright = (t2) => sprintf(t2("IDUS_COPYRIGHT_MESSAGE"), pkgid.copyright);
    const getDebugLogsFlag = () => 1;
    const getCurrentEnv = () => 1 + getDebugLogsFlag();
    var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
      LogLevel2["DEBUG"] = "log";
      LogLevel2["INFO"] = "info";
      LogLevel2["WARNING"] = "warn";
      LogLevel2["ERROR"] = "error";
      return LogLevel2;
    })(LogLevel || {});
    var LogEnv = /* @__PURE__ */ ((LogEnv2) => {
      LogEnv2[LogEnv2["DEBUG"] = 0] = "DEBUG";
      LogEnv2[LogEnv2["DEVELOPMENT"] = 1] = "DEVELOPMENT";
      LogEnv2[LogEnv2["PRODUCTION"] = 2] = "PRODUCTION";
      return LogEnv2;
    })(LogEnv || {});
    const getEnv = (env) => {
      if (typeof env === "boolean") {
        return env ? 1 : 0;
      }
      return env;
    };
    const log = (content2, level = "log", env = 0) => {
      if (getEnv(env) >= getCurrentEnv()) {
        console[level](...content2);
      }
    };
    const logGroup = (title, content2, level = "log", env = 0, collapsed = true) => {
      if (getEnv(env) >= getCurrentEnv()) {
        if (collapsed) {
          console.groupCollapsed(title);
        } else {
          console.group(title);
        }
        content2.forEach((entry) => {
          console[level](...entry);
        });
        console.groupEnd();
      }
    };
    const STORAGE_KEYS = {
      LOGIN_TIMES: "loginTimes",
      // last successful login in this browser, per user
      LAST_LOGIN: "lastLogin",
      // currently used "last login" of current user (not current login session but the last one before that)
      DASHBOARD_CONFIG: "dashboardConfig",
      // stringified list of report ids that should be displayed in dashboard
      DASHBOARD_INTERVAL: "dashboardInterval",
      // identifier of the current dashboard interval (from DashboardControls) - e.g. "login", "days-14", "hours-24"
      SOCKET_TRANSPORT_PREFIX: "socket-transport-",
      // prefix for storing info about current socket transport modes per tab
      LEFT_SIDEBAR_COLLAPSED: "sidebarCollapsed"
      // boolean regarding whether the main left sidebar should be collapsed
    };
    const setSidebarCollapsed = (flag) => {
      localStorage.setItem(STORAGE_KEYS.LEFT_SIDEBAR_COLLAPSED, flag.toString());
    };
    const getSidebarCollapsed = () => localStorage.getItem(STORAGE_KEYS.LEFT_SIDEBAR_COLLAPSED) === "true";
    const setLastLogin = (username, lastLogin) => {
      const currentAsString = localStorage.getItem(STORAGE_KEYS.LOGIN_TIMES) ?? "{}";
      try {
        const current = JSON.parse(currentAsString);
        localStorage.setItem(STORAGE_KEYS.LAST_LOGIN, (current[username] ?? 0).toString());
        localStorage.setItem(STORAGE_KEYS.LOGIN_TIMES, JSON.stringify({ ...current, [username]: lastLogin }));
      } catch (e) {
        localStorage.setItem(STORAGE_KEYS.LAST_LOGIN, "0");
        localStorage.setItem(STORAGE_KEYS.LOGIN_TIMES, "{}");
        log(["Last stored login was corrupted and has been reset."], LogLevel.WARNING, LogEnv.PRODUCTION);
      }
    };
    const getLastLogin = () => parseInt(localStorage.getItem(STORAGE_KEYS.LAST_LOGIN) ?? "0", 10);
    const setDashboardInterval = (interval) => {
      localStorage.setItem(STORAGE_KEYS.DASHBOARD_INTERVAL, interval);
    };
    const setDashboardTiles = (tiles) => {
      const stringifiedTiles = JSON.stringify(tiles);
      localStorage.setItem(STORAGE_KEYS.DASHBOARD_CONFIG, stringifiedTiles);
    };
    const getDashboardConfig = () => {
      const interval = localStorage.getItem(STORAGE_KEYS.DASHBOARD_INTERVAL);
      const tiles = localStorage.getItem(STORAGE_KEYS.DASHBOARD_CONFIG);
      if (!tiles) {
        return { interval, tiles: null };
      }
      try {
        const tilesParsed = JSON.parse(tiles);
        if (!Array.isArray(tilesParsed)) {
          throw new Error("invalidConfig");
        }
        return { interval, tiles: tilesParsed };
      } catch (e) {
        log(
          ["Stored dashboard config definition was corrupted. Resetting to default."],
          LogLevel.WARNING,
          LogEnv.PRODUCTION
        );
        localStorage.removeItem(STORAGE_KEYS.DASHBOARD_CONFIG);
        return { interval, tiles: null };
      }
    };
    const getAllSocketTransports = () => Object.keys(localStorage).filter((key) => key.startsWith(STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX));
    const resetSocketTransportInfo = () => {
      getAllSocketTransports().forEach((key) => {
        localStorage.removeItem(key);
      });
    };
    const cleanupSocketTransportInfo = (active) => {
      getAllSocketTransports().forEach((key) => {
        if (!active.includes(key.replace(STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX, ""))) {
          localStorage.removeItem(key);
        }
      });
    };
    const getPollingSockets = () => getAllSocketTransports().filter((key) => localStorage.getItem(key) === "polling").map((key) => key.replace(STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX, ""));
    const getSocketTransportInfo = (socketId) => localStorage.getItem(`${STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX}${socketId}`);
    const setSocketTransportInfo = (socketId, protocol) => {
      localStorage.setItem(`${STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX}${socketId}`, protocol);
    };
    const removeSocketTransportInfo = (socketId) => {
      localStorage.removeItem(`${STORAGE_KEYS.SOCKET_TRANSPORT_PREFIX}${socketId}`);
    };
    var UTILS_ACTION_KEYS = /* @__PURE__ */ ((UTILS_ACTION_KEYS2) => {
      UTILS_ACTION_KEYS2["UTILS_SCREEN_LOCK"] = "UTILS_SCREEN_LOCK";
      UTILS_ACTION_KEYS2["UTILS_SCREEN_UNLOCK"] = "UTILS_SCREEN_UNLOCK";
      UTILS_ACTION_KEYS2["UTILS_RESET_DEBOUNCE"] = "UTILS_RESET_DEBOUNCE";
      UTILS_ACTION_KEYS2["UTILS_INCREMENT_DEBOUNCE"] = "UTILS_INCREMENT_DEBOUNCE";
      UTILS_ACTION_KEYS2["UTILS_SET_SOCKET_PROTOCOL"] = "UTILS_SET_SOCKET_PROTOCOL";
      return UTILS_ACTION_KEYS2;
    })(UTILS_ACTION_KEYS || {});
    const initState$i = {
      screenLocks: 0,
      debounce: {},
      socketProtocol: "",
      socketId: ""
    };
    const utilsReducer = (state = initState$i, action) => {
      switch (action.type) {
        case UTILS_ACTION_KEYS.UTILS_SCREEN_LOCK:
          return {
            ...state,
            screenLocks: state.screenLocks + 1
          };
        case UTILS_ACTION_KEYS.UTILS_SCREEN_UNLOCK:
          return {
            ...state,
            screenLocks: state.screenLocks - 1
          };
        case UTILS_ACTION_KEYS.UTILS_RESET_DEBOUNCE:
          return {
            ...state,
            debounce: {
              ...state.debounce,
              [action.value]: 0
            }
          };
        case UTILS_ACTION_KEYS.UTILS_INCREMENT_DEBOUNCE:
          return {
            ...state,
            debounce: {
              ...state.debounce,
              [action.value]: (state.debounce[action.value] ?? 0) + 1
            }
          };
        case UTILS_ACTION_KEYS.UTILS_SET_SOCKET_PROTOCOL: {
          setSocketTransportInfo(action.value.id, action.value.protocol);
          return { ...state, socketProtocol: action.value.protocol, socketId: action.value.id };
        }
        default:
          return state;
      }
    };
    const PerseusErrors = {
      PERSEUS_E_RESOURCE_ALLOC: 7023
    };
    const UPD_RETVALS = {
      UPD_RETVAL_OK: 0,
      UPD_RETVAL_SETUP_ERROR: 12802,
      UPD_RETVAL_NOT_NEED_UPDATE: 20483,
      UPD_RETVAL_PCU_RUNNING: 20488,
      UPD_RETVAL_PCU_DOWNLOAD_FAILED: 20489,
      UPD_RETVAL_PCU_AVAILABLE: 20490,
      UPD_RETVAL_PCU_MUST_ACCEPT_EULA: 20491,
      UPD_RETVAL_PCU_NOT_NEED_UPDATE: 20492,
      UPD_RETVAL_BACKUP_BLOCKED: 28672,
      UPD_RETVAL_BACKUP_NO_ROLLBACK_POINTS: 28673,
      UPD_RETVAL_BACKUP_ROLLBACK_NOT_NEEDED: 28674
    };
    const UPD_RETVAL_GROUPS = {
      SUCCESS: [
        UPD_RETVALS.UPD_RETVAL_OK,
        UPD_RETVALS.UPD_RETVAL_NOT_NEED_UPDATE,
        UPD_RETVALS.UPD_RETVAL_PCU_RUNNING,
        UPD_RETVALS.UPD_RETVAL_PCU_AVAILABLE,
        UPD_RETVALS.UPD_RETVAL_PCU_NOT_NEED_UPDATE,
        UPD_RETVALS.UPD_RETVAL_BACKUP_ROLLBACK_NOT_NEEDED
      ]
    };
    var Error$1 = /* @__PURE__ */ ((Error2) => {
      Error2["OK"] = "OK";
      Error2["QUARD_INTERNAL_ERROR"] = "QUARD_INTERNAL_ERROR";
      Error2["UNKNOWN_QUERY_ID"] = "UNKNOWN_QUERY_ID";
      Error2["UNKNOWN_AGENT_ERROR"] = "UNKNOWN_AGENT_ERROR";
      Error2["DAEMON_CLOSED_CONNECTION"] = "DAEMON_CLOSED_CONNECTION";
      Error2["REDUX_ERROR"] = "REDUX_ERROR";
      Error2["SAMPLE_FILEPATH_NOT_FOUND"] = "SAMPLE_FILEPATH_NOT_FOUND";
      Error2["SAMPLE_FAILED"] = "SAMPLE_FAILED";
      Error2["PERSEUS"] = "PERSEUS";
      Error2["UPD_RETVAL_ERROR"] = "UPD_RETVAL_ERROR";
      Error2["ECP_ERROR"] = "ECP_ERROR";
      Error2["UNAUTHORIZED_REQUEST"] = "UNAUTHORIZED_REQUEST";
      Error2["UNKNOWN_REQUEST"] = "UNKNOWN_REQUEST";
      Error2["INTERNAL_ERROR"] = "INTERNAL_ERROR";
      Error2["SCAN_START_ERROR"] = "SCAN_START_ERROR";
      Error2["SCAN_ACTION_ERROR"] = "SCAN_ACTION_ERROR";
      Error2["ACTIVATION_ERROR"] = "ACTIVATION_ERROR";
      Error2["REPORT_ERROR"] = "REPORT_ERROR";
      Error2["CONFIG_ERROR"] = "CONFIG_ERROR";
      Error2["AUTH_ERROR"] = "AUTH_ERROR";
      return Error2;
    })(Error$1 || {});
    var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
      ErrorCode2[ErrorCode2["ACTIVATION_OVERUSED_LICENSE"] = 542199840] = "ACTIVATION_OVERUSED_LICENSE";
      return ErrorCode2;
    })(ErrorCode || {});
    const ErrorType$1 = {
      auth: {
        connectionWithProduct: "IDUS_LOGIN_ERROR_PRODUCT_NOT_RESPONDING",
        usernameOrPassword: "IDUS_LOGIN_ERROR_USERNAME_PASSWORD",
        inactivity: "IDUS_LOGIN_ERROR_INACTIVITY",
        connectionLost: "IDUS_LOGIN_ERROR_CONNECTION_LOST",
        remoteLogout: "IDUS_LOGIN_ERROR_REMOTE_LOGOUT",
        passwordChange: "IDUS_LOGIN_ERROR_PASSWORD_CHANGE",
        passwordChanging: {
          "invalid-params": "IDUS_CHANGE_PASSWORD_ERROR_CHANGE_FAILED",
          "password-confirmation-fail": "IDUS_CHANGE_PASSWORD_ERROR_CHANGE_FAILED",
          "invalid-password": "IDUS_CHANGE_PASSWORD_ERROR_CHANGE_FAILED",
          "password-change-failed": "IDUS_CHANGE_PASSWORD_ERROR_CHANGE_FAILED",
          "current-password-invalid": "IDUS_CHANGE_PASSWORD_ERROR_CURRENT_PASS"
        }
      },
      scan: {
        title: {
          newScan: "IDUS_NEW_SCAN_ERROR_TITLE",
          pause: "IDUS_SCAN_ACTION_PAUSE_TITLE",
          resume: "IDUS_SCAN_ACTION_RESUME_TITLE",
          stop: "IDUS_SCAN_ACTION_STOP_TITLE"
        },
        desc: {
          newScan: "IDUS_NEW_SCAN_ERROR_DESC",
          pause: "IDUS_SCAN_ACTION_DESC",
          resume: "IDUS_SCAN_ACTION_DESC",
          stop: "IDUS_SCAN_ACTION_DESC"
        }
      }
    };
    const history = createBrowserHistory();
    const routes$1 = {
      dashboard: "/dashboard",
      overviewProtection: "/status-overview/other-features",
      overviewModules: "/status-overview/modules-update",
      overviewPcu: "/status-overview/product-update",
      overviewLicense: "/status-overview/license",
      overviewDynamic: "/status-overview/:id",
      events: "/events",
      setup: "/setup",
      setupLevel1: "/setup/:prefix/:primary",
      setupLevel2: "/setup/:prefix/:primary/:secondary",
      detections: "/detections",
      scans: "/scans",
      scansDetail: "/scans/detail/:id/:tab",
      quarantine: "/quarantine",
      sentFiles: "/sent-files",
      blockedFiles: "/blocked-files",
      statusOverview: "/status-overview",
      mails: "/mails",
      about: "/about",
      logout: "/logout",
      login: "/login",
      notFound404: "/404-not-found",
      profile: "/profile",
      filteredWebsites: "/filtered-websites",
      networkProtection: "/network-protection"
    };
    var SCAN_DETAIL_TABS = /* @__PURE__ */ ((SCAN_DETAIL_TABS2) => {
      SCAN_DETAIL_TABS2["OVERVIEW"] = "overview";
      SCAN_DETAIL_TABS2["DETECTIONS"] = "detections";
      SCAN_DETAIL_TABS2["NOT_SCANNED"] = "not-scanned";
      return SCAN_DETAIL_TABS2;
    })(SCAN_DETAIL_TABS || {});
    const getRoute = (route, params) => {
      let r2 = route;
      Object.keys(params).forEach((key) => {
        r2 = r2.replace(`:${key}`, params[key]);
      });
      return r2;
    };
    const ERROR_MESSAGE_MAPPING = {
      [UPD_RETVALS.UPD_RETVAL_PCU_DOWNLOAD_FAILED]: "IDUS_PCU_ERROR_DOWNLOAD",
      [UPD_RETVALS.UPD_RETVAL_BACKUP_NO_ROLLBACK_POINTS]: "IDUS_ERROR_ROLLBACK_NOT_AVAILABLE",
      [Error$1.SAMPLE_FILEPATH_NOT_FOUND]: "IDUS_SAMPLE_FILE_NOT_FOUND",
      // PERSEUS_E_NOT_FOUND, PERSEUS_E_PATH_NOT_FOUND
      [Error$1.SAMPLE_FAILED]: "IDUS_SAMPLE_SENDING_FAILED",
      // other perseus errors for sample
      [PerseusErrors.PERSEUS_E_RESOURCE_ALLOC]: "IDUS_CONNECTIONS_LIMIT_BACKEND"
    };
    const ERROR_MODAL_MAPPING = {
      [Error$1.CONFIG_ERROR]: {
        title: "IDUS_CONFIG_FAILED_TITLE",
        text: "IDUS_CONFIG_FAILED_TEXT",
        isTranslationKey: true,
        buttons: [
          {
            id: "events-button",
            text: "IDUS_STATUS_ACTION_EVENTS",
            onClick: () => history.push(routes$1.events, { from: history.location }),
            type: "secondary",
            isTranslationKey: true
          },
          {
            id: "ok-button",
            text: "IDUS_OK",
            type: "primary",
            isTranslationKey: true
          }
        ]
      }
    };
    const mapToCode = (x) => x.toString(10);
    const PCU_CUSTOM_PROTECTION_STATUS_ERRORS = [UPD_RETVALS.UPD_RETVAL_SETUP_ERROR].map(mapToCode);
    const SUCCESS_STATES = UPD_RETVAL_GROUPS.SUCCESS.map(mapToCode);
    const INFO_STATES = [UPD_RETVALS.UPD_RETVAL_PCU_MUST_ACCEPT_EULA].map(mapToCode);
    const IGNORED_STATES = [UPD_RETVALS.UPD_RETVAL_BACKUP_BLOCKED].map(mapToCode);
    const getErrorMessageKey = (key) => !key ? null : ERROR_MESSAGE_MAPPING[key] ?? "";
    const isError = (code) => code && !SUCCESS_STATES.includes(code) && !INFO_STATES.includes(code) && !IGNORED_STATES.includes(code);
    const isInfo = (code) => code && INFO_STATES.includes(code);
    const getBackgroundError = (retval, message = "") => {
      if (!retval) {
        return null;
      }
      const stringRetval = retval.toString(10);
      const shouldHaveMessage = isError(stringRetval) || isInfo(stringRetval);
      return shouldHaveMessage ? message : null;
    };
    const getCodeType = (code) => {
      if (!code) {
        return void 0;
      }
      if (isError(code)) {
        return "error";
      }
      if (isInfo(code)) {
        return "info";
      }
      return void 0;
    };
    var UPDATE_ACTION_KEYS = /* @__PURE__ */ ((UPDATE_ACTION_KEYS2) => {
      UPDATE_ACTION_KEYS2["UPDATE_START"] = "UPDATE_START";
      UPDATE_ACTION_KEYS2["UPDATE_END"] = "UPDATE_END";
      UPDATE_ACTION_KEYS2["UPDATE_ROLLBACK"] = "UPDATE_ROLLBACK";
      UPDATE_ACTION_KEYS2["UPDATE_ROLLBACK_RESULT"] = "UPDATE_ROLLBACK_RESULT";
      UPDATE_ACTION_KEYS2["UPDATE_RESUME"] = "UPDATE_RESUME";
      UPDATE_ACTION_KEYS2["UPDATE_RESUME_RESULT"] = "UPDATE_RESUME_RESULT";
      UPDATE_ACTION_KEYS2["UPDATE_RESET_ROLLBACK_ERROR"] = "UPDATE_RESET_ROLLBACK_ERROR";
      UPDATE_ACTION_KEYS2["UPDATE_RESET_REDUCER"] = "UPDATE_RESET_REDUCER";
      UPDATE_ACTION_KEYS2["UPDATE_SET_RUNTIME"] = "UPDATE_SET_RUNTIME";
      UPDATE_ACTION_KEYS2["UPDATE_SET_STATE"] = "UPDATE_SET_STATE";
      return UPDATE_ACTION_KEYS2;
    })(UPDATE_ACTION_KEYS || {});
    const initState$h = {
      updating: false,
      // updating+compiling in updater terminology
      LastTimeUpdOk: 0,
      LastTimeUpdCheck: 0,
      TimeRollbackDate: 0,
      TimeRollbackUntil: 0,
      LastUpdRetval: 0,
      LastUpdRetvalIds: 0,
      errors: {
        rollback: null,
        last: null
      }
    };
    const setNewState = (state, newState) => ({
      ...state,
      ...newState,
      errors: {
        ...state.errors,
        last: isError(newState.LastUpdRetval.toString()) ? newState.LastUpdRetvalIds : ""
      }
    });
    const updateReducer = (state = initState$h, action) => {
      switch (action.type) {
        case UPDATE_ACTION_KEYS.UPDATE_START:
          return {
            ...state,
            updating: true
          };
        case UPDATE_ACTION_KEYS.UPDATE_END:
          return {
            ...state,
            updating: false
          };
        case UPDATE_ACTION_KEYS.UPDATE_SET_RUNTIME:
          return {
            ...state,
            updating: action.value !== 0
          };
        case UPDATE_ACTION_KEYS.UPDATE_SET_STATE:
          return setNewState(state, action.value);
        case UPDATE_ACTION_KEYS.UPDATE_ROLLBACK_RESULT:
        case UPDATE_ACTION_KEYS.UPDATE_RESUME_RESULT:
          return {
            ...state,
            errors: {
              ...state.errors,
              rollback: getErrorMessageKey(action.value)
            }
          };
        case UPDATE_ACTION_KEYS.UPDATE_RESET_ROLLBACK_ERROR:
          return {
            ...state,
            errors: {
              ...state.errors,
              rollback: initState$h.errors.rollback
            }
          };
        case UPDATE_ACTION_KEYS.UPDATE_RESET_REDUCER:
          return { ...initState$h };
        default:
          return state;
      }
    };
    const RTFSEnabled = "RTFSEnabled";
    const RTFSWorking = "RTFSWorking";
    const RTFSDisabled = "RTFSDisabled";
    const RTFSNonFunctional = "RTFSNonFunctional";
    const WebAccessProtectionDisabled = "WebAccessProtectionDisabled";
    const WebAccessProtectionNonFunctional = "WebAccessProtectionNonFunctional";
    const LiveGridEnabled = "LiveGridEnabled";
    const LiveGridDisabled = "LiveGridDisabled";
    const LiveGridFeedbackEnabled = "LiveGridFeedbackEnabled";
    const LiveGridFeedbackDisabled = "LiveGridFeedbackDisabled";
    const UnwantedAppsDetectionEnabled = "UnwantedAppsDetectionEnabled";
    const UnwantedAppsDetectionDisabled = "UnwantedAppsDetectionDisabled";
    const IcapEnabled = "IcapEnabled";
    const IcapDisabled = "IcapDisabled";
    const DetectionEngineUpToDate = "DetectionEngineUpToDate";
    const DetectionEngineOutOfDateWarning = "DetectionEngineOutOfDateWarning";
    const DetectionEngineOutOfDateError = "DetectionEngineOutOfDateError";
    const ModuleUpdateSuspended = "ModuleUpdateSuspended";
    const ProductNotActivated = "ProductNotActivated";
    const LicenseIsValid = "LicenseIsValid";
    const LicenseExpireSoon = "LicenseExpireSoon";
    const LicenseExpired = "LicenseExpired";
    const EDTDNotReachable = "EDTDNotReachable";
    const EDTDLicenseError = "EDTDLicenseError";
    const EDTDLimitedConnectivity = "EDTDLimitedConnectivity";
    const EDTDNotActivated = "EDTDNotActivated";
    const EDTDDisabled = "EDTDDisabled";
    const EDTDEnabled = "EDTDEnabled";
    const SelinuxMissingDevelPackage = "SelinuxMissingDevelPackage";
    const WatchdogEnabled = "WatchdogEnabled";
    const WatchdogDisabled = "WatchdogDisabled";
    const WebAccessProtectionEnabled = "WebAccessProtectionEnabled";
    const WebAccessProtectionFunctional = "WebAccessProtectionFunctional";
    var PROTECTION_STATUS = /* @__PURE__ */ ((PROTECTION_STATUS2) => {
      PROTECTION_STATUS2[PROTECTION_STATUS2["MUTE"] = -1] = "MUTE";
      PROTECTION_STATUS2[PROTECTION_STATUS2["RED"] = 0] = "RED";
      PROTECTION_STATUS2[PROTECTION_STATUS2["YELLOW"] = 1] = "YELLOW";
      PROTECTION_STATUS2[PROTECTION_STATUS2["INFO"] = 2] = "INFO";
      PROTECTION_STATUS2[PROTECTION_STATUS2["GREEN"] = 3] = "GREEN";
      PROTECTION_STATUS2[PROTECTION_STATUS2["UNKNOWN"] = 999] = "UNKNOWN";
      return PROTECTION_STATUS2;
    })(PROTECTION_STATUS || {});
    var PROTECTION_STATUS_MUTE = /* @__PURE__ */ ((PROTECTION_STATUS_MUTE2) => {
      PROTECTION_STATUS_MUTE2[PROTECTION_STATUS_MUTE2["ON"] = 1] = "ON";
      PROTECTION_STATUS_MUTE2[PROTECTION_STATUS_MUTE2["OFF"] = 0] = "OFF";
      return PROTECTION_STATUS_MUTE2;
    })(PROTECTION_STATUS_MUTE || {});
    var ProtectionStatusActionType = /* @__PURE__ */ ((ProtectionStatusActionType2) => {
      ProtectionStatusActionType2["Enable"] = "enable";
      ProtectionStatusActionType2["Disable"] = "disable";
      ProtectionStatusActionType2["LearnMore"] = "learn-more";
      ProtectionStatusActionType2["EventsLog"] = "events-log";
      return ProtectionStatusActionType2;
    })(ProtectionStatusActionType || {});
    var TagType = /* @__PURE__ */ ((TagType2) => {
      TagType2["EnumWorkingSeverity"] = "EnumWorkingSeverity";
      TagType2["PROTECTION_STATUS"] = "PROTECTION_STATUS";
      return TagType2;
    })(TagType || {});
    const UPDATE_STATUS_GROUP = [
      DetectionEngineUpToDate,
      DetectionEngineOutOfDateWarning,
      DetectionEngineOutOfDateError,
      ModuleUpdateSuspended
    ];
    const LICENSE_STATUS_GROUP = [
      ProductNotActivated,
      LicenseIsValid,
      LicenseExpireSoon,
      LicenseExpired
    ];
    const ACTIVATION_NEEDED_GROUP = [ProductNotActivated];
    const initStatus = (group, tag, info, actions) => ({
      group: group.name,
      groupId: group.id,
      tag,
      info: info === void 0 ? "" : info,
      actions: actions ?? []
    });
    const convertStatusToType = (status) => {
      switch (status) {
        case PROTECTION_STATUS.UNKNOWN:
        case PROTECTION_STATUS.GREEN:
          return "success";
        case PROTECTION_STATUS.INFO:
          return "info";
        case PROTECTION_STATUS.YELLOW:
          return "warning";
        case PROTECTION_STATUS.RED:
        default:
          return "error";
      }
    };
    const getStatusFromSeverity = (ceSeverity) => {
      if (ceSeverity < 1e4) {
        return PROTECTION_STATUS.RED;
      }
      if (ceSeverity < 2e4) {
        return PROTECTION_STATUS.YELLOW;
      }
      if (ceSeverity < 3e4) {
        return PROTECTION_STATUS.INFO;
      }
      return PROTECTION_STATUS.GREEN;
    };
    const getHighestSeverity = (statuses) => Math.min(...statuses.filter((s) => s !== PROTECTION_STATUS.MUTE), PROTECTION_STATUS.GREEN);
    const RTFS_GROUP = { name: "IDUS_REALTIME_FS_PROTECTION", id: "rtfs" };
    const ICAP_GROUP = { name: "IDUS_STATUS_ICAP", id: "icap" };
    const WAP_GROUP = { name: "IDUS_STATUS_WAP_TITLE", id: "wap" };
    const KNOWN_PROTECTION_STATUSES_PRODUCT = {
      [IcapEnabled]: initStatus(ICAP_GROUP, "IDUS_STATUS_ENABLED"),
      [IcapDisabled]: initStatus(ICAP_GROUP, "IDUS_STATUS_DISABLED", "IDUS_STATUS_ICAP_INFO_DISABLED", [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: { "Settings.Plugins.Icap.EnableSocks.Enable": 1 },
          cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
        }
      ]),
      [WebAccessProtectionEnabled]: initStatus(WAP_GROUP, "IDUS_STATUS_ENABLED"),
      [WebAccessProtectionFunctional]: initStatus(WAP_GROUP, "IDUS_STATUS_WORKING"),
      [WebAccessProtectionDisabled]: initStatus(WAP_GROUP, "IDUS_STATUS_DISABLED", "IDUS_STATUS_WAP_INFO_DISABLED", [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: { "Settings.Plugins.Wapd.Protoscan.WebProtectionEnabled": 1 },
          cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
        }
      ]),
      [WebAccessProtectionNonFunctional]: initStatus(
        WAP_GROUP,
        "IDUS_STATUS_NONFUNCTIONAL",
        "IDUS_STATUS_WAP_INFO_NONFUNCTIONAL",
        [
          { type: ProtectionStatusActionType.EventsLog, text: "IDUS_STATUS_ACTION_EVENTS", redirect: "/events" },
          {
            type: ProtectionStatusActionType.LearnMore,
            text: "IDUS_STATUS_ACTION_MORE",
            link: "HELP_WAP"
          }
        ]
      )
    };
    const PRODUCT_STATUSES_FOR_WATCHDOG = {
      [RTFSEnabled]: initStatus(RTFS_GROUP, "IDUS_STATUS_ENABLED"),
      [RTFSWorking]: initStatus(RTFS_GROUP, "IDUS_STATUS_WORKING"),
      [RTFSDisabled]: initStatus(RTFS_GROUP, "IDUS_STATUS_DISABLED", "IDUS_STATUS_RTFS_INFO_DISABLED", [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: { "Settings.Plugins.OAEventd.EnableSocks.Enable": 1 },
          cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
        }
      ]),
      [RTFSNonFunctional]: initStatus(
        RTFS_GROUP,
        "IDUS_STATUS_NONFUNCTIONAL",
        "IDUS_STATUS_RTFS_INFO_NONFUNCTIONAL",
        [
          { type: ProtectionStatusActionType.EventsLog, text: "IDUS_STATUS_ACTION_EVENTS", redirect: "/events" },
          {
            type: ProtectionStatusActionType.LearnMore,
            text: "IDUS_STATUS_ACTION_MORE",
            link: "HELP_PROTECTION_CANT_START_LINK"
          }
        ]
      )
    };
    const __variableDynamicImportRuntimeHelper = (glob, path) => {
      const v = glob[path];
      if (v) {
        return typeof v === "function" ? v() : Promise.resolve(v);
      }
      return new Promise((_, reject) => {
        (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
      });
    };
    var LANGUAGE_ACTION_KEYS = /* @__PURE__ */ ((LANGUAGE_ACTION_KEYS2) => {
      LANGUAGE_ACTION_KEYS2["CHANGE_LANG"] = "CHANGE_LANG";
      return LANGUAGE_ACTION_KEYS2;
    })(LANGUAGE_ACTION_KEYS || {});
    var Weight = /* @__PURE__ */ ((Weight2) => {
      Weight2["normal"] = "normal";
      Weight2["bold"] = "bold";
      return Weight2;
    })(Weight || {});
    var FontFamily = /* @__PURE__ */ ((FontFamily2) => {
      FontFamily2["Default"] = "helvetica";
      FontFamily2["NotoSansJP"] = "NotoSansJP";
      FontFamily2["Roboto"] = "Roboto";
      return FontFamily2;
    })(FontFamily || {});
    const OUR_DATE_SHORT = { ...DateTime.DATE_SHORT, month: "2-digit", day: "2-digit" };
    const OUR_DATETIME_SHORT = {
      ...DateTime.DATETIME_SHORT,
      month: "2-digit",
      day: "2-digit",
      hour: "2-digit"
    };
    const getLocalizedTime = (time2, format = OUR_DATETIME_SHORT) => DateTime.fromSeconds(time2).toLocaleString(format);
    const getCurrentTime = () => Math.floor(DateTime.now().toSeconds());
    const getDuration = (seconds) => {
      const language = (DateTime.now().locale ?? "en-US").split("-")[0];
      return humanizeDuration(seconds * 1e3, {
        language,
        round: true,
        serialComma: false,
        delimiter: " ",
        units: ["h", "m", "s"],
        largest: 1
      });
    };
    const getLocaleDateTimeString = (time2) => time2 === 0 ? "-" : DateTime.fromSeconds(time2).toLocaleString(OUR_DATETIME_SHORT);
    const getPluralFormType = (amount, langType) => {
      switch (langType) {
        case 1:
          return amount !== 1 ? 1 : 0;
        case 2:
          return amount > 1 ? 1 : 0;
        case 3:
          return amount % 10 === 1 && amount % 100 !== 11 ? 0 : amount !== 0 ? 1 : 2;
        case 4:
          return amount === 1 ? 0 : amount === 2 ? 1 : 2;
        case 5:
          return amount === 1 ? 0 : amount === 0 || amount % 100 > 0 && amount % 100 < 20 ? 1 : 2;
        case 6:
          return amount % 10 === 1 && amount % 100 !== 11 ? 0 : amount % 10 >= 2 && (amount % 100 < 10 || amount % 100 >= 20) ? 1 : 2;
        case 7:
          return amount % 10 === 1 && amount % 100 !== 11 ? 0 : amount % 10 >= 2 && amount % 10 <= 4 && (amount % 100 < 10 || amount % 100 >= 20) ? 1 : 2;
        case 8:
          return amount === 1 ? 0 : amount >= 2 && amount <= 4 ? 1 : 2;
        case 9:
          return amount === 1 ? 0 : amount % 10 >= 2 && amount % 10 <= 4 && (amount % 100 < 10 || amount % 100 >= 20) ? 1 : 2;
        case 10:
          return amount % 100 === 1 ? 0 : amount % 100 === 2 ? 1 : amount % 100 === 3 || amount % 100 === 4 ? 2 : 3;
        case 11:
          return amount === 0 ? 0 : amount === 1 ? 1 : amount === 2 ? 2 : amount % 100 >= 3 && amount % 100 <= 10 ? 3 : amount % 100 >= 11 ? 4 : 5;
        default:
          return 0;
      }
    };
    const pluralize = (translation, amount, langType) => {
      const translationOrder = getPluralFormType(amount, langType);
      const translations = translation.split("|");
      if (translations.length - 1 >= translationOrder) {
        return sprintf(translations[translationOrder], amount);
      }
      log([`Matching plural version within "${translations[0]}" not available`], LogLevel.WARNING, LogEnv.DEVELOPMENT);
      return sprintf(translations[translations.length - 1], amount);
    };
    const insertHtmlToTemplate = (template, data2, delimiter = "::") => {
      const templateParts = template.split(delimiter);
      const interpolatedParts = templateParts.map((item, index) => {
        const key = `part-${index}-${item.length}`;
        return /* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: data2[item] ?? item }, key);
      });
      return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: interpolatedParts });
    };
    const defTags = {
      strong: (content2, key) => /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: content2 }, key)
    };
    const deescape = {
      "&gt;": ">",
      "&lt;": "<"
    };
    const translateHtmlInTemplate = (template, newTags, wrapperKey, delimiter = "::", tagDelimiters = /<|>/, interpolate = {}) => {
      const tags = {
        ...defTags,
        ...newTags
      };
      const templateParts = template.split(tagDelimiters);
      const resultParts = [];
      const openTags = [];
      templateParts.filter((x) => x).forEach((part, i) => {
        const key = `part-${i}-${part.length}`;
        const lastOpenTagIndex = openTags.length - 1;
        if (part.startsWith("/")) {
          const endTag = part.replace("/", "");
          if (lastOpenTagIndex !== -1 && endTag === openTags[lastOpenTagIndex].tag) {
            const completeTag = openTags.pop();
            const attrContentFcn = tags[completeTag.tag];
            const completeTagComponent = attrContentFcn(completeTag.data, key);
            (openTags.length > 0 ? openTags[lastOpenTagIndex - 1].data : resultParts).push(completeTagComponent);
          }
        } else if (tags[part]) {
          openTags.push({ tag: part, data: [] });
        } else {
          let text = part;
          Object.entries(deescape).forEach(([escaped, value]) => {
            text = text.replaceAll(escaped, value);
          });
          Object.entries(interpolate).forEach(([interKey, value]) => {
            text = text.replaceAll(`${delimiter}${interKey}${delimiter}`, value);
          });
          const correctArray = lastOpenTagIndex === -1 ? resultParts : openTags[lastOpenTagIndex].data;
          correctArray.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: text }, key));
        }
      });
      return /* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: resultParts }, wrapperKey);
    };
    const getDefaultFileUploadMessages = (t2) => ({
      fileTooLarge: t2("IDUS_FILES_UPLOAD_TOO_LARGE"),
      // needs printf with the size limit to be added into it
      fileTooSmall: t2("IDUS_FILES_UPLOAD_TOO_SMALL"),
      tooManyFiles: t2("IDUS_FILES_UPLOAD_FILE_LIMIT"),
      invalidType: t2("IDUS_FILES_UPLOAD_INVALID_TYPE"),
      rejectionsHeader: t2("IDUS_FILES_UPLOAD_REJECTED_HEADER"),
      clearRejections: t2("IDUS_CLEAR")
    });
    const loadFontForCSS = (fontFamily) => {
      const localeFont = new FontFace(fontFamily, `url(/fonts/${fontFamily}.ttf)`);
      localeFont.load().then(
        () => {
          document.fonts.add(localeFont);
        },
        (err) => {
          log([`Could not load font ${fontFamily}:`, err], LogLevel.ERROR, LogEnv.DEVELOPMENT);
        }
      );
    };
    const defWeights = [Weight.normal, Weight.bold];
    const loadFontForPDF = async (fontFamily, doc, weights = defWeights) => {
      if (!doc.getFontList()[fontFamily]) {
        const fonts = await Promise.all(weights.map((weight) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../fonts/NotoSansJP-bold.ts": () => __vitePreload(() => import("./NotoSansJP-bold-d3328ee5.js"), true ? [] : void 0), "../fonts/NotoSansJP-normal.ts": () => __vitePreload(() => import("./NotoSansJP-normal-9d0308a9.js"), true ? [] : void 0), "../fonts/Roboto-bold.ts": () => __vitePreload(() => import("./Roboto-bold-358c8381.js"), true ? [] : void 0), "../fonts/Roboto-normal.ts": () => __vitePreload(() => import("./Roboto-normal-ca1f2e34.js"), true ? [] : void 0) }), `../fonts/${fontFamily}-${weight}.ts`)));
        weights.forEach((weight, i) => {
          const font = fonts[i].default;
          doc.addFileToVFS(`${fontFamily}-${weight}.ttf`, font);
          doc.addFont(`${fontFamily}-${weight}.ttf`, fontFamily, weight);
        });
      }
    };
    var Sort = /* @__PURE__ */ ((Sort2) => {
      Sort2["DATE_DESCENDING"] = "DATE_DESCENDING";
      Sort2["DATE_ASCENDING"] = "DATE_ASCENDING";
      return Sort2;
    })(Sort || {});
    var LogType = /* @__PURE__ */ ((LogType2) => {
      LogType2["LOGD_UNDEFINED"] = "LOGD_UNDEFINED";
      LogType2["LOGD_VIRUSLOG"] = "LOGD_VIRUSLOG";
      LogType2["LOGD_WARNLOG"] = "LOGD_WARNLOG";
      LogType2["LOGD_ONDEMAND"] = "LOGD_ONDEMAND";
      LogType2["LOGD_SPAMLOG"] = "LOGD_SPAMLOG";
      LogType2["LOGD_MAILSEVERLOG"] = "LOGD_MAILSEVERLOG";
      LogType2["LOGD_ONDEMAND_STATS"] = "LOGD_ONDEMAND_STATS";
      LogType2["LOGD_ONDEMAND_LIST"] = "LOGD_ONDEMAND_LIST";
      LogType2["LOGD_URLLOG"] = "LOGD_URLLOG";
      LogType2["LOGD_DEVICECONTROLLOG"] = "LOGD_DEVICECONTROLLOG";
      LogType2["LOGD_SENTFILESLOG"] = "LOGD_SENTFILESLOG";
      LogType2["LOGD_BLOCKEDFILESLOG"] = "LOGD_BLOCKEDFILESLOG";
      LogType2["LOGD_NETWORKPROTECTIONLOG"] = "LOGD_NETWORKPROTECTIONLOG";
      return LogType2;
    })(LogType || {});
    var LogdRowTypeFilter = /* @__PURE__ */ ((LogdRowTypeFilter2) => {
      LogdRowTypeFilter2["LOGD_RTF_NONE"] = "LOGD_RTF_NONE";
      LogdRowTypeFilter2["LOGD_RTF_DETECTIONS"] = "LOGD_RTF_DETECTIONS";
      LogdRowTypeFilter2["LOGD_RTF_NOT_SCANNED"] = "LOGD_RTF_NOT_SCANNED";
      return LogdRowTypeFilter2;
    })(LogdRowTypeFilter || {});
    var TableDataType = /* @__PURE__ */ ((TableDataType2) => {
      TableDataType2["STRING"] = "STRING";
      TableDataType2["ID"] = "ID";
      TableDataType2["DATE_TIME"] = "DATE_TIME";
      TableDataType2["DURATION"] = "DURATION";
      TableDataType2["SEVERITY"] = "SEVERITY";
      TableDataType2["PATH"] = "PATH";
      TableDataType2["SIZE"] = "SIZE";
      TableDataType2["BYTESIZE"] = "BYTESIZE";
      TableDataType2["LIST"] = "LIST";
      TableDataType2["NUMBER"] = "NUMBER";
      TableDataType2["BOOL"] = "BOOL";
      return TableDataType2;
    })(TableDataType || {});
    const TYPE_WIDTHS = {
      [
        "STRING"
        /* STRING */
      ]: 2,
      [
        "ID"
        /* ID */
      ]: 1,
      [
        "DATE_TIME"
        /* DATE_TIME */
      ]: 1,
      // the relevant needed width is covered by the minwith
      [
        "DURATION"
        /* DURATION */
      ]: 1,
      [
        "SEVERITY"
        /* SEVERITY */
      ]: 0,
      [
        "PATH"
        /* PATH */
      ]: 4,
      [
        "SIZE"
        /* SIZE */
      ]: 1,
      [
        "BYTESIZE"
        /* BYTESIZE */
      ]: 1,
      [
        "LIST"
        /* LIST */
      ]: 3,
      [
        "NUMBER"
        /* NUMBER */
      ]: 1,
      [
        "BOOL"
        /* BOOL */
      ]: 0
    };
    const TYPE_MIN_WIDTHS = {
      [
        "DATE_TIME"
        /* DATE_TIME */
      ]: 150,
      [
        "STRING"
        /* STRING */
      ]: 70
    };
    const NUMBER_FORMATS = [
      "NUMBER",
      "DATE_TIME",
      "DURATION",
      "SEVERITY",
      "SIZE"
      /* SIZE */
    ];
    var ValueWrapperType = /* @__PURE__ */ ((ValueWrapperType2) => {
      ValueWrapperType2["SEVERITY_ERROR"] = "SEVERITY_ERROR";
      ValueWrapperType2["SEVERITY_WARNING"] = "SEVERITY_WARNING";
      return ValueWrapperType2;
    })(ValueWrapperType || {});
    var ScanState = /* @__PURE__ */ ((ScanState2) => {
      ScanState2[ScanState2["RUNNING"] = 0] = "RUNNING";
      ScanState2[ScanState2["PAUSED"] = 1] = "PAUSED";
      ScanState2[ScanState2["COMPLETED"] = 2] = "COMPLETED";
      return ScanState2;
    })(ScanState || {});
    const EMPTY_COLUMNS = [{
      id: "1",
      header: "",
      width: 0,
      minWidth: 100,
      key: "1",
      type: "STRING"
      /* STRING */
    }];
    const COLUMN_KEYS = {
      HASH: "Hash",
      EXCLUDABLE: "Excludable",
      QUARANTINE_FILE_URL: "Name",
      RAW_THREAT_NAME: "RawThreatName",
      LOGS_FILE_URL: "ObjectURI",
      DETECTION: "ThreatName",
      DETECTION_TYPE: "ThreatType",
      SEVERITY: "Severity",
      CIRCUMSTANCES: "Circumstances",
      ACTION_TAKEN: "ActionTaken",
      ACTION: "Action",
      QUARANTINE_DETECTION: "Detection",
      QUARANTINE_DETECTION_TYPE: "DetectionType",
      COUNT: "Count",
      EVENT: "Event",
      TIME: "Time",
      APPLICATION: "ProcessName",
      USER_NAME: "UserName",
      FIRST_SEEN_TIME: "FirstSeenTime",
      REASON: "Reason",
      SOURCE: "Source",
      SCANNER_ID: "ScannerID",
      RULE_NAME_ID: "RuleNameId",
      TARGET_IP_V6: "TargetIpv6",
      TARGET_IP_V4: "TargetIpv4",
      CUSTOM_IP: "TargetIp",
      TARGET: "Target",
      PROTOCOL: "Protocol",
      DIRECTION: "Inbound",
      THREAT: "Threat"
    };
    const TABLE_ROW_COLORS = {
      NORMAL: "normal",
      WARNING: "warning",
      ERROR: "error",
      INFO: "info",
      GRAY: "gray"
    };
    const LOG_LEVELS = [
      /* LOGD_DEBUG */
      TABLE_ROW_COLORS.NORMAL,
      /* LOGD_INFO */
      TABLE_ROW_COLORS.NORMAL,
      /* LOGD_WARNING */
      TABLE_ROW_COLORS.NORMAL,
      /* LOGD_ERROR */
      TABLE_ROW_COLORS.ERROR,
      /* LOGD_EXIT */
      TABLE_ROW_COLORS.ERROR
    ];
    const LOG_SEVERITY = [
      IconStatusOk,
      // LOGD_TS_NEUTRAL / neutral
      IconStatusWarning,
      // LOGD_TS_WARNING / warning with inactive infection
      IconStatusError,
      // LOGD_TS_ERROR / error with inactive infection
      IconStatusError
      // LOGD_TS_STILL_INFECTED / active infection
    ];
    const LOG_SEVERITY_COLOR = [colors.iconColor, colors.warningBig, colors.error, colors.error];
    [colors.success, colors.warning, colors.error, colors.info];
    const EMAIL_REGEX = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
    const PROTOCOL_REGEX = /^.{1,6}:\/\//;
    const openLocation = (item, navigate) => {
      if (item.redirect && navigate) {
        navigate(item.redirect);
        return true;
      }
      if (item.link) {
        window.open(item.link);
        return true;
      }
      return false;
    };
    const openInTabAndFocus = (url) => {
      if (url) {
        window.open(url, "_blank");
      }
    };
    const getUrl = (path) => {
      const PORT = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_PORT;
      const HOST = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_ADDRESS ?? "localhost";
      const PROTOCOL = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_FORCE_HTTP ? "http" : "https";
      let url = path;
      if (PORT) {
        url = `${PROTOCOL}://${HOST}:${PORT}${path}`;
      }
      return url;
    };
    const formatFileSize = (sizeInBytes, base = 2) => {
      const locale = DateTime.now().locale;
      return filesize(sizeInBytes, { locale, base });
    };
    const longToNumber = (value = "0") => Long.fromValue(value).toNumber();
    const longToString = (value = "0") => Long.fromValue(value).toString();
    const wrapWithId = (content2, id2) => id2 ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: id2, children: content2 }) : content2;
    const formatValue = (value, format) => {
      switch (format) {
        case TableDataType.BOOL:
          return value === "true" ? t("IDUS_YES") : t("IDUS_NO");
        case TableDataType.DATE_TIME:
          return getLocalizedTime(parseInt(value, 10));
        case TableDataType.NUMBER: {
          const val = parseInt(value, 10);
          if (isNaN(val)) {
            return value;
          }
          const fullLocale = DateTime.now().locale;
          const splitLocale = fullLocale.substring(0, 2);
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$1, { number: val, locale: Object.keys(default_1$2).includes(fullLocale) ? fullLocale : splitLocale });
        }
        case TableDataType.SIZE:
        case TableDataType.BYTESIZE:
          return formatFileSize(parseInt(value, 10));
        case TableDataType.DURATION:
          return getDuration(parseInt(value, 10));
        case TableDataType.SEVERITY: {
          const v = parseInt(value, 10);
          if (Number.isNaN(v)) {
            return value;
          } else {
            const ValueIcon = LOG_SEVERITY[v];
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              ValueIcon,
              {
                size: "15",
                fill: LOG_SEVERITY_COLOR[v],
                display: "inline-block",
                style: { verticalAlign: "middle" }
              }
            );
          }
        }
        default:
          return value;
      }
    };
    const formattedValueWrapper = (content2, type) => {
      switch (type) {
        case ValueWrapperType.SEVERITY_ERROR:
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { color: "error", children: content2 });
        case ValueWrapperType.SEVERITY_WARNING:
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { color: "warning", children: content2 });
        default:
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-2 py-1", children: content2 });
      }
    };
    const valueWrapper$1 = (value, format, wholeObject, highlights, id2) => {
      const content2 = wrapWithId(formatValue(value, format), id2);
      const matchingHighlight = highlights ? Object.keys(highlights).find((h) => highlights[h](wholeObject)) : void 0;
      return highlights ? formattedValueWrapper(content2, matchingHighlight) : content2;
    };
    const displayRow = (label, text, leftSize = 5, valueId) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutters: false, style: { color: colors.text }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: leftSize, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-1 pr-1", children: label }) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 12 - leftSize, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-1", id: valueId, children: text }) })
    ] }, valueId);
    const b64EncodeUnicode = (str = "") => btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(parseInt(`0x${p1}`, 16))));
    const getValueFromColumn = (value, type) => {
      if (NUMBER_FORMATS.includes(type)) {
        const v = parseInt(value, 10);
        return Number.isNaN(v) ? value : v;
      } else if (TableDataType.BOOL === type) {
        return value === "true";
      }
      return value;
    };
    const idFromLogValId = (id2, prefix) => `${prefix}-${id2.split("-")[1].toLowerCase().replace(" ", "-")}`;
    const getCellTitle = (item, column) => {
      if (!column || column.type === TableDataType.SEVERITY || item === null || item === void 0 || item === "") {
        return void 0;
      }
      return column.type === TableDataType.NUMBER ? item : formatValue(item, column.type);
    };
    const processTableRows = (columns, rows = []) => rows.map((row, rowIndex) => {
      const id2 = row.log_name ?? longToNumber(row.record_id);
      const error = !!(row.error && row.error !== Error$1.OK && !row.column_data);
      const dataObject = { id: id2 };
      const columnData = [...row.column_data ?? []];
      if (columnData.length > 0) {
        const customColumns = columns.filter((column) => column.hasOwnProperty("getValue"));
        customColumns.forEach((column) => {
          columnData.splice(column.positionIndex, 0, "");
        });
        columnData.forEach((item, index) => {
          const column = index < columns.length ? columns[index] : null;
          if (column) {
            dataObject[column.key] = getValueFromColumn(item, column.type);
          }
        });
        customColumns.forEach((column) => {
          const val = column.getValue(dataObject);
          columnData[column.positionIndex] = val;
          dataObject[column.key] = getValueFromColumn(val, column.type);
        });
      }
      const cells = columnData.map((item, index) => {
        const column = index < columns.length ? columns[index] : null;
        return {
          value: !column ? item : wrapWithId(
            valueWrapper$1(
              item,
              column.type,
              dataObject,
              column.highlight,
              `table-${rowIndex}-${column.key.replace(" ", "-")}`
            )
          ),
          title: getCellTitle(item, column)
        };
      });
      return {
        cells,
        dataObject,
        id: id2,
        error,
        customId: id2,
        colorType: LOG_LEVELS[row.level]
      };
    });
    const processQuarantineRows = (columns, rows = [], nullRowMessage = "") => rows.map((row, rowIndex) => {
      const id2 = longToString(row.record_id);
      const error = !!(row.error && row.error !== Error$1.OK);
      const dataObject = { id: id2 };
      const columnData = row.column_data ?? [];
      const cells = columnData.map((item, index) => {
        const column = index < columns.length ? columns[index] : null;
        const title = getCellTitle(item, column);
        if (column) {
          dataObject[column.key] = getValueFromColumn(item, column.type);
          return {
            value: wrapWithId(formatValue(item, column.type), `quar-table-${rowIndex}-${column.key.replace(" ", "-")}`),
            title
          };
        }
        return { value: item, title };
      });
      return {
        customId: !error ? id2 : "",
        id: id2,
        colorType: "normal",
        cells: !error ? cells : [{ error: true, value: nullRowMessage }],
        dataObject,
        error,
        recordId: row.record_id
      };
    });
    const getScanState = (state) => {
      const SCAN_STATE = {
        RUNNING: 0,
        PAUSED: 1,
        COMPLETED: 2
      };
      switch (state) {
        case SCAN_STATE.RUNNING:
          return "IDUS_RUNNING";
        case SCAN_STATE.PAUSED:
          return "IDUS_PAUSED";
        default:
          return "";
      }
    };
    const convertRunningScans = (scans) => scans.map((scan) => {
      const id2 = scan.SessionId;
      const cellStarttime = { value: getLocalizedTime(scan.StartTime) };
      const cellScanState = { value: t(getScanState(scan.State)) };
      const cellCustomElement = {
        customElement: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-2 py-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, {}) })
      };
      const cellScanUser = { value: scan.User };
      const cells = [
        cellStarttime,
        cellScanState,
        cellCustomElement,
        cellCustomElement,
        cellCustomElement,
        cellCustomElement,
        cellScanUser
      ];
      return {
        id: id2,
        customId: id2,
        cells,
        colorType: TABLE_ROW_COLORS.NORMAL,
        status: scan.State
      };
    });
    const jsonToCsv = (data2, info, delimiter = ";") => {
      const infoRow = info.join(delimiter);
      const dataRows = data2.map((dataRow) => dataRow.join(delimiter));
      return [infoRow, ...dataRows].join("\n");
    };
    const arrayToObject = (arr) => arr.reduce((acc, item) => ({ ...acc, ...item }), {});
    const flattenArray = (arr) => arr.reduce((acc, val) => [...acc, ...val], []);
    const compareVersions = (version2, threshold) => version2[0] > threshold[0] || version2[0] === threshold[0] && version2[1] > threshold[1] || version2[0] === threshold[0] && version2[1] === threshold[1] && version2[2] > threshold[2] || version2[0] === threshold[0] && version2[1] === threshold[1] && version2[2] === threshold[2] && version2[3] >= threshold[3];
    const compareObjectSelectors = (left, right) => Object.entries(left).every(([key, value]) => value === right[key]);
    const LIVEGRID_GROUP = { name: "IDUS_STATUS_LIVEGRID_TITLE", id: "livegrid" };
    const LIVEGRID_FEEDBACK_GROUP = { name: "IDUS_STATUS_LIVEGRID_FEEDBACK_TITLE", id: "livegrid-feedback" };
    const UNWANTED_APPS_GROUP = { name: "IDUS_STATUS_UNWANTED_APPS_TITLE", id: "unwanted-apps" };
    const EDTD_GROUP = { name: "IDUS_STATUS_EDTD", id: "edtd" };
    const SELINUX_GROUP = { name: "IDUS_STATUS_SELINUX_TITLE", id: "selinux" };
    const WATCHDOG_GROUP = { name: "IDUS_STATUS_WATCHDOG", id: "watchdog" };
    const KNOWN_PROTECTION_STATUSES_COMMON = {
      [LiveGridEnabled]: initStatus(LIVEGRID_GROUP, "IDUS_STATUS_ENABLED"),
      [LiveGridDisabled]: initStatus(LIVEGRID_GROUP, "IDUS_STATUS_DISABLED", "IDUS_STATUS_LIVEGRID_INFO_DISABLED", [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: { "Settings.LiveGrid.LiveGridEnabled": 1 },
          cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
        }
      ]),
      [LiveGridFeedbackEnabled]: initStatus(LIVEGRID_FEEDBACK_GROUP, "IDUS_STATUS_ENABLED"),
      [LiveGridFeedbackDisabled]: initStatus(
        LIVEGRID_FEEDBACK_GROUP,
        "IDUS_STATUS_DISABLED",
        "IDUS_STATUS_LIVEGRID_FEEDBACK_INFO_DISABLED",
        [
          {
            type: ProtectionStatusActionType.Enable,
            text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
            cfg: { "Settings.LiveGrid.LiveGridFeedbackEnabled": 1 },
            cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
          }
        ]
      ),
      [UnwantedAppsDetectionEnabled]: initStatus(UNWANTED_APPS_GROUP, "IDUS_STATUS_ENABLED"),
      [UnwantedAppsDetectionDisabled]: initStatus(
        UNWANTED_APPS_GROUP,
        "IDUS_STATUS_DISABLED",
        "IDUS_STATUS_UNWANTED_APPS_INFO_DISABLED",
        [
          {
            type: ProtectionStatusActionType.Enable,
            text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
            cfg: { "Settings.Automation.DetectionResponse.Unwanted": { Reporting: 20, Protection: 20 } },
            cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
          }
        ]
      ),
      [SelinuxMissingDevelPackage]: initStatus(SELINUX_GROUP, "IDUS_STATUS_DISABLED"),
      [EDTDEnabled]: initStatus(EDTD_GROUP, "IDUS_STATUS_ENABLED"),
      [EDTDDisabled]: initStatus(EDTD_GROUP, "IDUS_STATUS_DISABLED", null, [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: {
            "Settings.LiveGrid.DynamicDefenseEnabled": 1,
            "Settings.LiveGrid.LiveGridFeedbackEnabled": 1,
            "Settings.LiveGrid.LiveGridEnabled": 1
          },
          cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
        }
      ]),
      [EDTDNotActivated]: initStatus(
        EDTD_GROUP,
        "IDUS_STATUS_EDTD_NOT_ACTIVATED",
        "IDUS_STATUS_EDTD_NOT_ACTIVATED_INFO",
        [
          { type: ProtectionStatusActionType.LearnMore, text: "IDUS_STATUS_ACTION_MORE", link: "HELP_EDTD_ACTIVATION" },
          {
            type: ProtectionStatusActionType.Disable,
            text: "IDUS_STATUS_ACTION_DISABLE",
            cfg: { "Settings.LiveGrid.DynamicDefenseEnabled": 0 },
            cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_DISABLE_ERROR"
          }
        ]
      ),
      [EDTDNotReachable]: initStatus(
        EDTD_GROUP,
        "IDUS_STATUS_EDTD_NOT_REACHABLE",
        "IDUS_STATUS_EDTD_NOT_REACHABLE_INFO",
        [{ type: ProtectionStatusActionType.LearnMore, text: "IDUS_STATUS_ACTION_MORE", link: "HELP_EDTD_TROUBLESHOOTING" }]
      ),
      [EDTDLicenseError]: initStatus(
        EDTD_GROUP,
        "IDUS_STATUS_EDTD_LICENSE_EXPIRED",
        "IDUS_STATUS_EDTD_LICENSE_EXPIRED_INFO",
        [
          {
            type: ProtectionStatusActionType.LearnMore,
            text: "IDUS_STATUS_ACTION_MORE",
            link: "HELP_EDTD_TROUBLESHOOTING"
          },
          {
            type: ProtectionStatusActionType.Disable,
            text: "IDUS_STATUS_ACTION_DISABLE",
            cfg: { "Settings.LiveGrid.DynamicDefenseEnabled": 0 },
            cfgErrorMsg: "IDUS_CONFIG_STATUS_ACTIONS_ENABLE_ERROR"
          }
        ]
      ),
      [EDTDLimitedConnectivity]: initStatus(
        EDTD_GROUP,
        "IDUS_STATUS_EDTD_LIMITED_CONNECTIVITY",
        "IDUS_STATUS_EDTD_LIMITED_CONNECTIVITY_INFO",
        [{ type: ProtectionStatusActionType.LearnMore, text: "IDUS_STATUS_ACTION_MORE", link: "HELP_EDTD_TROUBLESHOOTING" }]
      ),
      [WatchdogEnabled]: initStatus(WATCHDOG_GROUP, "IDUS_STATUS_ENABLED"),
      [WatchdogDisabled]: initStatus(WATCHDOG_GROUP, "IDUS_STATUS_DISABLED", "IDUS_STATUS_WATCHDOG_INFO_DISABLED", [
        {
          type: ProtectionStatusActionType.Enable,
          text: "IDUS_SETUP_TS_CONFIRMDLG_ENABLE_BUTTON",
          cfg: {
            "Settings.Plugins.Watchd.Enable": 1
          }
        }
      ])
    };
    const COMMON_STATUSES_FOR_WATCHDOG = {};
    const KNOWN_PROTECTION_STATUSES = {
      ...KNOWN_PROTECTION_STATUSES_COMMON,
      ...KNOWN_PROTECTION_STATUSES_PRODUCT
    };
    const STATUSES_FOR_WATCHDOG_INFO = {
      ...COMMON_STATUSES_FOR_WATCHDOG,
      ...PRODUCT_STATUSES_FOR_WATCHDOG
    };
    const sortByRawSeverity = (statusA, statusB) => statusA.Severity - statusB.Severity;
    const sortBySeverity = (statusA, statusB) => statusA.severity - statusB.severity;
    const sortByMute = (statusA, statusB) => statusA.MuteInGui - statusB.MuteInGui;
    const sortByEra = (statusA, statusB) => statusA.set_by_era_flag - statusB.set_by_era_flag;
    const processProtectionStatusesIntoGroups = (statuses, translate) => {
      const statusesAll = statuses.map((status) => {
        const statusFromSeverity = getStatusFromSeverity(status.Severity);
        const id2 = status.id;
        const MuteInGui = statusFromSeverity !== PROTECTION_STATUS.GREEN && status.MuteInGui !== void 0 ? status.MuteInGui : false;
        const setByEraFlag = status.set_by_era_flag === 1;
        const title = translate(status.group);
        let text = status.Problem ?? "";
        if (status.info === null) {
          text = "";
        } else if (status.info) {
          text = translate(status.info);
        }
        const severity = status.Severity;
        const tag = {
          id: id2,
          status: statusFromSeverity,
          severity,
          text: translate(status.tag),
          type: TagType.PROTECTION_STATUS
        };
        return [
          status.group,
          {
            id: id2,
            groupId: `protection-status-${status.groupId}`,
            MuteInGui,
            set_by_era_flag: setByEraFlag,
            text,
            title,
            severity,
            status: statusFromSeverity,
            actions: status.actions,
            tags: [tag]
          }
        ];
      });
      const statusesFiltred = statusesAll.filter((status) => status).sort((statusA, statusB) => statusB[1].severity - statusA[1].severity);
      return statusesFiltred.reduce((acc, status) => {
        const group = status[0];
        const data2 = status[1];
        const accFlated = flattenArray(acc);
        if (accFlated.includes(group)) {
          const indexPosition = accFlated.indexOf(group) / 2;
          const accumulateData = acc[indexPosition][1];
          const mergedData = {
            ...accumulateData,
            ...data2,
            tags: [...accumulateData.tags, ...data2.tags],
            actions: [...accumulateData.actions, ...data2.actions]
          };
          acc[indexPosition][1] = mergedData;
          return acc;
        }
        return [...acc, status];
      }, []).map((x) => x[1]);
    };
    const groupProtectionStatuses = (statuses, translate) => {
      const statusesAll = Object.entries(statuses).map((activeStatus) => {
        const status = activeStatus[0];
        const activeStatusData = activeStatus[1];
        const knownStatus = KNOWN_PROTECTION_STATUSES[status];
        return knownStatus ? { ...activeStatusData, ...knownStatus, id: status } : void 0;
      }).filter((x) => x);
      const statusGroups = processProtectionStatusesIntoGroups(statusesAll, translate);
      return statusGroups.sort(sortBySeverity).sort(sortByMute).sort(sortByEra);
    };
    const processStatusesForSidebar = (statuses) => statuses.map((status) => ({
      id: status.groupId,
      statusId: status.id,
      muted: status.MuteInGui === PROTECTION_STATUS_MUTE.ON,
      muteable: !status.set_by_era_flag && status.MuteInGui !== false,
      forced: status.set_by_era_flag,
      info: status.text,
      title: status.title,
      type: convertStatusToType(status.status),
      actions: status.actions ?? [],
      tags: status.tags
    }));
    var PROTECTION_STATUS_ACTION_KEYS = /* @__PURE__ */ ((PROTECTION_STATUS_ACTION_KEYS2) => {
      PROTECTION_STATUS_ACTION_KEYS2["PROTECTION_STATUS_SET"] = "PROTECTION_STATUS_SET";
      PROTECTION_STATUS_ACTION_KEYS2["PROTECTION_STATUS_MUTE"] = "PROTECTION_STATUS_MUTE";
      PROTECTION_STATUS_ACTION_KEYS2["PROTECTION_STATUS_SET_CUSTOM_STATUS_GROUP"] = "PROTECTION_STATUS_SET_CUSTOM_STATUS_GROUP";
      PROTECTION_STATUS_ACTION_KEYS2["PROTECTION_STATUS_RESET_REDUCER"] = "PROTECTION_STATUS_RESET_REDUCER";
      return PROTECTION_STATUS_ACTION_KEYS2;
    })(PROTECTION_STATUS_ACTION_KEYS || {});
    const defaultStatus = {
      status: PROTECTION_STATUS.UNKNOWN,
      text: "IDUS_STATUS_UNKNOWN",
      textOK: ""
    };
    const goodStatus = {
      status: PROTECTION_STATUS.GREEN,
      text: "",
      textOK: "IDUS_STATUS_OK"
    };
    const initState$g = {
      statuses: {},
      groups: {
        Update: defaultStatus,
        License: defaultStatus,
        PCUpdate: defaultStatus,
        Protection: defaultStatus
      },
      protectionGroups: {}
    };
    const getTriggeredStatus = (statuses, group, textOK) => {
      const matchingStatus = Object.keys(statuses).find((status) => group.includes(status));
      return !matchingStatus ? goodStatus : {
        id: matchingStatus,
        status: getStatusFromSeverity(statuses[matchingStatus].Severity),
        text: statuses[matchingStatus].Problem ?? "",
        textOK
      };
    };
    const recognizeMissingActivation = (statuses) => {
      const matchingStatus = Object.keys(statuses).find((status) => ACTIVATION_NEEDED_GROUP.includes(status));
      return !matchingStatus ? null : {
        id: matchingStatus,
        status: PROTECTION_STATUS.RED,
        customText: "IDUS_PCU_NOT_AVAILABLE"
      };
    };
    const getMergedStatus = (protectionGroups) => {
      const relevantStatuses = flattenArray(Object.values(protectionGroups)).filter((s) => s.set_by_era_flag || s.MuteInGui !== 1).map((s) => getStatusFromSeverity(s.Severity));
      return { ...goodStatus, status: getHighestSeverity(relevantStatuses) };
    };
    const protectionStatusReducer = (state = initState$g, action) => {
      switch (action.type) {
        case PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_SET: {
          const statuses = { ...action.value };
          const protectionGroups = {};
          Object.entries(statuses).forEach(([id2, value]) => {
            const matchingEntry = KNOWN_PROTECTION_STATUSES[id2];
            if (matchingEntry) {
              if (!protectionGroups[matchingEntry.groupId]) {
                protectionGroups[matchingEntry.groupId] = [];
              }
              protectionGroups[matchingEntry.groupId] = [
                ...protectionGroups[matchingEntry.groupId],
                { ...value, id: id2, ...matchingEntry }
              ];
            }
          });
          Object.values(protectionGroups).forEach((data2) => data2.sort(sortByRawSeverity));
          return {
            statuses,
            groups: {
              ...state.groups,
              Update: recognizeMissingActivation(statuses) ?? getTriggeredStatus(statuses, UPDATE_STATUS_GROUP, "IDUS_STATUS_MODULES_OK"),
              License: getTriggeredStatus(statuses, LICENSE_STATUS_GROUP, "IDUS_LICENSE_VALID"),
              Protection: getMergedStatus(protectionGroups)
            },
            protectionGroups
          };
        }
        case PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_SET_CUSTOM_STATUS_GROUP: {
          const { groupId, status, text } = action.value;
          return {
            ...state,
            groups: {
              ...state.groups,
              [groupId]: { id: groupId, status, text, textOK: text }
            }
          };
        }
        case PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_RESET_REDUCER:
          return { ...initState$g };
        default:
          return state;
      }
    };
    var SCANS_ACTION_KEYS = /* @__PURE__ */ ((SCANS_ACTION_KEYS2) => {
      SCANS_ACTION_KEYS2["SCANS_SET_PROFILES"] = "SCANS_SET_PROFILES";
      SCANS_ACTION_KEYS2["SCANS_RESET_REDUCER"] = "SCANS_RESET_REDUCER";
      SCANS_ACTION_KEYS2["SCANS_STARTING_SCAN"] = "SCANS_STARTING_SCAN";
      SCANS_ACTION_KEYS2["SCANS_PAUSING_SCAN"] = "SCANS_PAUSING_SCAN";
      SCANS_ACTION_KEYS2["SCANS_RESUMING_SCAN"] = "SCANS_RESUMING_SCAN";
      SCANS_ACTION_KEYS2["SCANS_STOPPING_SCAN"] = "SCANS_STOPPING_SCAN";
      SCANS_ACTION_KEYS2["SCANS_SET_RUNNING_SCANS"] = "SCANS_SET_RUNNING_SCANS";
      SCANS_ACTION_KEYS2["SCANS_ADD_CALLBACK_ID"] = "SCANS_ADD_CALLBACK_ID";
      SCANS_ACTION_KEYS2["SCANS_REMOVE_CALLBACK_ID"] = "SCANS_REMOVE_CALLBACK_ID";
      SCANS_ACTION_KEYS2["SCANS_SET_STARTING_SCAN"] = "SCANS_SET_STARTING_SCAN";
      SCANS_ACTION_KEYS2["SCANS_SET_ERROR"] = "SCANS_SET_ERROR";
      SCANS_ACTION_KEYS2["SCANS_RESET_ERROR"] = "SCANS_RESET_ERROR";
      return SCANS_ACTION_KEYS2;
    })(SCANS_ACTION_KEYS || {});
    var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
      ErrorType2["NEW_SCAN"] = "newScan";
      ErrorType2["PAUSE"] = "pause";
      ErrorType2["RESUME"] = "resume";
      ErrorType2["STOP"] = "stop";
      return ErrorType2;
    })(ErrorType || {});
    const initState$f = {
      newScan: {
        active: "",
        profiles: []
      },
      runningScans: [],
      currentCallbacks: [],
      startingScans: {},
      error: null,
      errorGlobal: false
    };
    const updateScansIfChanges = (state, newScans) => {
      let scans = state.runningScans;
      const compareScans = (scan, index) => newScans[index].status !== scan.status || newScans[index].id !== scan.id;
      if (scans.length !== newScans.length || state.runningScans.some(compareScans)) {
        scans = newScans;
      }
      return { ...state, runningScans: scans };
    };
    const scansReducer = (state = initState$f, action) => {
      switch (action.type) {
        case SCANS_ACTION_KEYS.SCANS_SET_PROFILES:
          return {
            ...state,
            newScan: {
              ...state.newScan,
              active: action.value.active,
              profiles: action.value.profile
            }
          };
        case SCANS_ACTION_KEYS.SCANS_RESET_REDUCER:
          return { ...initState$f };
        case SCANS_ACTION_KEYS.SCANS_RESET_ERROR:
          return { ...state, error: initState$f.error, errorGlobal: initState$f.errorGlobal };
        case SCANS_ACTION_KEYS.SCANS_PAUSING_SCAN:
        case SCANS_ACTION_KEYS.SCANS_RESUMING_SCAN:
        case SCANS_ACTION_KEYS.SCANS_STOPPING_SCAN:
        case SCANS_ACTION_KEYS.SCANS_STARTING_SCAN:
          return { ...state, error: initState$f.error, errorGlobal: action.value };
        case SCANS_ACTION_KEYS.SCANS_SET_ERROR:
          return {
            ...state,
            error: { activity: action.value.activity, error: action.value.error }
          };
        case SCANS_ACTION_KEYS.SCANS_SET_RUNNING_SCANS:
          return updateScansIfChanges(state, action.value);
        case SCANS_ACTION_KEYS.SCANS_ADD_CALLBACK_ID:
          return { ...state, currentCallbacks: [...state.currentCallbacks, action.value] };
        case SCANS_ACTION_KEYS.SCANS_REMOVE_CALLBACK_ID:
          return { ...state, currentCallbacks: state.currentCallbacks.filter((id2) => id2 !== action.value) };
        case SCANS_ACTION_KEYS.SCANS_SET_STARTING_SCAN:
          return { ...state, startingScans: { ...state.startingScans, ...action.value } };
        default:
          return state;
      }
    };
    var ACTIVATION_ACTION_KEYS = /* @__PURE__ */ ((ACTIVATION_ACTION_KEYS2) => {
      ACTIVATION_ACTION_KEYS2["ACTIVATION_SET_STATE"] = "ACTIVATION_SET_STATE";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_SET_LICENSE_INFO"] = "ACTIVATION_SET_LICENSE_INFO";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BY_KEY"] = "ACTIVATION_BY_KEY";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BY_FILE"] = "ACTIVATION_BY_FILE";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_RESULT_ERROR"] = "ACTIVATION_RESULT_ERROR";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_RESET_RESULT"] = "ACTIVATION_RESET_RESULT";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_ATTR_CHALENGE"] = "ACTIVATION_ATTR_CHALENGE";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_ATTR_RESPONSE"] = "ACTIVATION_ATTR_RESPONSE";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BUSINESS_ACCOUNT_SET_DATA"] = "ACTIVATION_BUSINESS_ACCOUNT_SET_DATA";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BUSINESS_ACCOUNT_START_ACTION"] = "ACTIVATION_BUSINESS_ACCOUNT_START_ACTION";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BUSINESS_ACCOUNT_SET_ERROR"] = "ACTIVATION_BUSINESS_ACCOUNT_SET_ERROR";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BUSINESS_ACCOUNT_RESET"] = "ACTIVATION_BUSINESS_ACCOUNT_RESET";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BY_BUSINESS_ACCOUNT"] = "ACTIVATION_BY_BUSINESS_ACCOUNT";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_BUSINESS_SEARCH"] = "ACTIVATION_BUSINESS_SEARCH";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_DISABLE_ERROR_MODAL"] = "ACTIVATION_DISABLE_ERROR_MODAL";
      ACTIVATION_ACTION_KEYS2["ACTIVATION_SET_ACTIVATION_TYPE"] = "ACTIVATION_SET_ACTIVATION_TYPE";
      return ACTIVATION_ACTION_KEYS2;
    })(ACTIVATION_ACTION_KEYS || {});
    var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
      ActivationType2["Key"] = "activation-key";
      ActivationType2["File"] = "activation-file";
      ActivationType2["EBA"] = "activation-business-account";
      return ActivationType2;
    })(ActivationType || {});
    var CompanyType = /* @__PURE__ */ ((CompanyType2) => {
      CompanyType2["COMPANY"] = "COMPANY";
      CompanyType2["MSP_COMPANY"] = "MSP_COMPANY";
      CompanyType2["SECURITY_ADMIN"] = "SECURITY_ADMIN";
      return CompanyType2;
    })(CompanyType || {});
    var StatusType = /* @__PURE__ */ ((StatusType2) => {
      StatusType2["AS_NORMAL"] = "AS_NORMAL";
      StatusType2["AS_ERROR"] = "AS_ERROR";
      StatusType2["AS_WARNING"] = "AS_WARNING";
      StatusType2["LS_NORMAL"] = "LS_NORMAL";
      StatusType2["LS_ERROR"] = "LS_ERROR";
      StatusType2["LS_WARNING"] = "LS_WARNING";
      return StatusType2;
    })(StatusType || {});
    const initState$e = {
      State: {
        ECPResponseCode: -1,
        MessageIDS: ""
      },
      LicenseInfo: [],
      responseCode: -1,
      attributes: [],
      countries: [],
      challenge: false,
      businessLicenses: null,
      allBusinessLicenses: null,
      businessLicenseValueMap: {},
      businessSearch: "",
      errors: {
        businessLogin: "",
        activation: ""
      },
      active: {
        businessLogin: false,
        activation: false
      },
      modalDisabled: false,
      activationType: null
    };
    const getSearchString = (name, units = null, owner = "", contact = "", licenceId = "") => [name, owner, contact, licenceId, units ? `${units.used}/${units.total}` : ""].filter((x) => x).join(" #|# ").toLowerCase();
    const setError = (state, field, active, error) => ({
      ...state,
      errors: {
        ...state.errors,
        [field]: error
      },
      active: {
        ...state.active,
        [field]: active ?? initState$e.active[field]
      }
    });
    const processBusinessLicenses = (state, companies) => {
      const valueMap = {};
      const newValue = (poolId, licenseId) => {
        const val = v4();
        valueMap[val] = { poolId, licenseId };
        return val;
      };
      const processLicense = (license, poolId) => {
        const newLicense = {
          ...license,
          searchString: getSearchString(license.name, license.units, license.owner, license.contact, license.id)
        };
        if (license.items && license.items.length > 0) {
          newLicense.items = license.items.map((item) => ({
            ...item,
            value: newValue(poolId, license.id),
            searchString: getSearchString(item.name, item.units)
          }));
        } else if (license.id) {
          newLicense.value = newValue(poolId, license.id);
        }
        return newLicense;
      };
      const processPool = (pool) => {
        const newPool = {
          ...pool,
          searchString: getSearchString(pool.name, pool.units),
          licenses: (pool.licenses ?? []).map((license) => processLicense(license, pool.id)),
          sites: (pool.sites ?? []).map(processPool)
        };
        if (pool.id) {
          newPool.value = newValue(pool.id);
        }
        return newPool;
      };
      const processedCompanies = companies.map((company) => ({
        ...company,
        pools: company.pools.map(processPool)
      }));
      return {
        ...setError(state, "businessLogin", false, initState$e.errors.businessLogin),
        businessLicenses: processedCompanies,
        allBusinessLicenses: processedCompanies,
        businessLicenseValueMap: valueMap
      };
    };
    const checkForSearch = (search) => (item) => item.searchString.includes(search);
    const filterInBundle = (bundle, filterMethod) => {
      const filtered = bundle.filter(filterMethod);
      return {
        bundle: filtered,
        found: filtered.length > 0
      };
    };
    const filterInLicenses = (licenses, filterMethod) => {
      const filteredLicenses = licenses.map((license) => {
        let found = filterMethod(license);
        const newLicense = { ...license };
        if (!found && license.items && license.items.length > 0) {
          const filteredChildren = filterInBundle(license.items, filterMethod);
          if (filteredChildren.found) {
            found = true;
            newLicense.items = filteredChildren.bundle;
          }
        }
        return found ? newLicense : null;
      }).filter((x) => x);
      return {
        licenses: filteredLicenses,
        found: filteredLicenses.length > 0
      };
    };
    const filterInPools = (pools, filterMethod) => {
      const filteredPools = pools.map((pool) => {
        let found = filterMethod(pool);
        const newPool = { ...pool };
        if (!found) {
          if (pool.sites && pool.sites.length > 0) {
            const filteredSites = filterInPools(pool.sites, filterMethod);
            newPool.sites = filteredSites.pools;
            found = found || filteredSites.found;
          }
          if (pool.licenses && pool.licenses.length > 0) {
            const filteredChildren = filterInLicenses(pool.licenses, filterMethod);
            found = found || filteredChildren.found;
            newPool.licenses = filteredChildren.licenses;
          }
        }
        return found ? newPool : null;
      }).filter((x) => x);
      return {
        found: filteredPools.length > 0,
        pools: filteredPools
      };
    };
    const applyFilter = (state, filterMethod) => {
      if (!state.allBusinessLicenses) {
        return null;
      }
      return state.allBusinessLicenses.map((company) => {
        const filteredPools = filterInPools(company.pools, filterMethod);
        return filteredPools.found ? { ...company, pools: filteredPools.pools } : null;
      }).filter((x) => x);
    };
    const activationReducer = (state = initState$e, action) => {
      switch (action.type) {
        case ACTIVATION_ACTION_KEYS.ACTIVATION_SET_STATE:
          return {
            ...state,
            State: {
              ECPResponseCode: action.value.ECPResponseCode,
              MessageIDS: action.value.MessageIDS
            }
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_SET_LICENSE_INFO:
          return {
            ...state,
            LicenseInfo: action.value
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BY_BUSINESS_ACCOUNT:
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BY_KEY:
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BY_FILE:
          return setError(state, "activation", true, initState$e.errors.activation);
        case ACTIVATION_ACTION_KEYS.ACTIVATION_RESULT_ERROR:
          return {
            ...setError(state, "activation", false, action.value.msg),
            responseCode: action.value.code
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_RESET_RESULT:
          return {
            ...setError(state, "activation", false, initState$e.errors.activation),
            responseCode: action.value
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_ATTR_CHALENGE: {
          const { countries } = action.value;
          countries.sort((a, b) => a.name.localeCompare(b.name));
          return {
            ...state,
            attributes: action.value.attributes,
            countries,
            challenge: true
          };
        }
        case ACTIVATION_ACTION_KEYS.ACTIVATION_ATTR_RESPONSE:
          return {
            ...state,
            challenge: initState$e.challenge,
            attributes: initState$e.attributes
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_SET_DATA:
          return processBusinessLicenses(state, action.value);
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_SET_ERROR:
          return {
            ...setError(state, "businessLogin", false, action.value.msg),
            responseCode: action.value.code,
            businessLicenses: initState$e.businessLicenses,
            allBusinessLicenses: initState$e.allBusinessLicenses
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_START_ACTION:
          return setError(state, "businessLogin", true, initState$e.errors.businessLogin);
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_RESET:
          return {
            ...setError(state, "businessLogin", false, initState$e.errors.businessLogin),
            responseCode: initState$e.responseCode,
            businessLicenses: initState$e.businessLicenses,
            allBusinessLicenses: initState$e.allBusinessLicenses
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_SEARCH:
          return {
            ...state,
            businessSearch: action.value,
            businessLicenses: action.value === "" ? state.allBusinessLicenses : applyFilter(state, checkForSearch(action.value.toLowerCase()))
          };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_DISABLE_ERROR_MODAL:
          return { ...state, modalDisabled: action.value };
        case ACTIVATION_ACTION_KEYS.ACTIVATION_SET_ACTIVATION_TYPE:
          return { ...state, activationType: action.value };
        default:
          return state;
      }
    };
    var LAYOUT_ACTION_KEYS = /* @__PURE__ */ ((LAYOUT_ACTION_KEYS2) => {
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_FOOTER"] = "LAYOUT_CONTENT_FOOTER";
      LAYOUT_ACTION_KEYS2["LAYOUT_FEEDBACK"] = "LAYOUT_FEEDBACK";
      LAYOUT_ACTION_KEYS2["LAYOUT_SAMPLE_SUBMISSION"] = "LAYOUT_SAMPLE_SUBMISSION";
      LAYOUT_ACTION_KEYS2["LAYOUT_REQUIRE_ROUTE_CHANGE_CONFIRMATION"] = "LAYOUT_REQUIRE_ROUTE_CHANGE_CONFIRMATION";
      LAYOUT_ACTION_KEYS2["LAYOUT_NO_ROUTE_CHANGE_CONFIRMATION"] = "LAYOUT_NO_ROUTE_CHANGE_CONFIRMATION";
      LAYOUT_ACTION_KEYS2["LAYOUT_RESET_REDUCER"] = "LAYOUT_RESET_REDUCER";
      LAYOUT_ACTION_KEYS2["LAYOUT_WELCOME"] = "LAYOUT_WELCOME";
      LAYOUT_ACTION_KEYS2["LAYOUT_PRODUCT_TOUR"] = "LAYOUT_PRODUCT_TOUR";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_SIDEBAR"] = "LAYOUT_CONTENT_SIDEBAR";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_RIGHT_SIDEBAR"] = "LAYOUT_CONTENT_RIGHT_SIDEBAR";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_HEADER_SIDEBAR"] = "LAYOUT_CONTENT_HEADER_SIDEBAR";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_MENU_ITEM"] = "LAYOUT_CONTENT_MENU_ITEM";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_RIGHT_SIDEBAR_COMPLETE"] = "LAYOUT_CONTENT_RIGHT_SIDEBAR_COMPLETE";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_SIDEBAR_COMPLETE"] = "LAYOUT_CONTENT_SIDEBAR_COMPLETE";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONTENT_RIGHT_SIDEBAR_LEVEL"] = "LAYOUT_CONTENT_RIGHT_SIDEBAR_LEVEL";
      LAYOUT_ACTION_KEYS2["LAYOUT_DASHBBOARD_CONFIG"] = "LAYOUT_DASHBBOARD_CONFIG";
      LAYOUT_ACTION_KEYS2["LAYOUT_CONNECTION_LIMIT"] = "LAYOUT_CONNECTION_LIMIT";
      LAYOUT_ACTION_KEYS2["LAYOUT_SET_FRESH_INSTALL"] = "LAYOUT_SET_FRESH_INSTALL";
      LAYOUT_ACTION_KEYS2["LAYOUT_SET_BADGE_DATA_FOR_MENU"] = "LAYOUT_SET_BADGE_DATA_FOR_MENU";
      return LAYOUT_ACTION_KEYS2;
    })(LAYOUT_ACTION_KEYS || {});
    const getInitState = () => ({
      modals: {
        feedback: false,
        routeConfirmation: null,
        sampleSubmission: false,
        dashboardConfig: false,
        connectionLimit: null,
        welcome: false,
        productTour: false
      },
      content: {
        footer: false,
        menuItem: "",
        sidebar: !getSidebarCollapsed(),
        rightSidebar: false,
        sidebarComplete: true,
        rightSidebarComplete: false,
        rightSidebarLevel: false
      },
      isFreshInstall: null,
      badgeData: {}
    });
    const initState$d = getInitState();
    const layoutReducer = (state = initState$d, action) => {
      switch (action.type) {
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_FOOTER:
          return { ...state, content: { ...state.content, footer: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_MENU_ITEM:
          return { ...state, content: { ...state.content, menuItem: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_SIDEBAR_COMPLETE:
          return { ...state, content: { ...state.content, sidebarComplete: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR_COMPLETE:
          return { ...state, content: { ...state.content, rightSidebarComplete: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_SIDEBAR:
          setSidebarCollapsed(!action.value);
          return { ...state, content: { ...state.content, sidebar: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR:
          return { ...state, content: { ...state.content, rightSidebar: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR_LEVEL:
          return { ...state, content: { ...state.content, rightSidebarLevel: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_WELCOME:
          return { ...state, modals: { ...state.modals, welcome: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_PRODUCT_TOUR:
          return { ...state, modals: { ...state.modals, productTour: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_FEEDBACK:
          return { ...state, modals: { ...state.modals, feedback: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_SAMPLE_SUBMISSION:
          return { ...state, modals: { ...state.modals, sampleSubmission: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_DASHBBOARD_CONFIG:
          return { ...state, modals: { ...state.modals, dashboardConfig: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_REQUIRE_ROUTE_CHANGE_CONFIRMATION:
          return {
            ...state,
            modals: { ...state.modals, routeConfirmation: { ...action.value } }
          };
        case LAYOUT_ACTION_KEYS.LAYOUT_NO_ROUTE_CHANGE_CONFIRMATION:
          return { ...state, modals: { ...state.modals, routeConfirmation: initState$d.modals.routeConfirmation } };
        case LAYOUT_ACTION_KEYS.LAYOUT_CONNECTION_LIMIT:
          return { ...state, modals: { ...state.modals, connectionLimit: action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_SET_FRESH_INSTALL:
          return { ...state, isFreshInstall: action.value };
        case LAYOUT_ACTION_KEYS.LAYOUT_SET_BADGE_DATA_FOR_MENU:
          return { ...state, badgeData: { ...state.badgeData, ...action.value } };
        case LAYOUT_ACTION_KEYS.LAYOUT_RESET_REDUCER:
          return getInitState();
        default:
          return state;
      }
    };
    var NOTIFICATIONS_ACTION_KEYS = /* @__PURE__ */ ((NOTIFICATIONS_ACTION_KEYS2) => {
      NOTIFICATIONS_ACTION_KEYS2["NOTIFICATIONS_ADD_MODAL"] = "NOTIFICATIONS_ADD_MODAL";
      NOTIFICATIONS_ACTION_KEYS2["NOTIFICATIONS_CLOSE_CURRENT_MODAL"] = "NOTIFICATIONS_CLOSE_CURRENT_MODAL";
      return NOTIFICATIONS_ACTION_KEYS2;
    })(NOTIFICATIONS_ACTION_KEYS || {});
    const initState$c = {
      modals: [],
      // active modals, the first one is shown
      lastModal: null,
      // saved last modal to properly show the hide animation
      modalCounter: 0
    };
    const notificationReducer = (state = initState$c, action) => {
      switch (action.type) {
        case NOTIFICATIONS_ACTION_KEYS.NOTIFICATIONS_ADD_MODAL:
          return {
            ...state,
            modalCounter: state.modalCounter + 1,
            modals: [...state.modals, { ...action.value, id: `global-modal-${state.modalCounter}` }]
            // no need to update lastModal, it won't be visible after it closes
          };
        case NOTIFICATIONS_ACTION_KEYS.NOTIFICATIONS_CLOSE_CURRENT_MODAL:
          return {
            ...state,
            modals: state.modals.slice(1),
            lastModal: state.modals[0]
          };
        default:
          return state;
      }
    };
    var PCU_ACTION_KEYS = /* @__PURE__ */ ((PCU_ACTION_KEYS2) => {
      PCU_ACTION_KEYS2["PCU_SET_AUTOUPDATES_FLAG"] = "PCU_SET_AUTOUPDATES_FLAG";
      PCU_ACTION_KEYS2["PCU_UPDATE_EULA"] = "PCU_UPDATE_EULA";
      PCU_ACTION_KEYS2["PCU_UPDATE_STATE"] = "PCU_UPDATE_STATE";
      PCU_ACTION_KEYS2["PCU_CHECK_FOR_UPDATE"] = "PCU_CHECK_FOR_UPDATE";
      PCU_ACTION_KEYS2["PCU_CONFIRM_UPDATE"] = "PCU_CONFIRM_UPDATE";
      PCU_ACTION_KEYS2["PCU_TRIGGER_UPDATE"] = "PCU_TRIGGER_UPDATE";
      PCU_ACTION_KEYS2["PCU_CHECK_FOR_UPDATE_RESPONSE"] = "PCU_CHECK_FOR_UPDATE_RESPONSE";
      PCU_ACTION_KEYS2["PCU_CONFIRM_UPDATE_RESPONSE"] = "PCU_CONFIRM_UPDATE_RESPONSE";
      PCU_ACTION_KEYS2["PCU_TRIGGER_UPDATE_RESPONSE"] = "PCU_TRIGGER_UPDATE_RESPONSE";
      PCU_ACTION_KEYS2["PCU_RESET_RUNNING_ACTIONS"] = "PCU_RESET_RUNNING_ACTIONS";
      PCU_ACTION_KEYS2["PCU_RESET_ACTION_ERROR"] = "PCU_RESET_ACTION_ERROR";
      PCU_ACTION_KEYS2["PCU_RESET_REDUCER"] = "PCU_RESET_REDUCER";
      PCU_ACTION_KEYS2["PCU_SET_BACKEND_RUNNING_FLAG"] = "PCU_SET_BACKEND_RUNNING_FLAG";
      PCU_ACTION_KEYS2["PCU_UPDATE_APP"] = "PCU_UPDATE_APP";
      return PCU_ACTION_KEYS2;
    })(PCU_ACTION_KEYS || {});
    var AutoUpdateFlag = /* @__PURE__ */ ((AutoUpdateFlag2) => {
      AutoUpdateFlag2[AutoUpdateFlag2["OFF"] = 0] = "OFF";
      AutoUpdateFlag2[AutoUpdateFlag2["ON"] = 1] = "ON";
      return AutoUpdateFlag2;
    })(AutoUpdateFlag || {});
    var EnumAppUpdateState = /* @__PURE__ */ ((EnumAppUpdateState2) => {
      EnumAppUpdateState2[EnumAppUpdateState2["CE_APP_UPDATE_STATE_NOT_AVAILABLE"] = 0] = "CE_APP_UPDATE_STATE_NOT_AVAILABLE";
      EnumAppUpdateState2[EnumAppUpdateState2["CE_APP_UPDATE_STATE_NEED_TO_APPROVE_DOWNLOAD"] = 1] = "CE_APP_UPDATE_STATE_NEED_TO_APPROVE_DOWNLOAD";
      EnumAppUpdateState2[EnumAppUpdateState2["CE_APP_UPDATE_STATE_READY_FOR_REINSTALLATION"] = 2] = "CE_APP_UPDATE_STATE_READY_FOR_REINSTALLATION";
      return EnumAppUpdateState2;
    })(EnumAppUpdateState || {});
    var EnumPCURunningFlags = /* @__PURE__ */ ((EnumPCURunningFlags2) => {
      EnumPCURunningFlags2[EnumPCURunningFlags2["CE_PCU_STATE_NONE"] = 0] = "CE_PCU_STATE_NONE";
      EnumPCURunningFlags2[EnumPCURunningFlags2["CE_PCU_STATE_CHECKING"] = 1] = "CE_PCU_STATE_CHECKING";
      EnumPCURunningFlags2[EnumPCURunningFlags2["CE_PCU_STATE_DOWNLOADING"] = 2] = "CE_PCU_STATE_DOWNLOADING";
      EnumPCURunningFlags2[EnumPCURunningFlags2["CE_PCU_STATE_PERFORMING_UPDATE"] = 3] = "CE_PCU_STATE_PERFORMING_UPDATE";
      return EnumPCURunningFlags2;
    })(EnumPCURunningFlags || {});
    var EnumAppEulaStatus = /* @__PURE__ */ ((EnumAppEulaStatus2) => {
      EnumAppEulaStatus2[EnumAppEulaStatus2["CE_EULA_STATUS_UNKNOWN"] = 0] = "CE_EULA_STATUS_UNKNOWN";
      EnumAppEulaStatus2[EnumAppEulaStatus2["CE_EULA_STATUS_NOT_CHANGED"] = 1] = "CE_EULA_STATUS_NOT_CHANGED";
      EnumAppEulaStatus2[EnumAppEulaStatus2["CE_EULA_STATUS_UPDATE_SILENTLY"] = 2] = "CE_EULA_STATUS_UPDATE_SILENTLY";
      EnumAppEulaStatus2[EnumAppEulaStatus2["CE_EULA_STATUS_NOTIFY_USER"] = 3] = "CE_EULA_STATUS_NOTIFY_USER";
      EnumAppEulaStatus2[EnumAppEulaStatus2["CE_EULA_STATUS_MUST_ACCEPT"] = 4] = "CE_EULA_STATUS_MUST_ACCEPT";
      return EnumAppEulaStatus2;
    })(EnumAppEulaStatus || {});
    const initState$b = {
      state: null,
      autoupdatesFlag: null,
      AvailableAppUpdate: null,
      AvailableEulaUpdate: null,
      runningActions: {
        checking: false,
        updating: false,
        accepting: false
      },
      backendRunningActions: {
        checking: false,
        updating: false,
        accepting: false
      },
      errors: {
        action: null,
        actionCode: null,
        background: null,
        backgroundCode: null
      }
    };
    const setRunningFlag = (state, flag, value, error) => ({
      ...state,
      runningActions: {
        ...initState$b.runningActions,
        [flag]: value
      },
      errors: {
        ...state.errors,
        action: getErrorMessageKey(error),
        actionCode: error
      }
    });
    const setRunningFlagFromBackend = (state, flag) => {
      switch (flag) {
        case EnumPCURunningFlags.CE_PCU_STATE_CHECKING:
          return { ...state, backendRunningActions: { ...initState$b.backendRunningActions, checking: true } };
        case EnumPCURunningFlags.CE_PCU_STATE_DOWNLOADING:
          return { ...state, backendRunningActions: { ...initState$b.backendRunningActions, accepting: true } };
        case EnumPCURunningFlags.CE_PCU_STATE_PERFORMING_UPDATE:
          return { ...state, backendRunningActions: { ...initState$b.backendRunningActions, updating: true } };
        case EnumPCURunningFlags.CE_PCU_STATE_NONE:
        default:
          return { ...state, backendRunningActions: { ...initState$b.backendRunningActions } };
      }
    };
    const pcuReducer = (state = initState$b, action) => {
      switch (action.type) {
        case PCU_ACTION_KEYS.PCU_SET_AUTOUPDATES_FLAG:
          return { ...state, autoupdatesFlag: action.value };
        case PCU_ACTION_KEYS.PCU_UPDATE_STATE: {
          const error = getBackgroundError(action.value.LastUpdRetval, action.value.LastUpdRetvalIds);
          return {
            ...state,
            state: { ...action.value },
            runningActions: error ? { ...initState$b.runningActions } : state.runningActions,
            errors: {
              ...state.errors,
              background: error,
              backgroundCode: action.value.LastUpdRetval.toString(10)
            }
          };
        }
        case PCU_ACTION_KEYS.PCU_UPDATE_APP:
          return { ...state, AvailableAppUpdate: { ...action.value } };
        case PCU_ACTION_KEYS.PCU_UPDATE_EULA:
          return { ...state, AvailableEulaUpdate: { ...action.value } };
        case PCU_ACTION_KEYS.PCU_CHECK_FOR_UPDATE:
          return setRunningFlag(state, "checking", true, "");
        case PCU_ACTION_KEYS.PCU_CONFIRM_UPDATE:
          return setRunningFlag(state, "accepting", true, "");
        case PCU_ACTION_KEYS.PCU_TRIGGER_UPDATE:
          return setRunningFlag(state, "updating", true, "");
        case PCU_ACTION_KEYS.PCU_CHECK_FOR_UPDATE_RESPONSE:
          return setRunningFlag(state, "checking", false, action.value);
        case PCU_ACTION_KEYS.PCU_CONFIRM_UPDATE_RESPONSE:
          return setRunningFlag(state, "accepting", false, action.value);
        case PCU_ACTION_KEYS.PCU_TRIGGER_UPDATE_RESPONSE:
          return action.value ? setRunningFlag(state, "updating", false, action.value) : state;
        case PCU_ACTION_KEYS.PCU_RESET_ACTION_ERROR:
          return { ...state, errors: { ...state.errors, action: null, actionCode: null } };
        case PCU_ACTION_KEYS.PCU_SET_BACKEND_RUNNING_FLAG:
          return setRunningFlagFromBackend(state, action.value);
        case PCU_ACTION_KEYS.PCU_RESET_REDUCER:
          return { ...initState$b };
        default:
          return state;
      }
    };
    const STATIC_LINKS = {
      KB_LINK: "https://support.eset.com/",
      FORUM_LINK: "https://forum.eset.com/forum/36-eset-products-for-linux-servers/",
      WELIVESECURITY_LINK: "https://www.welivesecurity.com/",
      RADAR_LINK: "https://virusradar.com/",
      SUPPORT_LINK: "https://www.eset.com/int/support/contact/",
      FEEDBACK_LINK: "https://survey.eset.com/index.php?r=survey/index&sid=469191",
      LICENSE_OVERUSE_KB_LINK: "https://go.eset.eu/knowledgebase?KBID=kb8043"
    };
    const helpLink = (product, lang, version2, topic) => {
      const query = Object.entries({ product, version: version2, lang, topic }).filter((entry) => !!entry[1]).map((entry) => entry.join("=")).join("&");
      return `https://help.eset.com/getHelp?${query}`;
    };
    const helpEFSLink = (winid, topic) => helpLink("efsu", winid, VERSION_PRODUCT_FOR_HELP_PAGE, topic);
    const helpEDTDLink = (winid, topic) => helpLink("edtd", winid, void 0, topic);
    const helpESMCLink = (winid, topic) => helpLink("protect_admin", winid, "latest", topic);
    const goEsetLink = (langCode, key) => `https://go.eset.com/esetaccount_${key}?culture=${langCode}`;
    const setLinks = (winid, langCode) => ({
      FORGOTTEN_PASSWORD_LINK: helpEFSLink(winid, "forgotten_password"),
      EULA_LINK: helpEFSLink(winid, "eula"),
      POLICY_LINK: helpEFSLink(winid, "privacy_policy"),
      HELP_ACTIVATION_LINK: helpEFSLink(winid, "where_can_i_find_my_license"),
      HELP_ACTIVATION_USERNAME_LINK: helpEFSLink(winid, "where_can_i_find_my_license#usernamepassword"),
      HELP_LINK_TROUBLESHOOTING: helpEFSLink(winid, "troubleshooting"),
      HELP_LINK_UPDATE_FAILED: helpEFSLink(winid, "update_failed"),
      HELP_LINK_SUBMIT_SAMPLE: helpEFSLink(winid, "idh_charon_file"),
      HELP_PROTECTION_CANT_START_LINK: helpEFSLink(winid, "realtime_protection_cannot_start"),
      HELP_WAP: helpEFSLink(winid, "web_access_protection"),
      ACTIVATION_ESMC: helpESMCLink(winid, "client_tasks_product_activation"),
      HELP_LINK: helpEFSLink(winid),
      BUSINESS_ACTIVATION_REGISTRATION: goEsetLink(langCode, "register"),
      BUSINESS_ACTIVATION_FORGOTTEN: goEsetLink(langCode, "forgot"),
      HELP_EDTD_ACTIVATION: helpEDTDLink(winid, "activation"),
      HELP_EDTD_TROUBLESHOOTING: helpEDTDLink(winid, "troubleshooting"),
      HELP_DASHBOARD: helpEFSLink(winid, "dashboard"),
      HELP_STATUS_OVERVIEW: helpEFSLink(winid, "status_overview"),
      HELP_SCANS: helpEFSLink(winid, "scans"),
      HELP_DETECTIONS: helpEFSLink(winid, "detections"),
      HELP_AUTOUPDATES: helpEFSLink(winid, "automatic_product_component_updates")
    });
    const initState$a = {
      loadedLanguage: false,
      winid: 1033,
      direction: "ltr",
      plural: 1,
      localeKey: "en-US",
      font: "",
      pdfFont: FontFamily.Default,
      links: {
        ...STATIC_LINKS,
        ...setLinks(1033, "en-us")
      }
    };
    const languageReducer = (state = initState$a, action) => {
      switch (action.type) {
        case LANGUAGE_ACTION_KEYS.CHANGE_LANG:
          document.documentElement.lang = action.value.localeKey;
          document.documentElement.dir = action.value.direction;
          return {
            ...state,
            loadedLanguage: true,
            winid: action.value.winid,
            direction: action.value.direction,
            plural: action.value.plural,
            localeKey: action.value.localeKey,
            font: action.value.font || "",
            pdfFont: action.value.pdfFont || FontFamily.Default,
            links: {
              ...state.links,
              ...setLinks(action.value.winid, action.value.localeKey)
            }
          };
        default:
          return state;
      }
    };
    var LOGS_ACTION_KEYS = /* @__PURE__ */ ((LOGS_ACTION_KEYS2) => {
      LOGS_ACTION_KEYS2["LOGS_RESET_TABLE"] = "LOGS_RESET_TABLE";
      LOGS_ACTION_KEYS2["LOGS_SET_LOGS"] = "LOGS_SET_LOGS";
      LOGS_ACTION_KEYS2["LOGS_SET_LOG_DETAIL"] = "LOGS_SET_LOG_DETAIL";
      LOGS_ACTION_KEYS2["LOGS_SET_HEADERS"] = "LOGS_SET_HEADERS";
      LOGS_ACTION_KEYS2["LOGS_SET_HEADERS_ERROR"] = "LOGS_SET_HEADERS_ERROR";
      LOGS_ACTION_KEYS2["LOGS_SET_LOGS_ERROR"] = "LOGS_SET_LOGS_ERROR";
      LOGS_ACTION_KEYS2["LOGS_SET_QUERY"] = "LOGS_SET_QUERY";
      LOGS_ACTION_KEYS2["LOGS_SET_QUERY_ERROR"] = "LOGS_SET_QUERY_ERROR";
      LOGS_ACTION_KEYS2["LOGS_SET_TABLE_NUMBERS"] = "LOGS_SET_TABLE_NUMBERS";
      LOGS_ACTION_KEYS2["LOGS_ADD_CALLBACK_ID"] = "LOGS_ADD_CALLBACK_ID";
      LOGS_ACTION_KEYS2["LOGS_REMOVE_CALLBACK_ID"] = "LOGS_REMOVE_CALLBACK_ID";
      LOGS_ACTION_KEYS2["LOGS_RESET_CALLBACKS"] = "LOGS_RESET_CALLBACKS";
      LOGS_ACTION_KEYS2["LOGS_SELECT_ROWS"] = "LOGS_SELECT_ROWS";
      return LOGS_ACTION_KEYS2;
    })(LOGS_ACTION_KEYS || {});
    const initState$9 = {
      rowCount: 1,
      // for correct table loading displaying
      firstRowIndex: 0,
      logs: [],
      headers: [],
      logsById: {},
      errors: {
        headerLoading: false,
        dataLoading: false
      },
      query: {},
      tableNumbers: {
        otherRows: 0,
        rowLimit: 0,
        lastFirstRowIndex: 0
      },
      currentCallbacks: [],
      selectedRows: []
    };
    const logsReducer = (state = initState$9, action) => {
      switch (action.type) {
        case LOGS_ACTION_KEYS.LOGS_SET_HEADERS:
          return { ...state, headers: [...action.value], errors: { ...state.errors, headerLoading: false } };
        case LOGS_ACTION_KEYS.LOGS_SET_HEADERS_ERROR:
          return {
            ...state,
            headers: [...EMPTY_COLUMNS],
            rowCount: 0,
            firstRowIndex: 0,
            errors: { ...state.errors, headerLoading: true }
          };
        case LOGS_ACTION_KEYS.LOGS_SET_LOGS:
          return {
            ...state,
            logs: [...action.value.logs],
            rowCount: action.value.rowCount,
            firstRowIndex: action.value.firstRowIndex,
            errors: { ...state.errors, dataLoading: false }
          };
        case LOGS_ACTION_KEYS.LOGS_SET_QUERY_ERROR:
        case LOGS_ACTION_KEYS.LOGS_SET_LOGS_ERROR:
          return {
            ...state,
            rowCount: 0,
            logs: [],
            firstRowIndex: 0,
            errors: { ...state.errors, dataLoading: true },
            query: {}
          };
        case LOGS_ACTION_KEYS.LOGS_SET_LOG_DETAIL:
          return { ...state, logsById: { ...state.logsById, [action.value.id]: action.value.data } };
        case LOGS_ACTION_KEYS.LOGS_SET_QUERY:
          return { ...state, query: { queryId: action.value.queryId, id: action.value.id } };
        case LOGS_ACTION_KEYS.LOGS_SET_TABLE_NUMBERS:
          return { ...state, tableNumbers: { ...state.tableNumbers, ...action.value } };
        case LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID:
          return { ...state, currentCallbacks: [...state.currentCallbacks, action.value] };
        case LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID:
          return { ...state, currentCallbacks: state.currentCallbacks.filter((id2) => id2 !== action.value) };
        case LOGS_ACTION_KEYS.LOGS_RESET_TABLE:
          return { ...initState$9, logsById: state.logsById };
        case LOGS_ACTION_KEYS.LOGS_RESET_CALLBACKS:
          return { ...initState$9, currentCallbacks: [] };
        case LOGS_ACTION_KEYS.LOGS_SELECT_ROWS:
          return {
            ...state,
            selectedRows: action.value
          };
        default:
          return state;
      }
    };
    var SAMPLE_ACTION_KEYS = /* @__PURE__ */ ((SAMPLE_ACTION_KEYS2) => {
      SAMPLE_ACTION_KEYS2["SAMPLE_SET_FIELD"] = "SAMPLE_SET_FIELD";
      SAMPLE_ACTION_KEYS2["SAMPLE_RESET_DATA"] = "SAMPLE_RESET_DATA";
      SAMPLE_ACTION_KEYS2["SAMPLE_RESET_DETAILS"] = "SAMPLE_RESET_DETAILS";
      SAMPLE_ACTION_KEYS2["SAMPLE_SET_ENABLED"] = "SAMPLE_SET_ENABLED";
      return SAMPLE_ACTION_KEYS2;
    })(SAMPLE_ACTION_KEYS || {});
    var SampleType = /* @__PURE__ */ ((SampleType2) => {
      SampleType2[SampleType2["OTHER"] = 0] = "OTHER";
      SampleType2[SampleType2["SUSP_FILE"] = 1] = "SUSP_FILE";
      SampleType2[SampleType2["SUSP_SITE"] = 2] = "SUSP_SITE";
      SampleType2[SampleType2["FP_FILE"] = 3] = "FP_FILE";
      SampleType2[SampleType2["FP_SITE"] = 4] = "FP_SITE";
      return SampleType2;
    })(SampleType || {});
    const SAMPLE_TYPE_SITES = [
      4,
      2
      /* SUSP_SITE */
    ];
    var SampleStep = /* @__PURE__ */ ((SampleStep2) => {
      SampleStep2[SampleStep2["TYPE"] = 0] = "TYPE";
      SampleStep2[SampleStep2["DETAILS"] = 1] = "DETAILS";
      return SampleStep2;
    })(SampleStep || {});
    var SiteProblem = /* @__PURE__ */ ((SiteProblem2) => {
      SiteProblem2[SiteProblem2["OTHER"] = 0] = "OTHER";
      SiteProblem2[SiteProblem2["INFECTED"] = 1] = "INFECTED";
      SiteProblem2[SiteProblem2["PHISHING"] = 2] = "PHISHING";
      SiteProblem2[SiteProblem2["SCAM"] = 3] = "SCAM";
      return SiteProblem2;
    })(SiteProblem || {});
    const FieldIdMap = {
      symptoms: 0,
      origin: 1,
      notes: 2,
      appName: 3,
      appPurpose: 4,
      vendor: 5,
      reason: 6
    };
    const initState$8 = {
      step: SampleStep.TYPE,
      type: SampleType.SUSP_FILE,
      email: "",
      filepath: "",
      id: null,
      anonymous: 0,
      symptoms: "",
      origin: "",
      notes: "",
      siteProblem: null,
      appName: "",
      appPurpose: "",
      vendor: "",
      reason: "",
      errors: {},
      isEnabled: false
    };
    const sampleReducer$1 = (state = initState$8, action) => {
      switch (action.type) {
        case SAMPLE_ACTION_KEYS.SAMPLE_SET_FIELD:
          return {
            ...state,
            [action.value.field]: action.value.value
          };
        case SAMPLE_ACTION_KEYS.SAMPLE_RESET_DETAILS: {
          let newState = { ...state };
          action.value.forEach((field) => {
            newState = { ...newState, [field]: initState$8[field] };
          });
          return newState;
        }
        case SAMPLE_ACTION_KEYS.SAMPLE_RESET_DATA:
          return { ...initState$8, isEnabled: state.isEnabled };
        case SAMPLE_ACTION_KEYS.SAMPLE_SET_ENABLED:
          return { ...state, isEnabled: action.value };
        default:
          return state;
      }
    };
    var QUARANTINE_ACTION_KEYS = /* @__PURE__ */ ((QUARANTINE_ACTION_KEYS2) => {
      QUARANTINE_ACTION_KEYS2["QUARANTINE_RESET_REDUCER"] = "QUARANTINE_RESET_REDUCER";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_DATA"] = "QUARANTINE_SET_DATA";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_HEADERS"] = "QUARANTINE_SET_HEADERS";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_HEADERS_ERROR"] = "QUARANTINE_SET_HEADERS_ERROR";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_DATA_ERROR"] = "QUARANTINE_SET_QUARANTINE_ERROR";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_QUERY"] = "QUARANTINE_SET_QUERY";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_QUERY_ERROR"] = "QUARANTINE_SET_QUERY_ERROR";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_ADD_CALLBACK_ID"] = "QUARANTINE_ADD_CALLBACK_ID";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_REMOVE_CALLBACK_ID"] = "QUARANTINE_REMOVE_CALLBACK_ID";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_RESET_CALLBACKS"] = "QUARANTINE_RESET_CALLBACKS";
      QUARANTINE_ACTION_KEYS2["QUARANTINE_SET_SETTINGS"] = "QUARANTINE_SET_SETTINGS";
      return QUARANTINE_ACTION_KEYS2;
    })(QUARANTINE_ACTION_KEYS || {});
    const initState$7 = {
      rowCount: 1,
      // for correct table loading displaying
      firstRowIndex: 0,
      data: [],
      headers: [],
      errors: {
        headerLoading: false,
        dataLoading: false
      },
      query: {},
      currentCallbacks: [],
      rowLimit: 0,
      nullRowMessage: ""
    };
    const quarantineReducer = (state = initState$7, action) => {
      switch (action.type) {
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_HEADERS:
          return { ...state, headers: [...action.value], errors: { ...state.errors, headerLoading: false } };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_HEADERS_ERROR:
          return {
            ...state,
            headers: [...EMPTY_COLUMNS],
            rowCount: 0,
            firstRowIndex: 0,
            errors: { ...state.errors, headerLoading: true }
          };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA:
          return {
            ...state,
            data: [...action.value.data],
            rowCount: action.value.rowCount,
            firstRowIndex: action.value.firstRowIndex,
            errors: { ...state.errors, dataLoading: false }
          };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_QUERY_ERROR:
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA_ERROR:
          return {
            ...state,
            rowCount: 0,
            data: [],
            firstRowIndex: 0,
            errors: { ...state.errors, dataLoading: true },
            query: {}
          };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_QUERY:
          return { ...state, query: { queryId: action.value.queryId, id: action.value.id } };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID:
          return { ...state, currentCallbacks: [...state.currentCallbacks, action.value] };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_REMOVE_CALLBACK_ID:
          return { ...state, currentCallbacks: state.currentCallbacks.filter((id2) => id2 !== action.value) };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_RESET_REDUCER:
          return { ...initState$7 };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_RESET_CALLBACKS:
          return { ...initState$7, currentCallbacks: [] };
        case QUARANTINE_ACTION_KEYS.QUARANTINE_SET_SETTINGS:
          return { ...state, rowLimit: action.value.rowLimit, nullRowMessage: action.value.nullRowMessage };
        default:
          return state;
      }
    };
    var DETECTIONS_ACTION_KEYS = /* @__PURE__ */ ((DETECTIONS_ACTION_KEYS2) => {
      DETECTIONS_ACTION_KEYS2["DETECTIONS_SET_EXCLUSIONS_DATA"] = "DETECTIONS_SET_EXCLUSIONS_DATA";
      DETECTIONS_ACTION_KEYS2["DETECTIONS_EXCLUSIONS_SET_ERROR"] = "DETECTIONS_EXCLUSIONS_SET_ERROR";
      return DETECTIONS_ACTION_KEYS2;
    })(DETECTIONS_ACTION_KEYS || {});
    const initState$6 = { exclusions: null, exclusionsError: null };
    const detectionsReducer = (state = initState$6, action) => {
      switch (action.type) {
        case DETECTIONS_ACTION_KEYS.DETECTIONS_SET_EXCLUSIONS_DATA:
          return {
            ...state,
            exclusions: action.value,
            exclusionsError: initState$6.exclusionsError
          };
        case DETECTIONS_ACTION_KEYS.DETECTIONS_EXCLUSIONS_SET_ERROR:
          return {
            ...state,
            exclusionsError: action.value
          };
        default:
          return state;
      }
    };
    var ReportScanner = /* @__PURE__ */ ((ReportScanner2) => {
      ReportScanner2[ReportScanner2["UNKNOWN"] = 369098828] = "UNKNOWN";
      ReportScanner2[ReportScanner2["ESCAN"] = 369098829] = "ESCAN";
      ReportScanner2[ReportScanner2["ONDEMAND"] = 369098829] = "ONDEMAND";
      ReportScanner2[ReportScanner2["EPFW_HTTP"] = 369098830] = "EPFW_HTTP";
      ReportScanner2[ReportScanner2["HTTP"] = 369098830] = "HTTP";
      ReportScanner2[ReportScanner2["EPFW_EMAIL"] = 369098831] = "EPFW_EMAIL";
      ReportScanner2[ReportScanner2["EPFW_IMAP"] = 369098832] = "EPFW_IMAP";
      ReportScanner2[ReportScanner2["IMAP"] = 369098832] = "IMAP";
      ReportScanner2[ReportScanner2["EPFW_FTP"] = 369098833] = "EPFW_FTP";
      ReportScanner2[ReportScanner2["FTP"] = 369098833] = "FTP";
      ReportScanner2[ReportScanner2["EAMON"] = 369098834] = "EAMON";
      ReportScanner2[ReportScanner2["RTFS"] = 369098834] = "RTFS";
      ReportScanner2[ReportScanner2["EEMON"] = 369098835] = "EEMON";
      ReportScanner2[ReportScanner2["EEMON_TB"] = 369098837] = "EEMON_TB";
      ReportScanner2[ReportScanner2["EMAILSERVER"] = 369098838] = "EMAILSERVER";
      ReportScanner2[ReportScanner2["EFILESERVER"] = 369098839] = "EFILESERVER";
      ReportScanner2[ReportScanner2["ESTARTUP"] = 369098840] = "ESTARTUP";
      ReportScanner2[ReportScanner2["EDMON"] = 369098841] = "EDMON";
      ReportScanner2[ReportScanner2["EEMON_WM"] = 369098842] = "EEMON_WM";
      ReportScanner2[ReportScanner2["EEMON_WLM"] = 369098843] = "EEMON_WLM";
      ReportScanner2[ReportScanner2["UCLI"] = 369098844] = "UCLI";
      ReportScanner2[ReportScanner2["UIMAP"] = 369098845] = "UIMAP";
      ReportScanner2[ReportScanner2["UMDA"] = 369098846] = "UMDA";
      ReportScanner2[ReportScanner2["UPIPE"] = 369098847] = "UPIPE";
      ReportScanner2[ReportScanner2["USMFI"] = 369098849] = "USMFI";
      ReportScanner2[ReportScanner2["USMTP"] = 369098850] = "USMTP";
      ReportScanner2[ReportScanner2["SMTP"] = 369098850] = "SMTP";
      ReportScanner2[ReportScanner2["UZMFI"] = 369098851] = "UZMFI";
      ReportScanner2[ReportScanner2["USCAN"] = 369098852] = "USCAN";
      ReportScanner2[ReportScanner2["UDAC"] = 369098853] = "UDAC";
      ReportScanner2[ReportScanner2["UFTP"] = 369098854] = "UFTP";
      ReportScanner2[ReportScanner2["UHTTP"] = 369098855] = "UHTTP";
      ReportScanner2[ReportScanner2["UPAC"] = 369098856] = "UPAC";
      ReportScanner2[ReportScanner2["USSFI"] = 369098857] = "USSFI";
      ReportScanner2[ReportScanner2["UDAEMON"] = 369098858] = "UDAEMON";
      ReportScanner2[ReportScanner2["UICAP"] = 369098859] = "UICAP";
      ReportScanner2[ReportScanner2["ICAP"] = 369098859] = "ICAP";
      ReportScanner2[ReportScanner2["UKAC"] = 369098860] = "UKAC";
      ReportScanner2[ReportScanner2["UGUI"] = 369098861] = "UGUI";
      ReportScanner2[ReportScanner2["UCGP"] = 369098862] = "UCGP";
      ReportScanner2[ReportScanner2["GATEWAY_HTTP"] = 369098863] = "GATEWAY_HTTP";
      ReportScanner2[ReportScanner2["GATEWAY_FTP"] = 369098864] = "GATEWAY_FTP";
      ReportScanner2[ReportScanner2["GATEWAY_SMTP"] = 369098865] = "GATEWAY_SMTP";
      ReportScanner2[ReportScanner2["GATEWAY_IMAP"] = 369098867] = "GATEWAY_IMAP";
      ReportScanner2[ReportScanner2["EFILESERVER_ONDEMAND"] = 369098868] = "EFILESERVER_ONDEMAND";
      ReportScanner2[ReportScanner2["MEMSCAN"] = 369098869] = "MEMSCAN";
      ReportScanner2[ReportScanner2["IDLE"] = 369098914] = "IDLE";
      ReportScanner2[ReportScanner2["FIRST_SCAN"] = 369098915] = "FIRST_SCAN";
      ReportScanner2[ReportScanner2["REGSCAN"] = 369098916] = "REGSCAN";
      ReportScanner2[ReportScanner2["EMAILSERVER_ONACCESS"] = 369098917] = "EMAILSERVER_ONACCESS";
      ReportScanner2[ReportScanner2["EMAILSERVER_ONDEMAND"] = 369098918] = "EMAILSERVER_ONDEMAND";
      ReportScanner2[ReportScanner2["JSCRIPT"] = 369098919] = "JSCRIPT";
      ReportScanner2[ReportScanner2["AMSI"] = 369098920] = "AMSI";
      ReportScanner2[ReportScanner2["GATEWAYSERVER"] = 369098921] = "GATEWAYSERVER";
      ReportScanner2[ReportScanner2["NETPROT_HTTP"] = 369098922] = "NETPROT_HTTP";
      ReportScanner2[ReportScanner2["COMMANDLINE"] = 369098923] = "COMMANDLINE";
      ReportScanner2[ReportScanner2["CRYPTO_BLOCKER"] = 369098924] = "CRYPTO_BLOCKER";
      ReportScanner2[ReportScanner2["EDTD"] = 369098930] = "EDTD";
      ReportScanner2[ReportScanner2["SCRIPT"] = 369098931] = "SCRIPT";
      ReportScanner2[ReportScanner2["EMAILAPP"] = 369098932] = "EMAILAPP";
      ReportScanner2[ReportScanner2["GATEWAY"] = 369098933] = "GATEWAY";
      ReportScanner2[ReportScanner2["BEHMON"] = 369098936] = "BEHMON";
      ReportScanner2[ReportScanner2["WMI"] = 369098939] = "WMI";
      ReportScanner2[ReportScanner2["LIVEGUARD"] = 369098941] = "LIVEGUARD";
      return ReportScanner2;
    })(ReportScanner || {});
    const HOUR = 60 * 60;
    const DAY = HOUR * 24;
    var REPORTS_ACTION_KEYS = /* @__PURE__ */ ((REPORTS_ACTION_KEYS2) => {
      REPORTS_ACTION_KEYS2["REPORTS_ADD_CALLBACK_ID"] = "REPORTS_ADD_CALLBACK_ID";
      REPORTS_ACTION_KEYS2["REPORTS_REMOVE_CALLBACK_ID"] = "REPORTS_REMOVE_CALLBACK_ID";
      REPORTS_ACTION_KEYS2["REPORTS_SET_DASHBOARD_DATA"] = "REPORTS_SET_DASHBOARD_DATA";
      REPORTS_ACTION_KEYS2["REPORTS_SET_REPORT_DEFINITIONS"] = "REPORTS_SET_REPORT_DEFINITIONS";
      REPORTS_ACTION_KEYS2["REPORTS_SET_REPORT"] = "REPORTS_SET_REPORT";
      REPORTS_ACTION_KEYS2["REPORTS_SET_DISPLAYED_REPORTS"] = "REPORTS_SET_DISPLAYED_REPORTS";
      REPORTS_ACTION_KEYS2["REPORTS_SET_SELECT_INTERVAL"] = "REPORTS_SET_SELECT_INTERVAL";
      REPORTS_ACTION_KEYS2["REPORTS_SET_LOADING_INTERVAL"] = "REPORTS_SET_LOADING_INTERVAL";
      REPORTS_ACTION_KEYS2["REPORTS_REMOVE_DISPLAYED_REPORT"] = "REPORTS_REMOVE_DISPLAYED_REPORT";
      REPORTS_ACTION_KEYS2["REPORTS_RESET_DISPLAYED_REPORTS"] = "REPORTS_RESET_DISPLAYED_REPORTS";
      REPORTS_ACTION_KEYS2["REPORTS_SET_FULLSCREEN"] = "REPORTS_SET_FULLSCREEN";
      return REPORTS_ACTION_KEYS2;
    })(REPORTS_ACTION_KEYS || {});
    var StatisticsType = /* @__PURE__ */ ((StatisticsType2) => {
      StatisticsType2["COMBINED"] = "combined";
      StatisticsType2["NUMBER"] = "number";
      StatisticsType2["MULTI"] = "multi";
      StatisticsType2["PIE"] = "pie";
      StatisticsType2["TABLE"] = "table";
      return StatisticsType2;
    })(StatisticsType || {});
    var DetectionAction = /* @__PURE__ */ ((DetectionAction2) => {
      DetectionAction2["Cleaned"] = "cleaned";
      DetectionAction2["Unresolved"] = "unresolved";
      return DetectionAction2;
    })(DetectionAction || {});
    var MemoryType = /* @__PURE__ */ ((MemoryType2) => {
      MemoryType2["Memory"] = "memory";
      MemoryType2["Swap"] = "swap";
      return MemoryType2;
    })(MemoryType || {});
    var CPUTypes = /* @__PURE__ */ ((CPUTypes2) => {
      CPUTypes2["CPU"] = "cpu";
      return CPUTypes2;
    })(CPUTypes || {});
    var StatisticsReportType = /* @__PURE__ */ ((StatisticsReportType2) => {
      StatisticsReportType2["CleanedStatusDetectionAggregationReport"] = "CleanedStatusDetectionAggregationReport";
      StatisticsReportType2["AbsoluteDetectionsByMethodAggregationReport"] = "AbsoluteDetectionsByMethodAggregationReport";
      StatisticsReportType2["LastXDetectionsReport"] = "LastXDetectionsReport";
      StatisticsReportType2["TopXUsersOnAccessReport"] = "TopXUsersOnAccessReport";
      StatisticsReportType2["LastXScansWithDetectionsReport"] = "TopXScansWithDetectionsReport";
      StatisticsReportType2["ScannedFilesByMethodAggregationReport"] = "ScannedFilesByMethodAggregationReport";
      StatisticsReportType2["SystemStatsAggregationReport"] = "SystemStatsAggregationReport";
      return StatisticsReportType2;
    })(StatisticsReportType || {});
    const reportScanners = [
      ReportScanner.ONDEMAND,
      ReportScanner.RTFS,
      ReportScanner.HTTP,
      ReportScanner.ICAP,
      ReportScanner.EDTD
    ];
    const scannerTitleMapping = {
      [ReportScanner.RTFS]: "IDUS_STATS_LEGEND_ONACCESS",
      [ReportScanner.ONDEMAND]: "IDUS_STATS_LEGEND_ONDEMAND",
      [ReportScanner.ICAP]: "IDUS_STATS_LEGEND_ICAP",
      [ReportScanner.EDTD]: "IDUS_STATS_LEGEND_EDTD",
      [ReportScanner.HTTP]: "IDUS_STATS_LEGEND_HTTP"
      // [ReportScanner.FTP]: 'IDUS_STATS_LEGEND_FTP',
    };
    const detectionActions = [DetectionAction.Cleaned, DetectionAction.Unresolved];
    const actionTitleMapping = {
      [DetectionAction.Cleaned]: "IDUS_STATS_LEGEND_CLEANED",
      [DetectionAction.Unresolved]: "IDUS_STATS_LEGEND_UNCLEANED"
    };
    const memoryTypes = [MemoryType.Memory, MemoryType.Swap];
    const memoryTypeTitleMapping = {
      [MemoryType.Memory]: "IDUS_STATS_LEGEND_MEMORY",
      [MemoryType.Swap]: "IDUS_STATS_LEGEND_SWAP"
    };
    const cpuTypes = [CPUTypes.CPU];
    const cpuTitleMapping = {
      [CPUTypes.CPU]: "IDUS_STATS_LEGEND_CPU"
    };
    const intervalOptions$1 = {
      days: (days2) => ({
        id: `days-${days2}`,
        value: days2,
        title: "IDUS_STATS_INTERVAL_DAYS",
        settings: {
          duration: 60 * 60 * 24 * days2
        }
      }),
      hours: (hours) => ({
        id: `hours-${hours}`,
        value: hours,
        title: "IDUS_STATS_INTERVAL_HOURS",
        settings: {
          duration: 60 * 60 * hours
        }
      })
    };
    const getLoginInterval = () => ({
      id: "login",
      title: "IDUS_STATS_INTERVAL_LOGIN",
      settings: {
        fromTime: getLastLogin()
      },
      tooltip: "IDUS_STATS_INTERVAL_LOGIN_TOOLTIP"
    });
    const staticIntervals = [
      intervalOptions$1.days(30),
      intervalOptions$1.days(14),
      intervalOptions$1.days(7),
      intervalOptions$1.hours(24)
    ];
    const getDefaultIntervals = () => [...staticIntervals, getLoginInterval()];
    const getNameFromInterval = (interval) => {
      const loginInterval = getLoginInterval();
      if (interval === loginInterval.id) {
        return { key: loginInterval.title, num: 0 };
      }
      const match = staticIntervals.find((i) => i.id === interval) ?? {};
      return { key: match.title, num: match.value ?? 0 };
    };
    const noTileTypeFn = () => void 0;
    const errorAbove0 = (value) => value > 0 ? "error" : void 0;
    const filterByScanner = (s) => (data2) => data2.filter((item) => item.scanner === s);
    const preprocessDetectionsByAction = (data2) => {
      const combinedData = [];
      let current = {};
      const saveCombined = () => {
        if (current.timestamp) {
          combinedData.push(
            { timestamp: current.timestamp, value: current.cleaned, action: DetectionAction.Cleaned },
            { timestamp: current.timestamp, value: current.unresolved, action: DetectionAction.Unresolved }
          );
        }
      };
      data2.forEach((item) => {
        if (current.timestamp !== item.timestamp) {
          saveCombined();
          current = { timestamp: item.timestamp, cleaned: 0, unresolved: 0 };
        }
        current.cleaned += item.cleaned;
        current.unresolved += item.unresolved;
      });
      saveCombined();
      return combinedData;
    };
    const preprocessMemoryAndSwap = (data2) => [
      ...data2.map((row) => ({ timestamp: row.timestamp, type: MemoryType.Memory, value: row.mem })),
      ...data2.map((row) => ({ timestamp: row.timestamp, type: MemoryType.Swap, value: row.swap }))
    ];
    const preprocessCpu = (data2) => data2.map((row) => ({ timestamp: row.timestamp, type: CPUTypes.CPU, cpu: row.cpu }));
    const addReportDefaults = (report) => ({
      size: 1,
      maxSize: 4,
      growPriority: 0,
      fixed: false,
      optional: false,
      ...report
    });
    const ellipsis = {
      whiteSpace: "nowrap",
      overflow: "hidden",
      textOverflow: "ellipsis"
    };
    const definitions = [
      {
        key: "combined-detections-state",
        fixed: true,
        layoutCols: 2,
        type: StatisticsType.COMBINED,
        size: 2,
        maxSize: 2,
        content: [
          {
            key: "on-demand-cleaned",
            type: StatisticsType.NUMBER,
            title: "IDUS_STATS_CLEANED_ONDEMAND_TITLE",
            exportTitle: "files-with-cleaned-on-demand-scan-detections",
            requestType: StatisticsReportType.CleanedStatusDetectionAggregationReport,
            preprocess: filterByScanner(ReportScanner.ONDEMAND),
            dataField: "cleaned",
            paramDef: {},
            getTileType: noTileTypeFn,
            link: routes$1.scans,
            defaultValue: 0,
            defaultIcon: default_1$4
          },
          {
            key: "on-access-cleaned",
            type: StatisticsType.NUMBER,
            title: "IDUS_STATS_CLEANED_ONACCESS_TITLE",
            exportTitle: "files-with-cleaned-real-time-detections",
            requestType: StatisticsReportType.CleanedStatusDetectionAggregationReport,
            preprocess: filterByScanner(ReportScanner.RTFS),
            dataField: "cleaned",
            paramDef: {},
            getTileType: noTileTypeFn,
            link: routes$1.detections,
            defaultValue: 0,
            defaultIcon: default_1$4
          },
          {
            key: "on-demand-unresolved",
            type: StatisticsType.NUMBER,
            title: "IDUS_STATS_UNRESOLVED_ONDEMAND_TITLE",
            exportTitle: "files-with-uncleaned-on-demand-scan-detections",
            requestType: StatisticsReportType.CleanedStatusDetectionAggregationReport,
            preprocess: filterByScanner(ReportScanner.ONDEMAND),
            dataField: "unresolved",
            paramDef: {},
            getTileType: errorAbove0,
            link: routes$1.scans,
            defaultValue: 0,
            defaultIcon: default_1$5
          },
          {
            key: "on-access-unresolved",
            type: StatisticsType.NUMBER,
            title: "IDUS_STATS_UNRESOLVED_ONACCESS_TITLE",
            exportTitle: "files-with-uncleaned-real-time-detections",
            requestType: StatisticsReportType.CleanedStatusDetectionAggregationReport,
            preprocess: filterByScanner(ReportScanner.RTFS),
            dataField: "unresolved",
            paramDef: {},
            getTileType: errorAbove0,
            link: routes$1.detections,
            defaultValue: 0,
            defaultIcon: default_1$5
          }
        ]
      },
      {
        key: "detections-by-action-area",
        type: StatisticsType.MULTI,
        size: 2,
        growPriority: 1,
        title: "IDUS_STATS_TITLE_DETECTIONS_BY_ACTION",
        exportTitle: "detections-by-action",
        requestType: StatisticsReportType.AbsoluteDetectionsByMethodAggregationReport,
        preprocess: preprocessDetectionsByAction,
        dataField: "value",
        paramDef: {},
        link: routes$1.detections,
        defaultValue: [],
        graphSettings: {
          categories: detectionActions,
          categoryField: "action",
          categoryMapping: actionTitleMapping
        }
      },
      {
        key: "unresolved-by-method-pie",
        type: StatisticsType.PIE,
        maxSize: 2,
        growPriority: 2,
        title: "IDUS_STATS_TITLE_UNCLEANED_BY_METHOD",
        exportTitle: "uncleaned-detections-by-method",
        requestType: StatisticsReportType.AbsoluteDetectionsByMethodAggregationReport,
        dataField: "unresolved",
        paramDef: { period: null },
        link: routes$1.detections,
        defaultValue: [],
        graphSettings: {
          categories: reportScanners,
          categoryField: "scanner",
          categoryTitle: "IDUS_STATS_COLUMN_METHOD",
          categoryMapping: scannerTitleMapping
        }
      },
      {
        key: "cleaned-by-method-pie",
        type: StatisticsType.PIE,
        maxSize: 2,
        growPriority: 2,
        title: "IDUS_STATS_TITLE_CLEANED_BY_METHOD",
        exportTitle: "cleaned-detections-by-method",
        requestType: StatisticsReportType.AbsoluteDetectionsByMethodAggregationReport,
        dataField: "cleaned",
        paramDef: { period: null },
        link: routes$1.detections,
        defaultValue: [],
        graphSettings: {
          categories: reportScanners,
          categoryField: "scanner",
          categoryTitle: "IDUS_STATS_COLUMN_METHOD",
          categoryMapping: scannerTitleMapping
        }
      },
      {
        key: "detections-by-method-area",
        type: StatisticsType.MULTI,
        size: 2,
        growPriority: 1,
        title: "IDUS_STATS_TITLE_DETECTIONS_BY_METHOD",
        exportTitle: "detections-by-method",
        requestType: StatisticsReportType.AbsoluteDetectionsByMethodAggregationReport,
        dataField: "total",
        paramDef: {},
        link: routes$1.detections,
        defaultValue: [],
        graphSettings: {
          categories: reportScanners,
          categoryField: "scanner",
          categoryMapping: scannerTitleMapping
        }
      },
      {
        key: "scanned-files-by-method-area",
        type: StatisticsType.MULTI,
        size: 2,
        title: "IDUS_STATS_TITLE_SCANNED_FILES_BY_METHOD",
        exportTitle: "scanned-files-by-method",
        requestType: StatisticsReportType.ScannedFilesByMethodAggregationReport,
        dataField: "scanned",
        paramDef: {},
        defaultValue: [],
        graphSettings: {
          categories: reportScanners.filter((s) => s !== ReportScanner.EDTD),
          categoryField: "scanner",
          categoryMapping: scannerTitleMapping
        }
      },
      {
        key: "last-detections",
        type: StatisticsType.TABLE,
        maxSize: 2,
        growPriority: 4,
        title: "IDUS_STATS_TITLE_LAST_DETECTIONS",
        exportTitle: "last-detection|last-%d-detections",
        requestType: StatisticsReportType.LastXDetectionsReport,
        paramDef: { limit: 10 },
        defaultValue: [],
        tableSettings: {
          getId: (item, index) => `${index}-${item.timestamp}-${item.threatname}`,
          getRedirect: (item) => {
            const scanId = item.logname.replace(".dat", "");
            return scanId ? getRoute(routes$1.scansDetail, { id: scanId, tab: SCAN_DETAIL_TABS.DETECTIONS }) : routes$1.detections;
          },
          columns: [
            {
              id: "threatname",
              name: "IDUS_STATS_COLUMN_DETECTION",
              field: (item) => item.threatname,
              style: {
                width: "40%",
                minWidth: "60px",
                ...ellipsis
              }
            },
            {
              id: "timestamp",
              name: "IDUS_STATS_COLUMN_DETECTION_TIME",
              field: (item) => getLocalizedTime(item.timestamp),
              style: {
                width: "50%",
                minWidth: "130px"
              }
            }
          ]
        }
      },
      {
        key: "cpu-utilization-area",
        type: StatisticsType.MULTI,
        size: 2,
        title: "IDUS_STATS_TITLE_CPU",
        exportTitle: "cpu-utilization",
        requestType: StatisticsReportType.SystemStatsAggregationReport,
        preprocess: preprocessCpu,
        dataField: "cpu",
        paramDef: {},
        defaultValue: [],
        graphSettings: {
          defaultMax: 100,
          categories: cpuTypes,
          categoryField: "type",
          categoryMapping: cpuTitleMapping
        }
      },
      {
        key: "top-users",
        optional: true,
        type: StatisticsType.TABLE,
        maxSize: 2,
        growPriority: 3,
        title: "IDUS_STATS_TITLE_TOP_USERS",
        exportTitle: "user-with-the-most-on-access-detections|top-%d-users-with-the-most-on-access-detections",
        requestType: StatisticsReportType.TopXUsersOnAccessReport,
        paramDef: { limit: 10 },
        defaultValue: [],
        tableSettings: {
          getId: (item) => item.user,
          getRedirect: () => routes$1.detections,
          columns: [
            {
              id: "user",
              name: "IDUS_STATS_COLUMN_USER",
              field: (item) => item.user,
              style: {
                width: "60%",
                minWidth: "100px",
                ...ellipsis
              }
            },
            {
              id: "total",
              name: "IDUS_STATS_COLUMN_TOTAL",
              field: (item) => item.total,
              style: {
                width: "30%",
                minWidth: "60px"
              }
            }
          ]
        }
      },
      {
        key: "last-scans",
        optional: true,
        maxSize: 2,
        growPriority: 5,
        type: StatisticsType.TABLE,
        title: "IDUS_STATS_TITLE_LAST_SCANS",
        exportTitle: "last-on-demand-scan-with-detections|last-%d-on-demand-scans-with-detections",
        requestType: StatisticsReportType.LastXScansWithDetectionsReport,
        paramDef: { limit: 10 },
        defaultValue: [],
        tableSettings: {
          getId: (item) => item.logname,
          getRowType: (item) => item.cleaned < item.total ? "error" : null,
          getRedirect: (item) => getRoute(routes$1.scansDetail, { id: item.logname.replace(".dat", ""), tab: SCAN_DETAIL_TABS.DETECTIONS }),
          columns: [
            {
              id: "timestamp",
              name: "IDUS_STATS_COLUMN_SCAN_TIME",
              field: (item) => getLocalizedTime(item.timestamp),
              style: {
                width: "45%",
                minWidth: "80px",
                ...ellipsis
              }
            },
            {
              id: "cleaned",
              name: "IDUS_STATS_LEGEND_CLEANED",
              field: (item) => item.cleaned,
              style: {
                width: "15%",
                minWidth: "60px"
              }
            },
            {
              id: "total",
              name: "IDUS_STATS_COLUMN_SCAN_TOTAL_OCCURED",
              field: (item) => item.total,
              style: {
                width: "30%",
                minWidth: "80px"
              }
            }
          ]
        }
      },
      {
        key: "memory-utilization-area",
        optional: true,
        type: StatisticsType.MULTI,
        size: 2,
        title: "IDUS_STATS_TITLE_MEMORY",
        exportTitle: "memory-and-swap-utilization",
        requestType: StatisticsReportType.SystemStatsAggregationReport,
        preprocess: preprocessMemoryAndSwap,
        dataField: "value",
        paramDef: {},
        defaultValue: [],
        graphSettings: {
          defaultMax: 100,
          categories: memoryTypes,
          categoryField: "type",
          categoryMapping: memoryTypeTitleMapping
        }
      }
    ].map(addReportDefaults);
    const DEFAULT_DASHBOARD_DEFINITIONS = {};
    definitions.forEach((def) => {
      DEFAULT_DASHBOARD_DEFINITIONS[def.key] = def;
    });
    const getDefaultDashboards = () => DEFAULT_DASHBOARD_DEFINITIONS;
    const getDefaultDisplayedDashboards = () => definitions.filter((def) => !def.optional).map((def) => def.key);
    const dashboardConfig = getDashboardConfig();
    const intervalOptions = getDefaultIntervals();
    const defaultDashboards = getDefaultDashboards();
    const defaultInterval = intervalOptions.find((interval) => interval.id === dashboardConfig.interval) ?? intervalOptions[0];
    const initState$5 = {
      updateFrequency: 1e3 * 60,
      // every 1 minute
      definitions: { ...defaultDashboards },
      reports: {},
      currentCallbacks: [],
      displayedReports: dashboardConfig.tiles ?? getDefaultDisplayedDashboards(),
      selectedInterval: defaultInterval.id,
      dashboardSettings: defaultInterval.settings,
      loadingReports: [],
      fullscreen: null
    };
    const setDisplayedReports$1 = (state, newReports) => {
      setDashboardTiles(newReports);
      const fullscreen2 = state.fullscreen && newReports.includes(state.fullscreen) ? state.fullscreen : null;
      return { ...state, displayedReports: newReports, fullscreen: fullscreen2 };
    };
    const sampleReducer = (state = initState$5, action) => {
      switch (action.type) {
        case REPORTS_ACTION_KEYS.REPORTS_SET_REPORT_DEFINITIONS:
          return { ...state, definitions: action.value };
        case REPORTS_ACTION_KEYS.REPORTS_SET_REPORT:
          return { ...state, reports: { ...state.reports, ...action.value } };
        case REPORTS_ACTION_KEYS.REPORTS_SET_DISPLAYED_REPORTS:
          return setDisplayedReports$1(state, action.value);
        case REPORTS_ACTION_KEYS.REPORTS_ADD_CALLBACK_ID:
          return { ...state, currentCallbacks: [...state.currentCallbacks, action.value] };
        case REPORTS_ACTION_KEYS.REPORTS_REMOVE_CALLBACK_ID:
          return { ...state, currentCallbacks: state.currentCallbacks.filter((id2) => id2 !== action.value) };
        case REPORTS_ACTION_KEYS.REPORTS_SET_SELECT_INTERVAL: {
          setDashboardInterval(action.value.id);
          return { ...state, selectedInterval: action.value.id, dashboardSettings: action.value.settings };
        }
        case REPORTS_ACTION_KEYS.REPORTS_REMOVE_DISPLAYED_REPORT: {
          const newReports = state.displayedReports.filter((t2) => t2 !== action.value);
          return setDisplayedReports$1(state, newReports);
        }
        case REPORTS_ACTION_KEYS.REPORTS_RESET_DISPLAYED_REPORTS: {
          const newReports = getDefaultDisplayedDashboards();
          return setDisplayedReports$1(state, newReports);
        }
        case REPORTS_ACTION_KEYS.REPORTS_SET_LOADING_INTERVAL:
          return {
            ...state,
            loadingReports: action.value.remove ? state.loadingReports.filter((key) => !action.value.keys.includes(key)) : [...state.loadingReports, ...action.value.keys]
          };
        case REPORTS_ACTION_KEYS.REPORTS_SET_FULLSCREEN:
          return { ...state, fullscreen: action.value };
        default:
          return state;
      }
    };
    var CONFIG_ACTION_KEYS = /* @__PURE__ */ ((CONFIG_ACTION_KEYS2) => {
      CONFIG_ACTION_KEYS2["CONFIG_SET_CONFIG"] = "CONFIG_SET_CONFIG";
      return CONFIG_ACTION_KEYS2;
    })(CONFIG_ACTION_KEYS || {});
    const initState$4 = {
      pollingLimit: 5,
      overallTabsLimit: 16
    };
    const configReducer = (state = initState$4, action) => {
      switch (action.type) {
        case CONFIG_ACTION_KEYS.CONFIG_SET_CONFIG:
          return { ...state, ...action.value };
        default:
          return state;
      }
    };
    const OAScand = "OAScand";
    const ODScand = "ODScand";
    var EnumWorkingState = /* @__PURE__ */ ((EnumWorkingState2) => {
      EnumWorkingState2[EnumWorkingState2["CE_WORKING_STATE_UNKNOWN"] = 0] = "CE_WORKING_STATE_UNKNOWN";
      EnumWorkingState2[EnumWorkingState2["CE_WORKING_STATE_WORKING"] = 1] = "CE_WORKING_STATE_WORKING";
      EnumWorkingState2[EnumWorkingState2["CE_WORKING_STATE_NOTWORKING"] = 2] = "CE_WORKING_STATE_NOTWORKING";
      EnumWorkingState2[EnumWorkingState2["CE_WORKING_STATE_DISABLED"] = 3] = "CE_WORKING_STATE_DISABLED";
      return EnumWorkingState2;
    })(EnumWorkingState || {});
    var EnumWorkingSeverity = /* @__PURE__ */ ((EnumWorkingSeverity2) => {
      EnumWorkingSeverity2[EnumWorkingSeverity2["CE_WORKING_SEVERITY_UNKNOWN"] = 0] = "CE_WORKING_SEVERITY_UNKNOWN";
      EnumWorkingSeverity2[EnumWorkingSeverity2["CE_WORKING_SEVERITY_OK"] = 10] = "CE_WORKING_SEVERITY_OK";
      EnumWorkingSeverity2[EnumWorkingSeverity2["CE_WORKING_SEVERITY_INFO"] = 20] = "CE_WORKING_SEVERITY_INFO";
      EnumWorkingSeverity2[EnumWorkingSeverity2["CE_WORKING_SEVERITY_WARNING"] = 30] = "CE_WORKING_SEVERITY_WARNING";
      EnumWorkingSeverity2[EnumWorkingSeverity2["CE_WORKING_SEVERITY_ERROR"] = 40] = "CE_WORKING_SEVERITY_ERROR";
      return EnumWorkingSeverity2;
    })(EnumWorkingSeverity || {});
    var Enums = /* @__PURE__ */ ((Enums2) => {
      Enums2["EnumWorkingState"] = "EnumWorkingState";
      Enums2["EnumWorkingSeverity"] = "EnumWorkingSeverity";
      return Enums2;
    })(Enums || {});
    var FEATURES_ACTION_KEYS = /* @__PURE__ */ ((FEATURES_ACTION_KEYS2) => {
      FEATURES_ACTION_KEYS2["FEATURES_MISSING_MODULES"] = "FEATURES_MISSING_MODULES";
      return FEATURES_ACTION_KEYS2;
    })(FEATURES_ACTION_KEYS || {});
    var FEATURES = /* @__PURE__ */ ((FEATURES2) => {
      FEATURES2["ON_DEMAND_SCAN"] = "ON_DEMAND_SCAN";
      FEATURES2["SUBMIT_SAMPLE"] = "SUBMIT_SAMPLE";
      FEATURES2["QUARANTINE_TABLE"] = "QUARANTINE_TABLE";
      FEATURES2["SENT_FILES_TABLE"] = "SENT_FILES_TABLE";
      FEATURES2["DETECTIONS_TABLE"] = "DETECTIONS_TABLE";
      FEATURES2["BLOCKED_FILES_TABLE"] = "BLOCKED_FILES_TABLE";
      FEATURES2["SCANS_TABLE"] = "SCANS_TABLE";
      FEATURES2["REALTIME_PROTECTION"] = "REALTIME_PROTECTION";
      FEATURES2["FILTERED_WEBSITES"] = "FILTERED_WEBSITES";
      FEATURES2["WAP"] = "WAP";
      FEATURES2["NETWORK_PROTECTION_TABLE"] = "NETWORK_PROTECTION_TABLE";
      return FEATURES2;
    })(FEATURES || {});
    var WatchdogGroup = /* @__PURE__ */ ((WatchdogGroup2) => {
      WatchdogGroup2["RealtimeSystemProtection"] = "real-time-protection";
      WatchdogGroup2["OnDemandScanner"] = "on-demand-scanner";
      return WatchdogGroup2;
    })(WatchdogGroup || {});
    const WatchdogGroupDetails = {
      [
        "on-demand-scanner"
        /* OnDemandScanner */
      ]: {
        title: "IDUS_WATCHDOG_TILE_TITLE_ODSCAND",
        icon: default_1$6,
        services: [ODScand],
        featureFlags: [FEATURES.ON_DEMAND_SCAN]
      },
      [
        "real-time-protection"
        /* RealtimeSystemProtection */
      ]: {
        title: "IDUS_WATCHDOG_TILE_TITLE_OASCAND",
        icon: default_1$6,
        protectionStatusesMapping: {
          [RTFSDisabled]: EnumWorkingState.CE_WORKING_STATE_DISABLED,
          [RTFSWorking]: EnumWorkingState.CE_WORKING_STATE_WORKING,
          [RTFSNonFunctional]: EnumWorkingState.CE_WORKING_STATE_NOTWORKING,
          [RTFSEnabled]: EnumWorkingState.CE_WORKING_STATE_UNKNOWN
        },
        services: [
          OAScand
          /*, WatchdogService.OAKernelModule*/
        ],
        featureFlags: [FEATURES.REALTIME_PROTECTION]
      }
      // [WatchdogGroup.Updater]: {
      //   title: 'IDUS_WATCHDOG_TILE_TITLE_UPDATED',
      //   icon: IconArrowRefresh,
      //   services: [WatchdogService.Updated],
      //   featureFlags: []
      // },
    };
    const WatchdogContentKeys = {};
    const WatchdogContentSettings = {};
    const WatchdogMenuItems = {};
    Object.entries(WatchdogGroup).forEach(([key, value]) => {
      const link = getRoute(routes$1.overviewDynamic, { id: value });
      WatchdogContentKeys[value] = value;
      WatchdogContentSettings[value] = {
        title: WatchdogGroupDetails[value].title,
        link
      };
      WatchdogMenuItems[`Overview${key}`] = {
        link,
        parentLink: routes$1.statusOverview
      };
    });
    const WatchdogProtectionStatuses = flattenArray(
      Object.values(WatchdogGroupDetails).map((item) => Object.keys(item.protectionStatusesMapping ?? {}))
    ).filter((status, index, array) => array.indexOf(status) >= index);
    const AllWatchdogGroups = Object.values(WatchdogGroup).map((group) => ({ ...WatchdogGroupDetails[group], group }));
    const WatchdogServiceSeverityMap = {
      [EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN]: {
        type: void 0,
        icon: IconLetterI,
        color: colors.text
      },
      [EnumWorkingSeverity.CE_WORKING_SEVERITY_OK]: {
        type: "success",
        icon: IconStatusOk,
        color: colors.success
      },
      [EnumWorkingSeverity.CE_WORKING_SEVERITY_INFO]: {
        type: "info",
        icon: IconLetterI,
        color: colors.info
      },
      [EnumWorkingSeverity.CE_WORKING_SEVERITY_WARNING]: {
        type: "warning",
        icon: IconStatusWarning,
        color: colors.warning
      },
      [EnumWorkingSeverity.CE_WORKING_SEVERITY_ERROR]: {
        type: "error",
        icon: IconStatusError,
        color: colors.error
      }
    };
    var WATCHDOG_ACTION_KEYS = /* @__PURE__ */ ((WATCHDOG_ACTION_KEYS2) => {
      WATCHDOG_ACTION_KEYS2["WATCHDOG_UPDATE_SERVICES"] = "WATCHDOG_UPDATE_SERVICES";
      WATCHDOG_ACTION_KEYS2["WATCHDOG_UPDATE_PROTECTION_STATUSES"] = "WATCHDOG_UPDATE_PROTECTION_STATUSES";
      WATCHDOG_ACTION_KEYS2["WATCHDOG_IS_ENABLED"] = "WATCHDOG_UPDATE_IS_ENABLED";
      return WATCHDOG_ACTION_KEYS2;
    })(WATCHDOG_ACTION_KEYS || {});
    const PROTECTION_STATUS_SERVICE_KEY = "protection-status-service";
    const withProtectionStatus = (item) => item.key === PROTECTION_STATUS_SERVICE_KEY;
    const watchdogFromProtectionStatusSeverity = (protectionStatusSeverity) => {
      if (protectionStatusSeverity < 1e4) {
        return EnumWorkingSeverity.CE_WORKING_SEVERITY_ERROR;
      }
      if (protectionStatusSeverity < 2e4) {
        return EnumWorkingSeverity.CE_WORKING_SEVERITY_WARNING;
      }
      if (protectionStatusSeverity < 3e4) {
        return EnumWorkingSeverity.CE_WORKING_SEVERITY_INFO;
      }
      return EnumWorkingSeverity.CE_WORKING_SEVERITY_OK;
    };
    const getWatchdogStatuses = (statuses) => {
      const result = {};
      Object.entries(statuses).map(([name, status]) => ({
        ...status,
        Status: name
      })).filter(
        (status) => WatchdogProtectionStatuses.includes(status.Status) && (status.Active === void 0 || status.Active > 0)
      ).forEach((status) => {
        result[status.Status] = status;
      });
      return result;
    };
    const getProtectionStatusEntry = (origStatuses, definedStatuses = {}) => {
      const statuses = getWatchdogStatuses(origStatuses);
      const mappedStatuses = Object.keys(definedStatuses).map((key) => statuses[key] ? { ...statuses[key], id: key } : void 0).filter((x) => x).sort(sortByRawSeverity);
      const entry = {
        Title: "",
        // the tile fills it in instead
        key: PROTECTION_STATUS_SERVICE_KEY,
        StateChangeDate: 0,
        originalProtectionStatuses: mappedStatuses
      };
      const mostImportantPS = mappedStatuses.length > 0 ? mappedStatuses[0] : null;
      return mostImportantPS && definedStatuses[mostImportantPS.Status] !== EnumWorkingState.CE_WORKING_STATE_UNKNOWN ? {
        ...entry,
        State: definedStatuses[mostImportantPS.Status],
        Severity: watchdogFromProtectionStatusSeverity(mostImportantPS.Severity),
        muted: mostImportantPS.MuteInGui === 1 || mostImportantPS.MuteInEra === 1
      } : {
        ...entry,
        State: EnumWorkingState.CE_WORKING_STATE_UNKNOWN,
        Severity: EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN
      };
    };
    const initState$3 = {
      isEnabled: false,
      watchdogLoaded: false,
      statusesLoaded: false,
      displayedGroups: [],
      clickableGroups: [],
      services: []
    };
    const getDisplayedAndClickableGroups = (services, isEnabled, fullyLoaded) => {
      const displayed = services.filter((group) => isEnabled || group.data.find(withProtectionStatus));
      const clickable2 = fullyLoaded ? displayed.filter((service) => service.severity !== EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN) : [];
      return {
        displayedGroups: displayed.map((group) => group.group),
        clickableGroups: clickable2.map((group) => group.group)
      };
    };
    const getGroupSeverity = (origData, isEnabled) => {
      let data2 = origData.filter((item) => !item.muted);
      if (!isEnabled) {
        data2 = data2.filter(withProtectionStatus);
      }
      return data2.length === 0 ? EnumWorkingSeverity.CE_WORKING_SEVERITY_OK : Math.max(...data2.map((item) => item.Severity));
    };
    const watchdogReducer = (state = initState$3, action) => {
      switch (action.type) {
        case WATCHDOG_ACTION_KEYS.WATCHDOG_UPDATE_SERVICES: {
          const statuses = action.value.statuses;
          const services = Object.entries(action.value.services).map(([key, value]) => ({
            ...value,
            key
          }));
          const processedData = AllWatchdogGroups.map((group) => {
            let data2 = [];
            if (group.protectionStatusesMapping) {
              data2 = [getProtectionStatusEntry(statuses, group.protectionStatusesMapping)];
            }
            data2 = [
              ...data2,
              ...group.services.map((service) => services.find((item) => item.key === service)).filter((x) => x)
            ];
            return data2.length === 0 ? null : {
              group: group.group,
              title: group.title,
              icon: group.icon,
              featureFlags: group.featureFlags,
              severity: getGroupSeverity(data2, state.isEnabled),
              data: data2
            };
          }).filter((x) => x);
          return {
            ...state,
            services: processedData,
            watchdogLoaded: true,
            ...getDisplayedAndClickableGroups(processedData, state.isEnabled, state.statusesLoaded)
          };
        }
        case WATCHDOG_ACTION_KEYS.WATCHDOG_UPDATE_PROTECTION_STATUSES: {
          const statuses = action.value;
          const processedData = AllWatchdogGroups.map((group) => {
            let data2 = [];
            const matchingPreviousEntry = state.services.find((g) => g.group === group.group);
            if (group.protectionStatusesMapping) {
              const entry = getProtectionStatusEntry(statuses, group.protectionStatusesMapping);
              data2 = matchingPreviousEntry ? [entry, ...matchingPreviousEntry.data.splice(1)] : [entry];
              return {
                group: group.group,
                title: group.title,
                icon: group.icon,
                severity: getGroupSeverity(data2, state.isEnabled),
                featureFlags: group.featureFlags,
                data: data2
              };
            } else {
              return matchingPreviousEntry;
            }
          }).filter((x) => x);
          return {
            ...state,
            services: processedData,
            statusesLoaded: true,
            ...getDisplayedAndClickableGroups(processedData, state.isEnabled, state.watchdogLoaded)
          };
        }
        case WATCHDOG_ACTION_KEYS.WATCHDOG_IS_ENABLED: {
          const isEnabled = action.value;
          const services = state.services;
          const processedServices = services.map((group) => ({
            ...group,
            severity: getGroupSeverity(group.data, isEnabled)
          }));
          return {
            ...state,
            isEnabled: action.value,
            services: processedServices,
            ...getDisplayedAndClickableGroups(processedServices, isEnabled, state.statusesLoaded && state.watchdogLoaded)
          };
        }
        default:
          return state;
      }
    };
    var CFG_ACTION_KEYS = /* @__PURE__ */ ((CFG_ACTION_KEYS2) => {
      CFG_ACTION_KEYS2["CFG_SET_ENUMS"] = "CFG_SET_ENUMS";
      return CFG_ACTION_KEYS2;
    })(CFG_ACTION_KEYS || {});
    const initState$2 = {
      enums: {
        [Enums.EnumWorkingState]: {}
      }
    };
    const cfgReducer = (state = initState$2, action) => {
      switch (action.type) {
        case CFG_ACTION_KEYS.CFG_SET_ENUMS: {
          let newEnums = {};
          Object.entries(action.value).forEach(([path, data2]) => {
            const sections = path.split(".");
            const name = sections[sections.length - 1];
            newEnums = {
              ...newEnums,
              [name]: data2
            };
          });
          return { ...state, enums: { ...state.enums, ...newEnums } };
        }
        default:
          return state;
      }
    };
    const defaultFlag = {
      active: false,
      message: "",
      priority: -1,
      origin: null,
      action: void 0,
      route: void 0
    };
    const initState$1 = {
      [FEATURES.ON_DEMAND_SCAN]: [defaultFlag],
      [FEATURES.QUARANTINE_TABLE]: [defaultFlag],
      [FEATURES.SUBMIT_SAMPLE]: [defaultFlag],
      [FEATURES.BLOCKED_FILES_TABLE]: [defaultFlag],
      [FEATURES.DETECTIONS_TABLE]: [defaultFlag],
      [FEATURES.SCANS_TABLE]: [defaultFlag],
      [FEATURES.SENT_FILES_TABLE]: [defaultFlag],
      [FEATURES.REALTIME_PROTECTION]: [defaultFlag],
      [FEATURES.FILTERED_WEBSITES]: [defaultFlag],
      [FEATURES.WAP]: [defaultFlag],
      [FEATURES.NETWORK_PROTECTION_TABLE]: [defaultFlag]
    };
    const applyChanges = (state, changes, origin) => {
      const newResult = {};
      Object.keys(changes).forEach((key) => {
        const change = { ...changes[key], origin };
        const existingList = state[key].filter((entry) => entry.origin !== origin && entry.origin !== null);
        newResult[key] = [change, ...existingList].sort((a, b) => b.priority - a.priority);
      });
      return newResult;
    };
    const featuresReducer = (state = initState$1, action) => {
      switch (action.type) {
        case FEATURES_ACTION_KEYS.FEATURES_MISSING_MODULES:
          return { ...state, ...applyChanges(state, action.value, action.type) };
        default:
          return state;
      }
    };
    var WEBSITES_ACTION_KEYS = /* @__PURE__ */ ((WEBSITES_ACTION_KEYS2) => {
      WEBSITES_ACTION_KEYS2["WEBSITES_SET_EXCLUSIONS_DATA"] = "WEBSITES_SET_EXCLUSIONS_DATA";
      WEBSITES_ACTION_KEYS2["WEBSITES_EXCLUSIONS_SET_ERROR"] = "WEBSITES_EXCLUSIONS_SET_ERROR";
      WEBSITES_ACTION_KEYS2["WEBSITES_SET_URL_LISTS"] = "WEBSITES_SET_URL_LISTS";
      WEBSITES_ACTION_KEYS2["WEBSITES_SET_ENABLED"] = "WEBSITES_SET_ENABLED";
      return WEBSITES_ACTION_KEYS2;
    })(WEBSITES_ACTION_KEYS || {});
    var UrlListType = /* @__PURE__ */ ((UrlListType2) => {
      UrlListType2[UrlListType2["IgnoreMalware"] = 0] = "IgnoreMalware";
      UrlListType2[UrlListType2["Blocked"] = 1] = "Blocked";
      UrlListType2[UrlListType2["Allowed"] = 2] = "Allowed";
      return UrlListType2;
    })(UrlListType || {});
    const UrlListTypeValues = [0, 1, 2];
    var UrlListBoolean = /* @__PURE__ */ ((UrlListBoolean2) => {
      UrlListBoolean2[UrlListBoolean2["No"] = 0] = "No";
      UrlListBoolean2[UrlListBoolean2["Yes"] = 1] = "Yes";
      return UrlListBoolean2;
    })(UrlListBoolean || {});
    var UrlListAction = /* @__PURE__ */ ((UrlListAction2) => {
      UrlListAction2["RemoveBlocked"] = "remove-blocked";
      UrlListAction2["RemoveAllowed"] = "remove-allowed";
      UrlListAction2["AddToAllowed"] = "add-to-allowed";
      return UrlListAction2;
    })(UrlListAction || {});
    const COMMON_DEF_LIST = {
      Default: 1,
      ListActive: 1,
      NotifyWhenApplying: 0,
      ListName: "@",
      ListDescription: "",
      Addresses: []
    };
    const DefUrlList = {
      [
        0
        /* IgnoreMalware */
      ]: {
        ...COMMON_DEF_LIST,
        ListType: 0,
        ResIdListName: 320274516,
        Severity: 1
      },
      [
        1
        /* Blocked */
      ]: {
        ...COMMON_DEF_LIST,
        ListType: 1,
        ResIdListName: 320274515,
        Severity: 3
      },
      [
        2
        /* Allowed */
      ]: {
        ...COMMON_DEF_LIST,
        ListType: 2,
        ResIdListName: 320274514,
        Severity: 1
      }
    };
    var WebsitesExclusionType = /* @__PURE__ */ ((WebsitesExclusionType2) => {
      WebsitesExclusionType2["IP"] = "IP";
      WebsitesExclusionType2["Application"] = "Application";
      return WebsitesExclusionType2;
    })(WebsitesExclusionType || {});
    const initState = {
      enabled: null,
      exclusions: null,
      exclusionsError: null,
      urlLists: [],
      urlListsSearchStrings: {
        [UrlListType.Allowed]: "",
        [UrlListType.Blocked]: "",
        [UrlListType.IgnoreMalware]: ""
      }
    };
    const websitesReducer = (state = initState, action) => {
      switch (action.type) {
        case WEBSITES_ACTION_KEYS.WEBSITES_SET_ENABLED:
          return { ...state, enabled: action.value };
        case WEBSITES_ACTION_KEYS.WEBSITES_SET_EXCLUSIONS_DATA:
          return {
            ...state,
            exclusions: action.value,
            exclusionsError: initState.exclusionsError
          };
        case WEBSITES_ACTION_KEYS.WEBSITES_EXCLUSIONS_SET_ERROR:
          return {
            ...state,
            exclusionsError: action.value
          };
        case WEBSITES_ACTION_KEYS.WEBSITES_SET_URL_LISTS:
          return {
            ...state,
            urlLists: action.value.urlLists,
            urlListsSearchStrings: action.value.urlListsSearchStrings
          };
        default:
          return state;
      }
    };
    const rootReducer = () => combineReducers({
      auth: authReducer,
      utils: utilsReducer,
      update: updateReducer,
      protectionStatus: protectionStatusReducer,
      scans: scansReducer,
      activation: activationReducer,
      layout: layoutReducer,
      notification: notificationReducer,
      pcu: pcuReducer,
      language: languageReducer,
      logs: logsReducer,
      sample: sampleReducer$1,
      quarantine: quarantineReducer,
      detections: detectionsReducer,
      reports: sampleReducer,
      config: configReducer,
      watchdog: watchdogReducer,
      cfg: cfgReducer,
      features: featuresReducer,
      websites: websitesReducer
    });
    const middlewares = [thunkMiddleware];
    const middlewareEnhancer = applyMiddleware(...middlewares);
    const enhancers = [middlewareEnhancer];
    const composedEnhancers = composeWithDevTools(...enhancers);
    const store = createStore(rootReducer(), composedEnhancers);
    const langs$1 = [
      {
        value: "de",
        label: "Deutsch",
        direction: "ltr",
        winlang: "DEU",
        winid: 1031,
        iso: "de",
        plural: 1,
        bcp47: "de-DE"
      },
      {
        value: "en",
        label: "English",
        direction: "ltr",
        winlang: "ENU",
        winid: 1033,
        iso: "en",
        plural: 1,
        bcp47: "en-US"
      },
      {
        value: "es",
        label: "Español",
        direction: "ltr",
        winlang: "ESN",
        winid: 3082,
        iso: "es",
        plural: 1,
        bcp47: "es-ES"
      },
      {
        value: "es-419",
        label: "Español latinoamericano",
        direction: "ltr",
        winlang: "ESL",
        winid: 13322,
        iso: "es-419",
        plural: 1,
        bcp47: "es-CL"
      },
      {
        value: "fr",
        label: "Français",
        direction: "ltr",
        winlang: "FRA",
        winid: 1036,
        iso: "fr",
        plural: 2,
        bcp47: "fr-FR"
      },
      {
        value: "pl",
        label: "Polski",
        direction: "ltr",
        winlang: "PLK",
        winid: 1045,
        iso: "pl",
        plural: 9,
        bcp47: "pl-PL"
      },
      {
        value: "uk",
        label: "Українська",
        pdfFontFamily: "Roboto",
        direction: "ltr",
        winlang: "UKR",
        winid: 1058,
        iso: "uk",
        plural: 7,
        bcp47: "uk-UA"
      },
      {
        value: "ja",
        label: "日本語",
        fontFamily: "NotoSansJP",
        pdfFontFamily: "NotoSansJP",
        direction: "ltr",
        winlang: "JPN",
        winid: 1041,
        iso: "ja",
        plural: 0,
        bcp47: "ja-JP"
      }
    ];
    const changeLang = (winid, direction, plural, localeKey, pdfFont, font) => ({
      type: LANGUAGE_ACTION_KEYS.CHANGE_LANG,
      value: {
        winid,
        direction,
        plural,
        font,
        pdfFont,
        localeKey
      }
    });
    const DEFAULT_LANGUAGE = "en";
    const DEFAULT_NAMESPACE = "common";
    const LOCALES_PATH = `/generated/locales/{{lng}}/{{ns}}.${pkgid.version.join(".")}.json`;
    Settings.defaultLocale = DEFAULT_LANGUAGE;
    const detection = {
      // order and from where user language should be detected
      order: ["localStorage", "navigator", "querystring", "cookie", "htmlTag"]
    };
    const changeLanguageEverywhere = async (l) => {
      if (l) {
        await instance.changeLanguage(l.value);
        Settings.defaultLocale = l.bcp47;
        store.dispatch(changeLang(l.winid, l.direction, l.plural, l.bcp47, l.pdfFontFamily, l.fontFamily));
      }
    };
    const getMatchingLanguage = (lang) => {
      let l = langs$1.find((language) => language.value === lang);
      if (!l) {
        l = langs$1.find((language) => language.value === lang.split("-", 1)[0]);
      }
      if (!l) {
        l = langs$1.find((language) => language.value === DEFAULT_LANGUAGE);
      }
      return l;
    };
    const changeToSelectedLanguageEverywhere = (language) => {
      if (language) {
        changeLanguageEverywhere(getMatchingLanguage(language.value));
      }
    };
    const setLanguageUpdateEvent = () => {
      window.addEventListener("storage", (e) => {
        if (e.key === "i18nextLng" && e.newValue) {
          const language = getMatchingLanguage(e.newValue);
          changeLanguageEverywhere(language);
        }
      });
    };
    setLanguageUpdateEvent();
    instance.use(Backend).use(Browser).use(initReactI18next).init(
      {
        fallbackLng: DEFAULT_LANGUAGE,
        detection,
        load: "currentOnly",
        ns: [DEFAULT_NAMESPACE],
        // have a common namespace used around the full app
        defaultNS: DEFAULT_NAMESPACE,
        // have a common namespace used around the full app
        supportedLngs: langs$1.map((lang) => lang.value),
        nonExplicitSupportedLngs: true,
        // to accept also e.g. de-DE
        interpolation: {
          escapeValue: false
          // not needed for react as it escapes by default
        },
        cache: {
          enabled: true
        },
        backend: {
          loadPath: LOCALES_PATH
        },
        react: {
          useSuspense: false
        }
      },
      () => {
        const language = getMatchingLanguage(instance.language);
        changeLanguageEverywhere(language);
      }
    );
    const visibleContentFooter = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_FOOTER,
      value: true
    });
    const hiddenContentFooter = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_FOOTER,
      value: false
    });
    const updateLayoutRightSidebar = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR,
      value
    });
    const updateLayoutSidebar = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_SIDEBAR,
      value
    });
    const updateLayoutSidebarComplete = () => (dispatch, getState) => {
      dispatch({
        type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_SIDEBAR_COMPLETE,
        value: getState().layout.content.sidebar
      });
    };
    const updateLayoutRightSidebarComplete = () => (dispatch, getState) => {
      dispatch({
        type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR_COMPLETE,
        value: getState().layout.content.rightSidebar
      });
    };
    const updateCurrentMenuItem = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_MENU_ITEM,
      value
    });
    const visibleFeedback = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_FEEDBACK,
      value: true
    });
    const hiddenFeedback = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_FEEDBACK,
      value: false
    });
    const toggleSampleSubmission = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_SAMPLE_SUBMISSION,
      value
    });
    const toggleDashboardConfig = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_DASHBBOARD_CONFIG,
      value
    });
    const toggleConnectionLimit = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONNECTION_LIMIT,
      value
    });
    const requireRouteChangeConfirmation = (title, text, continueLabel, cancelLabel, continueAction, cancelAction) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_REQUIRE_ROUTE_CHANGE_CONFIRMATION,
      value: {
        title,
        text,
        cancelButton: {
          text: cancelLabel,
          onClick: cancelAction
        },
        continueButton: {
          text: continueLabel,
          onClick: continueAction
        }
      }
    });
    const removeRouteChangeConfirmation = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_NO_ROUTE_CHANGE_CONFIRMATION
    });
    const resetLayoutReducer = () => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_RESET_REDUCER
    });
    const setFreshInstallFlag = (flag) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_SET_FRESH_INSTALL,
      value: flag
    });
    const setBadgeDataForMenu = (data2) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_SET_BADGE_DATA_FOR_MENU,
      value: data2
    });
    const toggleWelcome = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_WELCOME,
      value
    });
    const toggleProductTour = (value) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_PRODUCT_TOUR,
      value
    });
    const setRightSidebarLevel = (flag) => ({
      type: LAYOUT_ACTION_KEYS.LAYOUT_CONTENT_RIGHT_SIDEBAR_LEVEL,
      value: flag
    });
    class PureErrorBoundary extends React.PureComponent {
      constructor() {
        super(...arguments);
        __publicField(this, "state", { hasError: false });
      }
      static getDerivedStateFromError() {
        return { hasError: true };
      }
      componentDidCatch(error, errorInfo) {
        if (this.props.onError) {
          this.props.onError(error, errorInfo);
        } else {
          log(["Error happened", error], LogLevel.ERROR, LogEnv.PRODUCTION);
        }
      }
      render() {
        const { t: t2 } = this.props;
        if (!this.state.hasError) {
          return this.props.children;
        }
        if (this.props.errorContent) {
          return this.props.errorContent;
        }
        const msg = t2(this.props.message ?? "IDUS_ERROR_BOUNDARY_GENERIC");
        const instructions = insertHtmlToTemplate(t2("IDUS_ERROR_BOUNDARY_INSTRUCTIONS"), {
          reloadlink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { onClick: () => window.location.reload(), children: t2("IDUS_ERROR_BOUNDARY_RELOAD") })
        });
        return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-3 mx-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$8, { type: "error", className: this.props.className, children: [
          msg,
          " ",
          instructions
        ] }) });
      }
    }
    const ErrorBoundary = withTranslation()(PureErrorBoundary);
    ErrorBoundary.displayName = "ErrorBoundary";
    function usePrevious(value) {
      const ref = reactExports.useRef();
      reactExports.useEffect(() => {
        ref.current = value;
      }, [value]);
      return ref.current;
    }
    const withErrorBoundary = (message, className) => (Component) => (props) => {
      const { boundaryErrorContent, boundaryMessage, boundaryOnError, boundaryClassName, ...otherProps } = props;
      const messageChosen = message ?? boundaryMessage;
      const classNameChosen = className ?? boundaryClassName;
      const [content2, setContent] = reactExports.useState(/* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps }));
      const prevOtherProps = usePrevious(otherProps);
      reactExports.useEffect(() => {
        if (!isDeepEqual(prevOtherProps, otherProps)) {
          setContent(/* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps }));
        }
      }, [otherProps, prevOtherProps]);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        ErrorBoundary,
        {
          className: classNameChosen,
          errorContent: boundaryErrorContent,
          message: messageChosen,
          onError: boundaryOnError,
          children: content2
        }
      );
    };
    const headerError = "_headerError_85lgg_1";
    const header$1 = "_header_85lgg_1";
    const logo = "_logo_85lgg_9";
    const style$w = {
      headerError,
      header: header$1,
      logo
    };
    const PureHelp = (props) => {
      const { t: t2 } = useTranslation();
      const { toggleSampleModal, toggleTourModal, showFeedback, wrapWithRouteConfirmation } = props;
      const links = useSelector((state) => state.language.links);
      const sampleEnabled = useSelector((state) => state.sample.isEnabled);
      const sampleFeatureFlag = useSelector((state) => state.features[FEATURES.SUBMIT_SAMPLE][0]);
      const navigate = useNavigate();
      const helpMenu = reactExports.useMemo(
        () => [
          [
            {
              id: "online-help-link",
              title: "IDUS_ONLINE_HELP",
              link: links.HELP_LINK
            },
            {
              id: "product-tour-link",
              title: "IDUS_ONBOARDING_PRODUCT_TOUR",
              callback: () => toggleTourModal(true)
            }
          ],
          [
            {
              id: "knowledge-base-link",
              title: "IDUS_KNOWLEDGE_BASE",
              link: links.KB_LINK
            },
            {
              id: "support-forum-link",
              title: "IDUS_SUPPORT_FORUM",
              link: links.FORUM_LINK
            },
            {
              id: "we-live-security-link",
              title: "WeLiveSecurity",
              link: links.WELIVESECURITY_LINK
            },
            {
              id: "virus-radar-link",
              title: "IDUS_MENU_VIRUS_RADAR",
              link: links.RADAR_LINK
            }
          ],
          [
            {
              id: "send-sample-link",
              title: "IDUS_SAMPLE_TITLE",
              callback: () => toggleSampleModal(true),
              condition: () => sampleEnabled && sampleFeatureFlag.active
            },
            {
              id: "contact-support-link",
              title: "IDUS_CONTACT_SUPPORT",
              link: links.SUPPORT_LINK
            },
            {
              id: "submit-feedback-help-link",
              title: "IDUS_SUBMIT_FEEDBACK",
              callback: showFeedback
            }
          ],
          [
            {
              id: "about-link",
              title: "IDUS_ABOUT",
              redirect: routes$1.about
            }
          ]
        ],
        [links, sampleEnabled, showFeedback, toggleSampleModal, toggleTourModal, sampleFeatureFlag]
      );
      const handleOnClick = reactExports.useCallback(
        (item) => {
          if (item.redirect) {
            wrapWithRouteConfirmation(() => navigate(item.redirect));
          } else if (item.link) {
            window.open(item.link);
          } else if (item.callback) {
            item.callback();
          }
        },
        [wrapWithRouteConfirmation, navigate]
      );
      const menu = reactExports.useMemo(() => {
        const sections = helpMenu.map((section) => section.filter((item) => !item.condition || item.condition())).filter((section) => section.length > 0).map(
          (section) => section.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$9, { type: default_1$9.TYPE_LINK, children: /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderLink, { id: item.id, onClick: () => handleOnClick(item), children: t2(item.title) }) }, item.id))
        );
        const processed = [];
        sections.forEach((section, i) => {
          if (i > 0) {
            processed.push(/* @__PURE__ */ jsxRuntimeExports.jsx(default_1$9, { type: default_1$9.TYPE_DIVIDER }, `help-divider-${i}`));
          }
          processed.push(...section);
        });
        return processed;
      }, [helpMenu, handleOnClick, t2]);
      logGroup(
        "Help",
        [
          ["props", props],
          ["sampleEnabled", sampleEnabled],
          ["helpMenu", helpMenu],
          ["links", links]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        HeaderLink,
        {
          id: "help-dropdown-link",
          dropdown: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$a, { fixedWidth: false, id: "help_dropdown", children: menu }),
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, {}),
          children: t2("IDUS_MENU_HELP")
        }
      );
    };
    const mapDispatchToProps$F = {
      showFeedback: visibleFeedback,
      toggleSampleModal: toggleSampleSubmission,
      toggleTourModal: toggleProductTour
    };
    const Help = withErrorBoundary(void 0, style$w.headerError)(connect(null, mapDispatchToProps$F)(PureHelp));
    Help.displayName = "Help";
    const id$2 = "header";
    const PureHeader = (props) => {
      const { t: t2 } = props;
      const navigate = useNavigate();
      const location = useLocation();
      logGroup("Header", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        default_1$b,
        {
          id: id$2,
          className: style$w.header,
          logo: {
            main: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$c, { height: "32px", width: "212px", className: style$w.logo }),
            onClick: () => props.wrapWithRouteConfirmation(() => navigate(routes$1.dashboard))
          },
          logout: {
            id: "logout-button",
            onClick: () => props.wrapWithRouteConfirmation(() => navigate(routes$1.logout, { state: { from: location } })),
            text: t2("IDUS_LOGOUT"),
            textSecondary: `>${props.timeLeft}m`,
            tooltip: pluralize(t2("IDUS_SESSION_INFO_TOOLTIP"), props.idleLimit, props.pluralType)
          },
          isSidebarCollapsed: props.sidebarCollapsed,
          onHamburgerClick: () => props.updateLayoutSidebar(props.sidebarCollapsed),
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Help, { wrapWithRouteConfirmation: props.wrapWithRouteConfirmation }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              HeaderLink,
              {
                id: "profile-link",
                icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconUserUser, {}),
                onClick: () => props.wrapWithRouteConfirmation(() => navigate(routes$1.profile)),
                children: props.username
              }
            )
          ]
        }
      );
    };
    const mapDispatchToProps$E = {
      updateLayoutSidebar
    };
    const mapStatetoProps = (state) => ({
      sidebarCollapsed: !state.layout.content.sidebar,
      timeLeft: state.auth.timeLeft,
      idleLimit: state.auth.idleLimit,
      pluralType: state.language.plural,
      username: state.auth.username
    });
    const HeaderWithBoundary = (props) => {
      const { t: t2 } = useTranslation();
      const errorContent = /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-1 mx-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type: "error", className: style$w.headerError, children: t2("IDUS_ERROR_BOUNDARY_HEADER") }) });
      return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { errorContent, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PureHeader, { ...props }) });
    };
    const Header = withTranslation()(connect(mapStatetoProps, mapDispatchToProps$E)(HeaderWithBoundary));
    Header.displayName = "Header";
    class PureLockScreen extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "timeoutId", null);
        __publicField(this, "state", {
          showLock: false
        });
      }
      componentDidUpdate() {
        if (this.props.screenLocks > 0 && !this.state.showLock && !this.timeoutId) {
          this.timeoutId = setTimeout(() => {
            this.setState({ showLock: true });
          }, 500);
        } else if (this.props.screenLocks === 0) {
          clearTimeout(this.timeoutId);
          this.timeoutId = null;
          if (this.state.showLock) {
            this.setState({ showLock: false });
          }
        }
      }
      render() {
        logGroup(
          "LockScreen",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        return this.state.showLock ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "lock-screen disable-text-selection lock-screen-visible", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, { show: true }) }) : null;
      }
    }
    const mapStateToProps$F = (state) => ({
      screenLocks: state.utils.screenLocks
    });
    const LockScreen = connect(mapStateToProps$F)(PureLockScreen);
    LockScreen.displayName = "LockScreen";
    const onTransitionEndEffect = (id2, callback, property = ["width", "right"], parent = false) => {
      let domNode = document.querySelector(`#${id2}`);
      if (parent && domNode) {
        domNode = domNode.parentElement;
      }
      const afterTransition = (e) => {
        if (property.length === 0 || property.includes(e.propertyName)) {
          callback();
        }
      };
      if (domNode) {
        domNode.addEventListener("transitionend", afterTransition);
      }
      return () => {
        if (domNode) {
          domNode.removeEventListener("transitionend", afterTransition);
        }
      };
    };
    var RESOURCE_TYPE = /* @__PURE__ */ ((RESOURCE_TYPE2) => {
      RESOURCE_TYPE2["SCRIPT"] = "script";
      RESOURCE_TYPE2["STYLESHEET"] = "link";
      return RESOURCE_TYPE2;
    })(RESOURCE_TYPE || {});
    const loadScriptResource = (url, onLoad) => {
      const resource = document.createElement(
        "script"
        /* SCRIPT */
      );
      resource.async = true;
      resource.src = url;
      resource.type = "text/javascript";
      resource.onload = () => {
        onLoad(resource);
      };
      document.body.appendChild(resource);
    };
    const loadStylesheetResource = (url, onLoad) => {
      const resource = document.createElement(
        "link"
        /* STYLESHEET */
      );
      resource.rel = "stylesheet";
      resource.type = "text/css";
      resource.href = url;
      resource.onload = () => {
        onLoad(resource);
      };
      document.head.appendChild(resource);
    };
    const unloadResource = (type, resource) => {
      switch (type) {
        case "script": {
          document.body.removeChild(resource);
          break;
        }
        case "link":
        default: {
          document.head.removeChild(resource);
          break;
        }
      }
    };
    const REFRESH_EVENT = "REFRESH";
    function CustomEvent(event, params = { bubbles: false, cancelable: false, detail: void 0 }) {
      const evt = document.createEvent("CustomEvent");
      evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
      return evt;
    }
    CustomEvent.prototype = window.Event.prototype;
    const addCustomEventPolyfill = () => {
      if (typeof window.CustomEvent !== "function") {
        window.CustomEvent = CustomEvent;
      }
    };
    const dispatchRefresh = () => {
      window.onbeforeunload = () => {
        const event = new window.CustomEvent(REFRESH_EVENT);
        window.document.dispatchEvent(event);
        return null;
      };
    };
    const addRefreshListener = (cbk) => {
      window.document.addEventListener(REFRESH_EVENT, cbk);
    };
    const messages = {
      doUpdateStart: "doUpdateStart",
      updateRollback: "updateRollback",
      updateResume: "updateResume",
      pcuUpdateCheck: "pcuUpdateCheck",
      pcuTriggerUpdate: "pcuTriggerUpdate",
      pcuConfirmUpdate: "pcuConfirmUpdate",
      logout: "logout",
      activationByKey: "activationByKey",
      activationByFile: "activationByFile",
      activationAttrResponse: "activationAttrResponse",
      cfgAddToArrayRequest: "cfgAddToArrayRequest",
      cfgSetValuesRequest: "cfgSetValuesRequest",
      cfgGetEnumsRequest: "cfgGetEnumsRequest",
      cfgResetToDefaultRequest: "cfgResetToDefaultRequest",
      cfgValueFlagsGetRequest: "cfgValueFlagsGetRequest",
      registerCallback: "registerCallback",
      unregisterCallback: "unregisterCallback",
      startODScan: "startODScan",
      pauseODScan: "pauseODScan",
      resumeODScan: "resumeODScan",
      stopODScan: "stopODScan",
      logInformationRequest: "logInformationRequest",
      logQueryExecuteRequest: "logQueryExecuteRequest",
      logQueryWindowRequest: "logQueryWindowRequest",
      logQueryClose: "logQueryClose",
      quarantineSendSample: "quarantineSendSample",
      sendSample: "sendSample",
      quarantineInformationRequest: "quarantineInformationRequest",
      quarantineQueryExecuteRequest: "quarantineQueryExecuteRequest",
      quarantineQueryWindowRequest: "quarantineQueryWindowRequest",
      quarantineRestoreExcludeRequest: "quarantineRestoreExcludeRequest",
      quarantineRestoreRequest: "quarantineRestoreRequest",
      quarantineQueryClose: "quarantineQueryClose",
      quarantineDeleteRequest: "quarantineDeleteRequest",
      quarantineDownloadRequest: "quarantineDownloadRequest",
      getLicensesRequest: "getLicensesRequest",
      activationByBusinessAccountRequest: "activationByBusinessAccountRequest",
      cleanedStatusDetectionAggregationRequest: "cleanedStatusDetectionAggregationRequest",
      absoluteDetectionsByMethodAggregationRequest: "absoluteDetectionsByMethodAggregationRequest",
      lastXDetectionsRequest: "lastXDetectionsRequest",
      topXUsersOnAccessRequest: "topXUsersOnAccessRequest",
      lastXScansWithDetectionsRequest: "lastXScansWithDetectionsRequest",
      scannedFilesByMethodAggregationRequest: "scannedFilesByMethodAggregationRequest",
      systemStatsAggregationRequest: "systemStatsAggregationRequest",
      socketCleanupListRequest: "socketCleanupListRequest",
      logMessageRequest: "logMessageRequest",
      setLastGuiUsage: "setLastGuiUsage",
      checkEula: "checkEula",
      eulaNotification: "eulaNotification",
      changePasswordRequest: "changePasswordRequest"
    };
    const messageSubtypes = {
      sessionExpired: "session-expired",
      remoteLogout: "remote-logout",
      missingToken: "missing-token",
      tokenVerificationError: "token-verification-error",
      missingSession: "missing-session",
      passwordChanged: "password-changed"
    };
    const updateStart = () => {
      socketio.socketioEmit(messages.doUpdateStart);
      return {
        type: UPDATE_ACTION_KEYS.UPDATE_START
      };
    };
    const updateEnd = () => ({
      type: UPDATE_ACTION_KEYS.UPDATE_END
    });
    const updateRollback = (interval) => {
      socketio.socketioEmit(messages.updateRollback, { time_interval: interval });
      return {
        type: UPDATE_ACTION_KEYS.UPDATE_ROLLBACK
      };
    };
    const updateRollbackResult = (response) => ({
      type: UPDATE_ACTION_KEYS.UPDATE_ROLLBACK_RESULT,
      value: response.error && response.errorCode ? response.errorCode.toString(10) : ""
    });
    const resetRollbackError = () => ({
      type: UPDATE_ACTION_KEYS.UPDATE_RESET_ROLLBACK_ERROR
    });
    const updateResume = () => {
      socketio.socketioEmit(messages.updateResume);
      return {
        type: UPDATE_ACTION_KEYS.UPDATE_RESUME
      };
    };
    const updateResumeResult = (response) => ({
      type: UPDATE_ACTION_KEYS.UPDATE_RESUME_RESULT,
      value: response.error && response.errorCode ? response.errorCode.toString(10) : ""
    });
    const setUpdatedRuntime = (data2) => ({
      type: UPDATE_ACTION_KEYS.UPDATE_SET_RUNTIME,
      value: data2
    });
    const setUpdatedState = (data2) => ({
      type: UPDATE_ACTION_KEYS.UPDATE_SET_STATE,
      value: data2
    });
    const resetUpdateReducer = () => ({
      type: UPDATE_ACTION_KEYS.UPDATE_RESET_REDUCER
    });
    class RegisterCallbackContainer {
      constructor() {
        __publicField(this, "idGenerator");
        __publicField(this, "callbacks");
        __publicField(this, "get", (id2) => this.callbacks[id2]);
        __publicField(this, "delete", (id2) => {
          delete this.callbacks[id2];
        });
        this.idGenerator = 1;
        this.callbacks = {};
      }
      call(id2, callbackArgument, deleteAfter = true) {
        let callbackArguments = [callbackArgument];
        if (callbackArgument instanceof Array) {
          callbackArguments = callbackArgument;
        }
        if (this.callbacks[id2] instanceof Function) {
          this.callbacks[id2](...callbackArguments);
          if (deleteAfter) {
            delete this.callbacks[id2];
          }
        }
      }
      register(callback, prefix = "") {
        this.idGenerator += 1;
        while (this.callbacks[this.idGenerator]) {
          this.idGenerator += 1;
        }
        let id2 = this.idGenerator;
        if (prefix) {
          id2 = `${prefix}-${id2}`;
        }
        this.callbacks[id2] = callback;
        return id2;
      }
      registerWithId(callback, id2) {
        this.callbacks[id2] = callback;
        return id2;
      }
    }
    const IdText = ({ children, id: id2, dynamic = false, debug }) => {
      logGroup(
        "ErrorMessage",
        [
          ["id", id2],
          ["dynamic", dynamic]
        ],
        void 0,
        debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-content-id": dynamic ? `response-${id2}` : id2, children });
    };
    var CONTENT_KEYS = /* @__PURE__ */ ((CONTENT_KEYS2) => {
      CONTENT_KEYS2["MODULES_UPDATE"] = "MODULES_UPDATE";
      CONTENT_KEYS2["PRODUCT_UPDATE"] = "PRODUCT_UPDATE";
      CONTENT_KEYS2["LICENSE"] = "LICENSE";
      CONTENT_KEYS2["PROTECTION_STATUS"] = "PROTECTION_STATUS";
      return CONTENT_KEYS2;
    })(CONTENT_KEYS || {});
    const RIGHT_CONTENT_SETTINGS = {
      [
        "MODULES_UPDATE"
        /* MODULES_UPDATE */
      ]: {
        title: "IDUS_UPDATE_MODULES",
        link: routes$1.overviewModules
      },
      [
        "PRODUCT_UPDATE"
        /* PRODUCT_UPDATE */
      ]: {
        title: "IDUS_PCU",
        link: routes$1.overviewPcu
      },
      [
        "LICENSE"
        /* LICENSE */
      ]: {
        title: "IDUS_LICTAB_COLUMN_LICENSE",
        link: routes$1.overviewLicense
      },
      [
        "PROTECTION_STATUS"
        /* PROTECTION_STATUS */
      ]: {
        title: "IDUS_TILE_TITLE_OTHER_SERVICES",
        link: routes$1.overviewProtection
      },
      ...WatchdogContentSettings
    };
    const ALL_CONTENT_KEYS = {
      ...CONTENT_KEYS,
      ...WatchdogContentKeys
    };
    const getRightContentByUrl = (url) => Object.keys(ALL_CONTENT_KEYS).find((key) => RIGHT_CONTENT_SETTINGS[key].link === url);
    const combineContentSettings = (settings) => {
      const combined = { ...settings };
      Object.keys(settings).forEach((key) => {
        const contentSettings = RIGHT_CONTENT_SETTINGS[key];
        if (contentSettings) {
          combined[key] = { key, ...combined[key], ...contentSettings };
        }
      });
      return combined;
    };
    const idToast = (content2, id2, contentId, dynamic = false, type = "success", options = {}) => default_1$d[type](
      contentId ? /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: contentId, dynamic, children: content2 }) : content2,
      { ...options, toastId: id2 }
    );
    const copyContextAction = (t2, id2, titleKey, value, toastId, isMultiple = false) => ({
      title: t2(titleKey),
      id: id2,
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$e, {}),
      disabled: isMultiple || !value,
      callback: () => {
        copy(value);
        idToast(t2("IDUS_COPIED_TO_CLIPBOARD"), toastId, "IDUS_COPIED_TO_CLIPBOARD");
      }
    });
    const callbacks$6 = new RegisterCallbackContainer();
    const setProfiles = (data2) => ({
      type: SCANS_ACTION_KEYS.SCANS_SET_PROFILES,
      value: data2
    });
    const resetScansReducer = () => ({
      type: SCANS_ACTION_KEYS.SCANS_RESET_REDUCER
    });
    const setRunningScans = (scans) => ({
      type: SCANS_ACTION_KEYS.SCANS_SET_RUNNING_SCANS,
      value: scans
    });
    const resetScanError = () => ({
      type: SCANS_ACTION_KEYS.SCANS_RESET_ERROR
    });
    const scanActionCallbackResponse = (result) => {
      callbacks$6.call(result.callbackId, result);
      return { type: SCANS_ACTION_KEYS.SCANS_REMOVE_CALLBACK_ID, value: result.callbackId };
    };
    const startODScan = (data2, t2, onSuccessCallback, globalError = false) => (dispatch, getState) => {
      const responseHandler = ({ error, req_id }) => {
        if (error) {
          dispatch({
            type: SCANS_ACTION_KEYS.SCANS_SET_ERROR,
            value: { activity: ErrorType.NEW_SCAN, error }
          });
        } else {
          const requestId = longToString(req_id);
          dispatch({ type: SCANS_ACTION_KEYS.SCANS_SET_STARTING_SCAN, value: { [requestId]: true } });
          setTimeout(() => {
            if (getState().scans.startingScans[requestId]) {
              if (onSuccessCallback) {
                onSuccessCallback();
              } else if (onSuccessCallback !== null) {
                idToast(t2("IDUS_NEW_SCAN_SUCCESSFUL"), "toast-scan-action", "IDUS_NEW_SCAN_SUCCESSFUL");
              }
              dispatch(resetScanError());
            }
          }, 1e3);
        }
      };
      const callbackId = callbacks$6.register(responseHandler, messages.startODScan);
      dispatch({ type: SCANS_ACTION_KEYS.SCANS_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.startODScan, { ...data2, callbackId });
      dispatch({ type: SCANS_ACTION_KEYS.SCANS_STARTING_SCAN, value: globalError });
    };
    const startODScanResult = ({ error, req_id }) => (dispatch) => {
      if (error) {
        const requestId = longToString(req_id);
        dispatch({ type: SCANS_ACTION_KEYS.SCANS_SET_STARTING_SCAN, value: { [requestId]: false } });
        dispatch({ type: SCANS_ACTION_KEYS.SCANS_SET_ERROR, value: { activity: ErrorType.NEW_SCAN, error } });
      }
    };
    const scanAction = (startingAction, socketEvent, activity) => (id2) => (dispatch) => {
      const responseHandler = ({ error }) => {
        if (error) {
          dispatch({ type: SCANS_ACTION_KEYS.SCANS_SET_ERROR, value: { activity, error } });
        } else {
          dispatch(resetScanError());
        }
      };
      const callbackId = callbacks$6.register(responseHandler, socketEvent);
      dispatch({ type: SCANS_ACTION_KEYS.SCANS_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(socketEvent, { session_id: id2, callbackId });
      dispatch({ type: startingAction, value: true });
    };
    const pauseODScan = scanAction(SCANS_ACTION_KEYS.SCANS_PAUSING_SCAN, messages.pauseODScan, ErrorType.PAUSE);
    const resumeODScan = scanAction(SCANS_ACTION_KEYS.SCANS_RESUMING_SCAN, messages.resumeODScan, ErrorType.RESUME);
    const stopODScan = scanAction(SCANS_ACTION_KEYS.SCANS_STOPPING_SCAN, messages.stopODScan, ErrorType.STOP);
    const showModal = (type, message, children, buttons, onClose, isTranslationKey = false) => ({
      type: NOTIFICATIONS_ACTION_KEYS.NOTIFICATIONS_ADD_MODAL,
      value: {
        type,
        message,
        children,
        buttons,
        onClose,
        isTranslationKey
      }
    });
    const showNextModal = () => ({
      type: NOTIFICATIONS_ACTION_KEYS.NOTIFICATIONS_CLOSE_CURRENT_MODAL
    });
    const callbacks$5 = new RegisterCallbackContainer();
    const cfgCallbackResponse = (result) => () => {
      callbacks$5.call(result.callbackId, result);
    };
    const defaultCfgResponseHandling = (errorMsg, dispatch, successCallback, errorCallback) => (data2) => {
      if (data2.error) {
        if (errorCallback) {
          errorCallback(data2);
        } else if (errorCallback !== null) {
          dispatch(showModal("error", "IDUS_CONFIG_CHANGE_ERROR_TITLE", sprintf(errorMsg, data2.errorMsg)));
        }
      } else if (successCallback) {
        successCallback(data2);
      }
    };
    const cfgSetValues = (values, errorMsg = "", successCallback, errorCallback) => (dispatch, getState) => {
      const responseHandler = defaultCfgResponseHandling(errorMsg, dispatch, successCallback, errorCallback);
      const callbackId = callbacks$5.register(responseHandler, messages.cfgSetValuesRequest);
      socketio.socketioEmit(messages.cfgSetValuesRequest, {
        lang: getState().language.winid,
        values,
        callbackId
      });
    };
    const cfgResetToDefault = (paths, errorMsg = "", successCallback) => (dispatch, getState) => {
      const responseHandler = defaultCfgResponseHandling(errorMsg, dispatch, successCallback);
      const callbackId = callbacks$5.register(responseHandler, messages.cfgResetToDefaultRequest);
      socketio.socketioEmit(messages.cfgResetToDefaultRequest, {
        lang: getState().language.winid,
        paths,
        callbackId
      });
    };
    const cfgAddToArray = (path, values, errorMsg, successCallback, errorCallback) => (dispatch, getState) => {
      const responseHandler = defaultCfgResponseHandling(errorMsg, dispatch, successCallback, errorCallback);
      const callbackId = callbacks$5.register(responseHandler, messages.cfgAddToArrayRequest);
      socketio.socketioEmit(messages.cfgAddToArrayRequest, {
        lang: getState().language.winid,
        path,
        values,
        callbackId
      });
    };
    const cfgRegisterCallbackResponse = (data2) => (dispatch) => {
      if (data2.error) {
        switch (data2.errorCode) {
          case PerseusErrors.PERSEUS_E_RESOURCE_ALLOC: {
            log(
              ["Limit for parallel connections reached at backend. Code: ", data2.errorCode],
              LogLevel.ERROR,
              LogEnv.DEVELOPMENT
            );
            dispatch(toggleConnectionLimit("conf"));
            break;
          }
          default: {
            log(["Config callback registration error code: ", data2.errorCode], LogLevel.ERROR, LogEnv.DEVELOPMENT);
            const { title, text, buttons, isTranslationKey } = ERROR_MODAL_MAPPING[Error$1.CONFIG_ERROR];
            dispatch(
              showModal(
                "error",
                title,
                text,
                buttons.map((buttonDef) => ({
                  ...buttonDef,
                  id: `register-callback-fail-${buttonDef.id}`,
                  onClick: buttonDef.onClick ? () => {
                    buttonDef.onClick();
                    dispatch(showNextModal());
                  } : () => dispatch(showNextModal())
                })),
                void 0,
                isTranslationKey
              )
            );
          }
        }
      }
    };
    const cfgGetEnums = (pathsMapping, winid) => (dispatch) => {
      const responseHandler = (data2) => {
        if (data2.error) {
          log(["Could not load enums: ", data2.errorCode], LogLevel.ERROR, LogEnv.DEVELOPMENT);
        } else {
          let result = {};
          Object.entries(data2.result).forEach(([path, value]) => {
            result = { ...result, [pathsMapping[path]]: value };
          });
          dispatch({
            type: CFG_ACTION_KEYS.CFG_SET_ENUMS,
            value: result
          });
        }
      };
      const callbackId = callbacks$5.register(responseHandler, messages.cfgGetEnumsRequest);
      socketio.socketioEmit(messages.cfgGetEnumsRequest, {
        lang: winid,
        paths: Object.keys(pathsMapping),
        callbackId
      });
    };
    const cfgGetFlagsWithCallback = (path, callback) => () => {
      const responseHandler = (data2) => {
        if (data2.error) {
          log(["Could not load CE field locks: ", data2.errorCode], LogLevel.ERROR, LogEnv.DEVELOPMENT);
          callback(false);
        } else {
          callback(!!data2.result[path].set_by_era_flag);
        }
      };
      const callbackId = callbacks$5.register(responseHandler, messages.cfgValueFlagsGetRequest);
      socketio.socketioEmit(messages.cfgValueFlagsGetRequest, {
        paths: [path],
        callbackId
      });
    };
    const setAllProtectionStatuses = (statuses) => {
      const filtredStatuses = arrayToObject(
        Object.entries(statuses).filter((status) => status[1].Active).map(([name, status]) => ({
          [name]: {
            Severity: status.Severity,
            Problem: status.Problem,
            MuteInGui: status.MuteInGui,
            set_by_era_flag: status.blockedByEra,
            fullEraState: status.fullEraState
          }
        }))
      );
      return {
        type: PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_SET,
        value: filtredStatuses
      };
    };
    const muteInGui = (statusID, muteFlag, errorMsg) => (dispatch, getState) => {
      cfgSetValues(
        { [`Settings.ProtectionStatus.${statusID}.MuteInGui`]: muteFlag },
        errorMsg,
        () => dispatch({
          type: PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_MUTE,
          value: {
            ID: statusID,
            MuteInGui: muteFlag
          }
        })
      )(dispatch, getState);
    };
    const setCustomStatusGroup = (groupId, status, text) => ({
      type: PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_SET_CUSTOM_STATUS_GROUP,
      value: { groupId, status, text }
    });
    const resetProtectionStatusReducer = () => ({
      type: PROTECTION_STATUS_ACTION_KEYS.PROTECTION_STATUS_RESET_REDUCER
    });
    const pcuAutoupdatesFlag = (value) => ({
      type: PCU_ACTION_KEYS.PCU_SET_AUTOUPDATES_FLAG,
      value
    });
    const EULA_FIELDS = ["EulaStatus", "EulaUrl", "EulaVersion", "EulaTag", "EulaNotify"];
    const pcuUpdateState = (value) => (dispatch, getState) => {
      const eulaFields = pick(value.AvailableAppUpdate ?? {}, EULA_FIELDS);
      const pcuFields = omit(value.AvailableAppUpdate ?? {}, EULA_FIELDS);
      const checkTimes = omit(value, ["AvailableAppUpdate"]);
      const oldPcu = getState().pcu;
      if (!isDeepEqual(oldPcu.state, checkTimes)) {
        dispatch({
          type: PCU_ACTION_KEYS.PCU_UPDATE_STATE,
          value: checkTimes
        });
      }
      if (!isDeepEqual(oldPcu.AvailableAppUpdate, pcuFields)) {
        dispatch({
          type: PCU_ACTION_KEYS.PCU_UPDATE_APP,
          value: Object.keys(pcuFields).length === 0 ? null : pcuFields
        });
      }
      if (!isDeepEqual(oldPcu.AvailableEulaUpdate, eulaFields)) {
        dispatch({
          type: PCU_ACTION_KEYS.PCU_UPDATE_EULA,
          value: Object.keys(eulaFields).length === 0 ? null : eulaFields
        });
      }
    };
    const resetPcuError = () => ({
      type: PCU_ACTION_KEYS.PCU_RESET_ACTION_ERROR
    });
    const checkForPcuUpdate = () => {
      socketio.socketioEmit(messages.pcuUpdateCheck, {});
      return {
        type: PCU_ACTION_KEYS.PCU_CHECK_FOR_UPDATE
      };
    };
    const pcuUpdateCheckResponse = (response) => ({
      type: PCU_ACTION_KEYS.PCU_CHECK_FOR_UPDATE_RESPONSE,
      value: response.error && response.errorCode ? response.errorCode.toString(10) : ""
    });
    const pcuTriggerUpdate = (eulaVersion, eulaTag) => {
      const eula = eulaVersion && eulaTag ? { accepted_eula: { eula_tag: eulaTag, eula_version: eulaVersion } } : {};
      socketio.socketioEmit(messages.pcuTriggerUpdate, eula);
      return {
        type: PCU_ACTION_KEYS.PCU_TRIGGER_UPDATE
      };
    };
    const pcuTriggerUpdateResponse = (response) => ({
      type: PCU_ACTION_KEYS.PCU_TRIGGER_UPDATE_RESPONSE,
      value: response.error && response.errorCode ? response.errorCode.toString(10) : ""
    });
    const pcuConfirmUpdate = (eulaVersion, eulaTag) => {
      socketio.socketioEmit(messages.pcuConfirmUpdate, {
        accepted_eula: { eula_tag: eulaTag, eula_version: eulaVersion }
      });
      return {
        type: PCU_ACTION_KEYS.PCU_CONFIRM_UPDATE
      };
    };
    const pcuConfirmUpdateResponse = (response, t2) => (dispatch) => {
      if (!response.error) {
        idToast(t2("IDUS_PCU_UPDATE_SCHEDULED"), "toast-pcu-submit", "IDUS_PCU_UPDATE_SCHEDULED");
      }
      dispatch({
        type: PCU_ACTION_KEYS.PCU_CONFIRM_UPDATE_RESPONSE,
        value: response.errorCode ? response.errorCode.toString(10) : ""
      });
    };
    const resetPcuReducer = () => ({
      type: PCU_ACTION_KEYS.PCU_RESET_REDUCER
    });
    const updateRunningActions = (flag) => ({
      type: PCU_ACTION_KEYS.PCU_SET_BACKEND_RUNNING_FLAG,
      value: flag
    });
    const notifyAboutEula = (eulaTag, eulaVersion, accepted = true) => () => {
      socketio.socketioEmit(messages.eulaNotification, {
        eula: { eula_tag: eulaTag, eula_version: eulaVersion },
        accepted
      });
    };
    const resetReducersOnLogout = () => (dispatch) => {
      dispatch(resetUpdateReducer());
      dispatch(resetScansReducer());
      dispatch(resetProtectionStatusReducer());
      dispatch(resetPcuReducer());
      dispatch(resetLayoutReducer());
    };
    const invalidateToken = () => {
      unsetAuth();
      return { type: AUTH_ACTION_KEYS.AUTH_LOGOUT };
    };
    const logoutAction = () => (dispatch) => {
      socketio.socketioEmit(messages.logout, {});
      dispatch(invalidateToken());
      resetReducersOnLogout()(dispatch);
      socketio.disconnectSocketIO();
      resetSocketTransportInfo();
    };
    const logoutConnectionLostHandler = (error) => () => (dispatch, getState) => {
      const currentError = getState().auth.error;
      unsetAuth();
      dispatch({
        type: AUTH_ACTION_KEYS.AUTH_LOGOUT_TRIGGERED,
        value: currentError ?? error
      });
      resetReducersOnLogout()(dispatch);
    };
    const triggeredLogoutWithReason = (type) => (dispatch, getState) => {
      log(["SocketIO Auth Error:", type], LogLevel.ERROR, LogEnv.DEVELOPMENT);
      let logoutMsg = getState().auth.error;
      if (!logoutMsg) {
        switch (type) {
          case messageSubtypes.sessionExpired:
          case messageSubtypes.missingSession:
          case messageSubtypes.missingToken:
          case messageSubtypes.tokenVerificationError: {
            log(["Session was invalid"], LogLevel.WARNING, LogEnv.PRODUCTION);
            break;
          }
          case messageSubtypes.remoteLogout: {
            logoutMsg = ErrorType$1.auth.remoteLogout;
            break;
          }
          case messageSubtypes.passwordChanged: {
            logoutMsg = ErrorType$1.auth.passwordChange;
            break;
          }
          default:
            logoutMsg = ErrorType$1.auth.connectionLost;
        }
      }
      dispatch({
        type: AUTH_ACTION_KEYS.AUTH_LOGOUT_SET_ERROR,
        value: logoutMsg
      });
      history.push(routes$1.logout, { from: history.location });
    };
    const blockLogout = (value) => ({
      type: AUTH_ACTION_KEYS.AUTH_LOGOUT_BLOCKED,
      value
    });
    const updateLogoutError = (logoutMsg) => ({
      type: AUTH_ACTION_KEYS.AUTH_LOGOUT_SET_ERROR,
      value: logoutMsg
    });
    const updateSessionTime = (timeLeft) => ({
      type: AUTH_ACTION_KEYS.AUTH_SESSION_TIME,
      value: timeLeft
    });
    const URLS = {
      activation: "/activation",
      login: "/login",
      version: "/version",
      config: "/config",
      tokenValidation: "/auth/token",
      quarantineDownload: "/quarantine/download/"
    };
    const downloadBlob = (blob, fileName) => {
      const blobUrl = URL.createObjectURL(new Blob([blob]));
      const link = document.createElement("a");
      link.href = blobUrl;
      link.setAttribute("class", "hidden");
      link.setAttribute("download", fileName);
      document.body.appendChild(link);
      link.click();
      const parent = link.parentNode;
      parent.removeChild(link);
    };
    const downloadZip = async (fileDefs, fileName) => {
      const zip = new JSZip();
      fileDefs.forEach((def) => {
        zip.file(def.name, def.content);
      });
      const content2 = await zip.generateAsync({ type: "blob" });
      downloadBlob(content2, fileName);
    };
    const callbacks$4 = new RegisterCallbackContainer();
    const authCallbackResponse = (result) => () => {
      callbacks$4.call(result.callbackId, result);
    };
    const fetchJsonRpc = async (url, method, params, headers = {}) => {
      const response = await fetch(url, {
        method: "POST",
        headers: {
          Accept: "application/json",
          "Content-Type": "application/json",
          ...headers
        },
        body: JSON.stringify({
          jsonrpc: "2.0",
          method,
          params
        })
      }).catch(() => {
        throw new Error(ErrorType$1.auth.connectionWithProduct);
      });
      return response.ok ? response.json() : null;
    };
    const checkVersion = async () => {
      try {
        const response = await fetch(getUrl(URLS.version), {
          method: "GET",
          headers: {
            "Content-Type": "application/json"
          }
        });
        const beVersion = response.ok ? (await response.json()).version : null;
        const feVersion = pkgid.version;
        return beVersion === null ? null : beVersion.join(",") === feVersion.join(",");
      } catch (e) {
        log(["Cannot connect to the webserver."], LogLevel.ERROR, LogEnv.PRODUCTION);
        return null;
      }
    };
    const reloadOnVersionMisalign = async () => {
      const aligned = await checkVersion();
      if (aligned === false) {
        window.location.reload();
      }
    };
    const getChallengeId = async () => {
      const jsonRpc = await fetchJsonRpc(getUrl(URLS.login), "challenge", {});
      return jsonRpc.result.challengeId;
    };
    const loginStart = () => ({
      type: AUTH_ACTION_KEYS.AUTH_LOGIN_START
    });
    const loginFailed = (error) => ({
      type: AUTH_ACTION_KEYS.AUTH_LOGIN_FAILED,
      value: error
    });
    const loginOK = (username) => ({
      type: AUTH_ACTION_KEYS.AUTH_LOGIN_OK,
      value: username
    });
    const setUsername = (username) => ({
      type: AUTH_ACTION_KEYS.AUTH_SET_USERNAME,
      value: username
    });
    const setIsFreshLogin = (value) => ({
      type: AUTH_ACTION_KEYS.AUTH_SET_IS_FRESH_LOGIN,
      value
    });
    const sendLastGUIUsage = () => {
      socketio.socketioEmit(messages.setLastGuiUsage, { update_gui_usage_time: true });
      return setIsFreshLogin(false);
    };
    const loginAction = (message) => async (dispatch, getState) => {
      try {
        const challengeId = await getChallengeId();
        dispatch(loginStart());
        const response = await fetchJsonRpc(getUrl(URLS.login), "login", {
          challengeId,
          message
        });
        if (!response || response.error) {
          dispatch(loginFailed(ErrorType$1.auth.usernameOrPassword));
        } else {
          const { username } = message.auth_challenge_response.simple;
          setLastLogin(username, getCurrentTime());
          if (!getState().auth.isLogged) {
            resetSocketTransportInfo();
            saveAuth(response.result.token, username);
            dispatch(setIsFreshLogin(true));
          }
          dispatch(loginOK(username));
        }
      } catch (error) {
        dispatch(loginFailed(error.message));
      }
    };
    const setPasswordChangeStatus = (running, error = "") => ({
      type: AUTH_ACTION_KEYS.AUTH_CHANGE_PASS_PROGRESS,
      value: {
        error,
        running
      }
    });
    const changePasswordAction = (username, password, newPassword, confirmPassword) => (dispatch, getState) => {
      const responseHandler = (data2) => {
        if (data2.error) {
          log(["Could not change password: ", data2.errorMsg], LogLevel.ERROR, LogEnv.DEVELOPMENT);
          dispatch(setPasswordChangeStatus(false, data2.errorType));
        }
      };
      const callbackId = callbacks$4.register(responseHandler, messages.changePasswordRequest);
      socketio.socketioEmit(messages.changePasswordRequest, {
        password,
        username,
        newPassword,
        confirmPassword,
        lang: getState().language.winid,
        callbackId
      });
      dispatch(setPasswordChangeStatus(true));
    };
    const checkToken = (finallyCallback, successCallback) => async (dispatch) => {
      try {
        const response = await fetchJsonRpc(
          getUrl(URLS.tokenValidation),
          void 0,
          {},
          { Authorization: `Bearer ${getAuth()}` }
        );
        if (!response || response.error) {
          dispatch(invalidateToken());
        } else {
          successCallback();
          dispatch({ type: AUTH_ACTION_KEYS.AUTH_LOGIN_TOKEN_OK });
        }
      } catch (error) {
        dispatch(invalidateToken());
      } finally {
        finallyCallback();
      }
    };
    const setLoggedIn = (flag) => ({
      type: AUTH_ACTION_KEYS.AUTH_IS_LOGGED,
      value: flag
    });
    const KEYS = {
      TOKEN: "token",
      USER: "username",
      TRANSFER: "transferAuth",
      CHECK: "checkAuth"
    };
    const sendToken = (token, username) => {
      localStorage.setItem(KEYS.TRANSFER, JSON.stringify({ token, username }));
      localStorage.removeItem(KEYS.TRANSFER);
    };
    const saveAuth = (token, username) => {
      sessionStorage.setItem(KEYS.TOKEN, token);
      sessionStorage.setItem(KEYS.USER, username);
      sendToken(token, username);
    };
    const getAuth = () => sessionStorage.getItem(KEYS.TOKEN);
    const getUser = () => sessionStorage.getItem(KEYS.USER);
    const requestSync = () => {
      localStorage.setItem(KEYS.CHECK, Date.now().toString());
    };
    const unsetAuth = () => {
      sessionStorage.removeItem(KEYS.TOKEN);
      sessionStorage.removeItem(KEYS.USER);
      store.dispatch(setLoggedIn(false));
    };
    const storageHandler = (event) => {
      if (event.key === KEYS.CHECK) {
        sendToken(getAuth() ?? "", getUser() ?? "");
      } else if (event.key === KEYS.TRANSFER && event.newValue !== null) {
        try {
          const { token, username } = JSON.parse(event.newValue);
          const isEmpty = token === "" || username === "";
          if (!isEmpty) {
            sessionStorage.setItem(KEYS.TOKEN, token);
            sessionStorage.setItem(KEYS.USER, username);
            store.dispatch(loginOK(username));
          } else {
            unsetAuth();
          }
        } catch (e) {
          unsetAuth();
        }
      }
    };
    window.addEventListener("storage", storageHandler);
    const getDefaultIOUrl = () => {
      const url = window.location.href;
      const arr = url.split("/");
      return `${arr[0]}//${arr[2]}`;
    };
    class SocketConnection {
      constructor() {
        __publicField(this, "socket", null);
        __publicField(this, "socketioEmit", (eventName, data2 = {}) => {
          if (this.socket) {
            this.socket.emit(eventName, data2, getAuth());
          } else {
            log(
              ["SocketIO Error: Tried to emit event to nonexistant socket", eventName],
              LogLevel.WARNING,
              LogEnv.DEVELOPMENT
            );
          }
        });
        __publicField(this, "disconnectSocketIO", () => {
          if (this.socket) {
            const s = this.socket;
            s.destroy();
          }
          this.socket = null;
        });
        __publicField(this, "createSocketIO", () => {
          const ADDRESS = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_ADDRESS;
          const PORT = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_PORT;
          const NOT_SECURE = { "CMAKE_BUILD_TOOL": "/usr/bin/make", "JENKINS_HOME": "/mnt/builds/jenkins", "MAIL": "/var/mail/jenkins", "USER": "jenkins", "LANGUAGE": "en_US:en", "SSH_CLIENT": "10.1.162.93 56400 22", "npm_config_user_agent": "npm/8.19.3 node/v18.13.0 linux x64 workspaces/false ci/jenkins", "CI": "true", "XDG_SESSION_TYPE": "tty", "BRANCH": "version/EFSU/10.3", "RUN_CHANGES_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=changes", "npm_node_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "TEMPDIR": "/tmp/user/1000", "HUDSON_URL": "https://jarvis.hq.eset.com/", "NODE_LABELS": "efsu-debian-10 ba-linux-apps-build01", "SHLVL": "0", "npm_config_noproxy": "", "HOME": "/home/jenkins", "OLDPWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build", "BUILD_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/", "APPVERSION_LOCALIZATION": "0", "npm_package_json": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/package.json", "ROOT_BUILD_CAUSE_MANUALTRIGGER": "true", "JENKINS_SERVER_COOKIE": "ccecb3c1f67a55df", "HUDSON_COOKIE": "92a5516d-ec2b-49d6-97c3-8a165f960928", "npm_config_userconfig": "/home/jenkins/.npmrc", "npm_config_local_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "APPVERSION_FULL_NEW": "10.3.5.0", "MAKEFLAGS": "s -j8 --jobserver-auth=3,4", "VITE_DEBUG_LOGS": "false", "WORKSPACE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10", "COLOR": "0", "npm_config_metrics_registry": "https://npm.hq.eset.com/", "ESET_GIT_REPOSITORY": "ssh://git/LinuxProtection/Server.git", "TMPDIR": "/tmp/user/1000", "LOGNAME": "jenkins", "NODE_NAME": "ba-linux-apps-build01", "_": "/usr/bin/java", "RUN_ARTIFACTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=artifacts", "APPVERSION_BUILD": "5", "TEMP": "/tmp/user/1000", "BUILD_CAUSE": "MANUALTRIGGER", "npm_config_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "XDG_SESSION_CLASS": "user", "EXECUTOR_NUMBER": "0", "npm_config_registry": "https://npm.hq.eset.com/", "XDG_SESSION_ID": "15852", "npm_config_cache": "/home/jenkins/.npm", "BUILD_DISPLAY_NAME": "#3", "RUN_TESTS_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect?page=tests", "HUDSON_HOME": "/mnt/builds/jenkins", "JOB_BASE_NAME": "EFS_LINUX_RELEASE_DEBIAN10", "ESET_TOPDIR": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Products/UnixProtection/Server/WebDaemon/Frontend/products/efs/../../../../../../../", "npm_config_node_gyp": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/node_modules/.bin:/home/jenkins/workspace/EFS/node_modules/.bin:/home/jenkins/workspace/node_modules/.bin:/home/jenkins/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/jenkins/client-cmds:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin", "NODE": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/bin/node", "npm_package_name": "unixprotection-frontend", "ESET_GIT_COMMIT": "e97149a57c4676b06fcd74fcc05211bebc26efd7", "XDG_RUNTIME_DIR": "/run/user/1000", "BUILD_ID": "3", "MAKELEVEL": "4", "BUILD_TAG": "jenkins-EFS-EFS_LINUX_RELEASE_DEBIAN10-3", "JENKINS_URL": "https://jarvis.hq.eset.com/", "LANG": "en_US.UTF-8", "TMP": "/tmp/user/1000", "APPVERSION_MAJOR": "10", "JOB_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/", "npm_lifecycle_script": "tsc -p tsconfig.prod.json && vite build", "BUILD_NUMBER": "3", "npm_config_ca": "-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQNqYIMuTu9oZO7745KlBvzjANBgkqhkiG9w0BAQsFADBW\nMRMwEQYKCZImiZPyLGQBGRYDY29tMRQwEgYKCZImiZPyLGQBGRYEZXNldDESMBAG\nCgmSJomT8ixkARkWAmhxMRUwEwYDVQQDEwxFU0VUIFJvb3QgQ0EwHhcNMTUwNDE0\nMTIxOTM5WhcNMjUwNDE0MTIyOTM5WjBWMRMwEQYKCZImiZPyLGQBGRYDY29tMRQw\nEgYKCZImiZPyLGQBGRYEZXNldDESMBAGCgmSJomT8ixkARkWAmhxMRUwEwYDVQQD\nEwxFU0VUIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA\nQszcT69I24JmfIkK9HZYnIioBCfGVXq02KKF/XaxZ2DZfdQ6UpFKsR8JBC3HEGYk\nwiJkhj9h3awsLRQiJyUhwh+0TujwUQ4w+E0n/FtCiO1SxM/nTKLIu8Mgu7eDvZz3\nZ7+wPrVZDZrjwLKhqoEEiYKci/wLdDWD9acSF/k1jHMy8xNhtuDrAUeb7vlSpovk\nW30oMxRx9OHGmwYAUAjmBGb/nmnD1CgbM83+dRHMVHHbbXqZz/zfBT4wSK3/O06j\nX67Je+X26VXvgbgP5Gv2cfFZAQBnhh24FZaJmK+8SwUxFs4ekgUb4JZDpvl3Nc/r\nWnqxchR2A7DZq2adoRJtAgMBAAGjgY4wgYswEwYJKwYBBAGCNxQCBAYeBABDAEEw\nCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOYUKQ5uQ7OG\n6bBhOd7eolJ0yQsAMBIGCSsGAQQBgjcVAQQFAgMDAAMwIwYJKwYBBAGCNxUCBBYE\nFP/eDZI1RJgoCdOM1AE8hh9EAcO0MA0GCSqGSIb3DQEBCwUAA4IBAQB5Uvj6gDLy\nfiyZlOmJf+l90miVZIKCTkPalI+RlwLPftMaYbuxVyu1A2LtfHLoL7B8TXeOiK7U\nGoi53SqTqDI7n6KH3oudWIdnpdOaedHDqI/su0p0cPZKPApBIDhY2iDy69OAjjrh\ntBoECEdX1ZxNzfiVYStKpWN6TLKCpzesUA9YMJFBBq12wW7n+C0SzJAriQXbxZ4x\nFeQ4lNEq8ES1RpwI6A6FZGHy9/Qc3gRxTEUspZcYBSqOktridbG//lNhEqCw6OaK\nB0ISEYWn4hPTV7kb+IItfVPqzwpq/I3ERB2NiyVUwkMsnLsqmYPvASvTWfu2CZJ8\nBUKYy/8YUvj5\n-----END CERTIFICATE-----", "SHELL": "/bin/bash", "npm_package_version": "1.0.0", "npm_lifecycle_event": "build", "ROOT_BUILD_CAUSE": "MANUALTRIGGER", "RUN_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/3/display/redirect", "HUDSON_SERVER_COOKIE": "ccecb3c1f67a55df", "GEM_HOME": "/usr/local", "JOB_DISPLAY_URL": "https://jarvis.hq.eset.com/job/EFS/job/EFS_LINUX_RELEASE_DEBIAN10/display/redirect", "PRODUCT": "efs", "JOB_NAME": "EFS/EFS_LINUX_RELEASE_DEBIAN10", "npm_config_globalconfig": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui/etc/npmrc", "npm_config_init_module": "/home/jenkins/.npm-init.js", "PWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_execpath": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/src/Build/Env/Linux-x64/node/lib/node_modules/npm/bin/npm-cli.js", "SSH_CONNECTION": "10.1.162.93 56400 10.1.162.14 22", "ESET_GIT_BRANCH": "version/EFSU/10.3", "npm_config_global_prefix": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build/Gui", "npm_command": "run-script", "TZ": ":/etc/localtime", "WORKSPACE_TMP": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10@tmp", "MFLAGS": "-s -j8 --jobserver-auth=3,4", "BUILD_CAUSE_MANUALTRIGGER": "true", "UPDSERVER": "serverlinux-build", "APPVERSION_MINOR": "3", "INIT_CWD": "/home/jenkins/workspace/EFS/EFS_LINUX_RELEASE_DEBIAN10/build/efs/frontend_build", "EDITOR": "vi", "NODE_ENV": "production" }.VITE_SOCKETIO_FORCE_HTTP ?? false;
          let url = getDefaultIOUrl();
          const options = {
            reconnectionAttempts: Infinity,
            reconnectionDelay: 1e3,
            reconnectionDelayMax: 5e3,
            autoConnect: true,
            closeOnBeforeunload: true,
            transportOptions: {
              polling: {
                extraHeaders: { Authorization: `Bearer ${getAuth()}` }
              }
            }
          };
          if (ADDRESS && PORT) {
            let protocol = "https://";
            if (NOT_SECURE) {
              protocol = "http://";
            }
            url = `${protocol}${ADDRESS}:${PORT}`;
          }
          return lookup(url, options);
        });
        __publicField(this, "connectSocketIO", () => {
          this.socket = this.createSocketIO();
          this.socket.on("disconnect", () => {
            this.disconnectSocketIO();
          });
          this.socket.on("error", (error) => {
            log(["SocketIO Error:", error], LogLevel.ERROR, LogEnv.DEVELOPMENT);
          });
          this.socket.on("unauthorized", (type, error) => {
            log(["SocketIO Error:", type, error], LogLevel.ERROR, LogEnv.DEVELOPMENT);
          });
          this.socket.on("sessionChange", ({ token }) => {
            saveAuth(token, getUser() ?? "");
          });
          return this.socket;
        });
        addRefreshListener(() => {
          this.disconnectSocketIO();
        });
      }
    }
    const socketio = new SocketConnection();
    const setActivationState = (value) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_SET_STATE,
      value
    });
    const setLicenseInfo = (value) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_SET_LICENSE_INFO,
      value
    });
    const activationByKey = (value) => {
      socketio.socketioEmit(messages.activationByKey, value);
      return {
        type: ACTIVATION_ACTION_KEYS.ACTIVATION_BY_KEY
      };
    };
    const activationByFile = (value) => {
      socketio.socketioEmit(messages.activationByFile, value);
      return {
        type: ACTIVATION_ACTION_KEYS.ACTIVATION_BY_FILE
      };
    };
    const sendFormData = (lang, formData, callback) => async (dispatch) => {
      formData.append("jsonrpc", "2.0");
      await fetch(getUrl(URLS.activation), {
        method: "POST",
        headers: { Authorization: `Bearer ${getAuth()}` },
        body: formData
      }).then((response) => {
        if (response.ok) {
          return response;
        }
        throw Error(response.statusText);
      }).then((response) => response.json()).then((jsonRpc) => {
        if (!jsonRpc) {
          callback("Unknown error");
        } else if (jsonRpc.error) {
          callback(jsonRpc.error);
        } else {
          callback(null);
          dispatch(activationByFile({ lang, fd: jsonRpc.result.fd }));
        }
      }).catch((error) => {
        callback(error);
      });
    };
    const activationResult = (response) => (dispatch) => {
      if (response.error) {
        dispatch({
          type: ACTIVATION_ACTION_KEYS.ACTIVATION_RESULT_ERROR,
          value: {
            msg: response.errorMsg,
            code: response.errorCode
          }
        });
        dispatch({
          type: ACTIVATION_ACTION_KEYS.ACTIVATION_DISABLE_ERROR_MODAL,
          value: false
        });
      } else {
        const toastContent = response.code !== void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: response.code, dynamic: response.code !== void 0, children: response.msg }) : response.msg;
        idToast(toastContent, "toast-activation-result");
        dispatch({
          type: ACTIVATION_ACTION_KEYS.ACTIVATION_RESET_RESULT,
          value: response.code
        });
      }
    };
    const resetActivationResult = () => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_RESET_RESULT,
      value: -1
    });
    const disableErrorModal = (value = false) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_DISABLE_ERROR_MODAL,
      value
    });
    const activationAttrChallenge = (value) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_ATTR_CHALENGE,
      value
    });
    const activationAttrResponse = (values, cancel = false) => {
      socketio.socketioEmit(messages.activationAttrResponse, { values, cancel });
      return {
        type: ACTIVATION_ACTION_KEYS.ACTIVATION_ATTR_RESPONSE
      };
    };
    const businessAccountReset = () => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_RESET
    });
    const businessAccountLogin = (username, password) => (dispatch, getState) => {
      socketio.socketioEmit(messages.getLicensesRequest, { username, password, lang: getState().language.winid });
      dispatch({ type: ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_START_ACTION });
    };
    const businessAccountLicenses = (response) => (dispatch) => {
      if (response.error) {
        dispatch({
          type: ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_SET_ERROR,
          value: {
            msg: response.errorMsg,
            code: response.errorCode
          }
        });
      } else {
        dispatch({
          type: ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_ACCOUNT_SET_DATA,
          value: response.companies
        });
      }
    };
    const businessAccountActivation = (username, password, poolId, publicId) => (dispatch, getState) => {
      const request = {
        username,
        password,
        lang: getState().language.winid
      };
      if (poolId) {
        request.pool_id = poolId;
      }
      if (publicId) {
        request.public_id = publicId;
      }
      socketio.socketioEmit(messages.activationByBusinessAccountRequest, request);
      dispatch({ type: ACTIVATION_ACTION_KEYS.ACTIVATION_BY_BUSINESS_ACCOUNT });
    };
    const businessAccountSearch = (search) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_BUSINESS_SEARCH,
      value: search
    });
    const setActivationType = (value) => ({
      type: ACTIVATION_ACTION_KEYS.ACTIVATION_SET_ACTIVATION_TYPE,
      value
    });
    const callbacks$3 = new RegisterCallbackContainer();
    let serialNumber = Long.UZERO;
    const cfgRegisterCallback = (callbackDefinitions, winid) => {
      const paths = callbackDefinitions.map((data2) => data2.path);
      const id2 = callbacks$3.register(callbackDefinitions);
      socketio.socketioEmit(messages.registerCallback, { paths, cookie: id2, lang: winid });
      return id2;
    };
    const cfgUnregisterCallback = (cookie) => {
      const pathCallback = callbacks$3.get(cookie);
      let paths = [];
      if (pathCallback) {
        paths = pathCallback.map((p) => p.path);
        callbacks$3.delete(cookie);
      }
      socketio.socketioEmit(messages.unregisterCallback, { paths, cookie });
    };
    const resetCfgSerial = () => {
      serialNumber = Long.UZERO;
    };
    const cfgCallbackNotification = (data2) => {
      const newSerialNumber = Long.fromValue(data2.serial_number);
      if (data2.error) {
        log(["Invalid data arrived from configuration update:", data2.error], LogLevel.ERROR, LogEnv.PRODUCTION);
        return;
      }
      if (serialNumber.greaterThan(newSerialNumber)) {
        log(
          [
            "Config: Serial numbers mismatch, lower than latest serial returned. Provided vs. latest serial numbers:",
            newSerialNumber,
            serialNumber
          ],
          LogLevel.INFO,
          LogEnv.DEVELOPMENT
        );
        return;
      }
      serialNumber = newSerialNumber;
      const storedValues = callbacks$3.get(longToNumber(data2.cookie)) ?? [];
      Object.entries(data2.result).forEach(([path, value]) => {
        storedValues.filter((s) => s.path === path).forEach((s) => s.callback(value));
      });
    };
    const getCfgPaths = () => {
      const paths = [];
      Object.entries(KNOWN_PROTECTION_STATUSES).forEach((status) => {
        const statusPath = status[0];
        if (status[1].actions) {
          const actionsWithCfg = status[1].actions.filter((act) => act.cfg);
          actionsWithCfg.forEach((action) => {
            Object.entries(action.cfg).forEach(([cfgKey, value]) => {
              paths.push({ path: statusPath, cfg: cfgKey, value });
            });
          });
        }
      });
      return paths.filter((item) => item.cfg);
    };
    const cfgValueFlagsGetRequest = (paths) => {
      socketio.socketioEmit(messages.cfgValueFlagsGetRequest, { paths });
    };
    const cfgSettingsValueFlagsEra$ = new Subject();
    const cfgValueFlagsGetResponse = (response) => {
      if (!response.error) {
        cfgSettingsValueFlagsEra$.next(response.result);
      }
    };
    const setSampleData = (field, value) => ({
      type: SAMPLE_ACTION_KEYS.SAMPLE_SET_FIELD,
      value: {
        field,
        value
      }
    });
    const resetSampleData = () => ({
      type: SAMPLE_ACTION_KEYS.SAMPLE_RESET_DATA
    });
    const resetSampleDetails = (fields) => ({
      type: SAMPLE_ACTION_KEYS.SAMPLE_RESET_DETAILS,
      value: fields
    });
    const sendSample = (data2) => () => {
      const finalStructure = {
        extended_info: {
          reason: data2.type,
          email: data2.email,
          comment: []
        }
      };
      if (data2.id) {
        finalStructure.id = data2.id;
      } else {
        finalStructure.filename = b64EncodeUnicode(data2.filepath);
      }
      if (data2.siteProblem !== null) {
        finalStructure.extended_info.site_problem = data2.siteProblem;
      }
      const commentFields = ["symptoms", "origin", "notes", "appName", "appPurpose", "vendor", "reason"];
      commentFields.forEach((field) => {
        if (data2[field]) {
          finalStructure.extended_info.comment.push({
            id: FieldIdMap[field],
            text: data2[field]
          });
        }
      });
      socketio.socketioEmit(data2.id ? messages.quarantineSendSample : messages.sendSample, finalStructure);
    };
    const sendSampleResponse = (response) => (dispatch) => {
      if (response.error) {
        const errorMsg = getErrorMessageKey(response.error);
        if (response.error === Error$1.SAMPLE_FILEPATH_NOT_FOUND) {
          dispatch(setSampleData("errors", { filepath: errorMsg }));
          dispatch(setSampleData("step", SampleStep.TYPE));
        } else {
          dispatch(setSampleData("errors", { global: errorMsg }));
        }
      } else {
        dispatch(toggleSampleSubmission(false));
        idToast(instance.t("IDUS_SAMPLE_SENDING_SUCCESS"), "toast-sample-submit", "IDUS_SAMPLE_SENDING_SUCCESS");
      }
    };
    const setSampleSubmissionEnabledFlag = (value) => ({
      type: SAMPLE_ACTION_KEYS.SAMPLE_SET_ENABLED,
      value
    });
    const updateWatchdogViaServices = (data2) => (dispatch, getState) => {
      dispatch({
        type: WATCHDOG_ACTION_KEYS.WATCHDOG_UPDATE_SERVICES,
        value: {
          services: data2,
          statuses: getState().protectionStatus.statuses
        }
      });
    };
    const updateWatchdogViaProtectionStatuses = (data2) => ({
      type: WATCHDOG_ACTION_KEYS.WATCHDOG_UPDATE_PROTECTION_STATUSES,
      value: data2
    });
    const updateWatchdogIsEnabled = (flag) => ({
      type: WATCHDOG_ACTION_KEYS.WATCHDOG_IS_ENABLED,
      value: !!flag
    });
    class PureStateListener extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "registeredCallbacks");
        __publicField(this, "stateProtectionStatuses$", new Subject());
        __publicField(this, "settingsProtectionStatuses$", new Subject());
        __publicField(this, "cfgChanged$", new Subject());
        __publicField(this, "state", {
          cfgCurrentValues: {}
        });
        __publicField(this, "updateCustomProtectionStatus", (activatedProduct, isUpToDate, errorCode, autoupdatesFlag) => {
          const { t: t2 } = this.props;
          let status;
          let text;
          if (isUpToDate === null || autoupdatesFlag === null || activatedProduct === null) {
            status = PROTECTION_STATUS.UNKNOWN;
            text = "IDUS_STATUS_UNKNOWN";
          } else if (!activatedProduct) {
            status = PROTECTION_STATUS.RED;
            text = "IDUS_PCU_NOT_AVAILABLE";
          } else if (errorCode && PCU_CUSTOM_PROTECTION_STATUS_ERRORS.includes(errorCode)) {
            status = PROTECTION_STATUS.RED;
            text = "IDUS_PCU_UPDATE_FAILED";
          } else if (isUpToDate) {
            status = PROTECTION_STATUS.GREEN;
            text = "IDUS_PCU_UP_TO_DATE";
          } else {
            status = PROTECTION_STATUS.INFO;
            text = "IDUS_PCU_AVAILABLE";
          }
          this.props.setCustomStatusGroup("PCUpdate", status, t2(text));
        });
      }
      componentDidMount() {
        const cfgPaths = getCfgPaths();
        const paths = cfgPaths.map((item) => item.cfg).filter((path, i, a) => a.indexOf(path) === i);
        const setUpCfgRegister = cfgPaths.map((item) => ({
          path: item.cfg,
          callback: (newData) => this.cfgChanged$.next([item.cfg, newData])
        }));
        this.registeredCallbacks = cfgRegisterCallback(
          [
            {
              path: "State.Plugins.Licensed.LicenseInfo",
              callback: this.props.setLicenseInfo
            },
            {
              path: "State.Plugins.Licensed.LastActivationResult",
              callback: this.props.setActivationState
            },
            {
              path: "State.ProtectionStatus",
              callback: (state) => this.stateProtectionStatuses$.next(state)
            },
            {
              path: "Settings.ProtectionStatus",
              callback: (settings) => this.settingsProtectionStatuses$.next(settings)
            },
            {
              path: "State.Plugins.Watchd.Services",
              callback: this.props.updateWatchdogViaServices
            },
            {
              path: "Settings.Plugins.Watchd.Enable",
              callback: this.props.updateWatchdogIsEnabled
            },
            {
              path: "Settings.LiveGrid.LiveGridFeedbackEnabled",
              callback: (value) => this.props.setSampleSubmissionEnabledFlag(!!value)
            },
            ...setUpCfgRegister
          ],
          this.props.winid
        );
        combineLatest([
          this.stateProtectionStatuses$,
          this.settingsProtectionStatuses$,
          cfgSettingsValueFlagsEra$
        ]).subscribe((protectionStatuses) => {
          const state = protectionStatuses[0];
          const settings = protectionStatuses[1];
          const cfgFlagsEra = protectionStatuses[2];
          const currentCfgFlagsValues = this.state.cfgCurrentValues;
          const eraSetting = Object.entries(cfgFlagsEra).map((item) => {
            const cfgPath = item[0];
            return cfgPaths.filter((pathAndCfg) => pathAndCfg.cfg === cfgPath).map((matchingCfgPath) => ({
              path: matchingCfgPath.path,
              cfgPath,
              ...item[1],
              actionValue: matchingCfgPath.value,
              currentValue: currentCfgFlagsValues[cfgPath]
            }));
          }).reduce((acc, item) => [...acc, ...item], []).reduce((acc, item) => {
            const newItem = { ...item };
            delete newItem.path;
            const currentItems = acc[item.path] ?? { fullEraState: [], blockedByEra: 0 };
            const isCurrentEraBlocking = newItem.set_by_era_flag && newItem.actionValue !== newItem.currentValue ? 1 : 0;
            return {
              ...acc,
              [item.path]: {
                blockedByEra: Math.max(currentItems.blockedByEra, isCurrentEraBlocking),
                fullEraState: [...currentItems.fullEraState, newItem]
              }
            };
          }, {});
          const mergedData = arrayToObject(
            Object.entries(state).map(([name, status]) => ({
              [name]: { ...status, ...settings[name], ...eraSetting[name], Status: status }
            }))
          );
          this.props.updateWatchdogViaProtectionStatuses(mergedData);
          this.props.setAllProtectionStatuses(mergedData);
        });
        this.cfgChanged$.subscribe(([path, value]) => {
          this.setState(({ cfgCurrentValues }) => ({ cfgCurrentValues: { ...cfgCurrentValues, [path]: value } }));
          cfgValueFlagsGetRequest(paths);
        });
        const { pcuBackgroundError, activatedProduct, pcuUpToDate, autoupdatesFlag } = this.props;
        this.updateCustomProtectionStatus(activatedProduct, pcuUpToDate, pcuBackgroundError, autoupdatesFlag);
      }
      componentDidUpdate(prevProps) {
        const { pcuBackgroundError, activatedProduct, pcuUpToDate, autoupdatesFlag } = this.props;
        if (prevProps.activatedProduct !== activatedProduct || prevProps.pcuUpToDate !== pcuUpToDate || prevProps.pcuBackgroundError !== pcuBackgroundError || prevProps.autoupdatesFlag !== autoupdatesFlag) {
          this.updateCustomProtectionStatus(activatedProduct, pcuUpToDate, pcuBackgroundError, autoupdatesFlag);
        }
      }
      componentWillUnmount() {
        cfgUnregisterCallback(this.registeredCallbacks);
        this.stateProtectionStatuses$.unsubscribe();
        this.settingsProtectionStatuses$.unsubscribe();
      }
      render() {
        logGroup(
          "StateListener",
          [
            ["props", this.props],
            ["state", this.state],
            ["registeredCallbacks", this.registeredCallbacks],
            ["stateProtectionStatuses$", this.stateProtectionStatuses$],
            ["settingsProtectionStatuses$", this.settingsProtectionStatuses$],
            ["cfgChanged$", this.cfgChanged$]
          ],
          void 0,
          this.props.debug
        );
        return null;
      }
    }
    const mapStateToProps$E = (state) => {
      const licenseStatus = state.protectionStatus.groups.License.status;
      return {
        winid: state.language.winid,
        autoupdatesFlag: state.pcu.autoupdatesFlag,
        pcuUpToDate: state.pcu.AvailableAppUpdate ? state.pcu.AvailableAppUpdate.State === EnumAppUpdateState.CE_APP_UPDATE_STATE_NOT_AVAILABLE : null,
        pcuBackgroundError: state.pcu.errors.backgroundCode ?? "",
        activatedProduct: licenseStatus === PROTECTION_STATUS.UNKNOWN ? null : licenseStatus !== PROTECTION_STATUS.RED
      };
    };
    const mapDispatchToProps$D = {
      setLicenseInfo,
      setAllProtectionStatuses,
      setActivationState,
      updateWatchdogViaServices,
      updateWatchdogViaProtectionStatuses,
      updateWatchdogIsEnabled,
      setCustomStatusGroup,
      setSampleSubmissionEnabledFlag
    };
    const StateListener = withTranslation()(connect(mapStateToProps$E, mapDispatchToProps$D)(PureStateListener));
    StateListener.displayName = "StateListener";
    const withLocation = (Component) => (props) => {
      const location = useLocation();
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...props, location });
    };
    const withNavigate = (Component) => (props) => {
      const navigate = useNavigate();
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...props, navigate });
    };
    const CHECK_FREQUENCY = 1e3 * 5;
    const WARNING_LENGTH = 1e3 * 10;
    const PROLONG_KEY = "idle-prolong";
    class PureAutoLogout extends React.Component {
      // IdleTimer | null // because IdleTimer has currently issues with importing types
      constructor(props) {
        super(props);
        __publicField(this, "idleTimer");
        __publicField(this, "prolongWatcher", (event) => {
          if (event.key === PROLONG_KEY) {
            this.cancelAutomaticLogout();
            this.closeWarning();
            this.setState({
              automaticLogoutId: null
            });
          }
        });
        __publicField(this, "updateRemainingTime", () => {
          if (this.idleTimer) {
            const remainingTime = Math.floor(this.idleTimer.getRemainingTime() / 6e4);
            this.props.updateSessionTime(remainingTime);
          }
        });
        __publicField(this, "automaticLogout", (withErrorMessage = true) => {
          this.cancelAutomaticLogout();
          if (this.state.modalTimerId) {
            clearInterval(this.state.modalTimerId);
          }
          if (withErrorMessage) {
            this.props.updateLogoutError(this.props.t(ErrorType$1.auth.inactivity));
          }
          this.props.navigate(routes$1.logout, { state: { from: this.props.location } });
        });
        __publicField(this, "cancelAutomaticLogout", () => {
          if (this.state.automaticLogoutId) {
            clearTimeout(this.state.automaticLogoutId);
          }
        });
        __publicField(this, "onWarningStay", () => {
          if (this.idleTimer) {
            this.idleTimer.reset();
          }
          this.cancelAutomaticLogout();
          localStorage.setItem(PROLONG_KEY, "true");
          localStorage.removeItem(PROLONG_KEY);
          this.setState({
            automaticLogoutId: null
          });
          this.closeWarning();
        });
        __publicField(this, "showWarningModal", () => {
          const automaticLogoutId = setTimeout(() => this.automaticLogout(), WARNING_LENGTH);
          const modalTimerId = setInterval(() => {
            const newTimer = this.state.modalTimer - 1e3;
            if (newTimer === 0) {
              if (this.state.modalTimerId) {
                clearInterval(this.state.modalTimerId);
              }
            } else {
              this.setState({
                modalTimer: newTimer
              });
            }
          }, 1e3);
          this.setState({
            modalTimerId,
            automaticLogoutId,
            modalIsOpen: true,
            modalTimer: WARNING_LENGTH
          });
        });
        __publicField(this, "closeWarning", () => {
          if (this.state.modalTimerId) {
            clearInterval(this.state.modalTimerId);
          }
          this.setState({
            modalTimerId: null,
            modalIsOpen: false
          });
        });
        this.idleTimer = null;
        this.state = {
          modalIsOpen: false,
          modalTimer: 0,
          modalTimerId: null,
          automaticLogoutId: null,
          checkingIntervalId: null
        };
      }
      componentDidMount() {
        const checkingIntervalId = setInterval(this.updateRemainingTime, CHECK_FREQUENCY);
        this.setState({ checkingIntervalId });
        window.addEventListener("storage", this.prolongWatcher);
      }
      componentWillUnmount() {
        if (this.state.modalTimerId) {
          clearInterval(this.state.modalTimerId);
        }
        this.cancelAutomaticLogout();
        if (this.state.checkingIntervalId) {
          clearInterval(this.state.checkingIntervalId);
        }
        window.removeEventListener("storage", this.prolongWatcher);
      }
      render() {
        const { t: t2 } = this.props;
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            G,
            {
              ref: (ref) => {
                this.idleTimer = ref;
              },
              element: document,
              onIdle: this.showWarningModal,
              crossTab: {
                emitOnAllTabs: true
              },
              timeout: this.props.idleLimit * 60 * 1e3 - WARNING_LENGTH
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            ConfirmationModal,
            {
              type: "warning",
              show: this.state.modalIsOpen,
              onKeyEsc: this.closeWarning,
              onClose: this.closeWarning,
              message: t2("IDUS_SESSION_RENEWAL_MODAL_TITLE"),
              buttons: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "session-warning-prolong",
                    text: this.props.t("IDUS_SESSION_RENEWAL_MODAL_STAY"),
                    onClick: this.onWarningStay
                  },
                  "prolong"
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "session-warning-logout",
                    text: this.props.t("IDUS_LOGOUT"),
                    type: "secondary",
                    onClick: () => this.automaticLogout(false)
                  },
                  "logout"
                )
              ],
              children: [
                pluralize(t2("IDUS_SESSION_RENEWAL_MODAL_TEXT"), this.props.idleLimit, this.props.pluralType),
                /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: pluralize(t2("IDUS_SESSION_RENEWAL_MODAL_TIMER"), this.state.modalTimer / 1e3, this.props.pluralType) })
              ]
            }
          )
        ] });
      }
    }
    const mapStateToProps$D = (state) => ({
      pluralType: state.language.plural,
      idleLimit: state.auth.idleLimit
    });
    const mapDispatchToProps$C = {
      updateSessionTime,
      updateLogoutError
    };
    const AutoLogout = withLocation(
      withNavigate(withTranslation()(connect(mapStateToProps$D, mapDispatchToProps$C)(PureAutoLogout)))
    );
    AutoLogout.displayName = "AutoLogout";
    function useCELocally(defs, initData) {
      const [data2, setData] = reactExports.useState(initData);
      const winid = useSelector((state) => state.language.winid);
      reactExports.useEffect(() => {
        const registeredCallbacks = cfgRegisterCallback(
          defs.map((def) => ({
            path: def.path,
            callback: (d) => {
              setData((storedData) => def.callback(d, storedData));
            }
          })),
          winid
        );
        return () => {
          if (registeredCallbacks) {
            cfgUnregisterCallback(registeredCallbacks);
          }
        };
      }, [winid]);
      return data2;
    }
    const PureModulesTable = (props) => {
      const { t: t2 } = props;
      const modules = useCELocally(
        [
          {
            path: "State.Plugins.Updated.Modules",
            callback: (m) => Object.entries(m).filter((entry) => entry[1].Version !== "").map(([k, moduleInfo], i) => ({
              id: `${k}-${moduleInfo.Version}-${i}`,
              cells: [
                { value: moduleInfo.Name },
                {
                  value: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: `module-version-${k}`, children: moduleInfo.Version })
                }
              ]
            }))
          }
        ],
        []
      );
      logGroup(
        "ModulesTable",
        [
          ["props", props],
          ["modules", modules]
        ],
        void 0,
        props.debug
      );
      const columns = [
        { id: "name", header: t2("IDUS_NAME"), minWidth: 250, width: 350, sortDisabled: true },
        { id: "version", header: t2("IDUS_VERSION"), minWidth: 150, width: 150, sortDisabled: true }
      ];
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Table, { id: "modules", columns, data: modules, rowCount: modules.length, noHeaderTopBorder: true });
    };
    const ModulesTable = withErrorBoundary()(withTranslation()(PureModulesTable));
    ModulesTable.displayName = "ModulesTable";
    const ExternalLink = ({ link, text, id: id2, debug }) => {
      logGroup(
        "ExternalLink",
        [
          ["id", id2],
          ["link", link],
          ["text", text]
        ],
        void 0,
        debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$7,
        {
          id: id2,
          onClick: () => window.open(link),
          iconRight: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowExternal, { fill: colors.primary, size: 16 }),
          text
        }
      );
    };
    const theme$3 = {
      Text: {
        display: "inline"
      }
    };
    class PlainText extends React.Component {
      render() {
        const { spacer = "mr-1", color = colors.text, align, id: id2 } = this.props;
        const bold = this.props.bold ? "bold" : "normal";
        logGroup("PlainText", [["props", this.props]], void 0, this.props.debug);
        const content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: theme$3, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { align, color, fontWeight: bold, id: id2, children: this.props.children }) });
        return spacer ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: spacer, children: content2 }) : content2;
      }
    }
    const aboutSection = "_aboutSection_6h375_1";
    const style$v = {
      aboutSection
    };
    const PureAboutSection = (props) => {
      const { icon, children, debug } = props;
      logGroup(
        "AboutSection",
        [
          ["icon", icon],
          ["children", children]
        ],
        void 0,
        debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$h, { limitContentWidth: false, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$v.aboutSection, children: [
        icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconCompanyEsetWithborder, { size: 32, style: { minWidth: "32px" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-4" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-3", children })
      ] }) });
    };
    const AboutSection = withErrorBoundary()(PureAboutSection);
    AboutSection.displayName = "AboutSection";
    const Copyright = () => {
      const { t: t2 } = useTranslation();
      return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: getCopyright(t2) });
    };
    const { version } = pkgid;
    const build = version.join(".");
    const PureAbout = (props) => {
      const { t: t2, links } = props;
      const systemData = useCELocally(
        [
          {
            path: "Runtime.Plugins.Sysinfod.MachineInfo",
            callback: (data2, stored) => {
              var _a, _b;
              return !(((_a = data2.Raw) == null ? void 0 : _a.Distribution) && ((_b = data2.Parsed) == null ? void 0 : _b.Hw)) ? stored : {
                systemName: `${data2.Raw.Distribution.Name}${getArchitecture(data2.Parsed.Hw.Architecture)}`,
                systemVersion: data2.Raw.Distribution.Version
              };
            }
          }
        ],
        {
          systemName: "{{unset}}",
          systemVersion: "{{unset}}"
        }
      );
      logGroup(
        "About",
        [
          ["props", props],
          ["systemData", systemData]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$i, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$i.Header, { pageName: t2("IDUS_ABOUT"), type: "big" }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$i.Content, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(AboutSection, { icon: true, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pb-5", id: "product-and-copyright", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: sprintf(t2("IDUS_PRODUCT_ID"), pkgid.product_info_long, build) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { noMargin: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copyright, {}) })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pb-5", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { text: t2("IDUS_EULA"), link: links.EULA_LINK, id: "link-eula" }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { text: t2("IDUS_PRIVACY_POLICY"), link: links.POLICY_LINK, id: "link-privacy" })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pb-5", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: t2("IDUS_COPYRIGHT_INFO") }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: sprintf(t2("IDUS_COPYRIGHT_INFO_TEXT"), pkgid.product_info_short) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: t2("IDUS_ESET_ABOUT_COPYRIGHT_WARNING") })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pb-5", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: t2("IDUS_ABOUT_TRADEMARK") }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: t2("IDUS_ABOUT_TRADEMARK_WARNING") })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: t2("IDUS_PATENTS") }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: t2("IDUS_PATENTS_TEXT") })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(AboutSection, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pb-5", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: t2("IDUS_HELP_CUSTOMER_CARE_OS") }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(PlainText, { children: [
                systemData.systemName,
                " ",
                t2("IDUS_VERSION"),
                " ",
                systemData.systemVersion
              ] })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, children: t2("IDUS_ABOUT_INSTALLED_MODULES") }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(ModulesTable, {})
          ] })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$i.Footer, {})
      ] });
    };
    const mapStateToProps$C = (state) => ({
      links: state.language.links
    });
    const About = withTranslation()(connect(mapStateToProps$C)(PureAbout));
    About.displayName = "About";
    class PureLogout extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "logout", () => {
          if (!this.props.blocked) {
            this.props.logoutAction();
          }
        });
      }
      componentDidMount() {
        this.logout();
      }
      componentDidUpdate(prevProps) {
        if (prevProps.blocked !== this.props.blocked) {
          this.logout();
        }
      }
      render() {
        logGroup("Logout", [["props", this.props]], void 0, this.props.debug);
        return null;
      }
    }
    const mapDispatchToProps$B = {
      logoutAction
    };
    const mapStateToProps$B = (state) => ({
      blocked: state.auth.logoutBlocked > 0
    });
    const Logout = connect(mapStateToProps$B, mapDispatchToProps$B)(PureLogout);
    Logout.displayName = "Logout";
    const FLEX_CONTAINER_STYLE = {
      display: "flex",
      justifyContent: "space-between",
      alignItems: "center"
    };
    const FLEX_CENTER_STYLE = {
      flex: "1 1 auto"
    };
    const FLEX_SIDE_STYLE = {
      flex: "0 0 auto"
    };
    const PureFeedback = (props) => {
      const { t: t2, isOpen, links, closeFeedback } = props;
      const renderCard = (title, info, CardIcon, link) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$m, { onClick: () => window.open(link), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "p-1", style: FLEX_CONTAINER_STYLE, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(CardIcon, { size: 36, fill: colors.infoBig, style: FLEX_SIDE_STYLE }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-3 mr-1", style: FLEX_CENTER_STYLE, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, color: colors.info, children: title }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: info })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowCaretRight, { size: 24, style: FLEX_SIDE_STYLE })
      ] }) });
      logGroup("Feedback", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$j,
        {
          id: "feedback_modal",
          title: t2("IDUS_SUBMIT_FEEDBACK"),
          type: "info",
          show: isOpen,
          effect: "fadeInDown",
          onKeyEsc: closeFeedback,
          onAway: closeFeedback,
          onClose: closeFeedback,
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { children: [
            renderCard(
              t2("IDUS_FEEDBACK_TITLE"),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: sprintf(t2("IDUS_FEEDBACK_INFO"), pkgid.product_info_short) }),
              default_1$k,
              links.FEEDBACK_LINK
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "m-3" }),
            renderCard(
              t2("IDUS_FEEDBACK_REPORT_TITLE"),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_FEEDBACK_REPORT_INFO") }),
              default_1$l,
              links.SUPPORT_LINK
            )
          ] }) })
        }
      );
    };
    const mapDispatchToProps$A = {
      closeFeedback: hiddenFeedback
    };
    const mapStateToProps$A = (state) => ({
      isOpen: state.layout.modals.feedback,
      links: state.language.links
    });
    const Feedback = withTranslation()(connect(mapStateToProps$A, mapDispatchToProps$A)(PureFeedback));
    Feedback.displayName = "Feedback";
    const explanation = "_explanation_z70q3_1";
    const contentWrapper = "_contentWrapper_z70q3_6";
    const style$u = {
      explanation,
      contentWrapper
    };
    const VisualForm = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$n, { hideRequiredNotice: true, onSubmit: (e) => e.preventDefault(), children });
    const ErrorMessage = (props) => {
      const { children, spacer = "mt-3 mb-3", when, debug, id: id2, textId, dynamicTextId, type = "error" } = props;
      logGroup("ErrorMessage", [["props", props]], void 0, debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$o, { when, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: spacer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type, id: id2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { dynamic: dynamicTextId, id: textId, children }) }) }) });
    };
    const SAMPLE_TYPES = [
      { value: SampleType.SUSP_FILE, label: "IDUS_SAMPLE_FIELD_TYPE_FILE" },
      { value: SampleType.SUSP_SITE, label: "IDUS_SAMPLE_FIELD_TYPE_SITE" },
      { value: SampleType.FP_SITE, label: "IDUS_SAMPLE_FIELD_TYPE_FP_SITE" },
      { value: SampleType.FP_FILE, label: "IDUS_SAMPLE_FIELD_TYPE_FP_FILE" },
      { value: SampleType.OTHER, label: "IDUS_SAMPLE_FIELD_OTHER" }
    ];
    const SITE_TYPES = [
      { value: SiteProblem.OTHER, label: "IDUS_SAMPLE_FIELD_OTHER" },
      { value: SiteProblem.INFECTED, label: "IDUS_SAMPLE_FIELD_SITE_SYMPTOMS_INFECTED" },
      { value: SiteProblem.PHISHING, label: "IDUS_SAMPLE_FIELD_SITE_SYMPTOMS_PHISH" },
      { value: SiteProblem.SCAM, label: "IDUS_SAMPLE_FIELD_SITE_SYMPTOMS_SCAM" }
    ];
    const FORMS = {
      [SampleType.SUSP_FILE]: {
        title: "IDUS_SAMPLE_TITLE_FILE",
        unusedFields: ["appName", "appPurpose", "siteProblem", "reason", "vendor"]
      },
      [SampleType.FP_FILE]: {
        title: "IDUS_SAMPLE_TITLE_FILE",
        unusedFields: ["symptoms", "siteProblem", "reason", "origin"]
      },
      [SampleType.OTHER]: {
        title: "IDUS_SAMPLE_TITLE_FILE",
        unusedFields: ["symptoms", "origin", "notes", "siteProblem", "appName", "appPurpose", "vendor"]
      },
      [SampleType.SUSP_SITE]: {
        title: "IDUS_SAMPLE_TITLE_SITE",
        unusedFields: ["symptoms", "origin", "appName", "appPurpose", "reason", "vendor"]
      },
      [SampleType.FP_SITE]: {
        title: "IDUS_SAMPLE_TITLE_SITE",
        unusedFields: ["symptoms", "origin", "siteProblem", "appName", "appPurpose", "reason", "vendor"]
      }
    };
    class PureSubmitSample extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "getIdText", (key) => /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: key, children: this.props.t(key) }));
        __publicField(this, "onModalExit", () => {
          this.props.resetSampleData();
          this.setState({
            displayErrors: false,
            invalidEmail: false
          });
        });
        __publicField(this, "getTitle", () => {
          const { type, step } = this.props.sampleData;
          return step === SampleStep.TYPE ? "IDUS_SAMPLE_TITLE" : FORMS[type].title;
        });
        __publicField(this, "close", () => {
          this.props.toggleSampleSubmission(false);
        });
        __publicField(this, "resetAppropriateFields", (type) => {
          this.props.resetSampleDetails(FORMS[type].unusedFields);
        });
        __publicField(this, "setData", (field) => (value) => {
          this.props.setSampleData(field, value);
        });
        __publicField(this, "setFilepath", (value) => {
          this.props.setSampleData("filepath", value);
          const errors = { ...this.props.sampleData.errors };
          if (errors.filepath) {
            delete errors.filepath;
            this.props.setSampleData("errors", errors);
          }
        });
        __publicField(this, "setContact", (email, anonymous) => {
          this.props.setSampleData("anonymous", anonymous);
          this.props.setSampleData("email", email);
          const error = !!email && !EMAIL_REGEX.test(email);
          this.setState({ invalidEmail: error });
        });
        __publicField(this, "setType", (value) => {
          const type = value.value;
          this.props.setSampleData("type", type);
          this.resetAppropriateFields(type);
          if (type === SampleType.SUSP_SITE) {
            this.props.setSampleData("siteProblem", SiteProblem.OTHER);
          }
        });
        __publicField(this, "getTypeForm", (type) => {
          const { t: t2, sampleData, helpLink: helpLink2 } = this.props;
          const { id: id2, filepath, email, anonymous, errors } = sampleData;
          const { requiredFieldError, displayErrors } = this.state;
          const typeOptions = SAMPLE_TYPES.map((sampleType) => ({
            ...sampleType,
            label: t2(sampleType.label),
            isDisabled: !!id2 && SAMPLE_TYPE_SITES.includes(sampleType.value)
          }));
          const selectedType = typeOptions.find((option) => option.value === type);
          const isSiteBased = type !== null && SAMPLE_TYPE_SITES.includes(type);
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-1 mb-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: insertHtmlToTemplate(t2("IDUS_SAMPLE_INTRO"), {
              morelink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { text: t2("IDUS_SAMPLE_INTRO_LINK"), onClick: () => openInTabAndFocus(helpLink2) })
            }) }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$p,
                {
                  id: "sample-field-type-select",
                  labelText: t2("IDUS_SAMPLE_FIELD_TYPE"),
                  content: /* @__PURE__ */ jsxRuntimeExports.jsx(Select, { options: typeOptions, isClearable: false, onChange: this.setType, value: selectedType })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$p,
                {
                  id: isSiteBased ? "sample-field-site-url" : "sample-field-file-path",
                  labelText: t2(isSiteBased ? "IDUS_SAMPLE_FIELD_SITE" : "IDUS_SAMPLE_FIELD_FILE"),
                  validationText: errors.filepath ? this.getIdText(errors.filepath) : requiredFieldError,
                  hasError: displayErrors && (!!errors.filepath || !filepath),
                  required: true,
                  disabled: !!id2,
                  content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { onChange: this.setFilepath, type: "text", value: filepath })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$p,
                {
                  id: "sample-field-email",
                  validationText: this.state.invalidEmail ? this.getIdText("IDUS_PRODACT_WARNING2") : requiredFieldError,
                  hasError: displayErrors && (this.state.invalidEmail || !anonymous && !email),
                  required: !anonymous,
                  labelText: t2("IDUS_SAMPLE_FIELD_EMAIL"),
                  content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { onChange: (value) => this.setContact(value, 0), type: "email", value: email })
                }
              )
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-2", id: "sample-field-is-anonymous-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$r,
              {
                id: "sample-field-is-anonymous",
                name: "anonymous",
                checked: anonymous ? 1 : 0,
                text: t2("IDUS_SAMPLE_FIELD_ANONYMOUS"),
                onChange: (value) => this.setContact("", value)
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$u.explanation, children: t2("IDUS_SAMPLE_EMAIL_EXPLANATION") }) })
          ] });
        });
        __publicField(this, "getDetailsForm", (type) => {
          const { t: t2, sampleData } = this.props;
          const { siteProblem, appPurpose, vendor, errors } = sampleData;
          const { requiredFieldError, displayErrors } = this.state;
          const requiredDualField = (label, field, idSuffix, required, hasError, validationText) => /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$p,
            {
              id: `sample-field-${idSuffix}`,
              labelText: t2(label),
              validationText,
              hasError: displayErrors && hasError,
              required,
              content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$s, { onChange: this.setData(field), value: sampleData[field] })
            }
          );
          const requiredField = (label, field, idSuffix) => requiredDualField(label, field, idSuffix ?? field, true, !sampleData[field], requiredFieldError);
          const optionalField = (label, field, idSuffix) => /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$p,
            {
              id: `sample-field-${idSuffix ?? field}`,
              labelText: t2(label),
              content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$s, { onChange: this.setData(field), value: sampleData[field] })
            }
          );
          let fields;
          switch (type) {
            case SampleType.SUSP_FILE: {
              fields = /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
                requiredField("IDUS_SAMPLE_FIELD_FILE_SYMPTOMS", "symptoms"),
                optionalField("IDUS_SAMPLE_FIELD_ORIGIN", "origin"),
                optionalField("IDUS_SAMPLE_FIELD_NOTES", "notes")
              ] });
              break;
            }
            case SampleType.FP_FILE: {
              const requiredError = sprintf(
                t2("IDUS_SAMPLE_REQUIRED_ONE"),
                t2("IDUS_SAMPLE_FIELD_APP_PURPOSE"),
                t2("IDUS_SAMPLE_FIELD_ORIGIN_SHORT")
              );
              fields = /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
                requiredField("IDUS_SAMPLE_FIELD_APP_NAME", "appName", "app-name"),
                requiredDualField("IDUS_SAMPLE_FIELD_ORIGIN", "vendor", "vendor", !appPurpose, !appPurpose && !vendor),
                requiredDualField(
                  "IDUS_SAMPLE_FIELD_APP_PURPOSE",
                  "appPurpose",
                  "app-purpose",
                  !vendor,
                  !appPurpose && !vendor,
                  requiredError
                ),
                optionalField("IDUS_SAMPLE_FIELD_NOTES", "notes")
              ] });
              break;
            }
            case SampleType.SUSP_SITE: {
              const problemOptions = SITE_TYPES.map((siteType) => ({
                ...siteType,
                label: t2(siteType.label)
              }));
              const selectedProblem = problemOptions.find((option) => option.value === siteProblem);
              fields = /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$p,
                  {
                    id: "sample-field-site-problem",
                    labelText: t2("IDUS_SAMPLE_FIELD_SITE_SYMPTOMS"),
                    content: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Select,
                      {
                        options: problemOptions,
                        isClearable: false,
                        onChange: (value) => this.setData("siteProblem")(value.value),
                        value: selectedProblem
                      }
                    )
                  }
                ),
                optionalField("IDUS_SAMPLE_FIELD_NOTES", "notes")
              ] });
              break;
            }
            case SampleType.OTHER: {
              fields = requiredField("IDUS_SAMPLE_FIELD_FILE_REASON", "reason");
              break;
            }
            case SampleType.FP_SITE:
            default:
              fields = optionalField("IDUS_SAMPLE_FIELD_NOTES", "notes");
          }
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ErrorMessage,
              {
                when: !!errors.global,
                spacer: "mt-1 mb-5",
                type: "error",
                id: "sample-sending-error",
                textId: errors.global,
                children: t2(errors.global)
              }
            ),
            fields,
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$u.explanation, children: t2("IDUS_SAMPLE_INFO_EXPLANATION") }) })
          ] });
        });
        __publicField(this, "getForm", () => {
          const { step, type } = this.props.sampleData;
          switch (step) {
            case SampleStep.DETAILS:
              return this.getDetailsForm(type);
            case SampleStep.TYPE:
            default:
              return this.getTypeForm(type);
          }
        });
        __publicField(this, "nextStep", () => {
          const { email, anonymous, filepath } = this.props.sampleData;
          const invalid = !filepath || !email && !anonymous || this.state.invalidEmail;
          if (invalid) {
            this.setState({ displayErrors: true });
          } else {
            this.setData("step")(SampleStep.DETAILS);
            this.setState({ displayErrors: false });
            this.resetAppropriateFields(this.props.sampleData.type);
          }
        });
        __publicField(this, "prevStep", () => {
          this.setData("step")(SampleStep.TYPE);
        });
        __publicField(this, "validateDetails", (type) => {
          const data2 = this.props.sampleData;
          switch (type) {
            case SampleType.SUSP_FILE:
              return !!data2.symptoms;
            case SampleType.SUSP_SITE:
              return data2.siteProblem !== null;
            case SampleType.FP_FILE:
              return !!data2.appName && (!!data2.vendor || !!data2.appPurpose);
            case SampleType.OTHER:
              return !!data2.reason;
            case SampleType.FP_SITE:
            default:
              return true;
          }
        });
        __publicField(this, "submit", () => {
          const data2 = this.props.sampleData;
          this.setState({ displayErrors: true });
          const valid = this.validateDetails(data2.type);
          if (valid) {
            this.props.sendSample(data2);
          }
        });
        this.state = {
          displayErrors: false,
          invalidEmail: false,
          requiredFieldError: this.getIdText("IDUS_SAMPLE_REQUIRED")
        };
      }
      render() {
        const { t: t2, isOpen, sampleData } = this.props;
        const { step } = sampleData;
        logGroup(
          "SubmitFeedback",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        const buttonsLeft = [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$f,
            {
              id: "sample-back",
              type: "secondary",
              onClick: this.prevStep,
              text: t2("IDUS_BACK"),
              disabled: step === SampleStep.TYPE
            },
            "s-back"
          )
        ];
        const buttons = [
          step === SampleStep.TYPE ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "sample-next", onClick: this.nextStep, text: t2("IDUS_NEXT") }, "s-next") : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "sample-send", onClick: this.submit, text: t2("IDUS_SEND") }, "s-send"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "sample-cancel", type: "secondary", onClick: this.close, text: t2("IDUS_CANCEL") }, "s-cancel")
        ];
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$j,
          {
            id: "submit-sample-modal",
            title: t2(this.getTitle()),
            type: "question",
            show: isOpen,
            buttonsLeft,
            buttons,
            effect: "fadeInDown",
            onKeyEsc: this.close,
            onAway: this.close,
            onClose: this.close,
            onHidden: this.onModalExit,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$h, { className: style$u.contentWrapper, children: this.getForm() })
          }
        );
      }
    }
    const mapDispatchToProps$z = {
      toggleSampleSubmission,
      resetSampleData,
      setSampleData,
      resetSampleDetails,
      sendSample
    };
    const mapStateToProps$z = (state) => ({
      helpLink: state.language.links.HELP_LINK_SUBMIT_SAMPLE,
      isOpen: state.layout.modals.sampleSubmission,
      sampleData: state.sample
    });
    const SubmitSample = connect(mapStateToProps$z, mapDispatchToProps$z)(withTranslation()(PureSubmitSample));
    SubmitSample.displayName = "SubmitSample";
    const contentHeader = "_contentHeader_xnusy_1";
    const pageHeader = "_pageHeader_xnusy_7";
    const style$t = {
      contentHeader,
      pageHeader
    };
    const id$1 = "main-page";
    const getTheme = (padding) => ({ Page: { Content: { padding } } });
    const PureMainPage = (props) => {
      const { padding, footer, breadcrumb, goBackHandler, style: extraStyle, headerContent, title, type, content: content2 } = props;
      const location = useLocation();
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const [pageTheme, setPageTheme] = reactExports.useState(getTheme(padding));
      reactExports.useEffect(() => {
        dispatch(footer ? visibleContentFooter() : hiddenContentFooter());
      }, [footer, location]);
      reactExports.useEffect(() => {
        setPageTheme(getTheme(padding));
      }, [padding]);
      logGroup("MainPage", [["props", props]], void 0, props.debug);
      const bckButton = reactExports.useMemo(
        () => goBackHandler && breadcrumb ? /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$f, { type: "secondary", onClick: goBackHandler, id: `${id$1}-back-btn`, children: [
          "< ",
          t2("IDUS_BACK")
        ] }) : null,
        [goBackHandler, breadcrumb, t2]
      );
      const headerMem = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$i.Header,
          {
            id: `${id$1}-header`,
            style: { marginBotton: "0" },
            className: headerContent ? [style$t.contentHeader, style$t.pageHeader].join(" ") : style$t.pageHeader,
            pageName: title,
            type,
            breadcrumb,
            childrenAlignRight: true,
            backButton: bckButton,
            children: headerContent
          }
        ),
        [headerContent, title, type, bckButton, breadcrumb]
      );
      const footerMem = reactExports.useMemo(() => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$i.Footer, { id: `${id$1}-footer`, children: footer }), [footer]);
      const contentMem = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$i.Content, { fullHeight: true, extraCss: extraStyle, id: `${id$1}-content`, children: content2 }),
        [extraStyle, content2]
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: pageTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$i, { id: id$1, children: [
        headerMem,
        contentMem,
        footerMem
      ] }) });
    };
    const MainPage = withErrorBoundary()(PureMainPage);
    MainPage.displayName = "MainPage";
    const vega = "";
    const dateTime$7 = "%A, der %e. %B %Y, %X";
    const date$7 = "%d.%m.%Y";
    const time$7 = "%H:%M";
    const periods$7 = [
      "AM",
      "PM"
    ];
    const days$7 = [
      "Sonntag",
      "Montag",
      "Dienstag",
      "Mittwoch",
      "Donnerstag",
      "Freitag",
      "Samstag"
    ];
    const shortDays$7 = [
      "So",
      "Mo",
      "Di",
      "Mi",
      "Do",
      "Fr",
      "Sa"
    ];
    const months$7 = [
      "Januar",
      "Februar",
      "März",
      "April",
      "Mai",
      "Juni",
      "Juli",
      "August",
      "September",
      "Oktober",
      "November",
      "Dezember"
    ];
    const shortMonths$7 = [
      "Jan",
      "Feb",
      "Mrz",
      "Apr",
      "Mai",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Okt",
      "Nov",
      "Dez"
    ];
    const de = {
      dateTime: dateTime$7,
      date: date$7,
      time: time$7,
      periods: periods$7,
      days: days$7,
      shortDays: shortDays$7,
      months: months$7,
      shortMonths: shortMonths$7
    };
    const dateTime$6 = "%x, %X";
    const date$6 = "%m/%d/%Y";
    const time$6 = "%I:%M %p";
    const periods$6 = [
      "AM",
      "PM"
    ];
    const days$6 = [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ];
    const shortDays$6 = [
      "Sun",
      "Mon",
      "Tue",
      "Wed",
      "Thu",
      "Fri",
      "Sat"
    ];
    const months$6 = [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ];
    const shortMonths$6 = [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ];
    const en = {
      dateTime: dateTime$6,
      date: date$6,
      time: time$6,
      periods: periods$6,
      days: days$6,
      shortDays: shortDays$6,
      months: months$6,
      shortMonths: shortMonths$6
    };
    const dateTime$5 = "%A, %e %B %Y, %X";
    const date$5 = "%d.%m.%Y";
    const time$5 = "%H:%M";
    const periods$5 = [
      "AM",
      "PM"
    ];
    const days$5 = [
      "Niedziela",
      "Poniedziałek",
      "Wtorek",
      "Środa",
      "Czwartek",
      "Piątek",
      "Sobota"
    ];
    const shortDays$5 = [
      "Niedz.",
      "Pon.",
      "Wt.",
      "Śr.",
      "Czw.",
      "Pt.",
      "Sob."
    ];
    const months$5 = [
      "Styczeń",
      "Luty",
      "Marzec",
      "Kwiecień",
      "Maj",
      "Czerwiec",
      "Lipiec",
      "Sierpień",
      "Wrzesień",
      "Październik",
      "Listopad",
      "Grudzień"
    ];
    const shortMonths$5 = [
      "Stycz.",
      "Luty",
      "Marz.",
      "Kwie.",
      "Maj",
      "Czerw.",
      "Lipc.",
      "Sierp.",
      "Wrz.",
      "Paźdz.",
      "Listop.",
      "Grudz."
    ];
    const pl = {
      dateTime: dateTime$5,
      date: date$5,
      time: time$5,
      periods: periods$5,
      days: days$5,
      shortDays: shortDays$5,
      months: months$5,
      shortMonths: shortMonths$5
    };
    const dateTime$4 = "%x %a %X";
    const date$4 = "%Y/%m/%d";
    const time$4 = "%H:%M";
    const periods$4 = [
      "AM",
      "PM"
    ];
    const days$4 = [
      "日曜日",
      "月曜日",
      "火曜日",
      "水曜日",
      "木曜日",
      "金曜日",
      "土曜日"
    ];
    const shortDays$4 = [
      "日",
      "月",
      "火",
      "水",
      "木",
      "金",
      "土"
    ];
    const months$4 = [
      "1月",
      "2月",
      "3月",
      "4月",
      "5月",
      "6月",
      "7月",
      "8月",
      "9月",
      "10月",
      "11月",
      "12月"
    ];
    const shortMonths$4 = [
      "1月",
      "2月",
      "3月",
      "4月",
      "5月",
      "6月",
      "7月",
      "8月",
      "9月",
      "10月",
      "11月",
      "12月"
    ];
    const jp = {
      dateTime: dateTime$4,
      date: date$4,
      time: time$4,
      periods: periods$4,
      days: days$4,
      shortDays: shortDays$4,
      months: months$4,
      shortMonths: shortMonths$4
    };
    const dateTime$3 = "%A, %e de %B de %Y, %X";
    const date$3 = "%d/%m/%Y";
    const time$3 = "%H:%M";
    const periods$3 = [
      "AM",
      "PM"
    ];
    const days$3 = [
      "domingo",
      "lunes",
      "martes",
      "miércoles",
      "jueves",
      "viernes",
      "sábado"
    ];
    const shortDays$3 = [
      "dom",
      "lun",
      "mar",
      "mié",
      "jue",
      "vie",
      "sáb"
    ];
    const months$3 = [
      "enero",
      "febrero",
      "marzo",
      "abril",
      "mayo",
      "junio",
      "julio",
      "agosto",
      "septiembre",
      "octubre",
      "noviembre",
      "diciembre"
    ];
    const shortMonths$3 = [
      "ene",
      "feb",
      "mar",
      "abr",
      "may",
      "jun",
      "jul",
      "ago",
      "sep",
      "oct",
      "nov",
      "dic"
    ];
    const es = {
      dateTime: dateTime$3,
      date: date$3,
      time: time$3,
      periods: periods$3,
      days: days$3,
      shortDays: shortDays$3,
      months: months$3,
      shortMonths: shortMonths$3
    };
    const dateTime$2 = "%A, %e de %B de %Y, %X";
    const date$2 = "%d/%m/%Y";
    const time$2 = "%H:%M";
    const periods$2 = [
      "AM",
      "PM"
    ];
    const days$2 = [
      "domingo",
      "lunes",
      "martes",
      "miércoles",
      "jueves",
      "viernes",
      "sábado"
    ];
    const shortDays$2 = [
      "dom",
      "lun",
      "mar",
      "mié",
      "jue",
      "vie",
      "sáb"
    ];
    const months$2 = [
      "enero",
      "febrero",
      "marzo",
      "abril",
      "mayo",
      "junio",
      "julio",
      "agosto",
      "septiembre",
      "octubre",
      "noviembre",
      "diciembre"
    ];
    const shortMonths$2 = [
      "ene",
      "feb",
      "mar",
      "abr",
      "may",
      "jun",
      "jul",
      "ago",
      "sep",
      "oct",
      "nov",
      "dic"
    ];
    const escl = {
      dateTime: dateTime$2,
      date: date$2,
      time: time$2,
      periods: periods$2,
      days: days$2,
      shortDays: shortDays$2,
      months: months$2,
      shortMonths: shortMonths$2
    };
    const dateTime$1 = "%A %e %B %Y à %X";
    const date$1 = "%d/%m/%Y";
    const time$1 = "%H:%M";
    const periods$1 = [
      "AM",
      "PM"
    ];
    const days$1 = [
      "dimanche",
      "lundi",
      "mardi",
      "mercredi",
      "jeudi",
      "vendredi",
      "samedi"
    ];
    const shortDays$1 = [
      "dim.",
      "lun.",
      "mar.",
      "mer.",
      "jeu.",
      "ven.",
      "sam."
    ];
    const months$1 = [
      "janvier",
      "février",
      "mars",
      "avril",
      "mai",
      "juin",
      "juillet",
      "août",
      "septembre",
      "octobre",
      "novembre",
      "décembre"
    ];
    const shortMonths$1 = [
      "janv.",
      "févr.",
      "mars",
      "avr.",
      "mai",
      "juin",
      "juil.",
      "août",
      "sept.",
      "oct.",
      "nov.",
      "déc."
    ];
    const fr = {
      dateTime: dateTime$1,
      date: date$1,
      time: time$1,
      periods: periods$1,
      days: days$1,
      shortDays: shortDays$1,
      months: months$1,
      shortMonths: shortMonths$1
    };
    const dateTime = "%x, %X";
    const date = "%d.%m.%Y";
    const time = "%H:%M";
    const periods = [
      "AM",
      "PM"
    ];
    const days = [
      "неділя",
      "понеділок",
      "вівторок",
      "середа",
      "четвер",
      "пʼятниця",
      "субота"
    ];
    const shortDays = [
      "нд",
      "пн",
      "вт",
      "ср",
      "чт",
      "пт",
      "сб"
    ];
    const months = [
      "січень",
      "лютий",
      "березень",
      "квітень",
      "травень",
      "червень",
      "липень",
      "серпень",
      "вересень",
      "жовтень",
      "листопад",
      "грудень"
    ];
    const shortMonths = [
      "січ",
      "лют",
      "бер",
      "кві",
      "тра",
      "чер",
      "лип",
      "сер",
      "вер",
      "жов",
      "лис",
      "гру"
    ];
    const uk = {
      dateTime,
      date,
      time,
      periods,
      days,
      shortDays,
      months,
      shortMonths
    };
    const langs = {
      "de-DE": {
        time: de
      },
      "en-US": {
        time: en
      },
      "pl-PL": {
        time: pl
      },
      "fr-FR": {
        time: fr
      },
      "ja-JP": {
        time: jp
      },
      "es-ES": {
        time: es
      },
      "es-CL": {
        time: escl
      },
      "uk-UA": {
        time: uk
      }
    };
    const getLocale = (locKey) => langs[locKey];
    const FIELD_NAME_X = "timestamp";
    const labelFont = "'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif";
    const normalFill = { opacity: { value: 0.9 } };
    const DATASET = {
      DATA: "data",
      TOOLTIP: "tooltip",
      TOOLTIP_VALUES: "tooltipValues"
    };
    const SIGNAL = {
      TOOLTIP: "tooltipPosition",
      PIE_CENTER_VALUE: "pieCenter",
      PIE_CENTER_CATEGORY: "pieCategory",
      PIE_ARC_HOVER: "pieHover"
    };
    const SCALE = {
      X: "xscale",
      Y: "yscale",
      COLOR: "color"
    };
    var SCHEMA_TYPE = /* @__PURE__ */ ((SCHEMA_TYPE2) => {
      SCHEMA_TYPE2["BROWSER"] = "BROWSER";
      SCHEMA_TYPE2["PDF"] = "PDF";
      return SCHEMA_TYPE2;
    })(SCHEMA_TYPE || {});
    const DEFAULT_SCHEME = "tableau10";
    const getDefaultedSettings = (settings) => ({
      defaultMax: 20,
      colorScheme: DEFAULT_SCHEME,
      categoryField: "category",
      categories: [],
      categoryMapping: {},
      ...settings
    });
    const getLineSchema = (type, width, height, data2, graphSettings, t2, localeKey) => {
      const {
        valueField = "y",
        categoryField,
        colorScheme,
        periodType = "",
        categoryMapping,
        defaultMax,
        timeslots: origTimeslots,
        categories: origCategories
      } = graphSettings;
      const locale = getLocale(localeKey);
      const completeData = [];
      origCategories.forEach((category) => {
        completeData.push(
          ...origTimeslots.map((slot) => {
            const matching = data2.find((d) => d.timestamp === slot && d[categoryField] === category);
            return matching ?? {
              timestamp: slot,
              [categoryField]: category,
              [valueField]: 0
            };
          })
        );
      });
      const processedData = completeData.map((d) => ({
        ...d,
        timestamp: DateTime.fromSeconds(d.timestamp).toMillis().toString(),
        [categoryField]: t2(categoryMapping[d[categoryField]])
      }));
      const xFormat = periodType === "day" ? "%x" : "%X";
      const categories = origCategories.map((x) => t2(categoryMapping[x]));
      const timeslots = origTimeslots.map((time2) => DateTime.fromSeconds(time2).toMillis());
      const maxValue = Math.max(...processedData.map((d) => d[valueField]));
      const last = timeslots[timeslots.length - 1];
      const first = timeslots[0];
      const second = timeslots.length > 1 ? timeslots[1] : last;
      const third = timeslots.length > 2 ? timeslots[2] : last;
      const getDistance = (from, to) => Math.floor(width / (last - first) * ((to - from) / 2));
      const firstGap = getDistance(first, second);
      const gap = getDistance(second, third);
      let tickCount = periodType;
      if (last - first < 60 * 60) {
        tickCount = 2;
      } else if (periodType === "day") {
        tickCount = { interval: periodType, step: timeslots.length > 8 ? 2 : 1 };
      }
      const maxY = maxValue > defaultMax ? Math.max(Math.round(1.05 * maxValue), maxValue + 10) : defaultMax;
      const pdfSpecial = type === "PDF" ? {
        global: { padding: 2 },
        axes: {
          horizontal: {
            labelFont: "Helvetica,Arial,sans-serif",
            // to match other printed text
            labelFontSize: 16,
            gridOpacity: 0.3,
            tickMinStep: 1
          },
          vertical: {
            labelFont: "Helvetica,Arial,sans-serif",
            // to match other printed text
            labelFontSize: 16,
            gridOpacity: 0.3
          }
        }
      } : { global: {}, axes: { horizontal: {}, vertical: {} } };
      return {
        $schema: "https://vega.github.io/schema/vega/v5.json",
        width,
        height,
        autosize: { type: "fit", resize: true },
        padding: 12,
        config: {
          locale
        },
        data: [
          {
            name: DATASET.DATA,
            values: processedData
          },
          {
            name: DATASET.TOOLTIP,
            values: processedData,
            transform: [
              {
                type: "pivot",
                groupby: [FIELD_NAME_X],
                field: categoryField,
                value: valueField
              }
            ]
          },
          {
            name: DATASET.TOOLTIP_VALUES,
            source: DATASET.DATA,
            transform: [
              {
                type: "filter",
                expr: `datum.${FIELD_NAME_X} === tooltipPosition`
              }
            ]
          }
        ],
        scales: [
          {
            name: SCALE.X,
            type: "time",
            range: "width",
            clamp: true,
            domain: { data: DATASET.DATA, field: FIELD_NAME_X }
          },
          {
            name: SCALE.Y,
            type: "linear",
            range: "height",
            clamp: true,
            nice: true,
            zero: false,
            domain: [0, maxY]
          },
          {
            name: SCALE.COLOR,
            type: "ordinal",
            domain: categories,
            range: { scheme: colorScheme }
          }
        ],
        signals: [
          {
            name: SIGNAL.TOOLTIP,
            update: "{}",
            on: [{ events: "mousemove", update: `datum && datum.${FIELD_NAME_X}` }]
          }
        ],
        axes: [
          {
            orient: "bottom",
            scale: SCALE.X,
            labelFont,
            labelSeparation: 5,
            labelOverlap: true,
            labelFlush: true,
            grid: true,
            format: xFormat,
            tickCount,
            ...pdfSpecial.axes.horizontal
          },
          {
            orient: "left",
            scale: SCALE.Y,
            grid: true,
            tickCount: 5,
            labelFont,
            ...pdfSpecial.axes.vertical
          }
        ],
        marks: [
          {
            type: "group",
            from: {
              facet: {
                name: "splitByColor",
                data: DATASET.DATA,
                groupby: categoryField
              }
            },
            marks: [
              {
                type: "line",
                from: { data: "splitByColor" },
                encode: {
                  enter: {
                    x: { scale: SCALE.X, field: FIELD_NAME_X },
                    y: { scale: SCALE.Y, field: valueField },
                    stroke: { scale: SCALE.COLOR, field: categoryField },
                    interpolate: { value: "monotone" },
                    strokeWidth: { value: 2 },
                    ...normalFill
                  },
                  update: { ...normalFill }
                }
              }
            ]
          },
          {
            type: "symbol",
            from: { data: DATASET.TOOLTIP_VALUES },
            encode: {
              update: {
                x: { scale: SCALE.X, signal: SIGNAL.TOOLTIP },
                y: { scale: SCALE.Y, field: valueField },
                fill: { scale: SCALE.COLOR, field: categoryField },
                ...normalFill,
                point: { value: true },
                stroke: { value: "#ffffff" },
                strokeWidth: { value: 2 }
              }
            }
          },
          {
            type: "rect",
            from: { data: DATASET.TOOLTIP },
            encode: {
              enter: {
                x: [
                  {
                    test: `toNumber(datum.${FIELD_NAME_X}) === ${first}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: -10 }
                  },
                  {
                    test: `${timeslots.length > 1} && toNumber(datum.${FIELD_NAME_X}) === ${second}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: -firstGap }
                  },
                  {
                    test: `${timeslots.length > 2} && toNumber(datum.${FIELD_NAME_X}) !== ${first}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: -gap }
                  }
                ],
                x2: [
                  {
                    test: `toNumber(datum.${FIELD_NAME_X}) === ${last}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: 10 }
                  },
                  {
                    test: `${timeslots.length > 1} && toNumber(datum.${FIELD_NAME_X}) === ${first}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: firstGap }
                  },
                  {
                    test: `${timeslots.length > 2} && toNumber(datum.${FIELD_NAME_X}) !== ${last}`,
                    scale: SCALE.X,
                    field: FIELD_NAME_X,
                    offset: { value: gap }
                  }
                ],
                y: { scale: SCALE.Y, value: 0 },
                y2: { scale: SCALE.Y, value: maxY },
                opacity: { value: 0 },
                tooltip: {
                  signal: `{ title: timeFormat(datum.${FIELD_NAME_X}, '%x %X'), ${categories.map((c) => `'${c}': datum['${c}']`).join(",")} }`
                }
              }
            }
          }
        ],
        ...pdfSpecial.global
      };
    };
    const getPieSchema = (type, width, height, origData, graphSettings, t2) => {
      const {
        categoryField,
        categories: origCategories,
        categoryMapping,
        colorScheme = DEFAULT_SCHEME,
        valueField = "y"
      } = graphSettings;
      const categories = origCategories.map((x) => t2(categoryMapping[x]));
      const data2 = origData.map((d) => ({
        ...d,
        [categoryField]: t2(categoryMapping[d[categoryField]])
      }));
      const isEmpty = data2.some((item) => item[valueField] > 0);
      const basis = {
        $schema: "https://vega.github.io/schema/vega/v5.json",
        padding: 10,
        width,
        height,
        autosize: { type: "fit", resize: true },
        scales: [
          {
            name: SCALE.COLOR,
            type: "ordinal",
            domain: categories,
            range: { scheme: colorScheme }
          }
        ]
      };
      const size = type === "PDF" ? Math.floor(Math.min(width, height) / 2) : Math.floor(Math.max(Math.min(width, height) / 2, 55));
      const sizeInfo = {
        x: width / 2,
        y: height / 2,
        innerSize: size > 70 ? Math.floor(size / 2) : 35,
        size
      };
      const pdfSpecial = type === "PDF" ? {
        marks: {
          arc: {
            outerRadius: { value: sizeInfo.size }
          }
        }
      } : { marks: { arc: {} } };
      return isEmpty ? {
        ...basis,
        data: [
          {
            name: DATASET.DATA,
            values: data2,
            transform: [
              {
                type: "pie",
                field: valueField
              }
            ]
          }
        ],
        axes: [],
        signals: [
          {
            name: SIGNAL.PIE_ARC_HOVER,
            value: null,
            on: [
              {
                events: "@pieArc:mouseover",
                update: "datum"
              },
              {
                events: "@pieArc:mouseout",
                update: "null"
              }
            ]
          },
          {
            name: SIGNAL.PIE_CENTER_VALUE,
            value: null,
            update: `${SIGNAL.PIE_ARC_HOVER} ? ${SIGNAL.PIE_ARC_HOVER}['${valueField}'] : null`
          },
          {
            name: SIGNAL.PIE_CENTER_CATEGORY,
            value: null,
            update: `${SIGNAL.PIE_ARC_HOVER} ? ${SIGNAL.PIE_ARC_HOVER}['${categoryField}']  : null`
          }
        ],
        marks: [
          {
            type: "arc",
            name: "pieArc",
            from: { data: DATASET.DATA },
            interactive: true,
            encode: {
              enter: {
                xc: { value: sizeInfo.x },
                yc: { value: sizeInfo.y },
                fill: { scale: SCALE.COLOR, field: categoryField },
                startAngle: { field: "startAngle" },
                endAngle: { field: "endAngle" },
                padAngle: { value: 0.01 },
                innerRadius: { value: sizeInfo.innerSize },
                outerRadius: { value: sizeInfo.size - 6 },
                cornerRadius: { value: 0 },
                align: { value: "right" },
                ...pdfSpecial.marks.arc
              },
              update: {
                fillOpacity: { value: 0.9 }
              }
            }
          },
          {
            type: "arc",
            name: "hoverArc",
            from: { data: DATASET.DATA },
            interactive: true,
            encode: {
              enter: {
                xc: { value: sizeInfo.x },
                yc: { value: sizeInfo.y },
                fill: { scale: SCALE.COLOR, field: categoryField },
                startAngle: { field: "startAngle" },
                endAngle: { field: "endAngle" },
                padAngle: { value: 0.01 },
                innerRadius: { value: sizeInfo.size - 3 },
                outerRadius: { value: sizeInfo.size },
                cornerRadius: { value: 0 },
                align: { value: "right" }
              },
              update: {
                fillOpacity: { signal: `${SIGNAL.PIE_ARC_HOVER} === datum ? 0.9 : 0` }
              }
            }
          },
          {
            type: "text",
            from: { data: DATASET.DATA },
            encode: {
              update: {
                x: { value: sizeInfo.x },
                y: { value: sizeInfo.y },
                text: { signal: SIGNAL.PIE_CENTER_VALUE },
                fillOpacity: { value: 0.9 },
                fontSize: {
                  signal: `min(floor(${sizeInfo.innerSize * 2 - 4} / (0.7 * length(toString(${SIGNAL.PIE_CENTER_VALUE} ? ${SIGNAL.PIE_CENTER_VALUE} : 0)))), 30)`
                },
                fill: { signal: `scale('${SCALE.COLOR}', ${SIGNAL.PIE_CENTER_CATEGORY})` },
                align: { value: "center" },
                baseline: { value: "middle" }
              }
            }
          }
        ]
      } : {
        ...basis,
        marks: [
          {
            type: "arc",
            name: "pieArc",
            encode: {
              enter: {
                xc: { value: sizeInfo.x },
                yc: { value: sizeInfo.y },
                fill: { value: "lightgray" },
                startAngle: { value: 0 },
                endAngle: { value: 6.29 },
                padAngle: { value: 0.01 },
                innerRadius: { value: sizeInfo.innerSize },
                outerRadius: { value: sizeInfo.size },
                cornerRadius: { value: 0 },
                align: { value: "right" }
              },
              update: {
                fillOpacity: { value: 0.7 }
              }
            }
          }
        ]
      };
    };
    const combineOverride = (dashboard, dashboardOverride, globalSettings) => {
      const override = dashboardOverride ?? {};
      const paramDef = {
        ...dashboard.paramDef,
        ...globalSettings,
        ...override.paramDef ?? {}
      };
      return { ...dashboard, paramDef };
    };
    const generateDashboardDefinitions = (globalSettings, dashboardsOverrides) => {
      const dashboards = {};
      Object.entries(getDefaultDashboards()).forEach(([key, dashboard]) => {
        if (dashboard.type === StatisticsType.COMBINED) {
          dashboards[key] = {
            ...dashboard,
            content: dashboard.content.map((d) => combineOverride(d, dashboardsOverrides[d.key], globalSettings))
          };
        } else {
          dashboards[key] = combineOverride(
            dashboard,
            dashboardsOverrides[key],
            globalSettings
          );
        }
      });
      return dashboards;
    };
    const getDefaultPeriod = (duration, defPeriod) => {
      if (defPeriod !== void 0) {
        const base = defPeriod ?? duration;
        return { period: base, round: base > DAY ? "day" : "hour" };
      }
      return duration <= 3 * DAY ? { period: HOUR, round: "hour" } : { period: DAY, round: "day" };
    };
    const generateDashboardRequests = (dashboardDefinitions) => {
      const now = DateTime.fromSeconds(getCurrentTime());
      const requests = [];
      const innerDashboards = [];
      const dashboardsWithRequests = dashboardDefinitions.filter((def) => {
        if (def.type !== StatisticsType.COMBINED) {
          return true;
        }
        innerDashboards.push(...def.content);
        return false;
      });
      const allDashboardsWithRequests = [...dashboardsWithRequests, ...innerDashboards];
      allDashboardsWithRequests.forEach((def) => {
        const matchingIndex = requests.findIndex(
          (request) => request.requestType === def.requestType && isDeepEqual(request.paramDef, def.paramDef)
        );
        if (matchingIndex > -1) {
          requests[matchingIndex].definitions.push(def);
        } else {
          requests.push({
            requestType: def.requestType,
            paramDef: def.paramDef,
            lastUpdate: now.toSeconds(),
            definitions: [def]
          });
        }
      });
      return requests.map((request) => {
        let fromTime;
        let period;
        let toTime;
        const originalParams = { ...request.paramDef };
        if (request.paramDef.fromTime !== void 0) {
          fromTime = DateTime.fromSeconds(request.paramDef.fromTime);
          period = getDefaultPeriod(now.diff(fromTime).as("seconds"), request.paramDef.period);
          if (request.paramDef.period !== null) {
            toTime = now.toUTC().startOf(period.round).plus({ [period.round]: 1 });
          } else {
            toTime = now.toUTC();
          }
        } else {
          period = getDefaultPeriod(request.paramDef.duration, request.paramDef.period);
          toTime = now.toUTC().startOf(period.round).plus({ [period.round]: 1 });
          fromTime = toTime.minus({ seconds: request.paramDef.duration });
        }
        delete originalParams.duration;
        return {
          ...request,
          periodType: period.round,
          params: {
            ...originalParams,
            fromTime: fromTime.toSeconds(),
            period: period.period,
            toTime: toTime.toSeconds()
          }
        };
      });
    };
    const getExcelTime = (time2) => DateTime.fromSeconds(time2).toFormat("yyyy-MM-dd HH:mm:ss");
    const getReportCsvData = (def, origData, timeslots, t2) => {
      switch (def.type) {
        case StatisticsType.NUMBER:
          return { json: [[origData]], cols: [t2(def.title)] };
        case StatisticsType.TABLE: {
          const data2 = origData;
          const cols = def.tableSettings.columns;
          return {
            json: data2.map((row) => cols.map((c) => c.id !== "timestamp" ? c.field(row) : getExcelTime(row.timestamp))),
            cols: cols.map((c) => t2(c.name))
          };
        }
        case StatisticsType.MULTI: {
          const data2 = origData;
          const settings = def.graphSettings;
          const completeData = timeslots.map((slot) => {
            const values = settings.categories.map((category) => {
              const matching = data2.find((d) => d.timestamp === slot && d[settings.categoryField] === category);
              return matching ? matching[def.dataField] : 0;
            });
            return [getExcelTime(slot), ...values];
          });
          return {
            json: completeData,
            cols: [t2("IDUS_STATS_COLUMN_DETECTION_TIME"), ...settings.categories.map((c) => t2(settings.categoryMapping[c]))]
          };
        }
        case StatisticsType.PIE: {
          const data2 = origData;
          const settings = def.graphSettings;
          return {
            json: settings.categories.map((c) => {
              const matching = data2.find((row) => row[settings.categoryField] === c);
              return [t2(settings.categoryMapping[c]), matching ? matching[def.dataField] : 0];
            }),
            cols: [t2(settings.categoryTitle), t2(def.title)]
          };
        }
        default:
          return { json: [], cols: [] };
      }
    };
    const filenameInterval = (interval) => interval === "login" ? "since-last-login" : interval.split("-").reverse().join("-");
    const dashboardExportTitle = (definition, pluralType) => definition.type === StatisticsType.TABLE ? pluralize(definition.exportTitle, definition.paramDef.limit ?? 0, pluralType) : definition.exportTitle;
    const getCsvDef = (languagePluralType, t2) => (definition, data2) => {
      const { error = true, data: matchingData, timeslots = [] } = data2 ?? {};
      if (error) {
        return null;
      }
      const { json, cols } = getReportCsvData(definition, matchingData, timeslots, t2);
      const csv = jsonToCsv(json, cols);
      const titleText = dashboardExportTitle(definition, languagePluralType);
      return {
        name: `${titleText}.csv`,
        content: new Blob([csv])
      };
    };
    const getPdfContent = async (doc, start, definition, data2, t2, callback, locale, font = FontFamily.Default) => {
      const { data: matchingData, timeslots = [], periodType = "" } = data2;
      switch (definition.type) {
        case StatisticsType.PIE: {
          const sett = {
            valueField: definition.dataField,
            ...getDefaultedSettings(definition.graphSettings)
          };
          const schema = getPieSchema(SCHEMA_TYPE.PDF, 300, 300, matchingData, sett, t2);
          const vegaGraph = new View(parse(schema), { renderer: "none" });
          const canvas = await vegaGraph.toCanvas();
          doc.addImage(canvas, "PNG", start.x + 30, start.y, 130, 130);
          const { colorScheme, categoryMapping, categoryField, categories, valueField } = sett;
          const colours = scheme(colorScheme);
          let y = start.y + 40;
          const x = start.x + 30 + 130 + 20;
          doc.setFontSize(12);
          categories.forEach((category, i) => {
            doc.setFillColor(colours[i]);
            doc.circle(x, y - 4, 5, "F");
            doc.text(t2(categoryMapping[category]), x + 15, y);
            const categoryMatch = matchingData.find((item) => item[categoryField] === category) ?? {};
            const val = categoryMatch[valueField] ?? 0;
            doc.text(val.toString(), x + 200, y, { align: "right" });
            y += 15;
          });
          callback(doc);
          break;
        }
        case StatisticsType.MULTI: {
          const sett = {
            valueField: definition.dataField,
            timeslots,
            periodType,
            ...getDefaultedSettings(definition.graphSettings)
          };
          const { colorScheme, categoryMapping, categories } = sett;
          const colours = scheme(colorScheme);
          let y = start.y + 20;
          doc.setFontSize(12);
          categories.forEach((category, i) => {
            doc.setFillColor(colours[i]);
            doc.circle(start.x + 10, y - 4, 5, "F");
            doc.text(t2(categoryMapping[category]), start.x + 25, y);
            y += 15;
          });
          const schema = getLineSchema(SCHEMA_TYPE.PDF, (start.xEnd - start.x) * 2, 400, matchingData, sett, t2, locale);
          const vegaGraph = new View(parse(schema), { renderer: "none" });
          const canvas = await vegaGraph.toCanvas();
          doc.addImage(canvas, "PNG", start.x, y, start.xEnd - start.x, 200);
          callback(doc);
          break;
        }
        case StatisticsType.TABLE: {
          const elem = document.getElementById(definition.key);
          if (elem) {
            const clone = elem.cloneNode(true);
            clone.style.width = "600px";
            clone.style.fontFamily = font;
            clone.style.fontSize = "12px";
            if (font === FontFamily.Roboto) {
              clone.style.letterSpacing = "0.4px";
            }
            doc.html(clone, {
              x: start.x,
              y: start.y,
              callback,
              html2canvas: {
                scale: 0.66
              }
            });
          }
          break;
        }
      }
      return doc;
    };
    const getReportTitle = (definition, t2, pluralType) => definition.type === StatisticsType.TABLE ? pluralize(t2(definition.title), definition.paramDef.limit ?? 0, pluralType) : t2(definition.title);
    const stretchToFillRow = (rowSum, rowDefs) => {
      if (rowSum === 4) {
        return rowDefs;
      }
      let items = [...rowDefs];
      const maxSizeSum = rowDefs.reduce((sum, item) => sum + item.maxSize, 0);
      let slotsToUse = Math.min(4, maxSizeSum) - rowSum;
      let processedPriority = 1e3;
      const getPriority = () => Math.max(...rowDefs.map((item) => item.growPriority < processedPriority ? item.growPriority : -1));
      const possiblyStretchItem = (item) => {
        if (slotsToUse === 0 || item.growPriority !== processedPriority) {
          return item;
        }
        const usedSlots = Math.min(slotsToUse, item.maxSize - item.size);
        slotsToUse -= usedSlots;
        return { ...item, size: item.size + usedSlots };
      };
      while (slotsToUse > 0 && processedPriority > -1) {
        processedPriority = getPriority();
        items = items.map(possiblyStretchItem);
      }
      return items;
    };
    const callbacks$2 = new RegisterCallbackContainer();
    const statisticsCallbackResponse = (result) => {
      callbacks$2.call(result.callbackId, result);
      return { type: REPORTS_ACTION_KEYS.REPORTS_REMOVE_CALLBACK_ID, value: result.callbackId };
    };
    const reportResponseHandler = (lastUpdate, defs, timeslots, periodType, withLoading) => (response, dispatch) => {
      const reports = {};
      const errorResponse = response;
      if (errorResponse.error) {
        defs.forEach((def) => {
          reports[def.key] = { lastUpdate, error: errorResponse.error, data: null, timeslots, periodType };
        });
      } else {
        const data2 = response.rows;
        defs.forEach((def) => {
          const matchingData = def.preprocess ? def.preprocess(data2) : data2;
          let value = null;
          let error = null;
          if (def.type === StatisticsType.NUMBER && matchingData.length === 0 && def.defaultValue !== void 0) {
            value = def.defaultValue;
          } else if (def.type === StatisticsType.NUMBER && def.dataField && matchingData.length === 1) {
            value = matchingData[0][def.dataField];
          } else if ([StatisticsType.MULTI, StatisticsType.TABLE, StatisticsType.PIE].includes(def.type)) {
            value = matchingData;
          } else {
            error = Error$1.REPORT_ERROR;
          }
          reports[def.key] = { lastUpdate, error, data: value, timeslots, periodType };
        });
      }
      dispatch({ type: REPORTS_ACTION_KEYS.REPORTS_SET_REPORT, value: reports });
      if (withLoading) {
        dispatch({
          type: REPORTS_ACTION_KEYS.REPORTS_SET_LOADING_INTERVAL,
          value: { keys: defs.map((d) => d.key), remove: true }
        });
      }
    };
    const requestGenericReport = (messageKey, parameters, responseHandler) => {
      return (dispatch) => {
        const responseCallback = (response) => {
          responseHandler(response, dispatch);
        };
        const callbackId = callbacks$2.register(responseCallback, messageKey);
        dispatch({ type: REPORTS_ACTION_KEYS.REPORTS_ADD_CALLBACK_ID, value: callbackId });
        socketio.socketioEmit(messageKey, { callbackId, parameters });
      };
    };
    const setReportDefinitions = (reportOverrides = {}) => (dispatch, getState) => {
      const globalSettings = getState().reports.dashboardSettings;
      const generatedDefinitions = generateDashboardDefinitions(globalSettings, reportOverrides);
      dispatch({ type: REPORTS_ACTION_KEYS.REPORTS_SET_REPORT_DEFINITIONS, value: generatedDefinitions });
    };
    const getTimes = (from, to, period) => {
      const times = [];
      let time2 = to - period;
      while (time2 > from) {
        times.push(time2);
        time2 -= period;
      }
      return [...times, from].reverse();
    };
    const updateGivenDashboards = (dashboards, withLoading = false) => (dispatch) => {
      const requests = generateDashboardRequests(dashboards);
      requests.forEach((request) => {
        const timeslots = getTimes(request.params.fromTime, request.params.toTime, request.params.period);
        const handler = reportResponseHandler(
          request.lastUpdate,
          request.definitions,
          timeslots,
          request.periodType,
          withLoading
        );
        if (withLoading) {
          dispatch({
            type: REPORTS_ACTION_KEYS.REPORTS_SET_LOADING_INTERVAL,
            value: {
              keys: request.definitions.map((d) => d.key),
              remove: false
            }
          });
        }
        switch (request.requestType) {
          case StatisticsReportType.CleanedStatusDetectionAggregationReport: {
            requestGenericReport(
              messages.cleanedStatusDetectionAggregationRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.AbsoluteDetectionsByMethodAggregationReport: {
            requestGenericReport(
              messages.absoluteDetectionsByMethodAggregationRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.LastXDetectionsReport: {
            requestGenericReport(
              messages.lastXDetectionsRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.TopXUsersOnAccessReport: {
            requestGenericReport(
              messages.topXUsersOnAccessRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.LastXScansWithDetectionsReport: {
            requestGenericReport(
              messages.lastXScansWithDetectionsRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.ScannedFilesByMethodAggregationReport: {
            requestGenericReport(
              messages.scannedFilesByMethodAggregationRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
          case StatisticsReportType.SystemStatsAggregationReport: {
            requestGenericReport(
              messages.systemStatsAggregationRequest,
              request.params,
              handler
            )(dispatch);
            break;
          }
        }
      });
    };
    const updateDashboards = (withLoading = false) => (dispatch, getState) => {
      const { definitions: definitions2, displayedReports } = getState().reports;
      const displayedDefinitions = Object.values(definitions2).filter((def) => displayedReports.includes(def.key));
      updateGivenDashboards(displayedDefinitions, withLoading)(dispatch);
    };
    const setDisplayedReports = (displayedReports) => ({
      type: REPORTS_ACTION_KEYS.REPORTS_SET_DISPLAYED_REPORTS,
      value: displayedReports
    });
    const removeDisplayedReport = (reportId) => ({
      type: REPORTS_ACTION_KEYS.REPORTS_REMOVE_DISPLAYED_REPORT,
      value: reportId
    });
    const resetDisplayedReports = () => ({
      type: REPORTS_ACTION_KEYS.REPORTS_RESET_DISPLAYED_REPORTS
    });
    const setSelectedInterval = (id2, settings) => ({
      type: REPORTS_ACTION_KEYS.REPORTS_SET_SELECT_INTERVAL,
      value: { id: id2, settings }
    });
    const setFullscreen = (id2) => ({
      type: REPORTS_ACTION_KEYS.REPORTS_SET_FULLSCREEN,
      value: id2
    });
    const statsTile = "_statsTile_1u8qa_1";
    const data = "_data_1u8qa_4";
    const valueWrapper = "_valueWrapper_1u8qa_7";
    const style$s = {
      statsTile,
      data,
      valueWrapper
    };
    const textColorMap$1 = {
      success: colors.success,
      info: colors.info,
      warning: colors.warning,
      error: colors.error
    };
    const iconMap = {
      success: IconStatusOk,
      info: IconLetterI,
      warning: IconStatusWarning,
      error: IconStatusError
    };
    const PureStatsTile = React.memo((props) => {
      const { t: t2 } = useTranslation();
      const { title, type } = props;
      const color = type ? textColorMap$1[type] : void 0;
      const TileIcon = !type || props.error ? props.defaultIcon ?? default_1$t : iconMap[type];
      const value = props.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$s.data, fontSize: "16px", children: t2("IDUS_STATS_VALUE_UNAVAILABLE") }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$s.data, fontSize: "28px", fontWeight: "bold", children: props.data });
      const className = props.className ? [style$s.statsTile, props.className].join(" ") : style$s.statsTile;
      const titlePart = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-4 mb-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontSize: "14px", children: title }) }),
        [title]
      );
      logGroup("StatsTile", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$8, { type, hideContentIcon: true, className, id: props.id, onClick: props.onClick, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$s.valueWrapper, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(TileIcon, { size: 28, fill: color }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: props.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, { size: "30px" }) : value })
        ] }),
        titlePart
      ] });
    });
    const StatsTile = withErrorBoundary()(PureStatsTile);
    StatsTile.displayName = "StatsTile";
    const rightPanelSection = "_rightPanelSection_1fd2n_1";
    const topDivider = "_topDivider_1fd2n_6";
    const bottomDivider = "_bottomDivider_1fd2n_10";
    const paddedLink = "_paddedLink_1fd2n_14";
    const centeredFlex = "_centeredFlex_1fd2n_19";
    const centeredFlexCol = "_centeredFlexCol_1fd2n_19";
    const linkWithButtons = "_linkWithButtons_1fd2n_28";
    const clickable$2 = "_clickable_1fd2n_33";
    const inlineBlock = "_inlineBlock_1fd2n_40";
    const withPrefixIcon = "_withPrefixIcon_1fd2n_44";
    const prefixIcon = "_prefixIcon_1fd2n_47";
    const middleRow = "_middleRow_1fd2n_52";
    const dashboardRowFix = "_dashboardRowFix_1fd2n_57";
    const exclusionRadioTile = "_exclusionRadioTile_1fd2n_67";
    const disabled = "_disabled_1fd2n_70";
    const exclusionRadioItem = "_exclusionRadioItem_1fd2n_75";
    const exclusionCriteriaWrapper = "_exclusionCriteriaWrapper_1fd2n_79";
    const exclusionCriteriaFormGroup = "_exclusionCriteriaFormGroup_1fd2n_80";
    const exclusionIconListWrapper = "_exclusionIconListWrapper_1fd2n_84";
    const exclusionIconListItem = "_exclusionIconListItem_1fd2n_90";
    const exclusionIconListIcon = "_exclusionIconListIcon_1fd2n_93";
    const exclusionIconListText = "_exclusionIconListText_1fd2n_97";
    const style$r = {
      rightPanelSection,
      topDivider,
      bottomDivider,
      paddedLink,
      centeredFlex,
      centeredFlexCol,
      linkWithButtons,
      clickable: clickable$2,
      inlineBlock,
      withPrefixIcon,
      prefixIcon,
      middleRow,
      dashboardRowFix,
      exclusionRadioTile,
      disabled,
      exclusionRadioItem,
      exclusionCriteriaWrapper,
      exclusionCriteriaFormGroup,
      exclusionIconListWrapper,
      exclusionIconListItem,
      exclusionIconListIcon,
      exclusionIconListText
    };
    const overlayWrapper$1 = "_overlayWrapper_qh5r5_1";
    const loading = "_loading_qh5r5_7";
    const overlay = "_overlay_qh5r5_1";
    const style$q = {
      overlayWrapper: overlayWrapper$1,
      loading,
      overlay
    };
    class LoadingOverlay extends React.Component {
      render() {
        const { loading: loading2, className, innerClassName, id: id2, divRef } = this.props;
        logGroup("PlainText", [["props", this.props]], void 0, this.props.debug);
        const combinedClass = [style$q.overlayWrapper, className, this.props.onClick ? style$r.clickable : ""].filter((x) => x).join(" ");
        const combinedOverlayClass = [style$q.overlay, innerClassName].filter((x) => x).join(" ");
        return (
          // EslintNote: Eslint claims the role is not defined, but it is; It likely does not manage to properly recognize it, as it is dynamic
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: id2, className: combinedClass, ref: divRef, onClick: this.props.onClick, role: this.props.role, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: combinedOverlayClass, children: this.props.children }),
            loading2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$q.loading, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, { size: "30px" }) })
          ] })
        );
      }
    }
    const wrapper = "_wrapper_105q3_1";
    const innerWrapper = "_innerWrapper_105q3_6";
    const legend = "_legend_105q3_12";
    const horizontal = "_horizontal_105q3_15";
    const vegaWrapper = "_vegaWrapper_105q3_20";
    const missingData = "_missingData_105q3_29";
    const circle = "_circle_105q3_43";
    const legendRow = "_legendRow_105q3_50";
    const horizontalLegend = "_horizontalLegend_105q3_53";
    const withValue = "_withValue_105q3_56";
    const legendValue = "_legendValue_105q3_59";
    const style$p = {
      wrapper,
      innerWrapper,
      legend,
      horizontal,
      vegaWrapper,
      missingData,
      circle,
      legendRow,
      horizontalLegend,
      withValue,
      legendValue
    };
    const PureVegaTileLegend = React.memo((props) => {
      const { settings, getLegendEntry, legendId } = props;
      logGroup("VegaTileLegend", [["props", props]], void 0, props.debug);
      const defaultedSettings = getDefaultedSettings(settings);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-2 mt-2", id: `${legendId}-legend`, className: style$p.legend, children: defaultedSettings.categories.map(
        (category, index) => getLegendEntry(category, index, defaultedSettings)
      ) });
    });
    const VegaTileLegend = withErrorBoundary()(PureVegaTileLegend);
    VegaTileLegend.displayName = "VegaTileLegend";
    class PureVegaTile extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "graphRef", React.createRef());
        __publicField(this, "wrapperRef", React.createRef());
        __publicField(this, "sizeObserver", null);
        __publicField(this, "mutationObserver", null);
        __publicField(this, "state", {
          vegaError: false,
          width: 0,
          height: 0,
          wrapperWidth: 0
        });
        __publicField(this, "handleResize", () => {
          const { current } = this.graphRef;
          const { current: wrapperCurrent } = this.wrapperRef;
          const changes = {};
          if (current) {
            changes.width = current.offsetWidth;
            changes.height = current.offsetHeight;
          }
          if (wrapperCurrent) {
            changes.wrapperWidth = wrapperCurrent.offsetWidth;
          }
          this.setState(changes);
        });
        __publicField(this, "getContent", () => {
          if (this.props.error || this.state.vegaError) {
            return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-3 py-4", className: style$p.missingData, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontSize: "16px", children: this.props.t("IDUS_STATS_VALUE_UNAVAILABLE") }) });
          }
          const width = this.state.width - 30;
          const height = Math.max(this.state.height - 40, 110);
          const spec = this.props.getSchema(width, height, getDefaultedSettings(this.props.settings));
          return /* @__PURE__ */ jsxRuntimeExports.jsx(
            Yc,
            {
              width,
              height,
              enableHover: true,
              enableTooltip: true,
              onError: (e) => {
                log(["Graph data was invalid", e], LogLevel.WARNING, LogEnv.PRODUCTION);
                this.setState({ vegaError: true });
              },
              spec
            }
          );
        });
      }
      componentDidMount() {
        this.handleResize();
        const elem = document.getElementById(this.props.id);
        if (elem) {
          if (window.ResizeObserver) {
            this.sizeObserver = new ResizeObserver(() => {
              this.handleResize();
            });
            this.sizeObserver.observe(elem);
          }
          if (window.MutationObserver) {
            this.mutationObserver = new MutationObserver((mutations) => {
              if (mutations.some((mutation) => mutation.attributeName === "class")) {
                this.handleResize();
              }
            });
            this.mutationObserver.observe(elem, { attributes: true });
          }
        }
      }
      componentWillUnmount() {
        if (this.sizeObserver) {
          this.sizeObserver.disconnect();
        }
        if (this.mutationObserver) {
          this.mutationObserver.disconnect();
        }
      }
      render() {
        const className = [
          style$p.wrapper,
          this.props.className,
          this.props.horizontalLimit && this.state.wrapperWidth > this.props.horizontalLimit ? style$p.horizontal : ""
        ].filter((x) => x).join(" ");
        logGroup(
          "VegaTile",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u.BasicItem, { header: () => this.props.header, className: this.props.wrapperClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          LoadingOverlay,
          {
            loading: this.props.loading,
            divRef: this.wrapperRef,
            id: this.props.id,
            className,
            innerClassName: style$p.innerWrapper,
            onClick: this.props.onClick,
            role: "link",
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                VegaTileLegend,
                {
                  settings: this.props.settings,
                  legendId: this.props.id,
                  getLegendEntry: this.props.getLegendEntry
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `${this.props.id}-inner-wrapper`, ref: this.graphRef, className: style$p.vegaWrapper, children: this.getContent() })
            ]
          }
        ) });
      }
    }
    const VegaTile = withErrorBoundary()(withTranslation()(PureVegaTile));
    VegaTile.displayName = "VegaTile";
    const GraphTile = (props) => {
      const { t: t2 } = useTranslation();
      const { id: id2, timeslots, periodType, data: data2, valueField, locale } = props;
      const getSchema = reactExports.useCallback(
        (width, height, settings) => getLineSchema(
          SCHEMA_TYPE.BROWSER,
          width,
          height,
          data2,
          { ...settings, valueField, periodType, timeslots },
          t2,
          locale
        ),
        [data2, locale, valueField, periodType, timeslots, t2]
      );
      const getLegendEntry = reactExports.useCallback(
        (category, index, settings) => {
          const { colorScheme, categoryMapping } = settings;
          const colours = scheme(colorScheme);
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(
            default_1,
            {
              type: "mx-2 mb-2",
              className: [style$p.legendRow, style$p.horizontalLegend].join(" "),
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$p.circle, style: { backgroundColor: colours[index] } }) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2(categoryMapping[category]) })
              ]
            },
            `${id2}-legend-${category}`
          );
        },
        [id2, t2]
      );
      logGroup(
        "GraphTile",
        [
          ["getSchema", getSchema],
          ["getLegendEntry", getLegendEntry]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(VegaTile, { ...props, getSchema, getLegendEntry });
    };
    GraphTile.displayName = "GraphTile";
    const tableTile = "_tableTile_7dl8d_1";
    const tableTileRow = "_tableTileRow_7dl8d_6";
    const tableTileHeader = "_tableTileHeader_7dl8d_10";
    const numberColumn = "_numberColumn_7dl8d_14";
    const tableTileTable = "_tableTileTable_7dl8d_19";
    const dataColumn = "_dataColumn_7dl8d_25";
    const clickableRow = "_clickableRow_7dl8d_29";
    const errorRow = "_errorRow_7dl8d_35";
    const style$o = {
      tableTile,
      tableTileRow,
      tableTileHeader,
      numberColumn,
      tableTileTable,
      dataColumn,
      clickableRow,
      errorRow
    };
    const clickable$1 = "_clickable_1ucdc_1";
    const style$n = {
      clickable: clickable$1
    };
    const ClickableWrapper = ({ children, onClick, className, role = "button" }) => (
      // EslintNote: Eslint claims the role is not defined, but it is; It likely does not manage to properly recognize it, as it is dynamic
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          className: className ? [style$n.clickable, className].join(" ") : style$n.clickable,
          onClick,
          onKeyUp: (e) => e.key === "Enter" && onClick(),
          role,
          children
        }
      )
    );
    const PureTableTile = (props) => {
      const { t: t2, loading: loading2, wrapperClassName } = props;
      const { getId, getRedirect, getRowType, columns } = props.settings;
      const className = [style$o.tableTile, props.className].filter((x) => x).join(" ");
      logGroup("TableTile", [["props", props]], void 0, props.debug);
      const content2 = props.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-3 py-4", className: style$o.missingData, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontSize: "16px", children: t2("IDUS_STATS_VALUE_UNAVAILABLE") }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$o.tableTileTable, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: [style$o.tableTileRow, style$o.tableTileHeader].join(" "), children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pl-2 pr-1 py-1", className: style$o.numberColumn, children: " " }),
          columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-1 py-1", style: column.style, className: style$o.valueColumn, children: t2(column.name) }, column.name))
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$o.tableContent, children: props.data.map((item, i) => {
          const redirectLink = getRedirect == null ? void 0 : getRedirect(item);
          const id2 = getId(item, i);
          const rowTypeClassKey = getRowType == null ? void 0 : getRowType(item);
          const wrapperProps = {
            className: [
              style$o.tableTileRow,
              rowTypeClassKey ? style$o[`${rowTypeClassKey}Row`] : "",
              redirectLink ? style$o.clickableRow : ""
            ].filter((x) => x).join(" "),
            key: id2,
            id: id2
          };
          const rowContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "pl-2 pr-1 py-1", className: style$o.numberColumn, children: [
              i + 1,
              "."
            ] }),
            columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-1 py-1", style: column.style, className: style$o.valueColumn, children: column.field(item) }, column.name))
          ] });
          return redirectLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(ClickableWrapper, { ...wrapperProps, onClick: () => props.onRowClick(redirectLink), role: "link", children: rowContent }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...wrapperProps, children: rowContent });
        }) })
      ] });
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u.BasicItem, { header: () => props.header, className: wrapperClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingOverlay, { loading: loading2, id: props.id, className, children: content2 }) });
    };
    const TableTile = withErrorBoundary()(withTranslation()(PureTableTile));
    TableTile.displayName = "TableTile";
    const PieTile = React.memo((props) => {
      const { t: t2 } = useTranslation();
      const { id: id2, data: data2, valueField } = props;
      const getSchema = reactExports.useCallback(
        (width, height, settings) => {
          return getPieSchema(SCHEMA_TYPE.BROWSER, width, height, data2, { ...settings, valueField }, t2);
        },
        [data2, valueField, t2]
      );
      const getLegendEntry = reactExports.useCallback(
        (category, index, settings) => {
          const { colorScheme, categoryMapping, categoryField } = settings;
          const colours = scheme(colorScheme);
          const categoryItem = (data2 ?? []).find((item) => item[categoryField] === category) ?? {};
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mb-1", className: [style$p.legendRow, style$p.withValue].join(" "), children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$p.circle, style: { backgroundColor: colours[index] } }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2(categoryMapping[category]) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { className: style$p.legendValue, type: "ml-auto pl-2", children: categoryItem[valueField ?? "y"] ?? 0 })
          ] }, `${id2}-legend-${category}`);
        },
        [id2, data2, valueField, t2]
      );
      logGroup(
        "PieTile",
        [
          ["props", props],
          ["getSchema", getSchema],
          ["getLegendEntry", getLegendEntry]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(VegaTile, { ...props, horizontalLimit: 310, getSchema, getLegendEntry });
    });
    PieTile.displayName = "PieTile";
    const header = "_header_1rktj_1";
    const headerText = "_headerText_1rktj_5";
    const headerActions = "_headerActions_1rktj_8";
    const clickable = "_clickable_1rktj_13";
    const style$m = {
      header,
      headerText,
      headerActions,
      clickable
    };
    const pdfLogo = "/assets/pdf.logo-c59ca59b.png";
    const DashboardTileHeader = React.memo((props) => {
      const { definition, isFullscreen, children } = props;
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const pluralType = useSelector((state) => state.language.plural);
      logGroup("DashboardHeader", [["props", props]], void 0, props.debug);
      const title = getReportTitle(definition, t2, pluralType);
      const FullscreenIcon = isFullscreen ? IconArrowCollapse : IconArrowExpand;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "px-2 py-2", className: style$m.header, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$m.headerText, children: title }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$m.headerActions, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-4", children }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            FullscreenIcon,
            {
              testDataLabel: `${definition.key}-fullscreen`,
              id: `${definition.key}-${isFullscreen ? "collapse-fullscreen" : "fullscreen"}`,
              onClick: () => dispatch(setFullscreen(isFullscreen ? null : definition.key)),
              className: style$m.clickable
            }
          ) })
        ] })
      ] });
    });
    DashboardTileHeader.displayName = "DashboardTileHeader";
    class PureDashboardTile extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "getSettings", (title) => {
          const { t: t2, definition, data: data2, locale, pdfFont } = this.props;
          const { error = true, data: matchingData, timeslots = [] } = data2 ?? {};
          const titleText = dashboardExportTitle(definition, this.props.pluralType);
          const intervalText = filenameInterval(this.props.selectedIntervalId);
          return [
            {
              title: t2("IDUS_STATS_ACTIONS_GRAPH_REFRESH"),
              id: `${definition.key}-refresh`,
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowRefresh, {}),
              callback: () => this.props.updateGivenDashboards([definition], true)
            },
            {
              title: t2("IDUS_STATS_ACTIONS_GRAPH_DOWNLOAD"),
              id: `${definition.key}-download-parent`,
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}),
              placement: "right",
              subMenu: [
                {
                  header: t2("IDUS_STATS_ACTIONS_GRAPH_DOWNLOAD_SUBTITLE"),
                  items: [
                    {
                      title: t2("IDUS_STATS_ACTIONS_GRAPH_CSV"),
                      id: `${definition.key}-download-csv`,
                      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}),
                      disabled: !!error || !matchingData,
                      callback: () => {
                        const { json, cols } = getReportCsvData(definition, matchingData, timeslots, t2);
                        const csv = jsonToCsv(json, cols);
                        downloadBlob(new Blob([csv]), `${titleText}-${intervalText}.csv`);
                      }
                    },
                    {
                      title: t2("IDUS_STATS_ACTIONS_GRAPH_PDF"),
                      id: `${definition.key}-download-pdf`,
                      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}),
                      disabled: !!error || !matchingData,
                      callback: async () => {
                        const doc = new E({ unit: "px" });
                        await loadFontForPDF(pdfFont, doc);
                        doc.setFont(pdfFont, "normal");
                        doc.setDrawColor(colors.formInputBorderColor);
                        doc.setTextColor(colors.text);
                        doc.addImage(pdfLogo, "PNG", 20, 20, 120, 18);
                        doc.setFontSize(11);
                        doc.text(
                          `${this.props.t("IDUS_STATS_PDF_GENERATED")}: ${getLocalizedTime(getCurrentTime())}`,
                          425,
                          35,
                          { align: "right" }
                        );
                        doc.line(20, 40, 425, 40);
                        doc.setFontSize(14);
                        doc.setFont(pdfFont, "bold");
                        doc.text(title, 222, 70, { align: "center" });
                        doc.setFontSize(12);
                        doc.setFont(pdfFont, "normal");
                        const matchingInterval = getNameFromInterval(this.props.selectedIntervalId);
                        const intervalName = matchingInterval.num ? pluralize(t2(matchingInterval.key), matchingInterval.num, this.props.pluralType) : `${t2(matchingInterval.key)} - ${getLocalizedTime(getLastLogin())}`;
                        doc.text(`(${intervalName})`, 222, 85, { align: "center" });
                        doc.line(20, 590, 425, 590);
                        doc.text("1 / 1", 222, 610, { align: "center" });
                        doc.setFont(pdfFont, "normal");
                        await getPdfContent(
                          doc,
                          { x: 20, y: 100, xEnd: 425 },
                          definition,
                          data2 ?? {},
                          this.props.t,
                          (d) => {
                            d.save(`${titleText}-${intervalText}.pdf`);
                          },
                          locale,
                          pdfFont
                        );
                      }
                    }
                  ]
                }
              ]
            },
            {
              title: t2("IDUS_STATS_ACTIONS_GRAPH_CHANGE"),
              id: `${definition.key}-change`,
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$w, {}),
              callback: () => {
                this.props.toggleDashboardConfig(true);
              }
            },
            {
              title: t2("IDUS_STATS_ACTIONS_GRAPH_REMOVE"),
              id: `${definition.key}-remove`,
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionClose, {}),
              callback: () => {
                this.props.removeDisplayedReport(definition.key);
              }
            }
          ];
        });
        __publicField(this, "onClick", () => this.props.navigate(this.props.definition.link));
      }
      render() {
        const { t: t2, definition, data: data2, loading: loading2, className, wrapperClassName, isFullscreen, locale } = this.props;
        const { error = true, data: matchingData, timeslots = [], periodType } = data2 ?? {};
        logGroup("DashboardTile", [["props", this.props]], void 0, this.props.debug);
        const title = getReportTitle(definition, t2, this.props.pluralType);
        const dashboardHeader = /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardTileHeader, { definition, isFullscreen, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Dropdown,
          {
            id: `${definition.key}-settings`,
            zIndex: 1,
            reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$x,
              {
                id: `${definition.key}-settings-trigger`,
                onClick: toggle,
                ref: r2,
                className: style$m.clickable
              }
            ),
            placement: "bottom",
            content: [{ items: this.getSettings(title) }]
          }
        ) });
        const onClick = definition.link ? this.onClick : void 0;
        const commonProps = {
          key: definition.key,
          id: definition.key,
          className,
          wrapperClassName,
          loading: loading2,
          error: !!error
        };
        switch (definition.type) {
          case StatisticsType.NUMBER: {
            const type = matchingData !== null && !error ? definition.getTileType(matchingData) : void 0;
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              StatsTile,
              {
                ...commonProps,
                title: t2(definition.title),
                type,
                defaultIcon: definition.defaultIcon,
                onClick,
                data: matchingData
              }
            );
          }
          case StatisticsType.MULTI:
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              GraphTile,
              {
                ...commonProps,
                header: dashboardHeader,
                settings: definition.graphSettings,
                valueField: definition.dataField,
                onClick,
                timeslots,
                periodType,
                locale,
                data: matchingData
              }
            );
          case StatisticsType.PIE:
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              PieTile,
              {
                ...commonProps,
                header: dashboardHeader,
                settings: definition.graphSettings,
                valueField: definition.dataField,
                onClick,
                data: matchingData
              }
            );
          case StatisticsType.TABLE:
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              TableTile,
              {
                ...commonProps,
                header: dashboardHeader,
                settings: definition.tableSettings,
                onRowClick: (link) => this.props.navigate(link),
                data: matchingData
              }
            );
          default:
            return null;
        }
      }
    }
    const mapDispatchToProps$y = {
      updateGivenDashboards,
      removeDisplayedReport,
      toggleDashboardConfig,
      setFullscreen
    };
    const mapStateToProps$y = (state, props) => ({
      pluralType: state.language.plural,
      locale: state.language.localeKey,
      pdfFont: state.language.pdfFont,
      selectedIntervalId: state.reports.selectedInterval,
      data: state.reports.reports[props.definition.key],
      loading: state.reports.loadingReports.includes(props.definition.key)
    });
    const DashboardTile = withErrorBoundary()(
      withNavigate(withTranslation()(connect(mapStateToProps$y, mapDispatchToProps$y)(PureDashboardTile)))
    );
    DashboardTile.displayName = "DashboardTile";
    const theme$2 = {
      Tag: {
        background: {
          default: "transparent",
          active: colors.headlineColor,
          inactive: "transparent"
        },
        border: {
          default: "transparent",
          active: "transparent",
          inactive: "transparent"
        },
        text: {
          active: colors.secondary
        }
      }
    };
    const dashboardControls = "_dashboardControls_xin28_1";
    const dashboardIntervals = "_dashboardIntervals_xin28_8";
    const dashboardActions = "_dashboardActions_xin28_9";
    const disabledOption = "_disabledOption_xin28_14";
    const style$l = {
      dashboardControls,
      dashboardIntervals,
      dashboardActions,
      disabledOption
    };
    const DashboardControlExport = (props) => {
      const { dashboards } = props;
      const { t: t2 } = useTranslation();
      const languagePluralType = useSelector((state) => state.language.plural);
      const selectedIntervalId = useSelector((state) => state.reports.selectedInterval);
      const data2 = useSelector((state) => state.reports.reports);
      const exportAll = reactExports.useCallback(() => {
        const getCsvDefInLang = getCsvDef(languagePluralType, t2);
        const files = dashboards.map(
          (dashboard) => dashboard.type === StatisticsType.COMBINED ? dashboard.content.map((d) => getCsvDefInLang(d, data2[d.key])) : getCsvDefInLang(dashboard, data2[dashboard.key])
        ).flat().filter((x) => x);
        downloadZip(files, `dashboards-${filenameInterval(selectedIntervalId)}.zip`);
      }, [t2, languagePluralType, dashboards, selectedIntervalId, data2]);
      logGroup(
        "DashboardControlExport",
        [
          ["props", props],
          ["data", data2],
          ["selectedIntervalId", selectedIntervalId],
          ["languagePluralType", languagePluralType]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$3, { id: "dashboard-action-export-all", color: "default", onClick: exportAll, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$y, {}) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("IDUS_STATS_ACTIONS_EXPORT") })
      ] });
    };
    DashboardControlExport.displayName = "DashboardControlExport";
    const DashboardControlExport$1 = React.memo(DashboardControlExport);
    const PureDashboardControls = (props) => {
      const { dashboards } = props;
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const languagePluralType = useSelector((state) => state.language.plural);
      const selectedIntervalId = useSelector((state) => state.reports.selectedInterval);
      const lastLogin = getLastLogin();
      const setIntervalData = reactExports.useCallback(
        (option) => dispatch(setSelectedInterval(option.id, option.settings)),
        [dispatch]
      );
      reactExports.useEffect(() => {
        const loginInterval = getLoginInterval();
        if (selectedIntervalId === loginInterval.id) {
          setIntervalData(loginInterval);
        }
      }, []);
      const options = reactExports.useMemo(
        () => getDefaultIntervals().map((option) => {
          if (option.id === "login") {
            const lastLoginString = lastLogin > 0 ? getLocalizedTime(lastLogin, OUR_DATETIME_SHORT) : "-";
            return {
              ...option,
              title: t2("IDUS_STATS_INTERVAL_LOGIN"),
              tooltip: sprintf(t2("IDUS_STATS_INTERVAL_LOGIN_TOOLTIP"), lastLoginString),
              disabled: lastLogin === 0
            };
          }
          return {
            ...option,
            title: pluralize(t2(option.title), option.value, languagePluralType)
            // we know other options have value
          };
        }),
        [languagePluralType, t2, lastLogin]
      );
      logGroup(
        "DashboardControls",
        [
          ["props", props],
          ["options", options],
          ["lastLogin", lastLogin],
          ["selectedIntervalId", selectedIntervalId],
          ["languagePluralType", languagePluralType]
        ],
        void 0,
        props.debug
      );
      const optionsMem = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mx-2 mt-2", className: style$l.dashboardIntervals, children: options.map((option, i) => {
          const defaultColor = selectedIntervalId === option.id ? "active" : "default";
          const tag = /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$3,
            {
              id: `tag-${option.id}`,
              color: option.disabled ? "inactive" : defaultColor,
              className: option.disabled ? style$l.disabledOption : void 0,
              onClick: !option.disabled ? () => setIntervalData(option) : void 0,
              children: option.title
            }
          );
          const content2 = option.tooltip ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: option.tooltip, placement: "top", children: tag }) : tag;
          return i < options.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: content2 }, option.id) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: content2 }, option.id);
        }) }),
        [selectedIntervalId, setIntervalData, options]
      );
      const updateTag = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$3, { id: "dashboard-action-refresh", color: "default", onClick: () => dispatch(updateDashboards(true)), children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowRefresh, {}) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("IDUS_STATS_ACTIONS_REFRESH") })
        ] }),
        [dispatch, t2]
      );
      const exportMem = reactExports.useMemo(() => /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardControlExport$1, { dashboards }), [dashboards]);
      const configToggle = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$3, { id: "dashboard-action-config", color: "default", onClick: () => dispatch(toggleDashboardConfig(true)), children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$x, {}) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("IDUS_STATS_ACTIONS_CONFIG") })
        ] }),
        [dispatch, t2]
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-2", className: style$l.dashboardControls, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Theme.Provider, { theme: theme$2, children: [
        optionsMem,
        /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mx-2 mt-2", className: style$l.dashboardActions, children: [
          updateTag,
          exportMem,
          configToggle
        ] })
      ] }) });
    };
    const DashboardControls = withErrorBoundary()(PureDashboardControls);
    DashboardControls.displayName = "DashboardControls";
    const DashboardControls$1 = React.memo(DashboardControls);
    const noGutter = "_noGutter_1kcg1_1";
    const fullHeightGridTile = "_fullHeightGridTile_1kcg1_6";
    const fullHeightGridColumn = "_fullHeightGridColumn_1kcg1_10";
    const negativeRightMargin = "_negativeRightMargin_1kcg1_16";
    const dashboardRow = "_dashboardRow_1kcg1_22";
    const dashboardRowItem = "_dashboardRowItem_1kcg1_22";
    const fullscreen = "_fullscreen_1kcg1_36";
    const style$k = {
      noGutter,
      fullHeightGridTile,
      fullHeightGridColumn,
      negativeRightMargin,
      dashboardRow,
      dashboardRowItem,
      fullscreen
    };
    const reportRow = "_reportRow_kshmg_1";
    const style$j = {
      reportRow
    };
    const mapTypes = {
      [StatisticsType.COMBINED]: null,
      [StatisticsType.MULTI]: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$z, {}),
      [StatisticsType.PIE]: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$A, {}),
      [StatisticsType.TABLE]: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$B, {}),
      [StatisticsType.NUMBER]: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$C, {})
    };
    class PureDashboardConfig extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "isSelected", (key) => this.state.selectedReports.includes(key));
        __publicField(this, "toggleReport", (key) => (value) => {
          const allDef = Object.keys(this.props.definitions);
          this.setState(({ selectedReports }) => ({
            selectedReports: !selectedReports.includes(key) && value === 1 ? allDef.filter((id2) => selectedReports.includes(id2) || id2 === key) : selectedReports.filter((id2) => id2 !== key)
          }));
        });
        __publicField(this, "renderReport", (definition, inner = false) => /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: inner ? "my-1 ml-2" : "my-1", className: style$j.reportRow, children: [
          !inner && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$r,
            {
              name: `dashboard-config-${definition.key}-checkbox`,
              id: `dashboard-config-${definition.key}-checkbox`,
              checked: this.isSelected(definition.key) ? 1 : 0,
              disabled: definition.fixed,
              onChange: this.toggleReport(definition.key)
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: mapTypes[definition.type] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: getReportTitle(definition, this.props.t, this.props.pluralType) })
        ] }, `dashboard-config-${definition.key}`));
        __publicField(this, "renderCombinedReport", (definition) => {
          const { t: t2 } = this.props;
          return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "my-2", className: style$j.reportRow, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$r,
                {
                  name: `dashboard-config-${definition.key}-checkbox`,
                  id: `dashboard-config-${definition.key}-checkbox`,
                  checked: this.isSelected(definition.key) ? 1 : 0,
                  disabled: definition.fixed,
                  onChange: this.toggleReport(definition.key)
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
                t2("IDUS_STATS_CONFIG_COMBINED_REPORT"),
                ":"
              ] })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-5", children: definition.content.map((inner) => this.renderReport(inner, true)) })
          ] }, `dashboard-config-${definition.key}`);
        });
        __publicField(this, "close", () => this.props.toggleDashboardConfig(false));
        __publicField(this, "save", () => {
          this.props.setDisplayedReports(this.state.selectedReports);
          this.props.updateDashboards(true);
          this.close();
        });
        __publicField(this, "reset", () => {
          this.props.resetDisplayedReports();
          this.props.updateDashboards(true);
          this.close();
        });
        this.state = {
          selectedReports: props.displayedReports
        };
      }
      componentDidUpdate(prevProps) {
        if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen) {
          this.setState({ selectedReports: this.props.displayedReports });
        }
      }
      render() {
        const { isOpen, definitions: definitions2, debug, t: t2 } = this.props;
        const reports = Object.values(definitions2);
        logGroup(
          "DashboardConfig",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$j,
          {
            id: "dashboard-config-modal",
            title: t2("IDUS_STATS_CONFIG_TITLE"),
            type: "simple",
            show: isOpen,
            effect: "fadeInDown",
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "dashboard-config-create",
                  onClick: this.save,
                  text: t2("IDUS_SETUP_SAVE_BUTTON_SAVE")
                },
                "dashboard-config-create"
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "dashboard-config-reset",
                  type: "secondary",
                  onClick: this.reset,
                  text: t2("IDUS_STATS_CONFIG_RESET")
                },
                "dashboard-config-reset"
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "dashboard-config-cancel",
                  type: "secondary",
                  onClick: this.close,
                  text: t2("IDUS_CANCEL")
                },
                "dashboard-config-cancel"
              )
            ],
            onKeyEsc: this.close,
            onAway: this.close,
            onClose: this.close,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: reports.map(
              (report) => report.type === StatisticsType.COMBINED ? this.renderCombinedReport(report) : this.renderReport(report)
            ) })
          }
        );
      }
    }
    const mapStateToProps$x = (state) => ({
      isOpen: state.layout.modals.dashboardConfig,
      displayedReports: state.reports.displayedReports,
      definitions: state.reports.definitions,
      pluralType: state.language.plural
    });
    const mapDispatchToProps$x = {
      resetDisplayedReports,
      setDisplayedReports,
      toggleDashboardConfig,
      updateDashboards
    };
    const DashboardConfig = connect(mapStateToProps$x, mapDispatchToProps$x)(withTranslation()(PureDashboardConfig));
    DashboardConfig.displayName = "DashboardConfig";
    const TILE_GUTTER_WIDTH = 16;
    const LEFT_SIDEBAR_SIZES = {
      opened: 260,
      collapsed: 72
    };
    const DEF_TILE_SIZE = {
      size: 12,
      sm: 12,
      md: 6,
      lg: 6,
      xl: 3
    };
    const getGridDefinition = (minTileWidth, sidebarSizes, tileSize = DEF_TILE_SIZE) => {
      const tileWidth = minTileWidth + TILE_GUTTER_WIDTH;
      const sizes = Object.keys(tileSize);
      const initQueries = Object.values(tileSize).slice(1).map((val, i) => ({
        size: sizes[i] === "size" ? "xs" : sizes[i],
        value: 12 / val * tileWidth + sidebarSizes
      }));
      const queries = {};
      initQueries.forEach((info, i) => {
        if (i > 0 && i < initQueries.length - 1 && info.value === initQueries[i - 1].value) {
          queries[info.size] = Math.floor((info.value + initQueries[i + 1].value) / 2);
        } else {
          queries[info.size] = info.value;
        }
      });
      return { Grid: { queries } };
    };
    const getSidebarSizes = (leftSidebarOpen, rightSidebarOpen, width) => {
      const leftSidebarSize = leftSidebarOpen ? LEFT_SIDEBAR_SIZES.opened : LEFT_SIDEBAR_SIZES.collapsed;
      const rightSidebarSize = rightSidebarOpen ? width / 3 : 0;
      return leftSidebarSize + rightSidebarSize;
    };
    const ALLOWED_BASE = [3, 4, 6, 12];
    const getStaticTileSize = (minTileWidth, width) => {
      const maxSize = Math.min(Math.ceil(12 * (minTileWidth + TILE_GUTTER_WIDTH) / width), 12);
      return { size: ALLOWED_BASE.find((val) => val >= maxSize) };
    };
    const getModifiedTileSize = (origTileSize, modifier = 1) => {
      const tileSize = { ...origTileSize };
      Object.entries(tileSize).forEach(([key, value]) => {
        if (typeof value === "number") {
          tileSize[key] = Math.min(value * modifier, 12);
        }
      });
      return tileSize;
    };
    const getStaticTileSizes = (minTileWidth, width, modifiers) => {
      const tileSize = getStaticTileSize(minTileWidth, width);
      return modifiers.map((mod) => getModifiedTileSize(tileSize, mod));
    };
    const innerGridSizing = {
      1: { size: 12, sm: 12, md: 12, lg: 12, xl: 12 },
      2: { size: 12, sm: 12, md: 6, lg: 6, xl: 6 },
      4: { size: 12, sm: 12, md: 6, lg: 3, xl: 3 }
    };
    class PureDashboardStats extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "intervalId");
        __publicField(this, "renderTile", (definition, fullscreen2 = false) => {
          const sizes = getModifiedTileSize(this.props.defaultTileSize, definition.size);
          let content2;
          if (definition.type === StatisticsType.COMBINED) {
            const innerSize = innerGridSizing[definition.size];
            content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$D, { className: style$k.noGutter, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Row, { gutters: false, className: style$k.negativeRightMargin, children: definition.content.map((def) => /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { ...innerSize, className: style$k.fullHeightGridColumn, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-4 mb-4", className: style$k.fullHeightGridTile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardTile, { definition: def, wrapperClassName: style$k.dashboardRowItem }) }) }, def.key)) }) });
          } else {
            content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardTile, { definition, isFullscreen: fullscreen2, wrapperClassName: style$k.dashboardRowItem });
          }
          return { ...sizes, content: content2 };
        });
      }
      componentDidMount() {
        this.props.setReportDefinitions();
        this.props.updateDashboards(true);
        this.intervalId = setInterval(this.props.updateDashboards, this.props.updateFrequency);
      }
      componentDidUpdate(oldProps) {
        if (!isDeepEqual(oldProps.dashboardSettings, this.props.dashboardSettings)) {
          this.props.setReportDefinitions();
          this.props.updateDashboards(true);
        }
      }
      componentWillUnmount() {
        if (this.intervalId) {
          clearInterval(this.intervalId);
        }
      }
      render() {
        const { reportDefinitions, displayedReports, fullscreen: fullscreen2 } = this.props;
        logGroup("DashboardStats", [["props", this.props]], void 0, this.props.debug);
        const dashboards = [];
        const defs = [];
        if (fullscreen2) {
          defs.push(reportDefinitions[fullscreen2]);
        } else {
          let currentRow = [];
          let currentSum = 0;
          const addRow = (rowSum, rowDefs) => {
            const stretchedRow = stretchToFillRow(rowSum, rowDefs);
            dashboards.push(stretchedRow.map((item) => this.renderTile(item)));
          };
          displayedReports.forEach((key) => {
            const def = reportDefinitions[key];
            if (def) {
              defs.push(def);
              if (currentSum + (def.size ?? 1) > 4) {
                addRow(currentSum, currentRow);
                currentRow = [];
                currentSum = 0;
              }
              currentRow.push(def);
              currentSum += def.size ?? 1;
            }
          });
          if (currentRow.length > 0) {
            addRow(currentSum, currentRow);
          }
        }
        const cls = [style$k.dashboardrow, style$r.dashboardRowFix].join(" ");
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardControls$1, { dashboards: defs }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardConfig, {}),
          fullscreen2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-4 ml-4 mr-5", className: style$k.fullscreen, children: this.renderTile(defs[0], true).content }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, { rows: dashboards.map((row) => ({ cols: row, className: cls })) })
        ] });
      }
    }
    const mapDispatchToProps$w = {
      updateDashboards,
      setReportDefinitions
    };
    const mapStateToProps$w = (state) => ({
      reportDefinitions: state.reports.definitions,
      updateFrequency: state.reports.updateFrequency,
      displayedReports: state.reports.displayedReports,
      languagePluralType: state.language.plural,
      dashboardSettings: state.reports.dashboardSettings,
      fullscreen: state.reports.fullscreen
    });
    const DashboardStats = withErrorBoundary()(connect(mapStateToProps$w, mapDispatchToProps$w)(PureDashboardStats));
    DashboardStats.displayName = "DashboardStats";
    const BASE_TILE_WIDTH$1 = 224;
    const Dashboard = (props) => {
      const { title } = props;
      const [width, setWidth] = reactExports.useState(window.innerWidth);
      const {
        sidebarComplete: leftSidebarOpened,
        sidebar: leftSidebar,
        rightSidebarComplete: rightSidebarOpened,
        rightSidebar: rightSidebar2
      } = useSelector((state) => state.layout.content);
      const left = leftSidebarOpened ?? leftSidebar;
      const right = rightSidebarOpened ?? rightSidebar2;
      reactExports.useEffect(() => {
        const updateWidth = () => setWidth(window.innerWidth);
        window.addEventListener("resize", updateWidth);
        return () => {
          window.removeEventListener("resize", updateWidth);
        };
      }, []);
      const content2 = reactExports.useMemo(() => {
        const sidebarSizes = getSidebarSizes(left, right, width);
        const gridDefinition = getGridDefinition(BASE_TILE_WIDTH$1, sidebarSizes);
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: { Tile: { padding: "12px 16px" }, ...gridDefinition }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardStats, { defaultTileSize: DEF_TILE_SIZE }) });
      }, [left, right, width]);
      logGroup(
        "Dashboard",
        [
          ["props", props],
          ["width", width],
          ["left, left complete, right, right complete", leftSidebar, leftSidebarOpened, rightSidebar2, rightSidebarOpened]
        ],
        void 0,
        props.debug
      );
      return reactExports.useMemo(() => /* @__PURE__ */ jsxRuntimeExports.jsx(MainPage, { padding: "0px", title, content: content2 }), [title, content2]);
    };
    Dashboard.displayName = "Dashboard";
    const baseTableWrapper = "_baseTableWrapper_18hvs_1";
    const baseTable = "_baseTable_18hvs_1";
    const style$i = {
      baseTableWrapper,
      baseTable
    };
    const TABLE_OFFSET = 65;
    const TABLE_OFFSET_MULTI = 85;
    const getTableSubtitle = (id2, title) => ({
      id: id2,
      cells: [
        {
          customElement: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, spacer: "pl-2", children: title })
        }
      ],
      contextMenu: null
    });
    const getRemovalInfoRow = (title, idSuffix) => ({
      id: `RI${idSuffix}`,
      cells: [{ customElement: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { spacer: "", children: title }), justifyContent: "center" }],
      contextMenu: null,
      isCheckboxDisabled: true
    });
    const getErrorRow = (title, idSuffix) => ({
      id: `ERR${idSuffix}`,
      cells: [{ customElement: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { spacer: "", children: title }), allowDefaultPadding: true }],
      contextMenu: null,
      isCheckboxDisabled: true,
      error: true
    });
    const getCustomColumns = (columns, t2) => columns.map((column) => ({
      ...column,
      header: t2(column.header)
    }));
    const getNoDataPlaceholder = (logType, t2, rowFilter) => {
      const defaultReturn = { title: null, text: null };
      switch (logType) {
        case LogType.LOGD_WARNLOG:
          return {
            title: t2("IDUS_EMPTY_TABLE_EVENTS_TITLE"),
            text: sprintf(t2("IDUS_EMPTY_TABLE_EVENTS"), pkgid.product_info_short)
          };
        case LogType.LOGD_VIRUSLOG:
          return {
            title: t2("IDUS_EMPTY_TABLE_THREATS_TITLE"),
            text: t2("IDUS_EMPTY_TABLE_THREATS")
          };
        case LogType.LOGD_URLLOG:
          return {
            title: t2("IDUS_EMPTY_TABLE_FILTERED_WEB_TITLE"),
            text: t2("IDUS_EMPTY_TABLE_FILTERED_WEB")
          };
        case LogType.LOGD_ONDEMAND_LIST:
          return {
            text: t2("IDUS_EMPTY_TABLE_SCANS"),
            title: t2("IDUS_EMPTY_TABLE_SCANS_TITLE")
          };
        case LogType.LOGD_SENTFILESLOG:
          return {
            text: t2("IDUS_EMPTY_TABLE_SENT_FILES"),
            title: t2("IDUS_EMPTY_TABLE_SENT_FILES_TITLE")
          };
        case LogType.LOGD_BLOCKEDFILESLOG:
          return {
            text: t2("IDUS_EMPTY_TABLE_BLOCKED_FILES"),
            title: t2("IDUS_EMPTY_TABLE_BLOCKED_FILES_TITLE")
          };
        case LogType.LOGD_ONDEMAND: {
          if (rowFilter === LogdRowTypeFilter.LOGD_RTF_DETECTIONS) {
            return {
              title: t2("IDUS_EMPTY_TABLE_THREATS_TITLE"),
              text: t2("IDUS_EMPTY_TABLE_SCANS_THREATS")
            };
          }
          if (rowFilter === LogdRowTypeFilter.LOGD_RTF_NOT_SCANNED) {
            return {
              title: t2("IDUS_EMPTY_TABLE_THREATS_NOT_SCANNED_TITLE"),
              text: null
            };
          }
          return defaultReturn;
        }
        default:
          return defaultReturn;
      }
    };
    const getColumnLoadingTableError = (t2, tryAgainCallback) => ({
      title: t2("IDUS_EMPTY_TABLE_COLUMN_ERROR_TITLE"),
      text: sprintf(t2("IDUS_EMPTY_TABLE_COLUMN_ERROR"), t2("IDUS_TRY_AGAIN")),
      buttonText: t2("IDUS_TRY_AGAIN"),
      buttonOnClick: tryAgainCallback,
      icon: IconStatusError
    });
    const getDataLoadingTableError = (t2, tryAgainCallback) => ({
      title: t2("IDUS_TABLE_ERROR_DATA_LOAD_TITLE"),
      text: sprintf(t2("IDUS_TABLE_ERROR_DATA_LOAD"), t2("IDUS_TRY_AGAIN")),
      buttonText: t2("IDUS_TRY_AGAIN"),
      buttonOnClick: tryAgainCallback,
      icon: IconStatusError
    });
    const getWidth = (ref, withMulti = false) => ref.current ? ref.current.offsetWidth - (withMulti ? TABLE_OFFSET_MULTI : TABLE_OFFSET) : 0;
    const getHeight = (ref) => ref.current ? ref.current.getBoundingClientRect().height : 0;
    const updateWidths = (columns, totalWidth, overrideColumnPoints = {}) => {
      const visibleColumns = columns.filter((c) => c.visible);
      const minWidthTotal = visibleColumns.reduce((sum, c) => sum + c.minWidth, 0);
      if (minWidthTotal >= totalWidth) {
        return columns.map((c) => ({ ...c, width: c.minWidth }));
      }
      const defaultTypeWidth = TYPE_WIDTHS[TableDataType.STRING];
      const getPointWidth = (c) => {
        if (overrideColumnPoints[c.key] !== void 0) {
          return overrideColumnPoints[c.key];
        }
        if (TYPE_WIDTHS[c.type] !== void 0) {
          return TYPE_WIDTHS[c.type];
        }
        return defaultTypeWidth;
      };
      const widthToDivide = totalWidth - minWidthTotal;
      const additionalWidthPoints = visibleColumns.map(getPointWidth).reduce((sum, c) => sum + c, 0);
      const pointWidth = Math.floor(widthToDivide / additionalWidthPoints);
      return columns.map((c) => !c.visible ? c : { ...c, width: c.minWidth + getPointWidth(c) * pointWidth });
    };
    const minWidthOfHeader = ({ header: header2, type }) => {
      const calculatedMin = Math.round(header2.length * 7.8) + 48;
      return Math.max(TYPE_MIN_WIDTHS[type] ?? 0, calculatedMin);
    };
    const contextMenuPlaceholder = {
      hasContextMenu: () => false,
      getContextMenu: () => []
    };
    const PureBaseTable = (props) => {
      const { columns, rows, items, start } = props.data;
      const tableRef = reactExports.useRef(null);
      const sidebarFlag = useSelector((state) => state.layout.content.sidebarComplete);
      const rightSidebarFlag = useSelector((state) => state.layout.content.rightSidebarComplete);
      const [widthColumns, setWidthColumns] = reactExports.useState(columns);
      const [lastRequestedIndexes, setLastRequestedIndexes] = reactExports.useState({ start, end: start + rows.length });
      const [autoWidths, setAutoWidths] = reactExports.useState(true);
      const [height, setHeight] = reactExports.useState(getHeight(tableRef));
      const onDataLoadRequest = (firstRowIndex, lastRowIndex) => {
        if (firstRowIndex !== lastRequestedIndexes.start || lastRowIndex !== lastRequestedIndexes.end) {
          props.loadMoreRows(firstRowIndex, lastRowIndex);
          setLastRequestedIndexes({ start: firstRowIndex, end: lastRowIndex });
        }
      };
      const addWidthToColumns = (cols) => {
        if (autoWidths) {
          setWidthColumns(updateWidths(cols, getWidth(tableRef, !!props.multiselectSettings), props.overrideColumnPoints));
        }
      };
      const onColumnSizeChange = (_columnId, _width, cols) => {
        setWidthColumns(cols);
        setAutoWidths(false);
      };
      reactExports.useEffect(() => {
        const handleResize = () => {
          addWidthToColumns(columns);
          setHeight(getHeight(tableRef));
        };
        window.addEventListener("resize", handleResize);
        return () => {
          window.removeEventListener("resize", handleResize);
        };
      });
      reactExports.useEffect(() => {
        addWidthToColumns(columns);
      }, [columns, sidebarFlag, rightSidebarFlag]);
      logGroup(
        "BaseTable",
        [
          ["props", props],
          ["widthColumns", widthColumns],
          ["lastRequestedIndexes", lastRequestedIndexes],
          ["autoWidths", autoWidths]
        ],
        void 0,
        props.debug
      );
      const { className = "", multiselectSettings = {} } = props;
      const NoDataIcon = props.noDataPlaceholder.icon ?? IconLetterI;
      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: tableRef, className: style$i.baseTableWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Table,
        {
          id: props.id,
          className: [style$i.baseTable, className].join(" ").trim(),
          columns: widthColumns,
          data: rows,
          rowCount: items,
          isLoading: !columns || columns.length === 0 || items > 0 && rows.length === 0,
          dataStartIndex: start ?? 0,
          loadRowsNotification: onDataLoadRequest,
          noDataIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(NoDataIcon, { size: 80, fill: "gray" }),
          noDataTitle: props.noDataPlaceholder.title,
          noDataText: props.noDataPlaceholder.text,
          noDataActionText: props.noDataPlaceholder.buttonText,
          noDataActionHandle: props.noDataPlaceholder.buttonOnClick,
          noHeaderTopBorder: true,
          onColumnSizeChange,
          maxRowLoad: props.maxRowLoad,
          height,
          contextMenuProvider: props.contextMenuProvider ?? contextMenuPlaceholder,
          loadDataThrottleTimeInterval: 100,
          scrollingThrottleTimeInterval: 400,
          selectedItemsCount: {
            callback: () => `${props.t("IDUS_SELECTED_ITEMS")}: ${(multiselectSettings.rows ?? []).length} / ${multiselectSettings.selectableRows ?? 0}`,
            showCount: true
          },
          selectAllDisplay: false,
          selectAllItems: false,
          selectionChangeHandle: multiselectSettings.onChange,
          selectedItems: multiselectSettings.rows ? multiselectSettings.rows.map((r2) => r2.id) : void 0
        }
      ) });
    };
    const BaseTable = withErrorBoundary("IDUS_ERROR_BOUNDARY_TABLE")(withTranslation()(PureBaseTable));
    BaseTable.displayName = "BaseTable";
    const lockScreen = () => ({
      type: UTILS_ACTION_KEYS.UTILS_SCREEN_LOCK
    });
    const unlockScreen = () => ({
      type: UTILS_ACTION_KEYS.UTILS_SCREEN_UNLOCK
    });
    const resetDebounce = (key) => ({
      type: UTILS_ACTION_KEYS.UTILS_RESET_DEBOUNCE,
      value: key
    });
    const incrementDebounce = (key) => ({
      type: UTILS_ACTION_KEYS.UTILS_INCREMENT_DEBOUNCE,
      value: key
    });
    const setSocketTransportProtocol = (id2, protocol) => ({
      type: UTILS_ACTION_KEYS.UTILS_SET_SOCKET_PROTOCOL,
      value: { id: id2, protocol }
    });
    const checkPollingLimit = (id2, limit) => {
      const current = getSocketTransportInfo(id2);
      return current !== "polling" || getPollingSockets().length <= limit;
    };
    const socketCleanupResponse = (sockets) => (dispatch, getState) => {
      const currentSocket = getState().utils.socketId;
      cleanupSocketTransportInfo(sockets);
      if (!checkPollingLimit(currentSocket, getState().config.pollingLimit)) {
        dispatch(toggleConnectionLimit("polling"));
      }
    };
    const callbacks$1 = new RegisterCallbackContainer();
    const logsCallbackResponse = (result) => {
      callbacks$1.call(result.ID, result);
      return { type: LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID, value: result.ID };
    };
    const setTableNumbers = (changes) => ({
      type: LOGS_ACTION_KEYS.LOGS_SET_TABLE_NUMBERS,
      value: changes
    });
    const resetCallbacks = (getState) => {
      const { currentCallbacks, query } = getState().logs;
      if (query.queryId) {
        socketio.socketioEmit(messages.logQueryClose, query.queryId);
      }
      currentCallbacks.forEach((id2) => {
        callbacks$1.delete(id2);
      });
    };
    const resetLogs = () => (dispatch, getState) => {
      resetCallbacks(getState);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_RESET_TABLE });
    };
    const getLogTableHeaders = (logType, rowFilter, hiddenColumns = [], highlightDefinitions, onSuccessCallback, onErrorCallback, newColumns = []) => (dispatch, getState) => {
      const responseCallback = ({ columns, error, ID }) => {
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID, value: ID });
        if (!error) {
          newColumns.forEach((newColumn) => {
            columns.splice(newColumn.positionIndex, 0, newColumn);
          });
          const headers = columns.map((c) => {
            const visible = !hiddenColumns.includes(c.key);
            return {
              ...c,
              minWidth: visible ? minWidthOfHeader(c) : 0,
              highlight: highlightDefinitions ? highlightDefinitions[c.key] : void 0,
              visible
            };
          });
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_HEADERS, value: headers });
          if (onSuccessCallback) {
            onSuccessCallback();
          }
        } else {
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_HEADERS_ERROR });
          if (onErrorCallback) {
            onErrorCallback(error);
          }
        }
      };
      const callbackId = callbacks$1.register(responseCallback, messages.logInformationRequest);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.logInformationRequest, {
        ID: callbackId,
        log_type: logType,
        lang: getState().language.winid,
        overall_width: 100,
        // sending 100 so that the calculated widths are actually percentage of width
        log_name: "",
        row_filter: rowFilter
      });
    };
    const getLogById = (logType, id2, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const responseCallback = ({ columns, error, ID }) => {
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID, value: ID });
        if (!error) {
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOG_DETAIL, value: { id: id2, data: columns } });
          if (onSuccessCallback) {
            onSuccessCallback();
          }
        } else {
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOG_DETAIL, value: {} });
          if (onErrorCallback) {
            onErrorCallback(error);
          }
        }
      };
      const callbackId = callbacks$1.register(responseCallback, messages.logInformationRequest);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.logInformationRequest, {
        ID: callbackId,
        log_type: logType,
        lang: getState().language.winid,
        overall_width: 0,
        log_name: id2,
        row_filter: LogdRowTypeFilter.LOGD_RTF_NONE
      });
    };
    const initializeTableNumbers = (numberOfRows) => setTableNumbers({ rowLimit: numberOfRows, otherRows: 0, lastFirstRowIndex: 0 });
    const initializeLogsQuery = (logType, rowFilter, id2, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const responseCallback = (response) => {
        const { query_id, ID, error } = response;
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID, value: ID });
        if (error) {
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_QUERY_ERROR });
          if (onErrorCallback) {
            onErrorCallback(error);
          }
        } else {
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_QUERY, value: { id: ID, queryId: query_id } });
          if (onSuccessCallback) {
            onSuccessCallback();
          }
        }
      };
      const callbackId = callbacks$1.register(responseCallback, messages.logQueryExecuteRequest);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.logQueryExecuteRequest, {
        ID: callbackId,
        log_type: logType,
        lang: getState().language.winid,
        sort: Sort.DATE_DESCENDING,
        row_filter: rowFilter,
        log_name: id2
      });
    };
    const getRequest = (getState, firstRowIndex, lastRowIndex) => {
      const { rowLimit, otherRows } = getState().logs.tableNumbers;
      const tableRequestRows = lastRowIndex ? lastRowIndex - firstRowIndex + 1 : rowLimit;
      return firstRowIndex === 0 ? {
        n_rows: tableRequestRows - otherRows,
        index: 0
      } : {
        n_rows: tableRequestRows,
        index: firstRowIndex - otherRows
      };
    };
    const getLogsFromQuery = (firstRowIndex, lastRowIndex, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const handleError = (e) => {
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOGS_ERROR });
        if (onErrorCallback) {
          onErrorCallback(e);
        }
      };
      const { query, headers } = getState().logs;
      if (!query.queryId) {
        handleError(Error$1.REDUX_ERROR);
        return;
      }
      const responseCallback = (response) => {
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_REMOVE_CALLBACK_ID, value: response.ID });
        if (response.error) {
          handleError(response.error);
        } else {
          const queryItems = longToNumber(response.n_query_items);
          const logs = processTableRows(headers, response.rows);
          dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOGS, value: { logs, firstRowIndex, rowCount: queryItems } });
          if (onSuccessCallback) {
            onSuccessCallback(logs);
          }
        }
      };
      const callbackId = callbacks$1.register(responseCallback, messages.logQueryWindowRequest);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID, value: callbackId });
      dispatch(setTableNumbers({ lastFirstRowIndex: firstRowIndex }));
      socketio.socketioEmit(messages.logQueryWindowRequest, {
        ...getRequest(getState, firstRowIndex, lastRowIndex),
        query_id: query.queryId,
        ID: callbackId
      });
    };
    const registerNewLogsUpdateFromQuery = (numberOfRows, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const { headers, query } = getState().logs;
      const handleError = (e) => {
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOGS_ERROR });
        if (onErrorCallback) {
          onErrorCallback(e);
        }
      };
      if (!query.queryId) {
        handleError(Error$1.REDUX_ERROR);
        return;
      }
      const id2 = longToString(query.queryId);
      const updateFromNotif = (r2, length) => {
        const rows = processTableRows(headers, r2);
        dispatch({ type: LOGS_ACTION_KEYS.LOGS_SET_LOGS, value: { logs: rows, firstRowIndex: 0, rowCount: length } });
        dispatch(resetDebounce(id2));
        if (onSuccessCallback) {
          onSuccessCallback();
        }
      };
      const debouncedUpdateFromNotif = r(updateFromNotif, 300);
      const responseCallback = (response, getStateInCallback) => {
        const {
          logs: { tableNumbers },
          utils
        } = getStateInCallback();
        const queryItems = longToNumber(response.n_query_items);
        if (response.rows !== void 0) {
          if (utils.debounce[id2] >= numberOfRows) {
            updateFromNotif(response.rows, queryItems);
          } else {
            debouncedUpdateFromNotif(response.rows, queryItems);
            dispatch(incrementDebounce(id2));
          }
        } else if (response.error) {
          handleError(response.error);
        } else {
          getLogsFromQuery(
            tableNumbers.lastFirstRowIndex,
            void 0,
            onSuccessCallback,
            onErrorCallback
          )(dispatch, getStateInCallback);
        }
      };
      callbacks$1.registerWithId(responseCallback, id2);
      dispatch({ type: LOGS_ACTION_KEYS.LOGS_ADD_CALLBACK_ID, value: id2 });
    };
    const newLogsUpdateFromQueryResponse = (result) => (_dispatch, getState) => {
      if (result.query_id) {
        callbacks$1.call(longToString(result.query_id), [result, getState], false);
      }
    };
    const selectRows = (data2) => ({
      type: LOGS_ACTION_KEYS.LOGS_SELECT_ROWS,
      value: data2
    });
    const logsTable = "_logsTable_azdp3_1";
    const style$h = {
      logsTable
    };
    const NUM_OF_ROWS$1 = 250;
    class PureLogsTable extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "setupHeaders", (logType, rowFilter) => new Promise((resolve) => {
          this.props.getLogTableHeaders(
            logType,
            rowFilter,
            this.props.hiddenColumns,
            this.props.highlightDefinitions,
            resolve,
            () => {
              if (this.props.onSetupError) {
                this.props.onSetupError();
              }
              resolve("");
            },
            this.props.customColumns
          );
        }));
        __publicField(this, "setupQuery", (logType, rowFilter) => new Promise((resolve) => {
          this.props.initializeLogsQuery(logType, rowFilter, this.props.id, resolve, resolve);
        }));
        __publicField(this, "setupTable", async () => {
          const { logType } = this.props;
          const rowFilter = this.props.rowFilter ?? LogdRowTypeFilter.LOGD_RTF_NONE;
          await this.setupHeaders(logType, rowFilter);
          await this.setupQuery(logType, rowFilter);
          this.props.registerNewLogsUpdateFromQuery(NUM_OF_ROWS$1);
          this.props.getLogsFromQuery(0);
        });
        __publicField(this, "createContextMenu", (rows = []) => {
          const { getContextMenu } = this.props;
          if (getContextMenu) {
            this.setState(({ contextMap }) => {
              const newContextMap = { ...contextMap };
              rows.forEach((row) => {
                const menu = getContextMenu([row]);
                if (menu) {
                  newContextMap[row.customId] = menu;
                }
              });
              return { contextMap: newContextMap };
            });
          }
        });
        __publicField(this, "getDynamicContextMenu", (rowId) => {
          const { getContextMenu } = this.props;
          const isSelected = this.props.selectedRows.find((r2) => r2.customId === rowId);
          if (isSelected) {
            return getContextMenu ? getContextMenu(this.props.selectedRows) : void 0;
          }
          return this.state.contextMap[rowId];
        });
        __publicField(this, "loadMoreRows", (firstRowIndex, lastRowIndex) => {
          const { numberOfLogs } = this.props;
          if (lastRowIndex >= firstRowIndex && firstRowIndex <= numberOfLogs) {
            this.props.getLogsFromQuery(firstRowIndex, lastRowIndex);
          }
        });
        __publicField(this, "getNoDataPlaceholder", (rowFilter) => {
          const { t: t2, errors } = this.props;
          if (errors.headerLoading) {
            return getColumnLoadingTableError(t2, this.setupTable);
          }
          if (errors.dataLoading) {
            return getDataLoadingTableError(t2, this.setupTable);
          }
          return getNoDataPlaceholder(this.props.logType, t2, rowFilter);
        });
        props.resetLogs();
        props.initializeTableNumbers(NUM_OF_ROWS$1);
        this.state = {
          contextMap: {}
        };
      }
      async componentDidMount() {
        this.props.selectRows([]);
        await this.setupTable();
      }
      componentDidUpdate(oldProps) {
        if (oldProps.logs !== this.props.logs || oldProps.getContextMenu !== this.props.getContextMenu) {
          this.createContextMenu(this.props.logs);
        }
      }
      render() {
        const rowFilter = this.props.rowFilter ?? LogdRowTypeFilter.LOGD_RTF_NONE;
        const { contextMap } = this.state;
        const { logs, rowCount, headers, firstRowIndex, numberOfLogs } = this.props;
        let rows = logs;
        let items = rowCount;
        const isLastBatchOfRows = numberOfLogs - 1 < firstRowIndex + rows.length;
        if (this.props.removalInfoRow && rows.length > 0 && isLastBatchOfRows) {
          rows = [...rows, getRemovalInfoRow(this.props.t("IDUS_SCANS_SOME_SCANS_DELETED"), rows.length)];
          items += 1;
        }
        rows = rows.map((r2) => r2.error ? getErrorRow(this.props.t("IDUS_UNKNOWN_LOG_RECORD"), r2.id) : r2);
        logGroup(
          "LogsTable",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          BaseTable,
          {
            className: style$h.logsTable,
            data: { rows, items, columns: headers, start: firstRowIndex },
            maxRowLoad: NUM_OF_ROWS$1,
            id: this.props.logType,
            loadMoreRows: this.loadMoreRows,
            overrideColumnPoints: this.props.overrideColumnPoints,
            noDataPlaceholder: this.getNoDataPlaceholder(rowFilter),
            multiselectSettings: this.props.multiselect ? {
              onChange: (all, newRowIds) => {
                const newRows = newRowIds.map((rowId) => [...this.props.selectedRows, ...rows].find((x) => x.id === rowId)).filter((x) => x);
                this.props.selectRows(all ? rows.filter((r2) => !r2.error) : newRows);
              },
              rows: this.props.selectedRows,
              selectableRows: rowCount
            } : void 0,
            contextMenuProvider: {
              hasContextMenu: (rowData) => !!contextMap[rowData.customId],
              getContextMenu: (_rowId, customId) => this.getDynamicContextMenu(customId)
            }
          }
        );
      }
    }
    const mapStateToProps$v = (state, props) => ({
      headers: state.logs.headers,
      errors: state.logs.errors,
      firstRowIndex: state.logs.firstRowIndex,
      logs: props.customLogs ?? state.logs.logs,
      rowCount: props.customRowCount ?? state.logs.rowCount,
      numberOfLogs: state.logs.rowCount,
      selectedRows: state.logs.selectedRows
    });
    const mapDispatchToProps$v = {
      showGlobalModal: showModal,
      registerNewLogsUpdateFromQuery,
      getLogTableHeaders,
      initializeLogsQuery,
      initializeTableNumbers,
      getLogsFromQuery,
      resetLogs,
      selectRows
    };
    const LogsTable = connect(mapStateToProps$v, mapDispatchToProps$v)(withErrorBoundary()(withTranslation()(PureLogsTable)));
    LogsTable.displayName = "LogsTable";
    const WIDTH_POINT_OVERRIDE$6 = {
      [COLUMN_KEYS.EVENT]: 16
    };
    const Events = (props) => {
      logGroup("Events", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: props.title,
          content: /* @__PURE__ */ jsxRuntimeExports.jsx(LogsTable, { logType: LogType.LOGD_WARNLOG, removalInfoRow: true, overrideColumnPoints: WIDTH_POINT_OVERRIDE$6 })
        }
      );
    };
    const setup = "";
    const SETUP_KEY_PREFIX = "dunx_new.";
    const DEFAULT_OPEN_KEY = `${SETUP_KEY_PREFIX}shared.features.detection_engine`;
    const SETUP_SCREEN_URLS = {
      UPDATE: getRoute(routes$1.setupLevel2, {
        prefix: "shared",
        primary: "update",
        secondary: "update"
      }),
      WAP: getRoute(routes$1.setupLevel2, {
        prefix: "shared",
        primary: "web-access-protection",
        secondary: "web-access-protection"
      })
    };
    const getUrlFromKey = (setupKey) => {
      const [prefix, primary, secondary] = setupKey.replace(SETUP_KEY_PREFIX, "").replace(/_/g, "-").split(".");
      const route = !secondary ? routes$1.setupLevel1 : routes$1.setupLevel2;
      return getRoute(route, { prefix, primary, secondary });
    };
    const getKeyFromUrl = (params) => {
      const { prefix = "", primary = "", secondary = "" } = params;
      if (!prefix || !primary) {
        return "";
      }
      let key = `${SETUP_KEY_PREFIX}${prefix}.${primary}`;
      if (secondary) {
        key = `${key}.${secondary}`;
      }
      return key.replace(/-/g, "_");
    };
    const ceSearch = "_ceSearch_xy4h8_1";
    const style$g = {
      ceSearch
    };
    const SEARCH_ID = "ce_search_id";
    const CESearch = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$g.ceSearch, id: SEARCH_ID });
    function useCurrentPath() {
      const location = useLocation();
      const result = matchRoutes(
        Object.values(routes$1).map((x) => ({ path: x })),
        location
      );
      if (!result) {
        return { currentPath: "/", currentPathname: location.pathname };
      }
      return {
        currentPath: result[0].route.path,
        currentPathname: result[0].pathname
      };
    }
    function useRouterStuff() {
      const location = useLocation();
      const navigate = useNavigate();
      const params = useParams();
      const { currentPath, currentPathname } = useCurrentPath();
      return {
        location,
        navigate,
        params,
        currentPath,
        currentPathname
      };
    }
    const withHooksRouter = (Component) => (props) => {
      const routerProps = useRouterStuff();
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...routerProps, ...props });
    };
    const extendedWindow = window;
    const MENU_ID = "ce-menu";
    const MENU_PATH_ATTR = "ce_selecteditem";
    class PureCEEditor extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "editorCallbacks", null);
        __publicField(this, "menuObserver", null);
        __publicField(this, "closing", false);
        __publicField(this, "state", {
          modal: false,
          modalText: null,
          modalType: "info",
          modalTitle: null,
          changeHappened: false,
          observerActive: false
        });
        __publicField(this, "closeupTransactions", (callback) => {
          const transactionID = extendedWindow.ce_GetTransactionID();
          if (this.editorCallbacks) {
            this.editorCallbacks.cancelConfigEdit();
          }
          const commit = new extendedWindow.CERPCAsync();
          commit.onComplete = () => {
            this.closeTransaction(transactionID, true, callback);
          };
          commit.ce_TransactionCommit(transactionID);
        });
        __publicField(this, "startStandaloneConfigEditor", () => {
          this.editorCallbacks = null;
          this.openTransaction((newTransactionId) => {
            this.editorCallbacks = this.initEditor(newTransactionId);
          });
        });
        __publicField(this, "addPathChangeListener", () => {
          if (!this.menuObserver) {
            const menuElement = document.getElementById(MENU_ID);
            if (menuElement) {
              this.menuObserver = new MutationObserver((mutations) => {
                const pathKeyMutation = mutations.find(
                  (mutation) => mutation.type === "attributes" && mutation.attributeName === MENU_PATH_ATTR
                ) ?? { target: {} };
                const pathKeyMutationTarget = pathKeyMutation.target;
                const pathKey = Object.keys(pathKeyMutationTarget).length > 0 ? pathKeyMutationTarget.attributes[MENU_PATH_ATTR].value : "";
                if (!this.state.observerActive) {
                  this.setState({ observerActive: true });
                }
                this.props.setUrlByKey(pathKey);
              });
              this.menuObserver.observe(menuElement, { attributes: true });
            }
          }
        });
        // When certain CE methods/callbacks are called (like cancelConfigEdit), its contents get removed and re-added into DOM.
        // That causes observers tied to the menu no longer get trigged.
        // This method ensures that whenever such "reload" is done, observers are re-added accordingly.
        __publicField(this, "reAddPathChangeListener", () => {
          if (this.menuObserver) {
            this.menuObserver.disconnect();
            this.menuObserver = null;
          }
          this.addPathChangeListener();
        });
        __publicField(this, "openTransaction", (onCompleteCallback) => {
          this.closing = false;
          const rpc = new extendedWindow.CERPCAsync({
            ceProductName: pkgid.ce_product,
            version: VERSION_PRODUCT_MMR,
            rpc_call_url: this.props.ceRpcUrl,
            eraSessionId: this.props.ERASessionID
          });
          rpc.onComplete = () => {
            onCompleteCallback(rpc.result);
          };
          rpc.ce_TransactionOpen();
        });
        __publicField(this, "initEditor", (transactionID) => {
          const initData = {
            ERASessionID: this.props.ERASessionID,
            editorID: "ce_editorID",
            searchPanelID: SEARCH_ID,
            transactionID,
            product: pkgid.ce_product_root,
            helpVersion: VERSION_PRODUCT_FOR_HELP_PAGE,
            locale: this.props.locale ?? "en_US",
            lang: this.props.winid ?? 1033,
            is_policy: false,
            readonly: false,
            selectedScreenID: getKeyFromUrl(this.props.params) || DEFAULT_OPEN_KEY,
            rpc_call_url: this.props.ceRpcUrl
          };
          const ERAcallbacks = {
            onChange: this.setupDiscardConfirmation,
            onValidationChange: () => {
            },
            clearTransaction: () => {
            },
            setConfigEditorWorkingStatus: this.setWorkingStatus,
            chooseItem: () => {
            },
            configEngineError: (err) => {
              if (err.includes("errorThrown: Unauthorized")) {
                this.props.navigate(routes$1.logout, { state: { from: this.props.location } });
              } else {
                this.showModal(err, "IDUS_SETUP_ERROR_TITLE");
              }
            },
            configEngineMessage: (msg) => {
              this.showModal(msg, "IDUS_SETUP_INFO_TITLE", false);
            },
            getStaffPlaceholders: () => "{}"
          };
          return extendedWindow.CE_HTML.core.initConfigEditor(JSON.stringify(initData), ERAcallbacks, true);
        });
        __publicField(this, "setWorkingStatus", (screenLockerStates) => {
          switch (screenLockerStates) {
            case extendedWindow.CE_HTML.consts.screenLockerStates.screenLock:
              this.props.lockScreen();
              break;
            case extendedWindow.CE_HTML.consts.screenLockerStates.screenUnlock:
              this.props.unlockScreen();
              this.addPathChangeListener();
              break;
          }
        });
        __publicField(this, "closeTransaction", (transactionID, restart = true, callback) => {
          if (!this.closing) {
            this.closing = true;
            const close = new extendedWindow.CERPCAsync();
            close.onComplete = () => {
              if (restart) {
                this.startStandaloneConfigEditor();
              }
              if (callback) {
                callback();
              }
            };
            close.ce_TransactionClose(transactionID);
          }
        });
        __publicField(this, "onSave", () => {
          if (this.editorCallbacks) {
            this.editorCallbacks.saveConfig({
              onSaveDone: () => {
                this.closeupTransactions(() => {
                  idToast(this.props.t("IDUS_SETUP_CHANGES_SAVED"), "toast-setup-submit", "IDUS_SETUP_CHANGES_SAVED");
                  this.props.removeRouteChangeConfirmation();
                  this.reAddPathChangeListener();
                  this.setState({ changeHappened: false });
                });
              },
              onSaveFailed: (err) => {
                this.showModal(err, "IDUS_SETUP_SAVE_ERROR_TITLE");
              }
            });
          }
        });
        __publicField(this, "reinitialize", () => {
          if (this.editorCallbacks) {
            const transactionID = extendedWindow.ce_GetTransactionID();
            this.editorCallbacks.cancelConfigEdit();
            this.setState({ changeHappened: false });
            this.closeTransaction(transactionID);
          }
        });
        __publicField(this, "showModal", (msg, title, isError2 = true) => {
          this.setState({
            modal: true,
            modalText: msg,
            modalType: isError2 ? "error" : "info",
            modalTitle: title
          });
        });
        __publicField(this, "closeModal", () => this.setState({ modal: false }));
        __publicField(this, "setupDiscardConfirmation", () => {
          this.setState({ changeHappened: true });
          this.props.requireRouteChangeConfirmation(
            "IDUS_SETUP_DISCARD_CONFIRMATION_TITLE",
            this.props.t("IDUS_SETUP_DISCARD_CONFIRMATION"),
            this.props.t("IDUS_SETUP_SAVE_BUTTON_DISCARD"),
            this.props.t("IDUS_CANCEL")
          );
        });
        __publicField(this, "triggerDiscardModal", (discardOnClick, cancelOnClick = this.props.closeGlobalModal) => {
          this.props.showGlobalModal(
            "warning",
            "IDUS_SETUP_DISCARD_CONFIRMATION_TITLE",
            this.props.t("IDUS_SETUP_DISCARD_CONFIRMATION"),
            [
              {
                id: "route-conf-discard",
                text: this.props.t("IDUS_SETUP_SAVE_BUTTON_DISCARD"),
                onClick: discardOnClick
              },
              {
                id: "route-conf-cancel",
                text: this.props.t("IDUS_CANCEL"),
                type: "secondary",
                onClick: cancelOnClick
              }
            ]
          );
        });
        __publicField(this, "onDiscard", () => {
          if (this.state.changeHappened) {
            this.triggerDiscardModal(() => {
              this.reinitialize();
              this.props.closeGlobalModal();
              this.props.removeRouteChangeConfirmation();
              this.reAddPathChangeListener();
            });
          }
        });
        __publicField(this, "onResetCompleted", () => {
          this.closeupTransactions(() => {
            idToast(this.props.t("IDUS_SETUP_CHANGES_SAVED"), "toast-setup-reset", "IDUS_SETUP_CHANGES_SAVED");
          });
        });
        __publicField(this, "onResetConfirmation", () => {
          this.setState({ changeHappened: false });
          this.props.resetConfig(["Settings"], void 0, this.onResetCompleted);
        });
        __publicField(this, "onReset", () => {
          if (this.state.changeHappened) {
            this.triggerDiscardModal(() => {
              this.onResetConfirmation();
              this.props.closeGlobalModal();
              this.props.removeRouteChangeConfirmation();
            });
          } else {
            this.onResetConfirmation();
          }
          this.reAddPathChangeListener();
        });
        __publicField(this, "renderButtons", () => {
          const { t: t2 } = this.props;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$E,
            {
              id: "ce_buttons",
              orientation: "left",
              buttons: [
                [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { type: "primary", id: "ce_button_primary", onClick: this.onSave, children: t2("IDUS_SETUP_SAVE_BUTTON_SAVE") }, "save-btn"),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { type: "secondary", id: "ce_button_secondary", onClick: this.onDiscard, children: t2("IDUS_SETUP_SAVE_BUTTON_DISCARD") }, "discard-btn")
                ],
                [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { type: "secondary", id: "ce_button_secondary_reset", onClick: this.onReset, children: t2("IDUS_STATS_CONFIG_RESET") }, "reset-btn")
                ]
              ]
            }
          );
        });
      }
      componentDidMount() {
        this.props.setButtons(this.renderButtons());
        this.props.blockLogout(true);
        this.startStandaloneConfigEditor();
      }
      // to allow changing the path by reinitialization if there was no interaction with setup yet
      // for cases when setup could not have been interacted with due to overlay modal or such
      componentDidUpdate(prevProps) {
        if (prevProps.params !== this.props.params && !this.state.observerActive && !this.state.changeHappened) {
          this.reinitialize();
          this.reAddPathChangeListener();
        }
      }
      componentWillUnmount() {
        if (this.menuObserver) {
          this.menuObserver.disconnect();
        }
        if (this.editorCallbacks) {
          const transactionID = extendedWindow.ce_GetTransactionID();
          this.editorCallbacks.cancelConfigEdit();
          this.closeTransaction(transactionID, false, () => {
            this.props.blockLogout(false);
          });
        } else {
          this.props.blockLogout(false);
        }
      }
      render() {
        logGroup(
          "CEEditor",
          [
            ["props", this.props],
            ["state", this.state],
            ["editorCallbacks", this.editorCallbacks]
          ],
          void 0,
          this.props.debug
        );
        const { modal, modalType, modalText, modalTitle = "" } = this.state;
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { limitContentWidth: false, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "ce_editorID", style: { minWidth: "750px" } }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ConfirmationModal,
            {
              type: modalType,
              show: modal,
              onKeyEsc: this.closeModal,
              onClose: this.closeModal,
              message: modalTitle ? this.props.t(modalTitle) : "",
              buttons: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "ce_modal_button", text: this.props.t("IDUS_OK"), onClick: this.closeModal }, "closebtn")
              ],
              children: modalText
            }
          )
        ] });
      }
    }
    const CEEditor = withErrorBoundary()(withTranslation()(withHooksRouter(PureCEEditor)));
    CEEditor.displayName = "CEEditor";
    const SETUP_PATH = "/generated/setup/";
    const SETUP_RPC = "/setup/ceRpcCall";
    class PureSetup extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "isBeingUnmounted", false);
        __publicField(this, "styleSheets", [
          { src: "standalone/standalone.css" },
          { src: window.document.dir === "rtl" ? "css/001_ce.rtl.css" : "css/001_ce.ltr.css" }
        ]);
        __publicField(this, "scripts", [{ src: "js/001_jquery.min.js" }, { src: "js/002_cef.min.js" }, { src: "js/003_ce.min.js" }]);
        __publicField(this, "state", {
          ceEditor: null,
          buttons: null
        });
        __publicField(this, "loadScripts", (i) => {
          const resource = this.scripts[i];
          if (resource) {
            loadScriptResource(SETUP_PATH + resource.src, (ref) => {
              resource.ref = ref;
              this.loadScripts(i + 1);
            });
          } else {
            this.renderSetup();
          }
        });
        __publicField(this, "setUrlByKey", (setupKey) => {
          this.props.navigate(getUrlFromKey(setupKey));
        });
        __publicField(this, "renderSetup", () => {
          if (!this.isBeingUnmounted) {
            this.setState({
              ceEditor: /* @__PURE__ */ jsxRuntimeExports.jsx(
                CEEditor,
                {
                  ERASessionID: getAuth(),
                  winid: this.props.winid,
                  lockScreen: this.props.lockScreen,
                  unlockScreen: this.props.unlockScreen,
                  requireRouteChangeConfirmation: this.props.requireRouteChangeConfirmation,
                  removeRouteChangeConfirmation: this.props.removeRouteChangeConfirmation,
                  showGlobalModal: this.props.showModal,
                  closeGlobalModal: this.props.showNextModal,
                  setUrlByKey: this.setUrlByKey,
                  resetConfig: this.props.cfgResetToDefault,
                  blockLogout: this.props.blockLogout,
                  ceRpcUrl: getUrl(SETUP_RPC),
                  setButtons: (buttonGroup) => {
                    this.setState({ buttons: buttonGroup });
                  }
                }
              )
            });
          }
        });
      }
      componentDidMount() {
        this.loadScripts(0);
        this.styleSheets = this.styleSheets.map((resource) => {
          const processedResource = { ...resource };
          loadStylesheetResource(SETUP_PATH + processedResource.src, (ref) => {
            processedResource.ref = ref;
          });
          return processedResource;
        });
      }
      componentWillUnmount() {
        this.isBeingUnmounted = true;
        this.styleSheets.forEach((resource) => {
          if (resource.ref) {
            unloadResource(RESOURCE_TYPE.STYLESHEET, resource.ref);
          }
        });
        this.scripts.forEach((resource) => {
          if (resource.ref) {
            unloadResource(RESOURCE_TYPE.SCRIPT, resource.ref);
          }
        });
      }
      render() {
        logGroup(
          "Setup",
          [
            ["props", this.props],
            ["state", this.state],
            ["styleSheets", this.styleSheets]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          MainPage,
          {
            title: this.props.title,
            content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
              this.state.ceEditor,
              /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, { show: !this.state.ceEditor })
            ] }),
            footer: this.state.buttons,
            headerContent: /* @__PURE__ */ jsxRuntimeExports.jsx(CESearch, {})
          }
        );
      }
    }
    const mapStateToProps$u = (state) => ({
      winid: state.language.winid
    });
    const mapDispatchToProps$u = {
      lockScreen,
      unlockScreen,
      requireRouteChangeConfirmation,
      removeRouteChangeConfirmation,
      showModal,
      showNextModal,
      blockLogout,
      cfgResetToDefault
    };
    const Setup = withNavigate(withTranslation()(connect(mapStateToProps$u, mapDispatchToProps$u)(PureSetup)));
    Setup.displayName = "Setup";
    const HIGHLIGHT_DEFINITIONS = {
      Cleaned: {
        [ValueWrapperType.SEVERITY_ERROR]: (data2) => data2.Cleaned < data2.Infected
      },
      Infected: {
        [ValueWrapperType.SEVERITY_ERROR]: (data2) => data2.Infected > 0
      }
    };
    class PureScanLogsTable extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          customLogs: void 0,
          customRowCount: void 0
        });
        __publicField(this, "registeredCallbacks", null);
        __publicField(this, "runningScansMenu", (id2, paused) => [
          {
            items: [
              {
                title: this.props.t(paused ? "IDUS_RESUME" : "IDUS_PAUSE"),
                id: paused ? "action-resume" : "action-pause",
                icon: paused ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$F, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$G, {}),
                callback: () => paused ? this.props.resumeODScan(id2) : this.props.pauseODScan(id2)
              },
              {
                title: this.props.t("IDUS_STOP"),
                id: "action-stop",
                icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionClose, {}),
                callback: () => this.props.stopODScan(id2)
              }
            ]
          }
        ]);
        __publicField(this, "completedScansMenu", (id2) => [
          {
            items: [
              {
                title: this.props.t("IDUS_NETMON_CMENU_SHOW_DETAILS"),
                id: "action-show-details",
                icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconLetterI, {}),
                callback: () => this.props.setDetail(id2)
              }
            ]
          }
        ]);
        __publicField(this, "prepareLogs", () => {
          const { t: t2, rowCount, logs, firstRowIndex, runningScans } = this.props;
          if (logs.length > 0 && firstRowIndex !== 0) {
            let otherRows = 1;
            if (runningScans.length > 0) {
              otherRows += runningScans.length + 1;
            }
            this.props.setTableNumbers({ otherRows });
            this.setState({
              customRowCount: rowCount + otherRows,
              customLogs: void 0
            });
          } else {
            let tableContent = [];
            let otherRows = 0;
            if (runningScans.length > 0) {
              tableContent = [...tableContent, getTableSubtitle("R", t2("IDUS_RUNNING")), ...runningScans];
              otherRows += runningScans.length + 1;
            }
            if (logs.length > 0) {
              const processedLogs = logs.map((log2) => ({ ...log2, status: ScanState.COMPLETED }));
              tableContent = [...tableContent, getTableSubtitle("C", t2("IDUS_COMPLETED")), ...processedLogs];
              otherRows += 1;
            }
            this.props.setTableNumbers({ otherRows });
            const totalCount = otherRows + rowCount;
            this.setState({
              customRowCount: totalCount,
              customLogs: tableContent
            });
          }
        });
        __publicField(this, "getContextMenu", (rows) => {
          if (rows.length !== 1) {
            return null;
          }
          const row = rows[0];
          switch (row.status) {
            case ScanState.PAUSED:
            case ScanState.RUNNING:
              return this.runningScansMenu(row.customId, row.status === ScanState.PAUSED);
            case ScanState.COMPLETED:
              return this.completedScansMenu(row.customId);
            default:
              return null;
          }
        });
      }
      componentDidMount() {
        this.registeredCallbacks = cfgRegisterCallback(
          [
            {
              path: "Runtime.Plugins.ODScand.RunningScan",
              callback: (data2) => {
                this.props.setRunningScans(convertRunningScans(data2));
              }
            }
          ],
          this.props.winid
        );
      }
      componentDidUpdate(oldProps) {
        if (oldProps.runningScans !== this.props.runningScans) {
          this.props.getLogsFromQuery(this.props.lastFirstRowIndex);
        }
        if (oldProps.logs !== this.props.logs) {
          this.prepareLogs();
        }
      }
      componentWillUnmount() {
        if (this.registeredCallbacks) {
          cfgUnregisterCallback(this.registeredCallbacks);
        }
        this.props.setRunningScans([]);
      }
      render() {
        const { customLogs, customRowCount } = this.state;
        logGroup(
          "ScanLogsTable",
          [
            ["props", this.props],
            ["state", this.state],
            ["registeredCallbacks", this.registeredCallbacks],
            ["HIGHLIGHT_DEFINITIONS", HIGHLIGHT_DEFINITIONS]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          LogsTable,
          {
            id: "scans",
            logType: LogType.LOGD_ONDEMAND_LIST,
            hasSubheaders: true,
            removalInfoRow: true,
            highlightDefinitions: HIGHLIGHT_DEFINITIONS,
            customLogs,
            customRowCount,
            getContextMenu: this.getContextMenu
          }
        );
      }
    }
    const mapDispatchToProps$t = {
      pauseODScan,
      resumeODScan,
      stopODScan,
      setTableNumbers,
      setRunningScans,
      getLogsFromQuery
    };
    const mapStateToProps$t = (state) => ({
      winid: state.language.winid,
      runningScans: state.scans.runningScans,
      rowCount: state.logs.rowCount,
      firstRowIndex: state.logs.firstRowIndex,
      logs: state.logs.logs,
      lastFirstRowIndex: state.logs.tableNumbers.lastFirstRowIndex
    });
    const ScanLogsTable = withErrorBoundary()(
      withTranslation()(connect(mapStateToProps$t, mapDispatchToProps$t)(PureScanLogsTable))
    );
    ScanLogsTable.displayName = "ScanLogsTable";
    const PROFILES = {
      SMART: "@Smart scan",
      IN_DEPTH: "@In-depth scan"
    };
    const scanProfiles = (t2) => [
      { label: t2("IDUS_SETUP_PROTECT_ONDMD_PROFILE_NAME_SMART"), value: PROFILES.SMART },
      { label: t2("IDUS_SETUP_PROTECT_ONDMD_PROFILE_NAME_DEEP"), value: PROFILES.IN_DEPTH }
    ];
    const scanTargets = (t2) => [
      { label: t2("IDUS_TARGET_LOCAL"), value: "local_drives" },
      { label: t2("IDUS_NETWORK_DRIVES"), value: "network_drives" },
      { label: t2("IDUS_TARGET_REMOVABLE"), value: "removable_media" },
      { label: t2("IDUS_BOOT_SECTORS"), value: "boot_sectors" }
    ];
    const scanOptions = (t2) => [
      { label: t2("IDUS_SCAN_CLEANING"), value: "readonly" },
      { label: t2("IDUS_SCAN_EXCLUSIONS"), value: "ignore_exclusions" }
    ];
    const scanOverviewCards = (t2) => [
      { header: t2("IDUS_STAT_BASIC"), icon: IconLetterI, tag: "BASIC_INFO", id: "scan-details-basics" },
      { header: t2("IDUS_STAT_SETTINGS"), icon: default_1$x, tag: "SCAN_SETTINGS", id: "scan-details-settings" },
      { header: t2("IDUS_STAT_OBJECTS"), icon: IconFileClean, tag: "FILES", id: "scan-details-files" }
    ];
    const transformTargets = (targets, custom) => {
      const result = {};
      targets.forEach((key) => {
        result[key] = true;
      });
      result.custom_paths = custom;
      return result;
    };
    var SECTIONS = /* @__PURE__ */ ((SECTIONS2) => {
      SECTIONS2["PROFILE"] = "profile";
      SECTIONS2["TARGETS"] = "targets";
      SECTIONS2["CUSTOM"] = "custom";
      SECTIONS2["OPTIONS"] = "options";
      return SECTIONS2;
    })(SECTIONS || {});
    const getDefaultScan = (profile, targets = [], custom = [], options = ["readonly"]) => ({
      [
        "profile"
        /* PROFILE */
      ]: profile,
      [
        "targets"
        /* TARGETS */
      ]: targets,
      [
        "custom"
        /* CUSTOM */
      ]: custom,
      [
        "options"
        /* OPTIONS */
      ]: options
    });
    const dataToRequest = (formData) => ({
      profile: formData[
        "profile"
        /* PROFILE */
      ],
      readonly: !formData[
        "options"
        /* OPTIONS */
      ].includes("readonly"),
      ignore_exclusions: formData[
        "options"
        /* OPTIONS */
      ].includes("ignore_exclusions"),
      ctl_incl_list: transformTargets(
        formData[
          "targets"
          /* TARGETS */
        ],
        formData[
          "custom"
          /* CUSTOM */
        ].map((target) => target.value)
      )
    });
    const scanModalContent = "_scanModalContent_esbgb_1";
    const styles$1 = {
      scanModalContent
    };
    class PureScanModal extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "scanTargets", []);
        __publicField(this, "scanOptions", []);
        __publicField(this, "resetModal", () => {
          this.setState({
            form: { ...this.props.defaultValues },
            loading: false
          });
          this.props.closeModal();
        });
        __publicField(this, "cancelModal", () => {
          this.resetModal();
          this.props.resetScanError();
        });
        __publicField(this, "startScan", () => {
          this.setState({ loading: true });
          this.props.startODScan(dataToRequest(this.state.form), this.props.t, this.resetModal);
        });
        __publicField(this, "mergeProfiles", () => {
          const result = scanProfiles(this.props.t);
          this.props.scans.profiles.forEach(({ name }) => {
            if (name && name[0] !== "@") {
              result.push({ label: name, value: name });
            }
          });
          return result;
        });
        __publicField(this, "changeForm", (label, value) => {
          this.setState(({ form }) => ({
            form: {
              ...form,
              [label]: value
            }
          }));
        });
        __publicField(this, "addCustomTarget", (targets) => {
          const formatTargets = targets.map(({ text }) => ({ label: text, value: b64EncodeUnicode(text) }));
          this.changeForm(SECTIONS.CUSTOM, [...formatTargets]);
        });
        __publicField(this, "checkboxChecked", (key, value) => this.state.form[key].includes(value) ? 1 : 0);
        this.state = {
          loading: false,
          form: { ...props.defaultValues }
        };
        this.scanTargets = scanTargets(props.t);
        this.scanOptions = scanOptions(props.t);
      }
      checkboxChanged(key, checked, value) {
        if (checked) {
          this.changeForm(key, [...this.state.form[key], value]);
        } else {
          const arrayWithoutValue = this.state.form[key].filter((item) => item !== value);
          this.changeForm(key, arrayWithoutValue);
        }
      }
      render() {
        const { t: t2 } = this.props;
        const { form } = this.state;
        const profiles = this.mergeProfiles();
        const defaultProfile = profiles.find((profile) => profile.value === this.state.form[SECTIONS.PROFILE]);
        logGroup(
          "ScanModal",
          [
            ["props", this.props],
            ["state", this.state],
            ["scanTargets", this.scanTargets],
            ["scanOptions", this.scanOptions]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$j,
          {
            id: "custom-scan-modal",
            title: t2("IDUS_NEW_SCAN"),
            show: this.props.isOpen,
            effect: "fadeInDown",
            onKeyEsc: this.cancelModal,
            onAway: this.cancelModal,
            onClose: this.cancelModal,
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "start-scan",
                  text: t2("IDUS_START_SCAN"),
                  disabled: [...form[SECTIONS.TARGETS], ...form[SECTIONS.CUSTOM]].length === 0,
                  loading: this.state.loading && !this.props.error,
                  loadingText: t2("IDUS_START_SCAN"),
                  onClick: this.startScan
                },
                "start-scan"
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "cancel-scan",
                  text: t2("IDUS_CANCEL"),
                  type: "secondary",
                  onClick: this.cancelModal
                },
                "cancel-scan"
              )
            ],
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.scanModalContent, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$o, { when: !!this.props.error && this.props.error.activity === ErrorType.NEW_SCAN, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type: "error", children: t2("IDUS_NEW_SCAN_ERROR_DESC") }) }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$p,
                  {
                    id: "scan-profile",
                    labelText: t2("IDUS_SCAN_PROFILE"),
                    content: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Select,
                      {
                        options: profiles,
                        defaultValue: defaultProfile,
                        onChange: (profile) => {
                          var _a;
                          return this.changeForm(SECTIONS.PROFILE, (_a = profile ?? defaultProfile) == null ? void 0 : _a.value);
                        },
                        allowEmpty: false,
                        isClearable: false,
                        isSearchable: false
                      }
                    )
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$p,
                  {
                    id: "scan-flags-checkbox-group",
                    labelText: t2("IDUS_LABEL_OPTIONS"),
                    content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$H, { type: "row", children: this.scanOptions.map(({ label, value }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
                      default_1$r,
                      {
                        id: `scan-flag-${value}-checkbox`,
                        name: value,
                        value,
                        text: label,
                        checked: this.checkboxChecked(SECTIONS.OPTIONS, value),
                        onChange: (checked, v) => this.checkboxChanged(SECTIONS.OPTIONS, checked === 1, v)
                      },
                      value
                    )) })
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$p,
                  {
                    id: "scan-target-checkbox-group",
                    labelText: t2("IDUS_SCAN_TARGETS"),
                    content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$H, { type: "row", children: this.scanTargets.map(({ label, value }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
                      default_1$r,
                      {
                        id: `scan-target-${value}-checkbox`,
                        name: value,
                        value,
                        text: label,
                        checked: this.checkboxChecked(SECTIONS.TARGETS, value),
                        onChange: (checked, v) => this.checkboxChanged(SECTIONS.TARGETS, checked === 1, v)
                      },
                      value
                    )) })
                  }
                )
              ] }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "m-auto pb-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$I,
                {
                  id: "scan-custom-targets",
                  tagsType: "active",
                  createOnBlur: true,
                  newOnTop: true,
                  formComponent: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "text", placeholder: t2("IDUS_SCAN_ADD_TARGET_HINT"), onChangedTimeout: 100 }),
                  onChange: (targets) => this.addCustomTarget(targets)
                }
              ) })
            ] })
          }
        );
      }
    }
    const mapDispatchToProps$s = {
      startODScan,
      resetScanError
    };
    const mapStateToProps$s = (state) => ({
      scans: state.scans.newScan,
      error: state.scans.error
    });
    const ScanModal = connect(mapStateToProps$s, mapDispatchToProps$s)(withTranslation()(PureScanModal));
    ScanModal.displayName = "ScanModal";
    function useCE(defs, moreDeps = []) {
      const winid = useSelector((state) => state.language.winid);
      reactExports.useEffect(() => {
        const registeredCallbacks = cfgRegisterCallback(defs, winid);
        return () => {
          if (registeredCallbacks) {
            cfgUnregisterCallback(registeredCallbacks);
          }
        };
      }, [winid, ...moreDeps]);
    }
    const InactiveFeature = (props) => {
      const { t: t2 } = useTranslation();
      const navigate = useNavigate();
      const { message, action, route } = props;
      const button = action && route ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { type: "primary", onClick: () => navigate(route), children: t2(action) }) : void 0;
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        PlaceholderScreen,
        {
          actionButton: button,
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$J, {}),
          primaryMessage: t2("IDUS_FEATURE_INACTIVE_TITLE"),
          secondaryMessage: t2(message)
        }
      );
    };
    const PureScans = (props) => {
      const { scanActive, startODScan: startODScanFn, featureFlag, startScanFeatureFlag, realtimeFlag } = props;
      const { t: t2 } = useTranslation();
      const [modal, setModal] = reactExports.useState(false);
      const navigate = useNavigate();
      useCE([
        {
          path: "Settings.Plugins.ODScand",
          callback: props.setProfiles
        }
      ]);
      const defaultValues = reactExports.useMemo(() => {
        const prof = scanActive || scanProfiles(t2)[0].value;
        return getDefaultScan(prof);
      }, [scanActive, t2]);
      const closeModal = reactExports.useCallback(() => setModal(false), []);
      const openModal = reactExports.useCallback(() => setModal(true), []);
      const startDefaultScan = reactExports.useCallback(() => {
        startODScanFn(
          dataToRequest({
            ...defaultValues,
            [SECTIONS.TARGETS]: ["local_drives"]
          }),
          t2,
          null,
          // no automated nor custom success handling necessary
          true
        );
      }, [startODScanFn, defaultValues, t2]);
      const openDetail = reactExports.useCallback(
        (id2) => navigate(getRoute(routes$1.scansDetail, { id: id2, tab: SCAN_DETAIL_TABS.OVERVIEW })),
        [navigate]
      );
      logGroup(
        "Scans",
        [
          ["props", props],
          ["modal", modal],
          ["defaultValues", defaultValues]
        ],
        void 0,
        props.debug
      );
      const tableFlags = [featureFlag, realtimeFlag].filter((f) => !f.active && f.priority !== -1);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: props.title,
          type: "big",
          content: tableFlags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScanLogsTable, { setDetail: openDetail }) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...tableFlags[0] }),
          footer: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "my-2", style: { display: "inline-flex", alignItems: "center" }, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Dropdown,
              {
                id: "new_scans_menu",
                reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "scan-new", ref: r2, onClick: toggle, type: "primary", disabled: !startScanFeatureFlag.active, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: t2("IDUS_NEW_SCAN") }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowTriangularDown, { fill: startScanFeatureFlag.active ? colors.secondary : colors.disabled })
                ] }) }),
                placement: "right",
                content: [
                  {
                    items: [
                      {
                        title: t2("IDUS_SCAN_ALL"),
                        id: "scan-all",
                        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$6, {}),
                        callback: startDefaultScan
                      },
                      {
                        title: t2("IDUS_CUSTOM_SCAN_DOTS"),
                        id: "custom-scan",
                        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionEdit, {}),
                        callback: openModal
                      }
                    ]
                  }
                ]
              }
            ),
            !startScanFeatureFlag.active && startScanFeatureFlag.message && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mx-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2(startScanFeatureFlag.message), placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { fill: colors.sidebarColor, size: 20, testDataLabel: "inactive-feature-tooltip-icon" }) }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(ScanModal, { isOpen: modal, closeModal, defaultValues })
          ] })
        }
      );
    };
    const mapDispatchToProps$r = {
      setProfiles,
      startODScan
    };
    const mapStateToProps$r = (state) => ({
      scanActive: state.scans.newScan.active,
      startScanFeatureFlag: state.features[FEATURES.ON_DEMAND_SCAN][0],
      featureFlag: state.features[FEATURES.SCANS_TABLE][0],
      realtimeFlag: state.features[FEATURES.REALTIME_PROTECTION][0]
    });
    const Scans = connect(mapStateToProps$r, mapDispatchToProps$r)(PureScans);
    Scans.displayName = "Scans";
    const fillSpace = "_fillSpace_1khhl_1";
    const pathStyleWraper = "_pathStyleWraper_1khhl_5";
    const pathStyle = "_pathStyle_1khhl_5";
    const tile = "_tile_1khhl_19";
    const style$f = {
      fillSpace,
      pathStyleWraper,
      pathStyle,
      tile
    };
    const TemplateCardRow = (props) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutters: false, id: props.id, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 5, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, spacer: "py-1 pr-1", children: props.title }) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 7, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-1", children: props.children }) })
    ] });
    const PureScanOverview = (props) => {
      const { t: t2, data: data2 } = props;
      const [targetsModalShow, setTargetsModalShow] = reactExports.useState(false);
      const [paths, setPaths] = reactExports.useState([]);
      reactExports.useEffect(() => {
        const targets = data2.find((item) => item.tag === "SCAN_SETTINGS" && item.key === "Targets");
        const newPaths = targets && "value" in targets ? targets.value.split(";").map((path) => path.trim()) : [];
        setPaths(newPaths);
      }, [data2]);
      const renderCardRows = (content2) => content2.map((element) => {
        const id2 = idFromLogValId(element.id, "scan-details-field");
        switch (element.key) {
          case "Targets":
            return /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCardRow, { title: element.header, id: id2, children: paths.length <= 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: paths[0], className: `${style$f.pathStyleWraper} ${style$f.pathStyle}`, children: paths[0] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { id: "targets-link", onClick: () => setTargetsModalShow(true), children: paths.length }) }, id2);
          case "Infected":
            return /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCardRow, { title: element.header, id: id2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$K, { children: +element.value === 0 ? 0 : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { id: "infected-link", color: "error", onClick: () => props.switchTab(SCAN_DETAIL_TABS.DETECTIONS), children: element.value }) }) }, id2);
          case "Not scanned":
            return /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCardRow, { title: element.header, id: id2, children: +element.value === 0 ? 0 : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { id: "not-scanned-link", onClick: () => props.switchTab(SCAN_DETAIL_TABS.NOT_SCANNED), children: element.value }) }, id2);
          default:
            return /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCardRow, { title: element.header, id: id2, children: wrapWithId(formatValue(element.value, element.type), `${id2}-value`) }, id2);
        }
      });
      const renderCards = () => scanOverviewCards(t2).map((card) => /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 12, sm: 12, md: 6, lg: 4, xl: 4, className: style$f.fillSpace, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { id: card.id, className: style$f.tile, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(card.icon, { size: 32 }), title: card.header, hideContentIcon: true, children: renderCardRows(data2.filter((value) => value.tag === card.tag)) }) }) }, card.tag));
      logGroup(
        "ScanOverview",
        [
          ["props", props],
          ["targetsModalShow", targetsModalShow],
          ["paths", paths]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$D, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Row, { gutters: true, children: data2.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, { show: true }) : renderCards() }) }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$j,
          {
            show: targetsModalShow,
            onClose: () => setTargetsModalShow(false),
            onKeyEsc: () => setTargetsModalShow(false),
            onAway: () => setTargetsModalShow(false),
            title: t2("IDUS_TARGETS"),
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: `modal__button-${props.id}`,
                  type: "secondary",
                  onClick: () => setTargetsModalShow(false),
                  text: t2("IDUS_CLOSE")
                },
                "close"
              )
            ],
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: paths.filter((path, index, array) => array.indexOf(path) === index).map((path) => /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: path, className: style$f.pathStyle, children: path }, `path-${path}`)) })
          }
        )
      ] });
    };
    const ScanOverview = withErrorBoundary()(withTranslation()(PureScanOverview));
    ScanOverview.displayName = "ScanOverview";
    const setExclusions = (data2) => ({
      type: DETECTIONS_ACTION_KEYS.DETECTIONS_SET_EXCLUSIONS_DATA,
      value: data2
    });
    const addExclusion = (exclusions, onSuccessCallback) => (dispatch, getState) => {
      cfgAddToArray(
        "Settings.ExclusionsManagement.DetectionExclusions",
        exclusions.map((exc) => ({
          Description: exc.comment,
          FileHash: exc.hash,
          Path: exc.path,
          ThreatName: exc.detection
        })),
        "",
        () => {
          dispatch({
            type: DETECTIONS_ACTION_KEYS.DETECTIONS_EXCLUSIONS_SET_ERROR,
            value: null
          });
          onSuccessCallback();
        },
        (data2) => {
          dispatch({
            type: DETECTIONS_ACTION_KEYS.DETECTIONS_EXCLUSIONS_SET_ERROR,
            value: data2.errorMsg ?? "?"
          });
        }
      )(dispatch, getState);
    };
    class PureDetectionExclusion extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          type: "PATH",
          comment: ""
        });
        __publicField(this, "getDescriptionByType", (data2, type) => {
          const { t: t2 } = this.props;
          switch (type) {
            case "HASH":
              return sprintf(t2("IDUS_EXCLUSIONS_FOR_HASH"), data2.hash);
            case "PATH":
              return sprintf(t2("IDUS_EXCLUSIONS_FOR_FILE_PATH"), data2.detection, data2.path);
            case "NAME":
            default:
              return sprintf(t2("IDUS_EXCLUSIONS_FOR_FILE"), data2.detection);
          }
        });
        __publicField(this, "renderRadio", (type, titleKey, descKey, disabled2 = false) => {
          const className = `${style$r.exclusionRadioTile} ${disabled2 ? style$r.disabled : ""}`;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type: this.state.type === type ? "info" : void 0, hideContentIcon: true, className, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-2 mx-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Radio.Item,
            {
              value: type,
              id: `exclusion-type-${type.toLowerCase()}`,
              className: style$r.exclusionRadioItem,
              checked: this.state.type === type,
              onChange: !disabled2 ? () => this.setState({ type }) : void 0,
              disabled: disabled2,
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: this.props.t(titleKey) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { noMargin: true, children: this.props.t(descKey) })
              ] })
            }
          ) }) }) });
        });
        __publicField(this, "close", () => {
          this.props.close();
          this.setState({
            type: "PATH",
            comment: ""
          });
        });
        __publicField(this, "createExclusion", (data2) => {
          const { comment } = this.state;
          const onSuccess = () => {
            this.close();
            idToast(this.props.t("IDUS_EXCLUSIONS_SUCCESS"), "toast-exclusion-submit", "IDUS_EXCLUSIONS_SUCCESS");
          };
          let exclusionDef;
          switch (this.state.type) {
            case "HASH": {
              exclusionDef = data2.map((d) => ({ hash: d.hash, path: "", detection: "", comment }));
              break;
            }
            case "PATH": {
              exclusionDef = data2.map((d) => ({ hash: "", path: d.path, detection: d.name, comment }));
              break;
            }
            case "NAME":
            default: {
              exclusionDef = data2.map((d) => ({ hash: "", path: "", detection: d.name, comment }));
            }
          }
          this.props.addExclusion(exclusionDef, onSuccess);
        });
        __publicField(this, "getDistinctData", () => {
          const data2 = this.props.data ?? [];
          switch (this.state.type) {
            case "HASH":
              return data2.filter((item, index, array) => array.findIndex((d) => d.hash === item.hash) === index);
            case "PATH":
              return data2.filter(
                (item, index, array) => array.findIndex((d) => d.path === item.path && d.name === item.name) === index
              );
            case "NAME":
            default:
              return data2.filter((item, index, array) => array.findIndex((d) => d.name === item.name) === index);
          }
        });
      }
      componentDidUpdate(prevProps) {
        if ((!prevProps.data && !!this.props.data || !!prevProps.data && !!this.props.data && prevProps.data.map((x) => x.path).join(";") !== this.props.data.map((x) => x.path).join(";")) && this.props.data.every((d) => !d.path.startsWith("/"))) {
          this.setState({
            type: "NAME"
            /* NAME */
          });
        }
      }
      render() {
        const { data: data2, debug, t: t2 } = this.props;
        logGroup(
          "DetectionExclusion",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        const distinctData = this.getDistinctData();
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$j,
          {
            id: "exclusion_modal",
            title: t2("IDUS_EXCLUSIONS_CREATE"),
            type: "simple",
            show: !!data2,
            effect: "fadeInDown",
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "exclusion-create",
                  onClick: () => this.createExclusion(distinctData),
                  text: t2("IDUS_EXCLUSIONS_CREATE")
                },
                "create"
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "exclusion-cancel", type: "secondary", onClick: this.close, text: t2("IDUS_CANCEL") }, "cancel")
            ],
            onKeyEsc: this.close,
            onAway: this.close,
            onClose: this.close,
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorMessage, { when: !!this.props.error, textId: "IDUS_EXCLUSIONS_ERROR", id: "exclusion-adding-error", children: sprintf(this.props.t("IDUS_EXCLUSIONS_ERROR"), this.props.error) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_EXCLUSIONS_DO_NOT_TRIGGER_FOR") }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", id: "exclusion-future-list", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$r.exclusionIconListWrapper, children: distinctData.map((d) => /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mb-1", className: style$r.exclusionIconListItem, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconStatusWarning,
                  {
                    size: 16,
                    display: "inline-block",
                    className: style$r.exclusionIconListIcon,
                    fill: colors.warningBig
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$r.exclusionIconListText, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: this.getDescriptionByType(d, this.state.type) }) })
              ] }, d.id)) }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5 mb-3", className: style$r.exclusionCriteriaWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$p,
                {
                  labelText: t2("IDUS_EXCLUSIONS_CRITERIA"),
                  className: style$r.exclusionCriteriaFormGroup,
                  content: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    Radio,
                    {
                      id: "exclusion-type",
                      name: "exclusionType",
                      onChange: (value) => this.setState({ type: value }),
                      value: this.state.type,
                      children: [
                        this.renderRadio("HASH", "IDUS_EXCLUSIONS_HASH", "IDUS_EXCLUSIONS_HASH_DESC"),
                        this.renderRadio("NAME", "IDUS_EXCLUSIONS_FILE", "IDUS_EXCLUSIONS_FILE_DESC"),
                        this.renderRadio(
                          "PATH",
                          "IDUS_EXCLUSIONS_FILE_PATH",
                          "IDUS_EXCLUSIONS_FILE_PATH_DESC",
                          !!data2 && data2.every((d) => !d.path.startsWith("/"))
                        )
                      ]
                    }
                  )
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$p,
                {
                  id: "wrapper-exclusion-comment",
                  labelText: t2("IDUS_EXCLUSIONS_COMMENT"),
                  optionalText: t2("IDUS_EXCLUSIONS_COMMENT_DESC"),
                  content: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    default_1$s,
                    {
                      id: "exclusion-comment",
                      onChange: (comment) => this.setState({ comment }),
                      value: this.state.comment
                    }
                  )
                }
              )
            ] })
          }
        );
      }
    }
    const mapStateToProps$q = (state) => ({
      error: state.detections.exclusionsError
    });
    const mapDispatchToProps$q = {
      addExclusion
    };
    const DetectionExclusion = connect(mapStateToProps$q, mapDispatchToProps$q)(withTranslation()(PureDetectionExclusion));
    DetectionExclusion.displayName = "DetectionExclusion";
    const INFECTION_THRESHOLD = 3;
    const FILE_PATH_PREFIX = /^file:\/\//;
    const getNullOrDisabled = (condition, item) => !condition ? {
      ...item,
      disabled: true
    } : item;
    const getCopyPath = (dataObjects, t2) => {
      const hasUrl = dataObjects.every((data2) => data2[COLUMN_KEYS.LOGS_FILE_URL]);
      const justOne = dataObjects.length === 1;
      return getNullOrDisabled(
        justOne && hasUrl,
        copyContextAction(
          t2,
          "action-copy-path",
          "IDUS_QUARANTINE_ACTION_COPY_PATH",
          dataObjects[0][COLUMN_KEYS.LOGS_FILE_URL],
          "toast-detections-action"
        )
      );
    };
    const getCopyHash = (dataObjects, t2) => {
      const hasHash = dataObjects.every((data2) => data2[COLUMN_KEYS.HASH]);
      const justOne = dataObjects.length === 1;
      return getNullOrDisabled(
        justOne && hasHash,
        copyContextAction(
          t2,
          "action-copy-hash",
          "IDUS_QUARANTINE_ACTION_COPY_HASH",
          dataObjects[0][COLUMN_KEYS.HASH],
          "toast-detections-action"
        )
      );
    };
    const getExclusion$1 = (dataObjects, t2, setExclusionData) => getNullOrDisabled(
      dataObjects.every(
        (x) => x[COLUMN_KEYS.HASH] || x[COLUMN_KEYS.LOGS_FILE_URL] || x[COLUMN_KEYS.DETECTION] || x[COLUMN_KEYS.RAW_THREAT_NAME]
      ),
      {
        title: t2("IDUS_EXCLUSIONS_CREATE"),
        id: "action-create-exclusion",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$L, {}),
        disabled: false,
        callback: () => {
          const processedData = dataObjects.map((data2) => ({
            id: data2.id,
            hash: data2[COLUMN_KEYS.HASH] ?? "",
            path: (data2[COLUMN_KEYS.LOGS_FILE_URL] ?? "").replace(FILE_PATH_PREFIX, ""),
            name: data2[COLUMN_KEYS.RAW_THREAT_NAME] ?? "",
            detection: data2[COLUMN_KEYS.DETECTION] ?? ""
          })).filter((x) => x);
          setExclusionData(processedData);
        }
      }
    );
    const getRescan = (dataObjects, t2, startODScan2, activeScanning) => {
      const hasUrls = dataObjects.every((data2) => data2[COLUMN_KEYS.LOGS_FILE_URL]);
      const cleanable = dataObjects.every((data2) => data2[COLUMN_KEYS.SEVERITY] >= INFECTION_THRESHOLD);
      return getNullOrDisabled(hasUrls && cleanable && activeScanning, {
        title: t2("IDUS_DETECTIONS_RESCAN_WITH_CLEANING"),
        id: "action-rescan-with-cleaning",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$M, {}),
        disabled: !hasUrls,
        callback: () => {
          const filePathsEncoded = dataObjects.map(
            (data2) => data2 && b64EncodeUnicode(data2[COLUMN_KEYS.LOGS_FILE_URL].replace(FILE_PATH_PREFIX, ""))
          );
          const request = {
            ctl_incl_list: {
              custom_paths: filePathsEncoded
            },
            ignore_exclusions: false,
            profile: PROFILES.IN_DEPTH,
            readonly: false
            // means that cleaning is turned on
          };
          startODScan2(request, t2, void 0, true);
        }
      });
    };
    const getDetectionActions = (rows, methods, featureFlags) => {
      const { t: t2, setExclusionData, startODScan: startODScan2 } = methods;
      if (rows.length === 0) {
        return [];
      }
      const dataObjects = rows.map((row) => row.dataObject ?? {});
      const items = [
        getCopyPath(dataObjects, t2),
        getCopyHash(dataObjects, t2),
        getExclusion$1(dataObjects, t2, setExclusionData),
        getRescan(dataObjects, t2, startODScan2, featureFlags[FEATURES.ON_DEMAND_SCAN].active)
      ];
      return items.filter((x) => x);
    };
    const HIDDEN_COLUMNS$1 = [COLUMN_KEYS.RAW_THREAT_NAME];
    const WIDTH_POINT_OVERRIDE$5 = {
      [COLUMN_KEYS.DETECTION]: 1,
      [COLUMN_KEYS.DETECTION_TYPE]: 1,
      [COLUMN_KEYS.LOGS_FILE_URL]: 5,
      [COLUMN_KEYS.CIRCUMSTANCES]: 5,
      [COLUMN_KEYS.ACTION_TAKEN]: 3,
      [COLUMN_KEYS.HASH]: 5
    };
    class PureDetectionsTable extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "getContextMenu", (rows) => [
          {
            items: getDetectionActions(
              rows,
              {
                t: this.props.t,
                setExclusionData: this.props.setExclusions,
                startODScan: this.props.startODScan
              },
              { [FEATURES.ON_DEMAND_SCAN]: this.props.scanningFeatureFlag }
            )
          }
        ]);
      }
      render() {
        const { logType, removalInfoRow, rowFilter, id: id2, onSetupError, debug } = this.props;
        logGroup("DetectionsTable", [["props", this.props]], void 0, debug);
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            LogsTable,
            {
              id: id2,
              logType,
              hiddenColumns: HIDDEN_COLUMNS$1,
              removalInfoRow,
              overrideColumnPoints: WIDTH_POINT_OVERRIDE$5,
              getContextMenu: this.getContextMenu,
              rowFilter,
              onSetupError,
              multiselect: true
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionExclusion, { data: this.props.exclusionRows, close: () => this.props.setExclusions(null) })
        ] });
      }
    }
    const mapDispatchToProps$p = {
      startODScan,
      setExclusions
    };
    const mapStateToProps$p = (state) => ({
      exclusionRows: state.detections.exclusions,
      scanningFeatureFlag: state.features[FEATURES.ON_DEMAND_SCAN][0]
    });
    const DetectionsTable = connect(
      mapStateToProps$p,
      mapDispatchToProps$p
    )(withErrorBoundary()(withTranslation()(PureDetectionsTable)));
    DetectionsTable.displayName = "DetectionsTable";
    const triggerSocketCleanup = () => () => {
      socketio.socketioEmit(messages.socketCleanupListRequest, {});
    };
    const sendToLog = (type, messageType, params) => () => {
      socketio.socketioEmit(messages.logMessageRequest, { type, messageType, params });
    };
    const logInvalidUrl = (url) => () => {
      sendToLog("warning", "invalidUrl", { Url: url })();
    };
    class PureDetectionsActions extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "getActionsMenu", () => [
          {
            items: getDetectionActions(
              this.props.selectedRows,
              {
                t: this.props.t,
                setExclusionData: this.props.setExclusions,
                startODScan: this.props.startODScan
              },
              { [FEATURES.ON_DEMAND_SCAN]: this.props.scanningFeatureFlag }
            )
          }
        ]);
      }
      render() {
        const { debug, t: t2 } = this.props;
        logGroup("DetectionActions", [["props", this.props]], void 0, debug);
        const noSelected = this.props.selectedRows.length === 0;
        return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Dropdown,
          {
            id: "detections-actions-dropdown",
            reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { ref: r2, onClick: toggle, type: "primary", id: "detections-actions-button", disabled: noSelected, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: t2("IDUS_ACTIONS") }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowTriangularDown, { fill: !noSelected ? colors.secondary : colors.disabled })
            ] }) }),
            placement: "right",
            content: this.getActionsMenu()
          }
        ) });
      }
    }
    const mapDispatchToProps$o = {
      startODScan,
      setExclusions
    };
    const mapStateToProps$o = (state) => ({
      selectedRows: state.logs.selectedRows,
      scanningFeatureFlag: state.features[FEATURES.ON_DEMAND_SCAN][0]
    });
    const DetectionsActions$1 = withTranslation()(connect(mapStateToProps$o, mapDispatchToProps$o)(PureDetectionsActions));
    DetectionsActions$1.displayName = "DetectionsActions";
    const scanDetailTabPane = "_scanDetailTabPane_1umxm_1";
    const style$e = {
      scanDetailTabPane
    };
    const tabKeys = [SCAN_DETAIL_TABS.OVERVIEW, SCAN_DETAIL_TABS.DETECTIONS, SCAN_DETAIL_TABS.NOT_SCANNED];
    const getDetailTabs = (id2, switchTab, data2) => [
      {
        id: "scan-detail-overview-tab",
        text: "IDUS_STAT_OVERVIEW",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconLetterI, { size: "15" }),
        content: /* @__PURE__ */ jsxRuntimeExports.jsx(ScanOverview, { id: id2, data: data2, switchTab })
      },
      {
        id: "scan-detail-detections-tab",
        text: "IDUS_THREATS",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconStatusError, { size: "15" }),
        content: /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionsTable, { logType: LogType.LOGD_ONDEMAND, rowFilter: LogdRowTypeFilter.LOGD_RTF_DETECTIONS, id: id2 })
      },
      {
        id: "scan-detail-not-scanned-tab",
        text: "IDUS_STAT_NOT_SCANNED",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$P, { size: "15" }),
        content: /* @__PURE__ */ jsxRuntimeExports.jsx(
          LogsTable,
          {
            logType: LogType.LOGD_ONDEMAND,
            rowFilter: LogdRowTypeFilter.LOGD_RTF_NOT_SCANNED,
            id: id2,
            overrideColumnPoints: {
              [COLUMN_KEYS.LOGS_FILE_URL]: 8
            }
          }
        )
      }
    ];
    const PureScansDetail = (props) => {
      const { location, navigate, params, currentPath } = useRouterStuff();
      const { tab, id: id2 } = params;
      const tabRef = reactExports.useRef();
      const { t: t2 } = useTranslation();
      const data2 = props.logsById[id2] ?? [];
      const parentLink = props.parentRoute.link;
      const goToParent = parentLink ? () => navigate(parentLink) : void 0;
      const switchTab = (tb) => navigate(getRoute(currentPath, { ...params, tab: tb }));
      const switchTabIndex = (tabIndex) => switchTab(tabKeys[tabIndex]);
      reactExports.useEffect(() => {
        props.getLogById(LogType.LOGD_ONDEMAND_STATS, id2, void 0, () => {
          props.logInvalidUrl(location.pathname);
          navigate(parentLink);
        });
      }, [id2, parentLink]);
      const activeTabIndex = tabKeys.indexOf(tab);
      reactExports.useEffect(() => {
        if (activeTabIndex === -1) {
          props.logInvalidUrl(location.pathname);
          switchTabIndex(0);
        } else if (tabRef.current) {
          tabRef.current.changeTab(activeTabIndex);
        }
      }, [activeTabIndex]);
      const tabs = getDetailTabs(id2, switchTab, data2).map((tb, index) => ({
        ...tb,
        text: t2(tb.text),
        key: tabKeys[index]
      }));
      logGroup(
        "ScansDetail",
        [
          ["props", props],
          ["tabs", tabs]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: null,
          type: "small",
          content: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$N.Container, { ref: tabRef, onChange: switchTabIndex, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$N.Header, { tabs }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$N.Content, { children: tabs.map((item, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$N.Pane, { tabKey: i, className: style$e.scanDetailTabPane, children: activeTabIndex === i ? item.content : null }, item.key)) })
          ] }),
          footer: activeTabIndex === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionsActions$1, {}) : false,
          breadcrumb: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$O,
            {
              items: [
                { id: "1", content: t2(props.parentRoute.title), onClick: goToParent },
                { id: "2", content: props.title }
              ]
            }
          ),
          goBackHandler: goToParent
        }
      );
    };
    const mapStateToProps$n = (state) => ({
      logsById: state.logs.logsById
    });
    const mapDispatchToProps$n = {
      getLogById,
      logInvalidUrl
    };
    const ScansDetail = connect(mapStateToProps$n, mapDispatchToProps$n)(PureScansDetail);
    ScansDetail.displayName = "ScansDetail";
    const Threats = (props) => {
      const { featureFlag, realtimeFlag } = useSelector((state) => ({
        featureFlag: state.features[FEATURES.DETECTIONS_TABLE][0],
        realtimeFlag: state.features[FEATURES.REALTIME_PROTECTION][0]
      }));
      logGroup("Threats", [["props", props]], void 0, props.debug);
      const flags = [featureFlag, realtimeFlag].filter((f) => !f.active && f.priority !== -1);
      const content2 = reactExports.useMemo(
        () => flags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionsTable, { logType: LogType.LOGD_VIRUSLOG, removalInfoRow: true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...flags[0] }),
        // eslint-disable-next-line react-hooks/exhaustive-deps
        [featureFlag, realtimeFlag]
      );
      const actions = reactExports.useMemo(() => /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionsActions$1, {}), []);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(MainPage, { padding: "0px", title: props.title, content: content2, footer: actions });
    };
    const callbacks = new RegisterCallbackContainer();
    const quarantineCallbackResponse = (result) => {
      callbacks.call(result.callbackId, result);
      return { type: QUARANTINE_ACTION_KEYS.QUARANTINE_REMOVE_CALLBACK_ID, value: result.callbackId };
    };
    const setQuarantineSettings = (rowLimit, nullRowMessage) => ({
      type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_SETTINGS,
      value: {
        rowLimit,
        nullRowMessage
      }
    });
    const quarantineActionErrorHandler = (title) => (response) => (dispatch) => {
      if (response.error) {
        dispatch(showModal("error", title, response.errorMsg));
      }
    };
    const closeQuarantineQuery = () => (_dispatch, getState) => {
      const { queryId } = getState().quarantine.query;
      if (queryId) {
        socketio.socketioEmit(messages.quarantineQueryClose, { id: queryId });
      }
    };
    const resetReducer = () => (dispatch, getState) => {
      const { currentCallbacks } = getState().quarantine;
      currentCallbacks.forEach((id2) => {
        callbacks.delete(id2);
      });
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_RESET_REDUCER });
    };
    const successErrorHandler = ({ callbackId, error }, successAction, errorAction, onSuccessCallback, onErrorCallback) => (dispatch) => {
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_REMOVE_CALLBACK_ID, value: callbackId });
      if (!error) {
        dispatch(successAction);
        if (onSuccessCallback) {
          onSuccessCallback();
        }
      } else {
        dispatch(errorAction);
        if (onErrorCallback) {
          onErrorCallback(error);
        }
      }
    };
    const getQuarantineTableHeaders = (hiddenColumns = [], onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const responseCallback = (response) => {
        const columns = (response.columns ?? []).map((c) => {
          const visible = !hiddenColumns.includes(c.key);
          return {
            ...c,
            minWidth: visible ? minWidthOfHeader(c) : 0,
            visible
          };
        });
        successErrorHandler(
          response,
          { type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_HEADERS, value: columns },
          { type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_HEADERS_ERROR },
          onSuccessCallback,
          onErrorCallback
        )(dispatch);
      };
      const callbackId = callbacks.register(responseCallback, messages.quarantineInformationRequest);
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.quarantineInformationRequest, { callbackId, lang: getState().language.winid });
    };
    const initializeQuarantineQuery = (onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const responseCallback = (response) => {
        successErrorHandler(
          response,
          {
            type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_QUERY,
            value: { id: response.callbackId, queryId: response.query_id }
          },
          { type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_QUERY_ERROR },
          onSuccessCallback,
          onErrorCallback
        )(dispatch);
      };
      const callbackId = callbacks.register(responseCallback, messages.quarantineQueryExecuteRequest);
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.quarantineQueryExecuteRequest, { callbackId, lang: getState().language.winid });
    };
    const getQuarantineFromQuery = (firstRowIndex, lastRowIndex, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const { rowLimit, query, headers, nullRowMessage } = getState().quarantine;
      if (!query.queryId) {
        dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA_ERROR });
        if (onErrorCallback) {
          onErrorCallback(Error$1.REDUX_ERROR);
        }
        return;
      }
      const responseCallback = (response) => {
        const queryItems = longToNumber(response.n_query_items);
        const data2 = processQuarantineRows(headers, response.rows, nullRowMessage);
        successErrorHandler(
          response,
          { type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA, value: { data: data2, firstRowIndex, rowCount: queryItems } },
          { type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA_ERROR },
          onSuccessCallback,
          onErrorCallback
        )(dispatch);
      };
      const callbackId = callbacks.register(responseCallback, messages.quarantineQueryWindowRequest);
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID, value: callbackId });
      const tableRequestRows = lastRowIndex ? lastRowIndex - firstRowIndex + 1 : rowLimit;
      socketio.socketioEmit(messages.quarantineQueryWindowRequest, {
        query_id: query.queryId,
        callbackId,
        index: firstRowIndex,
        n_rows: tableRequestRows
      });
    };
    const quarantineRestoreExcludeRequest = (id2) => (_dispatch, getState) => {
      const { winid } = getState().language;
      socketio.socketioEmit(messages.quarantineRestoreExcludeRequest, { id: id2, lang: winid });
    };
    const quarantineRestoreRequest = (id2) => (_dispatch, getState) => {
      const { winid } = getState().language;
      socketio.socketioEmit(messages.quarantineRestoreRequest, { id: id2, lang: winid });
    };
    const quarantineDeleteRequest = (id2) => (_dispatch, getState) => {
      const { winid } = getState().language;
      socketio.socketioEmit(messages.quarantineDeleteRequest, { id: id2, lang: winid });
    };
    const quarantineDownloadRequest = (id2, onSuccessCallback, onErrorCallback) => (dispatch) => {
      const handleError = (e) => {
        if (onErrorCallback) {
          onErrorCallback(e);
        }
      };
      const responseCallback = async (response) => {
        dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_REMOVE_CALLBACK_ID, value: response.callbackId });
        if (!response.error) {
          const url = `${URLS.quarantineDownload}${response.token}`;
          try {
            const resp = await fetch(getUrl(url), {
              method: "GET",
              headers: {
                "Content-Type": "application/octet-stream"
              }
            });
            const blob = await resp.blob();
            downloadBlob(blob, response.originalName);
            if (onSuccessCallback) {
              onSuccessCallback();
            }
          } catch (e) {
            handleError(Error$1.REDUX_ERROR);
          }
        } else {
          handleError(response.error);
        }
      };
      const callbackId = callbacks.register(responseCallback, messages.quarantineDownloadRequest);
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID, value: callbackId });
      socketio.socketioEmit(messages.quarantineDownloadRequest, { id: id2, callbackId });
    };
    const registerNewQuarantineUpdateFromQuery = (onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const { headers, query, nullRowMessage } = getState().quarantine;
      const handleError = (e) => {
        dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA_ERROR });
        if (onErrorCallback) {
          onErrorCallback(e);
        }
      };
      if (!query.queryId) {
        handleError(Error$1.REDUX_ERROR);
        return;
      }
      const id2 = longToString(query.queryId);
      const responseCallback = (response) => {
        const firstRowIndex = longToNumber(response.start_id);
        const queryItems = longToNumber(response.n_query_items);
        if (response.error) {
          handleError(response.error);
        } else {
          const rows = processQuarantineRows(headers, response.rows, nullRowMessage);
          dispatch({
            type: QUARANTINE_ACTION_KEYS.QUARANTINE_SET_DATA,
            value: { data: rows, firstRowIndex, rowCount: queryItems }
          });
          if (onSuccessCallback) {
            onSuccessCallback();
          }
        }
      };
      callbacks.registerWithId(responseCallback, id2);
      dispatch({ type: QUARANTINE_ACTION_KEYS.QUARANTINE_ADD_CALLBACK_ID, value: id2 });
    };
    const newQuarantineUpdateFromQueryResponse = (result) => (_dispatch, getState) => {
      if (result.query_id) {
        callbacks.call(longToString(result.query_id), [result, getState], false);
      }
    };
    const NUM_OF_ROWS = 250;
    const WIDTH_POINT_OVERRIDE$4 = {
      [COLUMN_KEYS.QUARANTINE_DETECTION]: 1,
      [COLUMN_KEYS.QUARANTINE_DETECTION_TYPE]: 1,
      [COLUMN_KEYS.COUNT]: 0,
      [COLUMN_KEYS.EXCLUDABLE]: 0,
      [COLUMN_KEYS.HASH]: 5
    };
    class PureQuarantineTable extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "setupHeaders", () => new Promise((resolve) => {
          this.props.getQuarantineTableHeaders([], resolve, resolve);
        }));
        __publicField(this, "setupQuery", () => new Promise((resolve) => {
          this.props.initializeQuarantineQuery(resolve, resolve);
        }));
        __publicField(this, "setupTable", async () => {
          await this.setupHeaders();
          await this.setupQuery();
          this.props.registerNewQuarantineUpdateFromQuery();
          this.props.getQuarantineFromQuery(0);
        });
        __publicField(this, "openActionConfirmationModal", (question, onConfirm) => {
          const { t: t2 } = this.props;
          this.props.showGlobalModal("question", "IDUS_QUARANTINE", question, [
            {
              id: "quarantine-confirm-yes",
              text: t2("IDUS_YES"),
              onClick: () => {
                onConfirm();
                this.props.closeGlobalModal();
              }
            },
            {
              id: "quarantine-confirm-no",
              text: t2("IDUS_NO"),
              type: "secondary",
              onClick: this.props.closeGlobalModal
            }
          ]);
        });
        __publicField(this, "createContextMenu", (rows = []) => {
          this.setState(({ contextMap }) => {
            const newContextMap = { ...contextMap };
            rows.forEach((row) => {
              newContextMap[row.customId] = this.quarantineContextMenu(row);
            });
            return { contextMap: newContextMap };
          });
        });
        __publicField(this, "quarantineContextMenu", ({ recordId, dataObject = {} }) => {
          const { t: t2 } = this.props;
          const isLocalFile = (dataObject[COLUMN_KEYS.QUARANTINE_FILE_URL] ?? "").startsWith("/");
          const items = [
            {
              title: t2("IDUS_QUARANTINE_ACTION_RESTORE_AND_EXCLUDE"),
              id: "action-restore-exclude",
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$M, {}),
              disabled: !dataObject[COLUMN_KEYS.EXCLUDABLE] || !isLocalFile,
              callback: () => {
                this.openActionConfirmationModal(
                  t2("IDUS_QUARANTINE_RESTORE_AND_EXCLUDE_CONFIRMATION"),
                  () => this.props.quarantineRestoreExcludeRequest(recordId)
                );
              }
            },
            {
              title: t2("IDUS_QUARANTINE_ACTION_RESTORE"),
              id: "action-restore",
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$M, {}),
              disabled: !isLocalFile,
              callback: () => {
                this.openActionConfirmationModal(
                  t2("IDUS_QUARANTINE_RESTORE_CONFIRMATION"),
                  () => this.props.quarantineRestoreRequest(recordId)
                );
              }
            },
            copyContextAction(
              this.props.t,
              "action-copy-path",
              "IDUS_QUARANTINE_ACTION_COPY_PATH",
              dataObject[COLUMN_KEYS.QUARANTINE_FILE_URL],
              "toast-quarantine-action"
            ),
            copyContextAction(
              this.props.t,
              "action-copy-hash",
              "IDUS_QUARANTINE_ACTION_COPY_HASH",
              dataObject[COLUMN_KEYS.HASH],
              "toast-quarantine-action"
            ),
            {
              title: t2("IDUS_QUARANTINE_ACTION_DOWNLOAD"),
              id: "action-download",
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}),
              callback: () => {
                this.props.quarantineDownloadRequest(recordId, void 0, () => {
                  this.props.showGlobalModal(
                    "error",
                    "IDUS_QUARANTINE_DOWNLOAD_ERROR",
                    t2("IDUS_QUARANTINE_DOWNLOAD_ERROR_GENERIC")
                  );
                });
              }
            },
            {
              title: t2("IDUS_QUARANTINE_ACTION_DELETE"),
              id: "action-delete",
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$Q, {}),
              callback: () => {
                this.openActionConfirmationModal(
                  t2("IDUS_QUARANTINE_DELETE_CONFIRMATION"),
                  () => this.props.quarantineDeleteRequest(recordId)
                );
              }
            }
          ];
          if (this.props.sampleEnabled && this.props.sampleFeatureFlag.active) {
            items.push({
              title: t2("IDUS_QUARANTINE_ACTION_SEND_SAMPLE"),
              id: "action-send-sample",
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$R, {}),
              disabled: !dataObject[COLUMN_KEYS.QUARANTINE_FILE_URL],
              callback: () => {
                this.props.setSampleData("id", recordId);
                this.props.setSampleData("filepath", dataObject[COLUMN_KEYS.QUARANTINE_FILE_URL]);
                this.props.toggleSampleSubmission(true);
              }
            });
          }
          return [{ items }];
        });
        __publicField(this, "loadMoreRows", (firstRowIndex, lastRowIndex) => {
          if (lastRowIndex >= firstRowIndex) {
            this.props.getQuarantineFromQuery(firstRowIndex, lastRowIndex);
          }
        });
        __publicField(this, "getNoDataPlaceholder", () => {
          const { t: t2, errors } = this.props;
          if (errors.headerLoading) {
            return getColumnLoadingTableError(t2, this.setupTable);
          }
          if (errors.dataLoading) {
            return getDataLoadingTableError(t2, this.setupTable);
          }
          return {
            title: t2("IDUS_EMPTY_TABLE_THREATS_TITLE"),
            text: t2("IDUS_EMPTY_TABLE_QUARANTINE")
          };
        });
        props.resetQuarantineReducer();
        this.state = {
          contextMap: {}
        };
      }
      async componentDidMount() {
        this.props.setQuarantineSettings(NUM_OF_ROWS, this.props.t("IDUS_UNKNOWN_LOG_RECORD"));
        await this.setupTable();
      }
      componentDidUpdate(oldProps) {
        if (oldProps.data !== this.props.data) {
          this.createContextMenu(this.props.data);
        }
      }
      componentWillUnmount() {
        this.props.closeQuarantineQuery();
      }
      render() {
        logGroup(
          "QuarantineTable",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          BaseTable,
          {
            id: "quarantine",
            maxRowLoad: NUM_OF_ROWS,
            data: {
              rows: this.props.data,
              items: this.props.rowCount,
              columns: this.props.headers,
              start: this.props.firstRowIndex
            },
            loadMoreRows: this.loadMoreRows,
            noDataPlaceholder: this.getNoDataPlaceholder(),
            overrideColumnPoints: WIDTH_POINT_OVERRIDE$4,
            contextMenuProvider: {
              hasContextMenu: (rowData) => this.state.contextMap[rowData.customId],
              getContextMenu: (_rowId, customId) => this.state.contextMap[customId]
            }
          }
        );
      }
    }
    const mapStateToProps$m = (state) => ({
      headers: state.quarantine.headers,
      errors: state.quarantine.errors,
      firstRowIndex: state.quarantine.firstRowIndex,
      data: state.quarantine.data,
      rowCount: state.quarantine.rowCount,
      sampleEnabled: state.sample.isEnabled,
      sampleFeatureFlag: state.features[FEATURES.SUBMIT_SAMPLE][0]
    });
    const mapDispatchToProps$m = {
      showGlobalModal: showModal,
      closeGlobalModal: showNextModal,
      setSampleData,
      toggleSampleSubmission,
      getQuarantineTableHeaders,
      initializeQuarantineQuery,
      resetQuarantineReducer: resetReducer,
      getQuarantineFromQuery,
      closeQuarantineQuery,
      quarantineDeleteRequest,
      quarantineDownloadRequest,
      quarantineRestoreExcludeRequest,
      quarantineRestoreRequest,
      registerNewQuarantineUpdateFromQuery,
      setQuarantineSettings
    };
    const QuarantineTable = withErrorBoundary()(
      withTranslation()(connect(mapStateToProps$m, mapDispatchToProps$m)(PureQuarantineTable))
    );
    QuarantineTable.displayName = "QuarantineTable";
    const Quarantine = (props) => {
      const featureFlag = useSelector((state) => state.features[FEATURES.QUARANTINE_TABLE][0]);
      logGroup(
        "Quarantine",
        [
          ["props", props],
          ["featureFlag", featureFlag]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: props.title,
          content: featureFlag.active ? /* @__PURE__ */ jsxRuntimeExports.jsx(QuarantineTable, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...featureFlag })
        }
      );
    };
    const WIDTH_POINT_OVERRIDE$3 = {
      [COLUMN_KEYS.LOGS_FILE_URL]: 12,
      [COLUMN_KEYS.TIME]: 6,
      [COLUMN_KEYS.HASH]: 6
    };
    class PureSentFiles extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "getContextMenu", (rows) => {
          const isMultiple = rows.length > 1;
          const dataObject = !isMultiple ? rows[0].dataObject ?? {} : {};
          return [
            {
              items: [
                copyContextAction(
                  this.props.t,
                  "samples-action-copy-path",
                  "IDUS_QUARANTINE_ACTION_COPY_PATH",
                  dataObject[COLUMN_KEYS.LOGS_FILE_URL],
                  "toast-sample-action",
                  isMultiple
                ),
                copyContextAction(
                  this.props.t,
                  "samples-action-copy-hash",
                  "IDUS_QUARANTINE_ACTION_COPY_HASH",
                  dataObject[COLUMN_KEYS.HASH],
                  "toast-sample-action",
                  isMultiple
                )
              ]
            }
          ];
        });
      }
      render() {
        const { featureFlag, sampleFeatureFlag, realtimeFlag, t: t2 } = this.props;
        logGroup("SentFiles", [["props", this.props]], void 0, this.props.debug);
        const tableFlags = [featureFlag, realtimeFlag].filter((f) => !f.active && f.priority !== -1);
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          MainPage,
          {
            padding: "0px",
            title: this.props.title,
            content: tableFlags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
              LogsTable,
              {
                logType: LogType.LOGD_SENTFILESLOG,
                removalInfoRow: true,
                getContextMenu: this.getContextMenu,
                overrideColumnPoints: WIDTH_POINT_OVERRIDE$3
              }
            ) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...tableFlags[0] }),
            footer: this.props.sampleEnabled ? /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "my-2", style: { display: "inline-flex", alignItems: "center" }, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  text: t2("IDUS_SAMPLE_TITLE"),
                  id: "sent-files-submit-sample",
                  onClick: sampleFeatureFlag.active ? () => this.props.toggleSampleSubmission(true) : void 0,
                  type: "primary",
                  disabled: !sampleFeatureFlag.active
                }
              ),
              !sampleFeatureFlag.active && sampleFeatureFlag.message && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mx-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2(sampleFeatureFlag.message), placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { fill: colors.sidebarColor, size: 20 }) }) })
            ] }) : void 0
          }
        );
      }
    }
    const mapStateToProps$l = (state) => ({
      sampleEnabled: state.sample.isEnabled,
      featureFlag: state.features[FEATURES.SENT_FILES_TABLE][0],
      realtimeFlag: state.features[FEATURES.REALTIME_PROTECTION][0],
      sampleFeatureFlag: state.features[FEATURES.SUBMIT_SAMPLE][0]
    });
    const mapDispatchToProps$l = {
      toggleSampleSubmission
    };
    const SentFiles = withTranslation()(connect(mapStateToProps$l, mapDispatchToProps$l)(PureSentFiles));
    SentFiles.displayName = "SentFiles";
    const statusOverviewTile = "_statusOverviewTile_2ta1i_1";
    const watchdogSubserviceLine = "_watchdogSubserviceLine_2ta1i_16";
    const watchdogSubserviceLineText = "_watchdogSubserviceLineText_2ta1i_21";
    const rightAlignedInFlex = "_rightAlignedInFlex_2ta1i_29";
    const headerIcon = "_headerIcon_2ta1i_33";
    const style$d = {
      statusOverviewTile,
      watchdogSubserviceLine,
      watchdogSubserviceLineText,
      rightAlignedInFlex,
      headerIcon
    };
    const PureStatusTile = (props) => {
      const { t: t2, status, id: id2, icon: TileIcon, title, onClick } = props;
      const getProblemDescription = reactExports.useCallback(
        (stat) => {
          const getIdText = (msgKey = "") => /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: `status-${msgKey}`, children: t2(msgKey) });
          if (stat) {
            if (stat.customText) {
              return getIdText(stat.customText);
            }
            if (stat.text) {
              return /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: `status-${stat.status}`, children: t2(stat.text) });
            }
            if (stat.status === PROTECTION_STATUS.GREEN) {
              return getIdText(stat.textOK);
            }
          }
          return getIdText("IDCUS_TITLE_PROTECTION_STATUS_YELLOW");
        },
        [t2]
      );
      logGroup("StatusTile", [["props", props]], void 0, props.debug);
      const commonProps = {
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TileIcon, { size: 32 }),
        title: t2(title)
      };
      const content2 = getProblemDescription(status);
      if (!status || status.status === PROTECTION_STATUS.UNKNOWN) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingOverlay, { loading: true, id: `status-tile-${id2}-unknown-wrapper`, className: style$d.overlayWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$8,
          {
            ...commonProps,
            id: `status-tile-${id2}-unknown`,
            hideContentIcon: true,
            className: [style$d.statusOverviewTile, style$d.loadingStatusTile].join(" "),
            children: content2
          }
        ) });
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$8,
        {
          ...commonProps,
          id: `status-tile-${id2}`,
          className: style$d.statusOverviewTile,
          type: convertStatusToType(status.status),
          onClick,
          children: content2
        }
      );
    };
    const StatusTile = withErrorBoundary()(withTranslation()(PureStatusTile));
    StatusTile.displayName = "StatusTile";
    const PureWatchdogTile = (props) => {
      var _a;
      const { t: t2 } = useTranslation();
      const { unavailableFeatureFlag } = props;
      const stateEnum = useSelector((state) => state.cfg.enums[Enums.EnumWorkingState]);
      logGroup(
        "WatchdogTile",
        [
          ["props", props],
          ["stateEnum", stateEnum]
        ],
        void 0,
        props.debug
      );
      let type = (_a = WatchdogServiceSeverityMap[props.severity]) == null ? void 0 : _a.type;
      const TileIcon = props.icon ?? IconLetterI;
      const hasProtectionStatus = props.data.find(withProtectionStatus);
      let title = t2(props.title);
      const withGlobalMuteIcon = hasProtectionStatus && hasProtectionStatus.State === EnumWorkingState.CE_WORKING_STATE_DISABLED && hasProtectionStatus.muted;
      const errorSeverity = WatchdogServiceSeverityMap[EnumWorkingSeverity.CE_WORKING_SEVERITY_ERROR];
      const ErrorSeverityIcon = errorSeverity.icon;
      if (unavailableFeatureFlag) {
        type = errorSeverity.type;
      }
      if (withGlobalMuteIcon) {
        title = /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Headline, { bottomMargin: false, type: "h3", children: title }) });
        type = WatchdogServiceSeverityMap[EnumWorkingSeverity.CE_WORKING_SEVERITY_OK].type;
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        default_1$8,
        {
          hideContentIcon: true,
          id: `watchdog-tile-${props.group}`,
          className: style$d.statusOverviewTile,
          type,
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TileIcon, { size: 32 }),
          title,
          onClick: props.onClick,
          children: [
            !unavailableFeatureFlag && withGlobalMuteIcon && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3 mr-4", className: style$d.headerIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_WATCHDOG_TILE_MUTED_COMPLETELY"), placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorSeverityIcon, { size: 16 }) }) }),
            unavailableFeatureFlag ? /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-2", id: `unavailable-feature-${props.group}`, className: style$d.watchdogSubserviceLine, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorSeverityIcon, { size: 16, fill: errorSeverity.color }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { className: style$d.watchdogSubserviceLineText, type: "ml-1", children: t2(unavailableFeatureFlag.message) })
            ] }) : props.data.map((item) => {
              let state = { label: "?", name: "unloaded-enum" };
              if (item.customState) {
                state = { label: item.customState, name: item.customState };
              } else if (stateEnum[item.State]) {
                state = stateEnum[item.State];
              }
              const severityInfo = WatchdogServiceSeverityMap[item.Severity] ?? {};
              const SeverityInfoIcon = severityInfo.icon ?? IconLetterI;
              const id2 = `watchdog-subservice-${item.key ?? "none"}-${severityInfo.type ?? "unknown"}`;
              return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-2", id: id2, className: style$d.watchdogSubserviceLine, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SeverityInfoIcon, { size: 16, fill: severityInfo.color }) }),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { className: style$d.watchdogSubserviceLineText, type: "ml-1", children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mr-1", children: [
                    item.Title || t2("IDUS_WATCHDOG_TILE_GENERAL_STATUS"),
                    ":"
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { children: t2(state.label) }, state.name) })
                ] }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$d.rightAlignedInFlex, children: item.muted && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_WATCHDOG_TILE_MUTED"), placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$S, { size: 16 }) }) })
              ] }, id2);
            })
          ]
        }
      );
    };
    const WatchdogTile = withErrorBoundary()(PureWatchdogTile);
    WatchdogTile.displayName = "WatchdogTile";
    const fullHeightRow = "_fullHeightRow_1fnkh_1";
    const overlayWrapper = "_overlayWrapper_1fnkh_5";
    const loadingStatusTile = "_loadingStatusTile_1fnkh_11";
    const style$c = {
      fullHeightRow,
      overlayWrapper,
      loadingStatusTile
    };
    const DASHBOARD_TILES = combineContentSettings({
      [CONTENT_KEYS.MODULES_UPDATE]: {
        icon: default_1$T,
        message: "UPDATE STATUS PLACEHOLDER",
        status: "Update"
      },
      [CONTENT_KEYS.PRODUCT_UPDATE]: {
        icon: IconCompanyEsetWithborder,
        message: "PCU STATUS PLACEHOLDER",
        status: "PCUpdate"
      },
      [CONTENT_KEYS.LICENSE]: {
        icon: default_1$U,
        message: "LICENSE STATUS PLACEHOLDER",
        status: "License"
      }
    });
    const BASE_TILE_WIDTH = 254;
    class PureStatusOverview extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          tiles: Object.values(DASHBOARD_TILES),
          width: window.innerWidth
        });
        __publicField(this, "updateWidth", () => {
          this.setState({ width: window.innerWidth });
        });
        __publicField(this, "renderBasedOnSize", () => {
          const { leftSidebarOpened, leftSidebar, rightSidebarOpened, rightSidebar: rightSidebar2 } = this.props;
          const sidebarSizes = getSidebarSizes(
            leftSidebarOpened ?? leftSidebar,
            rightSidebarOpened ?? rightSidebar2,
            this.state.width
          );
          const contentWidth = this.state.width - sidebarSizes;
          const [usedTileSize, usedOtherTileSize] = getStaticTileSizes(BASE_TILE_WIDTH, contentWidth, [1, 2]);
          const statusTiles = this.state.tiles.map((tile2) => ({
            ...usedTileSize,
            content: /* @__PURE__ */ jsxRuntimeExports.jsx(
              StatusTile,
              {
                ...tile2,
                status: this.props.statusGroups[tile2.status],
                id: tile2.key.toLowerCase().replace("_", "-"),
                onClick: () => {
                  this.props.navigate(this.props.openRightSidebar(tile2.link));
                }
              }
            )
          }));
          const protectionStatusGrouped = Object.values(this.props.protectionGroups).map((group) => {
            const mostImportant = group[0];
            return {
              Title: this.props.t(mostImportant.group),
              State: EnumWorkingState.CE_WORKING_STATE_UNKNOWN,
              StateChangeDate: 0,
              Severity: watchdogFromProtectionStatusSeverity(mostImportant.Severity),
              key: mostImportant.id,
              muted: mostImportant.set_by_era_flag || mostImportant.MuteInGui === PROTECTION_STATUS_MUTE.ON,
              customState: mostImportant.tag
            };
          });
          const protectionStatusTile = {
            ...usedOtherTileSize,
            content: /* @__PURE__ */ jsxRuntimeExports.jsx(
              WatchdogTile,
              {
                group: "other-services",
                icon: default_1$V,
                title: "IDUS_TILE_TITLE_OTHER_SERVICES",
                severity: Math.max(...protectionStatusGrouped.filter((x) => !x.muted).map((x) => x.Severity)),
                data: protectionStatusGrouped,
                onClick: () => {
                  this.props.navigate(this.props.openRightSidebar(routes$1.overviewProtection));
                }
              }
            )
          };
          let watchdogServices = this.props.watchdogServices.filter((group) => this.props.displayedGroups.includes(group.group));
          if (!this.props.watchdogEnabled) {
            watchdogServices = watchdogServices.map((status) => ({
              ...status,
              data: status.data.filter(withProtectionStatus)
            }));
          }
          watchdogServices = watchdogServices.map((status) => {
            const inactiveFeatureFlags = status.featureFlags.map((feature) => this.props.featureFlags[feature][0]).filter((flag) => !flag.active && flag.priority !== -1).sort((a, b) => b.priority - a.priority);
            const unavailableFeatureFlag = inactiveFeatureFlags.length > 0 ? inactiveFeatureFlags[0] : void 0;
            return {
              ...status,
              data: unavailableFeatureFlag ? status.data.map((item) => ({
                ...item,
                Severity: EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN,
                State: EnumWorkingState.CE_WORKING_STATE_UNKNOWN
              })) : status.data,
              severity: unavailableFeatureFlag ? EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN : status.severity,
              unavailableFeatureFlag
            };
          });
          const watchdogTiles = watchdogServices.map((tile2) => ({
            ...usedTileSize,
            content: /* @__PURE__ */ jsxRuntimeExports.jsx(
              WatchdogTile,
              {
                ...tile2,
                onClick: this.props.clickableGroups.includes(tile2.group) && !tile2.unavailableFeatureFlag ? () => {
                  this.props.navigate(this.props.openRightSidebar(getRoute(routes$1.overviewDynamic, { id: tile2.group })));
                } : void 0
              }
            )
          }));
          let allTiles = [...statusTiles, ...watchdogTiles];
          if (protectionStatusGrouped.length > 0) {
            allTiles = [...allTiles, protectionStatusTile];
          }
          const cls = [style$c.fullHeightRow, style$r.dashboardRowFix].join(" ");
          return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: { Tile: { padding: "12px 16px" } }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, { className: style$c.statusDashboard, rows: [{ className: cls, cols: allTiles }] }) });
        });
      }
      componentDidMount() {
        window.addEventListener("resize", this.updateWidth);
      }
      componentWillUnmount() {
        window.removeEventListener("resize", this.updateWidth);
      }
      render() {
        logGroup(
          "StatusOverview",
          [
            ["props", this.props],
            ["state", this.state],
            ["DASHBOARD_TILES", DASHBOARD_TILES]
          ],
          void 0,
          this.props.debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsx(MainPage, { padding: "0px", title: this.props.title, content: this.renderBasedOnSize() });
      }
    }
    const mapStateToProps$k = (state) => ({
      watchdogServices: state.watchdog.services,
      watchdogEnabled: state.watchdog.isEnabled,
      displayedGroups: state.watchdog.displayedGroups,
      clickableGroups: state.watchdog.clickableGroups,
      statusGroups: state.protectionStatus.groups,
      protectionGroups: state.protectionStatus.protectionGroups,
      leftSidebarOpened: state.layout.content.sidebarComplete,
      rightSidebarOpened: state.layout.content.rightSidebarComplete,
      leftSidebar: state.layout.content.sidebar,
      rightSidebar: state.layout.content.rightSidebar,
      featureFlags: state.features
    });
    const StatusOverview = withNavigate(withTranslation()(connect(mapStateToProps$k)(PureStatusOverview)));
    StatusOverview.displayName = "StatusOverview";
    const WIDTH_POINT_OVERRIDE$2 = {
      [COLUMN_KEYS.HASH]: 4,
      [COLUMN_KEYS.LOGS_FILE_URL]: 12,
      [COLUMN_KEYS.TIME]: 10,
      [COLUMN_KEYS.FIRST_SEEN_TIME]: 1,
      [COLUMN_KEYS.ACTION_TAKEN]: 1,
      [COLUMN_KEYS.APPLICATION]: 2
    };
    const BlockedFiles = (props) => {
      const { featureFlag, realtimeFlag } = useSelector((state) => ({
        featureFlag: state.features[FEATURES.BLOCKED_FILES_TABLE][0],
        realtimeFlag: state.features[FEATURES.REALTIME_PROTECTION][0]
      }));
      logGroup("BlockedFiles", [["props", props]], void 0, props.debug);
      const flags = [featureFlag, realtimeFlag].filter((f) => !f.active && f.priority !== -1);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: props.title,
          content: flags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            LogsTable,
            {
              logType: LogType.LOGD_BLOCKEDFILESLOG,
              removalInfoRow: true,
              overrideColumnPoints: WIDTH_POINT_OVERRIDE$2
            }
          ) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...flags[0] })
        }
      );
    };
    const setWapEnabled = (data2) => ({
      type: WEBSITES_ACTION_KEYS.WEBSITES_SET_ENABLED,
      value: !!data2
    });
    const setWebsitesExclusions = (data2) => ({
      type: WEBSITES_ACTION_KEYS.WEBSITES_SET_EXCLUSIONS_DATA,
      value: data2
    });
    const addWebsitesExclusion = (exclusions, type, onSuccessCallback) => (dispatch, getState) => {
      let path;
      switch (type) {
        case WebsitesExclusionType.IP: {
          path = "Settings.Plugins.Wapd.ExcludeIPs";
          break;
        }
        case WebsitesExclusionType.Application:
        default: {
          path = "Settings.Plugins.Wapd.ExcludeApps";
        }
      }
      cfgAddToArray(
        path,
        exclusions,
        "",
        () => {
          dispatch({
            type: WEBSITES_ACTION_KEYS.WEBSITES_EXCLUSIONS_SET_ERROR,
            value: null
          });
          onSuccessCallback();
        },
        (data2) => dispatch({
          type: WEBSITES_ACTION_KEYS.WEBSITES_EXCLUSIONS_SET_ERROR,
          value: data2.errorMsg ?? "?"
        })
      )(dispatch, getState);
    };
    const setUrlLists = (list) => {
      const searchStrings = {};
      UrlListTypeValues.forEach((t2) => {
        const matchingLists = list.filter((entry) => entry.ListType === t2 && entry.ListActive === UrlListBoolean.Yes);
        const combined = matchingLists.map((entry) => entry.Addresses.join(" ")).filter((x) => x).join(" ");
        searchStrings[t2] = ` ${combined} `;
      });
      return {
        type: WEBSITES_ACTION_KEYS.WEBSITES_SET_URL_LISTS,
        value: {
          urlLists: list,
          urlListsSearchStrings: searchStrings
        }
      };
    };
    const isDefaultList = (entry, type) => entry.ListType === type && entry.ListName === "@" && entry.Default === UrlListBoolean.Yes;
    const changeUrlLists = (urls, action, onSuccessCallback, onErrorCallback) => (dispatch, getState) => {
      const { urlLists } = getState().websites;
      const processedUrls = urls.map((u) => u.replace(PROTOCOL_REGEX, "")).filter((u, i, arr) => arr.indexOf(u) === i);
      let finalLists = [...urlLists];
      switch (action) {
        case UrlListAction.RemoveBlocked:
        case UrlListAction.RemoveAllowed: {
          finalLists = finalLists.map((entry) => {
            const { Addresses, ListType } = entry;
            if (action === UrlListAction.RemoveAllowed && ListType !== UrlListType.Allowed || action === UrlListAction.RemoveBlocked && ListType !== UrlListType.Blocked) {
              return entry;
            }
            return {
              ...entry,
              Addresses: Addresses.filter((a) => !processedUrls.includes(a))
            };
          });
          break;
        }
        case UrlListAction.AddToAllowed: {
          const defIndex = finalLists.findIndex((entry) => isDefaultList(entry, UrlListType.Allowed));
          if (defIndex === -1 || finalLists[defIndex].ListActive === UrlListBoolean.No) {
            if (defIndex !== -1) {
              finalLists.splice(defIndex, 1, { ...finalLists[defIndex], Default: UrlListBoolean.No });
            }
            finalLists = [
              ...finalLists,
              {
                ...DefUrlList[UrlListType.Allowed],
                Addresses: processedUrls
              }
            ];
          } else {
            finalLists.splice(defIndex, 1, {
              ...finalLists[defIndex],
              Addresses: [...finalLists[defIndex].Addresses, ...processedUrls]
            });
          }
          break;
        }
        default: {
          return;
        }
      }
      cfgSetValues(
        { "Settings.Plugins.Wapd.UrlLists": finalLists },
        "",
        onSuccessCallback,
        (data2) => onErrorCallback(data2.errorMsg ?? "?")
      )(dispatch, getState);
    };
    const ExclusionModal = (props) => {
      const { close, defaultType, typeMethods, exclusionRows, addExclusion: addExclusion2, error } = props;
      const { t: t2 } = useTranslation();
      const [exclusionType, setExclusionType] = reactExports.useState(defaultType);
      const matchingTypeMethods = reactExports.useMemo(
        () => typeMethods.find((typeData) => typeData.type === exclusionType) ?? typeMethods[0],
        [typeMethods, exclusionType]
      );
      const distinctData = reactExports.useMemo(
        () => exclusionRows.filter(
          (item, index, array) => array.findIndex((d) => matchingTypeMethods.getValue(d) === matchingTypeMethods.getValue(item)) === index
        ),
        [exclusionRows, matchingTypeMethods]
      );
      const closeModal = reactExports.useCallback(() => {
        close();
        setExclusionType(defaultType);
      }, [close, setExclusionType, defaultType]);
      const createExclusion = reactExports.useCallback(() => {
        const onSuccess = () => {
          close();
          idToast(t2("IDUS_EXCLUSIONS_SUCCESS"), "toast-exclusion-submit", "IDUS_EXCLUSIONS_SUCCESS");
        };
        const exclusionDef = distinctData.map(matchingTypeMethods.prepExclusionData);
        addExclusion2(exclusionDef, exclusionType, onSuccess);
      }, [distinctData, exclusionType, matchingTypeMethods, close, addExclusion2, t2]);
      logGroup(
        "WebsitesExclusion",
        [
          ["props", props],
          ["exclusionType", exclusionType]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$j,
        {
          id: "exclusion_modal",
          title: t2("IDUS_EXCLUSIONS_CREATE"),
          type: "simple",
          show: exclusionRows.length > 0,
          effect: "fadeInDown",
          buttons: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "exclusion-create", onClick: createExclusion, text: t2("IDUS_EXCLUSIONS_CREATE") }, "create"),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "exclusion-cancel", type: "secondary", onClick: closeModal, text: t2("IDUS_CANCEL") }, "cancel")
          ],
          onKeyEsc: closeModal,
          onAway: closeModal,
          onClose: closeModal,
          children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorMessage, { when: !!error, textId: "IDUS_EXCLUSIONS_ERROR", id: "exclusion-adding-error", children: sprintf(t2("IDUS_EXCLUSIONS_ERROR"), error) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_FILTERED_WEBSITES_EXCLUSIONS") }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", id: "exclusion-future-list", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$r.exclusionIconListWrapper, children: distinctData.map((d) => /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mb-1", className: style$r.exclusionIconListItem, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconStatusWarning,
                {
                  size: 16,
                  display: "inline-block",
                  className: style$r.exclusionIconListIcon,
                  fill: colors.warningBig
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style$r.exclusionIconListText, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: sprintf(t2(matchingTypeMethods.listEntryBase), matchingTypeMethods.getValue(d)) }) })
            ] }, d.id)) }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5 mb-3", className: style$r.exclusionCriteriaWrapper, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                labelText: t2("IDUS_EXCLUSIONS_CRITERIA"),
                className: style$r.exclusionCriteriaFormGroup,
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { id: "exclusion-type", name: "exclusionType", value: exclusionType, children: typeMethods.map((opt) => {
                  const isSelected = exclusionType === opt.type;
                  const disabled2 = opt.isDisabled(distinctData);
                  const className = `${style$r.exclusionRadioTile} ${disabled2 ? style$r.disabled : ""}`;
                  const id2 = `exclusion-type-${opt.type.toLowerCase()}`;
                  return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type: isSelected ? "info" : void 0, hideContentIcon: true, className, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-2 mx-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Radio.Item,
                    {
                      value: opt.type,
                      id: id2,
                      className: style$r.exclusionRadioItem,
                      checked: isSelected,
                      onChange: !disabled2 ? setExclusionType : void 0,
                      disabled: disabled2,
                      children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2(opt.titleKey) }),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { noMargin: true, children: t2(opt.descKey) })
                      ] })
                    }
                  ) }) }) }, opt.type);
                }) })
              }
            ) })
          ] })
        }
      );
    };
    ExclusionModal.displayName = "ExclusionModal";
    const WebsitesExclusion = (props) => {
      const { close } = props;
      const dispatch = useDispatch();
      const exclusionRows = useSelector((state) => state.websites.exclusions ?? []);
      const error = useSelector((state) => state.websites.exclusionsError);
      const typeMethods = [
        {
          type: WebsitesExclusionType.IP,
          titleKey: "IDUS_FILTERED_WEBSITES_IP_ADDRESS",
          descKey: "IDUS_FILTERED_WEBSITES_EXCLUSIONS_IP_DESC",
          getValue: (d) => d.ip,
          listEntryBase: "IDUS_FILTERED_WEBSITES_EXCLUSIONS_BY_IP",
          isDisabled: () => false,
          prepExclusionData: (d) => d.ip
        },
        {
          type: WebsitesExclusionType.Application,
          titleKey: "IDUS_FILTERED_WEBSITES_APPLICATION",
          descKey: "IDUS_FILTERED_WEBSITES_EXCLUSIONS_APPLICATION_DESC",
          getValue: (d) => d.application,
          listEntryBase: "IDUS_FILTERED_WEBSITES_EXCLUSIONS_BY_APPLICATION",
          isDisabled: () => false,
          prepExclusionData: (d) => d.application
        }
      ];
      const addExclusion2 = reactExports.useCallback(
        (exclusionDef, exclusionType, onSuccess) => dispatch(addWebsitesExclusion(exclusionDef, exclusionType, onSuccess)),
        [dispatch]
      );
      logGroup(
        "WebsitesExclusion",
        [
          ["props", props],
          ["typeMethods", typeMethods],
          ["error", error],
          ["exclusionRows", exclusionRows]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        ExclusionModal,
        {
          typeMethods,
          defaultType: WebsitesExclusionType.Application,
          addExclusion: addExclusion2,
          close,
          error,
          exclusionRows
        }
      );
    };
    WebsitesExclusion.displayName = "WebsitesExclusion";
    const getCopyActions = (dataObjects, t2) => {
      const isMultiple = dataObjects.length > 1;
      const item = dataObjects[0];
      return [
        copyContextAction(
          t2,
          "websites-action-copy-application",
          "IDUS_FILTERED_WEBSITES_ACTION_COPY_APPLICATION",
          item[COLUMN_KEYS.APPLICATION],
          "toast-websites-action",
          isMultiple
        ),
        copyContextAction(
          t2,
          "websites-action-copy-uri",
          "IDUS_FILTERED_WEBSITES_ACTION_COPY_URI",
          item[COLUMN_KEYS.LOGS_FILE_URL],
          "toast-website-action",
          isMultiple
        ),
        copyContextAction(
          t2,
          "websites-action-copy-IP",
          "IDUS_FILTERED_WEBSITES_ACTION_COPY_IP",
          item[COLUMN_KEYS.CUSTOM_IP],
          "toast-websites-action",
          isMultiple
        )
      ];
    };
    const getExclusion = (dataObjects, t2, setExclusionData) => ({
      title: t2("IDUS_EXCLUSIONS_CREATE"),
      id: "websites-action-create-exclusion",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$L, {}),
      disabled: false,
      callback: () => {
        const processedData = dataObjects.map((data2) => ({
          id: data2.id,
          application: data2[COLUMN_KEYS.APPLICATION] ?? "",
          ip: data2[COLUMN_KEYS.CUSTOM_IP] ?? ""
        })).filter((x) => x);
        setExclusionData(processedData);
      }
    });
    const getFlagsForUrl = (url, urlListsSearchStrings) => {
      const urlNoProtocol = ` ${url.replace(PROTOCOL_REGEX, "")} `;
      const isInAllowed = urlListsSearchStrings[UrlListType.Allowed].includes(urlNoProtocol);
      const isInBlocked = urlListsSearchStrings[UrlListType.Blocked].includes(urlNoProtocol);
      return {
        [UrlListAction.AddToAllowed]: !isInAllowed,
        [UrlListAction.RemoveAllowed]: !!isInAllowed,
        [UrlListAction.RemoveBlocked]: !!isInBlocked
      };
    };
    const getUrlAction = (title, dataObjects, changeUrlLists2, action, enforceEnabled = false) => {
      const newUrls = dataObjects.filter((d) => d.urlActions[action]).map((d) => d[COLUMN_KEYS.LOGS_FILE_URL].replace(PROTOCOL_REGEX, ""));
      const disabled2 = !enforceEnabled && dataObjects.length !== newUrls.length || newUrls.length === 0;
      return {
        title,
        id: `websites-action-url-lists-${action}`,
        disabled: disabled2,
        callback: !disabled2 ? () => changeUrlLists2(newUrls, action) : void 0
      };
    };
    const getUrlActions = (dataObjects, t2, urlListsSearchStrings, changeUrlLists2) => {
      const enhancedDataObjects = dataObjects.map((d) => ({
        ...d,
        urlActions: getFlagsForUrl(d[COLUMN_KEYS.LOGS_FILE_URL], urlListsSearchStrings)
      }));
      const items = [
        getUrlAction(
          t2("IDUS_FILTERED_WEBSITES_URL_LISTS_ALLOWED_ADD"),
          enhancedDataObjects,
          changeUrlLists2,
          UrlListAction.AddToAllowed,
          true
        ),
        getUrlAction(
          t2("IDUS_FILTERED_WEBSITES_URL_LISTS_ALLOWED_REMOVE"),
          enhancedDataObjects,
          changeUrlLists2,
          UrlListAction.RemoveAllowed
        ),
        getUrlAction(
          t2("IDUS_FILTERED_WEBSITES_URL_LISTS_BLOCKED_REMOVE"),
          enhancedDataObjects,
          changeUrlLists2,
          UrlListAction.RemoveBlocked
        )
      ];
      const disabled2 = items.every((e) => e.disabled);
      return {
        title: t2("IDUS_FILTERED_WEBSITES_URL_LISTS_CHANGE"),
        id: "websites-action-url-lists",
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$W, {}),
        disabled: disabled2,
        subMenu: [{ items }]
      };
    };
    const getWebsitesActions = (rows, methods, urlListsSearchStrings) => {
      const { t: t2, setExclusionData, changeUrlLists: changeUrlLists2 } = methods;
      if (rows.length === 0) {
        return [];
      }
      const dataObjects = rows.map((row) => row.dataObject ?? {});
      const items = [
        ...getCopyActions(dataObjects, t2),
        getExclusion(dataObjects, t2, setExclusionData),
        getUrlActions(dataObjects, t2, urlListsSearchStrings, changeUrlLists2)
      ];
      return items;
    };
    const HIDDEN_COLUMNS = [COLUMN_KEYS.SCANNER_ID, COLUMN_KEYS.TARGET_IP_V4, COLUMN_KEYS.TARGET_IP_V6];
    const WIDTH_POINT_OVERRIDE$1 = {
      [COLUMN_KEYS.LOGS_FILE_URL]: 8,
      // object uri = site url
      [COLUMN_KEYS.USER_NAME]: 0,
      [COLUMN_KEYS.RULE_NAME_ID]: 4,
      [COLUMN_KEYS.APPLICATION]: 5,
      [COLUMN_KEYS.CUSTOM_IP]: 0,
      [COLUMN_KEYS.ACTION_TAKEN]: 0
    };
    const CUSTOM_COLUMNS = [
      {
        id: `${LogType.LOGD_URLLOG}-${COLUMN_KEYS.CUSTOM_IP}`,
        header: "IDUS_FILTERED_WEBSITES_IP_ADDRESS",
        width: 0,
        minWidth: 0,
        key: COLUMN_KEYS.CUSTOM_IP,
        type: TableDataType.STRING,
        positionIndex: 5,
        getValue: (item) => item[COLUMN_KEYS.TARGET_IP_V4] ?? item[COLUMN_KEYS.TARGET_IP_V6],
        sortDisabled: true
      }
    ];
    const PureFilteredWebsitesTable = (props) => {
      const { setExclusionData, changeUrlLists: changeUrlLists2 } = props;
      const { t: t2 } = useTranslation();
      const urlListsSearchStrings = useSelector((state) => state.websites.urlListsSearchStrings);
      const close = reactExports.useCallback(() => setExclusionData(null), [setExclusionData]);
      const getContextMenu = reactExports.useCallback(
        (rows) => [
          { items: getWebsitesActions(rows, { t: t2, setExclusionData, changeUrlLists: changeUrlLists2 }, urlListsSearchStrings) }
        ],
        [t2, setExclusionData, changeUrlLists2, urlListsSearchStrings]
      );
      const customColumns = reactExports.useMemo(() => getCustomColumns(CUSTOM_COLUMNS, t2), [t2]);
      logGroup(
        "FilteredWebsitesTable",
        [
          ["props", props],
          ["customColumns", customColumns],
          ["urlListsSearchStrings", urlListsSearchStrings]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          LogsTable,
          {
            logType: LogType.LOGD_URLLOG,
            removalInfoRow: true,
            hiddenColumns: HIDDEN_COLUMNS,
            overrideColumnPoints: WIDTH_POINT_OVERRIDE$1,
            customColumns,
            getContextMenu,
            multiselect: true
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(WebsitesExclusion, { close })
      ] });
    };
    const FilteredWebsitesTable = withErrorBoundary()(PureFilteredWebsitesTable);
    FilteredWebsitesTable.displayName = "FilteredWebsitesTable";
    const DetectionsActions = (props) => {
      const { setExclusionData, changeUrlLists: changeUrlLists2 } = props;
      const { t: t2 } = useTranslation();
      const urlListsSearchStrings = useSelector((state) => state.websites.urlListsSearchStrings);
      const selectedRows = useSelector((state) => state.logs.selectedRows);
      const noSelected = selectedRows.length === 0;
      const actionsMenu = reactExports.useMemo(
        () => [{ items: getWebsitesActions(selectedRows, { t: t2, setExclusionData, changeUrlLists: changeUrlLists2 }, urlListsSearchStrings) }],
        [t2, selectedRows, setExclusionData, changeUrlLists2, urlListsSearchStrings]
      );
      logGroup("WebsitesActions", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Dropdown,
        {
          id: "websites-actions-dropdown",
          reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { ref: r2, onClick: toggle, type: "primary", id: "websites-actions-button", disabled: noSelected, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: t2("IDUS_ACTIONS") }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowTriangularDown, { fill: !noSelected ? colors.secondary : colors.disabled })
          ] }) }),
          placement: "right",
          content: actionsMenu
        }
      ) });
    };
    DetectionsActions.displayName = "DetectionsActions";
    const FilteredWebsites = (props) => {
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const featureFlag = useSelector((state) => state.features[FEATURES.FILTERED_WEBSITES][0]);
      const wapFlag = useSelector((state) => state.features[FEATURES.WAP][0]);
      const setExclusionData = reactExports.useCallback(
        (data2) => dispatch(setWebsitesExclusions(data2)),
        [dispatch]
      );
      const callChangeUrlLists = reactExports.useCallback(
        (urls, action) => dispatch(
          changeUrlLists(
            urls,
            action,
            () => idToast(
              t2("IDUS_FILTERED_WEBSITES_URL_LISTS_CHANGE_SUCCESS"),
              "url-lists-success",
              "IDUS_FILTERED_WEBSITES_URL_LISTS_CHANGE_SUCCESS"
            ),
            (errorMsg) => idToast(
              sprintf(t2("IDUS_FILTERED_WEBSITES_URL_LISTS_CHANGE_ERROR"), errorMsg),
              "url-lists-error",
              "IDUS_FILTERED_WEBSITES_URL_LISTS_CHANGE_ERROR",
              false,
              "error"
            )
          )
        ),
        [dispatch, t2]
      );
      logGroup("FilteredWebsites", [["props", props]], void 0, props.debug);
      const content2 = reactExports.useMemo(() => {
        const flags = [featureFlag, wapFlag].filter((f) => !f.active && f.priority !== -1);
        return flags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(FilteredWebsitesTable, { setExclusionData, changeUrlLists: callChangeUrlLists }) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...flags[0] });
      }, [featureFlag, wapFlag, setExclusionData, callChangeUrlLists]);
      const actions = reactExports.useMemo(
        () => /* @__PURE__ */ jsxRuntimeExports.jsx(DetectionsActions, { setExclusionData, changeUrlLists: callChangeUrlLists }),
        [setExclusionData, callChangeUrlLists]
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(MainPage, { padding: "0px", title: props.title, content: content2, footer: actions });
    };
    const WIDTH_POINT_OVERRIDE = {
      [COLUMN_KEYS.EVENT]: 15,
      [COLUMN_KEYS.TIME]: 3,
      [COLUMN_KEYS.SOURCE]: 10,
      [COLUMN_KEYS.TARGET]: 10,
      [COLUMN_KEYS.PROTOCOL]: 1,
      [COLUMN_KEYS.ACTION]: 1,
      [COLUMN_KEYS.THREAT]: 1,
      [COLUMN_KEYS.APPLICATION]: 1
    };
    const NetworkProtection = (props) => {
      const { featureFlag, wapFlag } = useSelector((state) => ({
        featureFlag: state.features[FEATURES.NETWORK_PROTECTION_TABLE][0],
        wapFlag: state.features[FEATURES.WAP][0]
      }));
      logGroup("NetworkProtection", [["props", props]], void 0, props.debug);
      const flags = [featureFlag, wapFlag].filter((f) => !f.active && f.priority !== -1);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          padding: "0px",
          title: props.title,
          content: flags.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            LogsTable,
            {
              logType: LogType.LOGD_NETWORKPROTECTIONLOG,
              removalInfoRow: true,
              overrideColumnPoints: WIDTH_POINT_OVERRIDE
            }
          ) : /* @__PURE__ */ jsxRuntimeExports.jsx(InactiveFeature, { ...flags[0] })
        }
      );
    };
    const OVERVIEW_PROTECTION = {
      link: routes$1.overviewProtection,
      parentLink: routes$1.statusOverview
    };
    const OVERVIEW_MODULES = {
      link: routes$1.overviewModules,
      parentLink: routes$1.statusOverview
    };
    const OVERVIEW_PCU = {
      link: routes$1.overviewPcu,
      parentLink: routes$1.statusOverview
    };
    const OVERVIEW_LICENSE = {
      link: routes$1.overviewLicense,
      parentLink: routes$1.statusOverview
    };
    const DASHBOARD = {
      id: "dashboard",
      link: routes$1.dashboard,
      title: "IDUS_DASHBOARD",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$Y, {}),
      large: true,
      component: Dashboard
    };
    const EVENTS = {
      id: "events",
      link: routes$1.events,
      title: "IDUS_EVENTS",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$W, {}),
      large: true,
      component: Events
    };
    const STATUS_OVERVIEW = {
      id: "status-overview",
      link: routes$1.statusOverview,
      combinedPaths: [
        routes$1.statusOverview,
        OVERVIEW_PROTECTION.link,
        OVERVIEW_MODULES.link,
        OVERVIEW_PCU.link,
        OVERVIEW_LICENSE.link,
        ...Object.values(WatchdogMenuItems).map((x) => x.link)
      ],
      title: "IDUS_STATUS_OVERVIEW",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$X, {}),
      component: StatusOverview
    };
    const SENT_FILES = {
      id: "sent-files",
      link: routes$1.sentFiles,
      title: "IDUS_SENT_FILES",
      component: SentFiles
    };
    const BLOCKED_FILES = {
      id: "blocked-files",
      link: routes$1.blockedFiles,
      title: "IDUS_BLOCKED_FILES",
      component: BlockedFiles
    };
    const FILTERED_WEBSITES = {
      id: "filtered-websites",
      link: routes$1.filteredWebsites,
      title: "IDUS_FILTERED_WEBSITES",
      component: FilteredWebsites
    };
    const NETWORK_PROTECTION = {
      id: "network-protection",
      link: routes$1.networkProtection,
      title: "IDUS_NETWORK_PROTECTION",
      component: NetworkProtection
    };
    const SETUP = {
      id: "setup",
      link: routes$1.setup,
      combinedPaths: [routes$1.setup, routes$1.setupLevel1, routes$1.setupLevel2],
      title: "IDUS_SETUP",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$x, {}),
      component: Setup
    };
    const FEEDBACK = {
      id: "feedback",
      link: "",
      feedback: true,
      highlight: true,
      buttonOnly: true,
      title: "IDUS_SUBMIT_FEEDBACK",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$k, {})
    };
    const THREATS = {
      id: "detections",
      link: routes$1.detections,
      title: "IDUS_THREATS",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconStatusError, {}),
      large: true,
      component: Threats
    };
    const SCANS = {
      id: "scans",
      link: routes$1.scans,
      title: "IDUS_SCANS",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$6, {}),
      large: true,
      component: Scans
    };
    const SCANS_DETAIL = {
      ...SCANS,
      link: routes$1.scansDetail,
      parentLink: SCANS.link,
      title: "IDUS_SCAN_DETAIL",
      component: ScansDetail
    };
    const QUARANTINE = {
      id: "quarantine",
      link: routes$1.quarantine,
      title: "IDUS_QUARANTINE",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$Z, {}),
      component: Quarantine
    };
    const MORE = {
      id: "more",
      link: "",
      title: "IDUS_MORE",
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconMenuMore, {}),
      subItems: [
        {
          id: "advanced-logs-group",
          isGroupTitle: true,
          title: "IDUS_ADVANCED_LOGS"
        },
        SENT_FILES,
        BLOCKED_FILES,
        FILTERED_WEBSITES,
        NETWORK_PROTECTION
      ]
    };
    const HIERARCHY = {
      [SCANS_DETAIL.link]: SCANS_DETAIL.parentLink,
      [OVERVIEW_PROTECTION.link]: OVERVIEW_PROTECTION.parentLink,
      [OVERVIEW_MODULES.link]: OVERVIEW_MODULES.parentLink,
      [OVERVIEW_PCU.link]: OVERVIEW_PCU.parentLink,
      [OVERVIEW_LICENSE.link]: OVERVIEW_LICENSE.parentLink,
      [routes$1.overviewDynamic]: routes$1.statusOverview
    };
    const DEFAULT_PAGE = DASHBOARD;
    const getTranslatedSubMenu = (menuTemplate, translate) => menuTemplate.map((item) => ({
      ...item,
      title: item.title ? translate(item.title) : ""
    }));
    const getTranslatedMenu = (menuTemplate, translate) => menuTemplate.map((item, i) => ({
      ...item,
      id: item.id ?? `menu${i}`,
      title: item.title ? translate(item.title) : "",
      icon: item.icon ?? null,
      children: [],
      subItems: item.subItems ? getTranslatedSubMenu(item.subItems, translate) : void 0
    }));
    const mainRoutes = [DASHBOARD, THREATS, SCANS, EVENTS, QUARANTINE, STATUS_OVERVIEW, SETUP, MORE, FEEDBACK];
    const deepLinkRoutes = [SCANS_DETAIL];
    const sidebar = "_sidebar_1ik3b_1";
    const style$b = {
      sidebar
    };
    const sidebarId = "sidebar";
    const PureMainSidebar = (props) => {
      const { routeConfirmation } = props;
      const navigate = useNavigate();
      const { currentPath } = useCurrentPath();
      const { t: t2 } = useTranslation();
      let menu = getTranslatedMenu(mainRoutes, t2).map((item) => ({
        ...item,
        badge: props.badgeData[item.id]
      }));
      if (routeConfirmation) {
        menu = menu.map((item) => ({ ...item, buttonOnly: true }));
      }
      let pathMenu = menu.find((route) => route.link && currentPath.startsWith(route.link));
      if (!pathMenu) {
        pathMenu = menu.map((route) => route.subItems ?? []).reduce((acc, items) => [...acc, ...items], []).find((route) => route.link && currentPath.startsWith(route.link));
      }
      reactExports.useEffect(() => {
        props.updateCurrentMenuItem(pathMenu ? pathMenu.id : "");
      }, [pathMenu]);
      reactExports.useEffect(() => onTransitionEndEffect(sidebarId, props.updateLayoutSidebarComplete));
      const callback = (stringId, link = "") => {
        const matching = menu.find((item) => item.id === stringId) ?? {};
        if (matching.feedback) {
          props.showFeedback(true);
        } else if (matching.link) {
          props.wrapWithRouteConfirmation(() => navigate(link));
        } else {
          navigate(link);
        }
      };
      logGroup(
        "MainSidebar",
        [
          ["props", props],
          ["menu", menu],
          ["pathMenu", pathMenu]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$b.sidebar, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$_,
        {
          id: sidebarId,
          items: menu,
          onItemClick: callback,
          activeItemID: props.currentMenu,
          isCollapsed: props.isCollapsed,
          onCollapse: (collapsed) => props.updateLayoutSidebar(!collapsed),
          textCollapse: t2("IDUS_COLLAPSE"),
          textExpand: t2("IDUS_EXPAND"),
          tooltips: props.isCollapsed
        }
      ) });
    };
    const mapDispatchToProps$k = {
      updateCurrentMenuItem,
      updateLayoutSidebar,
      updateLayoutSidebarComplete,
      showFeedback: visibleFeedback
    };
    const mapStateToProps$j = (state) => ({
      isCollapsed: !state.layout.content.sidebar,
      currentMenu: state.layout.content.menuItem,
      routeConfirmation: state.layout.modals.routeConfirmation,
      badgeData: state.layout.badgeData
    });
    const MainSidebar = withErrorBoundary()(connect(mapStateToProps$j, mapDispatchToProps$k)(PureMainSidebar));
    MainSidebar.displayName = "MainSidebar";
    const rightSidebar = "_rightSidebar_rs5uv_1";
    const headline = "_headline_rs5uv_4";
    const headlineBack = "_headlineBack_rs5uv_9";
    const headlineText = "_headlineText_rs5uv_13";
    const style$a = {
      rightSidebar,
      headline,
      headlineBack,
      headlineText
    };
    const customTag = "_customTag_2o5di_1";
    const style$9 = {
      customTag
    };
    const theme$1 = {
      Tag: {
        borderRadius: "10px",
        padding: "4px 8px",
        background: {
          green: colors.success,
          orange: colors.warning,
          red: colors.error,
          active: colors.info,
          mute: colors.disabled
        }
      }
    };
    const statusToColorMap = {
      [TagType.PROTECTION_STATUS]: {
        [PROTECTION_STATUS.MUTE]: "default",
        [PROTECTION_STATUS.GREEN]: "green",
        [PROTECTION_STATUS.INFO]: "active",
        [PROTECTION_STATUS.YELLOW]: "orange",
        [PROTECTION_STATUS.RED]: "red"
      },
      [TagType.EnumWorkingSeverity]: {
        [EnumWorkingSeverity.CE_WORKING_SEVERITY_ERROR]: "red",
        [EnumWorkingSeverity.CE_WORKING_SEVERITY_WARNING]: "orange",
        [EnumWorkingSeverity.CE_WORKING_SEVERITY_INFO]: "active",
        [EnumWorkingSeverity.CE_WORKING_SEVERITY_OK]: "green",
        [EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN]: "default"
      }
    };
    const CustomTag = (props) => {
      logGroup("CustomTag", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: theme$1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { id: props.id, color: statusToColorMap[props.type][props.status], border: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: style$9.customTag, children: props.children }) }) });
    };
    const themeMutedData = {
      Link: {
        color: {
          primary: colors.disabled,
          hover: colors.disabled,
          disabled: colors.disabled
        }
      },
      RightSidebar: {
        Item: {
          colors: {
            success: colors.disabled,
            warning: colors.disabled,
            error: colors.disabled,
            info: colors.disabled,
            disabled: colors.disabled
          },
          headline: {
            color: colors.disabled,
            disabledColor: colors.disabled
          },
          content: {
            color: colors.disabled
          }
        }
      }
    };
    const themeUnMutedData = {
      Link: {
        color: {
          primary: colors.disabled,
          hover: colors.disabled,
          disabled: colors.disabled
        }
      }
    };
    class PureStatusItem extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "renderTags", () => {
          const { t: t2, tags, muted, forced } = this.props;
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$K, { children: [
            tags.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(
              CustomTag,
              {
                id: `${tag.id}-tag`,
                type: tag.type,
                status: muted || forced ? PROTECTION_STATUS.MUTE : tag.status,
                children: tag.text
              },
              `${tag.id}-tag`
            )),
            forced && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_TOOLTIP_DISABLED_VIA_ESET_MC"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionLock, { size: 16, fill: colors.disabled }) })
          ] });
        });
        __publicField(this, "renderActions", () => {
          const { t: t2, links, id: id2, actions } = this.props;
          const buttonGroupId = `${id2}-actions`;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$E,
            {
              id: buttonGroupId,
              buttons: actions.map((action, i) => {
                const updatedAction = { ...action, link: action.link ? links[action.link] : action.link };
                const buttonId = `${buttonGroupId}-${action.type}`;
                return /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: buttonId,
                    type: i > 0 ? "secondary" : "primary",
                    onClick: () => {
                      if (!openLocation(updatedAction, this.props.navigate) && updatedAction.cfg) {
                        this.props.cfgSetValues(updatedAction.cfg, t2(updatedAction.cfgErrorMsg ?? ""));
                      }
                    },
                    children: t2(updatedAction.text)
                  },
                  buttonId
                );
              })
            }
          );
        });
        __publicField(this, "renderMuteBtn", () => {
          const { t: t2, muted, statusId, id: id2 } = this.props;
          const MuteIcon = muted ? default_1$10 : default_1$S;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$7,
            {
              id: `${id2}-${muted ? "unmute" : "mute"}-btn`,
              onClick: () => {
                this.props.muteInGui(statusId, muted ? 0 : 1, t2("IDUS_CONFIG_MUTE_ERROR"));
              },
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(MuteIcon, { fill: colors.disabled }),
              children: t2(muted ? "IDUS_STATUS_UNMUTE" : "IDUS_STATUS_MUTE")
            }
          ) });
        });
      }
      render() {
        const { id: id2, muted, muteable, forced, info, title, type, actions, separator, extraInfo } = this.props;
        logGroup("StatusItem", [["props", this.props]], void 0, this.props.debug);
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: forced || muted ? themeMutedData : themeUnMutedData, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$$.StatusItem,
          {
            id: id2,
            separator,
            headline: title,
            headlineRightContent: !forced && muteable ? this.renderMuteBtn() : void 0,
            type,
            tags: this.renderTags(),
            children: !forced && !muted && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
              info,
              actions.length > 0 && this.renderActions(),
              extraInfo
            ] })
          }
        ) });
      }
    }
    const mapStateToProps$i = (state) => ({
      links: state.language.links
    });
    const mapDispatchToProps$j = {
      muteInGui,
      cfgSetValues
    };
    const StatusItem = withErrorBoundary()(
      withNavigate(withTranslation()(connect(mapStateToProps$i, mapDispatchToProps$j)(PureStatusItem)))
    );
    StatusItem.displayName = "StatusItem";
    const PureProtectionStatusList = (props) => {
      const { t: t2 } = props;
      const statuses = useSelector((state) => state.protectionStatus.statuses);
      const groupOfStatuses = reactExports.useMemo(() => processStatusesForSidebar(groupProtectionStatuses(statuses, t2)), [statuses, t2]);
      logGroup(
        "ProtectionStatusList",
        [
          ["statuses", statuses],
          ["groupOfStatuses", groupOfStatuses]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: groupOfStatuses.map((status, i) => /* @__PURE__ */ reactExports.createElement(StatusItem, { ...status, separator: i !== 0, key: status.statusId })) });
    };
    const ProtectionStatusList = withErrorBoundary()(withTranslation()(PureProtectionStatusList));
    ProtectionStatusList.displayName = "ProtectionStatusList";
    class PureUpdateStatus extends React.Component {
      constructor() {
        super(...arguments);
        // Set data which you want to show:
        __publicField(this, "setStatus", (protectionStatus) => {
          const { t: t2, activatedProduct } = this.props;
          if (!activatedProduct) {
            return {
              text: t2("IDUS_PCU_ACTIVATION_NEEDED"),
              showErrMsg: false,
              showButtonUpdate: true,
              showActivate: true
            };
          }
          switch (protectionStatus.id) {
            case DetectionEngineUpToDate:
              return {
                showErrMsg: true,
                showButtonUpdate: true
              };
            case DetectionEngineOutOfDateWarning:
              return {
                text: sprintf(t2("IDUS_UPDATE_WARNING_TEXT"), pkgid.product_info_short),
                showErrMsg: true,
                showButtonUpdate: true,
                showButtonLearnMore: true
              };
            case DetectionEngineOutOfDateError:
              return {
                text: t2("IDUS_UPDATE_ERROR_TEXT"),
                showErrMsg: true,
                showButtonUpdate: true,
                showButtonLearnMore: true
              };
            case ModuleUpdateSuspended:
              return {
                text: t2("IDUS_UPDATE_SUSPENDED_TEXT"),
                // don't show any error message, it might be from the state before rollback was enabled
                showButtonCancelRollback: true
              };
            default:
              return {};
          }
        });
        __publicField(this, "renderButtons", ({
          showActivate = false,
          showButtonUpdate = false,
          showButtonLearnMore = false,
          showButtonCancelRollback = false
        }) => {
          const { t: t2, links } = this.props;
          const buttons = [];
          if (showActivate) {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button_activate",
                  type: "primary",
                  onClick: () => this.props.switchRightSidebar(routes$1.overviewLicense),
                  text: t2("IDUS_PCU_ACTIVATE")
                },
                "button_activate"
              )
            );
          }
          if (showButtonUpdate) {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: this.props.updating ? "button_update_loading" : "button_update",
                  type: showActivate ? "secondary" : "primary",
                  disabled: showActivate,
                  onClick: !this.props.updating ? this.props.updateStart : void 0,
                  loadingText: t2("IDUS_UPDATE_UPDATING"),
                  loading: this.props.updating,
                  text: t2("IDUS_UPDATE_VIRUS_DATABASE")
                },
                "button_update"
              )
            );
          }
          if (showButtonLearnMore) {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button_learn_more",
                  type: "secondary",
                  onClick: () => openLocation({ link: links.HELP_LINK_UPDATE_FAILED }),
                  text: t2("IDUS_STATUS_ACTION_MORE")
                },
                "button_learn_more"
              )
            );
          }
          if (showButtonCancelRollback) {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button_cancel_rollback",
                  type: "primary",
                  onClick: this.props.updateResume,
                  text: t2("IDUS_CANCEL_ROLLBACK")
                },
                "button_cancel_rollback"
              )
            );
          }
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$E, { id: "update_buttons", orientation: "left", buttons });
        });
      }
      render() {
        const { protectionStatus, t: t2 } = this.props;
        const statusData = this.setStatus(protectionStatus);
        const headline2 = protectionStatus.text || protectionStatus.customText && t2(protectionStatus.customText) || protectionStatus.textOK && t2(protectionStatus.textOK);
        logGroup("UpdateStatus", [["props", this.props]], void 0, this.props.debug);
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$h, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            ErrorMessage,
            {
              type: "error",
              id: "update-error",
              dynamicTextId: true,
              textId: this.props.errCode,
              when: !!statusData.showErrMsg && !this.props.updating && !!this.props.errMsg,
              children: sprintf(t2("IDUS_UPDATE_FAILED"), this.props.errMsg)
            }
          ) }),
          protectionStatus.status === PROTECTION_STATUS.UNKNOWN ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$$.DetailItem,
            {
              headline: t2(protectionStatus.text),
              type: convertStatusToType(protectionStatus.status),
              separator: false
            }
          ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
            default_1$$.StatusItem,
            {
              separator: false,
              headline: headline2,
              type: convertStatusToType(protectionStatus.status),
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: statusData.text }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pt-2", children: this.renderButtons(statusData) })
              ]
            }
          )
        ] });
      }
    }
    const mapStateToProps$h = (state) => ({
      protectionStatus: state.protectionStatus.groups.Update,
      links: state.language.links,
      activatedProduct: ![PROTECTION_STATUS.RED, PROTECTION_STATUS.UNKNOWN].includes(
        state.protectionStatus.groups.License.status
      )
    });
    const mapDispatchToProps$i = {
      updateStart,
      updateResume
    };
    const UpdateStatus = withErrorBoundary()(
      connect(mapStateToProps$h, mapDispatchToProps$i)(withTranslation()(PureUpdateStatus))
    );
    UpdateStatus.displayName = "UpdateStatus";
    const PureUpdateDates = ({ timeOk, timeCheck, rollbackStart, rollbackUntil, inRollback, debug }) => {
      const { t: t2 } = useTranslation();
      const lastSuccessfulUpdateLine = displayRow(
        t2("IDUS_LABEL_LAST_SUCCESS_UPDATE"),
        getLocaleDateTimeString(timeOk),
        void 0,
        "mup-sidebar-last-update"
      );
      const lastSuccessfulCheckLine = displayRow(
        t2("IDUS_LABEL_LAST_SUCCESS_CHECK_UPDATE"),
        getLocaleDateTimeString(timeCheck),
        void 0,
        "mup-sidebar-last-check"
      );
      const rollbackDateLine = displayRow(
        t2("IDUS_LABEL_ROLLBACK_DATE"),
        getLocaleDateTimeString(rollbackStart),
        void 0,
        "mup-sidebar-rollback-date"
      );
      const updatesDisabledUntilLine = displayRow(
        t2("IDUS_LABEL_ROLLBACK_DISABLED_UNTIL"),
        rollbackUntil === -1 ? t2("IDUS_SETUP_UPDATE_ROLLBACK_UNTIL_REVOKE") : getLocaleDateTimeString(rollbackUntil),
        void 0,
        "mup-sidebar-rollback-until"
      );
      logGroup(
        "UpdateDates",
        [
          ["timeOk", timeOk],
          ["timeCheck", timeCheck],
          ["rollbackStart", rollbackStart],
          ["rollbackUntil", rollbackUntil],
          ["inRollback", inRollback]
        ],
        void 0,
        debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-3", children: inRollback ? [rollbackDateLine, updatesDisabledUntilLine] : [lastSuccessfulUpdateLine, lastSuccessfulCheckLine] });
    };
    const UpdateDates = withErrorBoundary()(PureUpdateDates);
    UpdateDates.displayName = "UpdateDates";
    const rollbackSettings__wrap = "_rollbackSettings__wrap_jxqse_1";
    const rollbackSettings__label = "_rollbackSettings__label_jxqse_7";
    const rollbackSettings__input = "_rollbackSettings__input_jxqse_10";
    const style$8 = {
      rollbackSettings__wrap,
      rollbackSettings__label,
      rollbackSettings__input
    };
    const PureRollbackSettings = (props) => {
      const [rollbackDuration, setRollbackDuration] = reactExports.useState(12);
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const noSnapshots = useCELocally(
        [
          {
            path: "Settings.Plugins.Updated.Rollback.NumSnapshots",
            callback: (snapshots) => snapshots === 0
          }
        ],
        false
      );
      const durationOptions = [
        { label: t2("IDUS_SETUP_UPDATE_ROLLBACK_12H"), value: 12 },
        { label: t2("IDUS_SETUP_UPDATE_ROLLBACK_24H"), value: 24 },
        { label: t2("IDUS_SETUP_UPDATE_ROLLBACK_36H"), value: 36 },
        { label: t2("IDUS_SETUP_UPDATE_ROLLBACK_48H"), value: 48 },
        { label: t2("IDUS_SETUP_UPDATE_ROLLBACK_UNTIL_REVOKE"), value: -1 }
      ];
      const setRollbackHandler = () => {
        const seconds = rollbackDuration >= 0 ? rollbackDuration * 60 * 60 : rollbackDuration;
        dispatch(updateRollback(seconds));
        props.setRightSidebarLevel(false);
      };
      logGroup(
        "RollbackSettings",
        [
          ["props", props],
          ["rollbackDuration", rollbackDuration]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Headline, { type: "h3", children: t2("IDUS_MODULE_ROLLBACK") }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$K, { className: style$8.rollbackSettings__wrap, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: "rollback-duration", className: style$8.rollbackSettings__label, children: t2("IDUS_LABEL_DURATION") }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Select,
            {
              id: "rollback-duration",
              className: style$8.rollbackSettings__input,
              options: durationOptions,
              defaultValue: durationOptions[0],
              allowEmpty: false,
              onChange: (duration) => {
                setRollbackDuration(duration.value);
              }
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_TOOLTIP_ROLLBACK_DURATION"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { size: 18, fill: colors.iconColor }) })
        ] }),
        noSnapshots && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { color: colors.error, children: t2("IDUS_ROLLBACK_NO_SNAPSHOTS_SETTING") }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionEdit, { fill: colors.primary, size: 14 }), onClick: props.redirectToSetup, children: t2("IDUS_ROLLBACK_SETTINGS_CHANGE") }) })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "set-rollback-button", type: "primary", onClick: setRollbackHandler, disabled: noSnapshots, children: !props.inRollback ? t2("IDUS_ROLLBACK_NOW") : t2("IDUS_MODULE_ROLLBACK_PROLONG_NOW") }) })
      ] });
    };
    const RollbackSettings = withErrorBoundary("IDUS_ERROR_BOUNDARY_ROLLBACK")(PureRollbackSettings);
    RollbackSettings.displayName = "RollbackSettings";
    const rollbackWrapper = "_rollbackWrapper_rgqm5_1";
    const style$7 = {
      rollbackWrapper
    };
    const PureRollback = (props) => {
      const { t: t2 } = useTranslation();
      const { rollbackError } = props;
      const text = !props.inRollback ? {
        link: t2("IDUS_MODULE_ROLLBACK"),
        text: t2("IDUS_MODULE_ROLLBACK_DESCRIPTION")
      } : {
        link: t2("IDUS_MODULE_ROLLBACK_PROLONG"),
        text: t2("IDUS_MODULE_ROLLBACK_PROLONG_DESCRIPTION")
      };
      reactExports.useEffect(() => {
        if (rollbackError) {
          props.showGlobalModal(
            "error",
            "IDUS_ERROR_ROLLBACK_TITLE",
            t2(rollbackError),
            void 0,
            props.resetRollbackError
          );
        }
      }, [rollbackError]);
      logGroup(
        "Rollback",
        [
          ["props", props],
          ["rollbackError", rollbackError]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$7.rollbackWrapper, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$7,
          {
            display: "block",
            onClick: () => {
              props.setOption(RollbackSettings);
              props.setRightSidebarLevel(true);
            },
            children: text.link
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: text.text }) })
      ] });
    };
    const Rollback = withErrorBoundary("IDUS_ERROR_BOUNDARY_ROLLBACK")(PureRollback);
    Rollback.displayName = "Rollback";
    const PureUpdate = (props) => {
      const [option, setOption] = reactExports.useState(null);
      const navigate = useNavigate();
      const setWrappedOption = reactExports.useCallback((o) => setOption(() => o), [setOption]);
      useCE([
        {
          path: "State.Plugins.Updated",
          callback: props.setUpdatedState
        }
      ]);
      const redirectToSetup = reactExports.useCallback(() => {
        navigate(SETUP_SCREEN_URLS.UPDATE);
      }, [navigate]);
      const { update } = props;
      logGroup(
        "Update",
        [
          ["props", props],
          ["option", option]
        ],
        void 0,
        props.debug
      );
      if (props.rightSidebarLevel && option !== null) {
        const Option = option;
        return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", style: { padding: "0 24px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Option,
          {
            setRightSidebarLevel: props.setRightSidebarLevel,
            inRollback: props.inRollback,
            redirectToSetup
          }
        ) });
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          UpdateStatus,
          {
            errMsg: update.errors.last,
            errCode: update.LastUpdRetval,
            updating: update.updating,
            switchRightSidebar: props.switchRightSidebar
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.rightPanelSection, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            UpdateDates,
            {
              timeOk: update.LastTimeUpdOk,
              timeCheck: update.LastTimeUpdCheck,
              inRollback: props.inRollback,
              rollbackStart: update.TimeRollbackDate,
              rollbackUntil: update.TimeRollbackUntil
            }
          ),
          props.activatedProduct && /* @__PURE__ */ jsxRuntimeExports.jsx(
            Rollback,
            {
              inRollback: props.inRollback,
              rollbackError: update.errors.rollback,
              setRightSidebarLevel: props.setRightSidebarLevel,
              setOption: setWrappedOption,
              showGlobalModal: props.showModal,
              resetRollbackError: props.resetRollbackError
            }
          )
        ] })
      ] });
    };
    const mapDispatchToProps$h = {
      setUpdatedState,
      showModal,
      resetRollbackError,
      setRightSidebarLevel
    };
    const mapStateToProps$g = (state) => ({
      rightSidebarLevel: state.layout.content.rightSidebarLevel,
      update: state.update,
      inRollback: state.protectionStatus.groups.Update.id === ModuleUpdateSuspended,
      activatedProduct: ![PROTECTION_STATUS.RED, PROTECTION_STATUS.UNKNOWN].includes(
        state.protectionStatus.groups.License.status
      )
    });
    const Update = withErrorBoundary()(connect(mapStateToProps$g, mapDispatchToProps$h)(withTranslation()(PureUpdate)));
    Update.displayName = "Update";
    const PureProductInfo = (props) => {
      const { autoupdatesFlag, lastCheck, turnOnAutoUpdates } = props;
      const { t: t2 } = useTranslation();
      let mode = "";
      let tooltip = "";
      if (autoupdatesFlag) {
        mode = t2("IDUS_PCU_AUTOMATIC_UPDATES");
        tooltip = t2("IDUS_PCU_TYPE_TOOLTIP_ALWAYS");
      } else if (autoupdatesFlag === AutoUpdateFlag.OFF) {
        mode = t2("IDUS_PCU_NEVER_UPDATE");
        tooltip = t2("IDUS_PCU_TYPE_TOOLTIP_NEVER");
      }
      const modeSection = !mode ? "-" : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$K, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: mode }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: tooltip, placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { fill: colors.iconColor }) })
        ] }),
        turnOnAutoUpdates && autoupdatesFlag === AutoUpdateFlag.OFF && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { onClick: turnOnAutoUpdates, display: "block", children: t2("IDUS_PCU_AU_ENABLE") })
      ] });
      logGroup("ProductInfo", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "py-3", className: `${style$r.topDivider} ${style$r.rightPanelSection}`, children: [
        displayRow(t2("IDUS_PCU_CURRENT_VERSION"), pkgid.version.join("."), void 0, "pcu-sidebar-version"),
        displayRow(t2("IDUS_PCU_LAST_CHECK"), getLocaleDateTimeString(lastCheck), void 0, "pcu-sidebar-last-check"),
        displayRow(t2("IDUS_PCU_UPDATE_SETTINGS"), modeSection)
      ] });
    };
    const ProductInfo = withErrorBoundary()(PureProductInfo);
    ProductInfo.displayName = "ProductInfo";
    const PureProductStatus = (props) => {
      const { t: t2, appUpdateInfo, eulaInfo, autoupdatesFlag, runningActions, turnOnAutoUpdates } = props;
      const { State, Version, ReleaseDate, Size, ChangelogUrl } = appUpdateInfo ?? {};
      const { EulaUrl, EulaTag = "", EulaVersion = "", EulaStatus } = eulaInfo ?? {};
      const navigate = useNavigate();
      const { HELP_AUTOUPDATES, POLICY_LINK } = useSelector((state) => state.language.links);
      const errors = useSelector((state) => state.pcu.errors);
      reactExports.useEffect(() => {
        if (errors.action !== null) {
          let errorMessage = t2("IDUS_PCU_ERROR_GENERIC");
          if (errors.background && errors.backgroundCode === errors.actionCode) {
            errorMessage = errors.background;
          } else if (errors.action) {
            errorMessage = t2(errors.action);
          }
          props.showGlobalModal(
            "error",
            "IDUS_PCU_UPDATE_FAILED",
            errorMessage,
            [
              {
                id: "pcu_error_events",
                text: t2("IDUS_STATUS_ACTION_EVENTS"),
                type: "secondary",
                onClick: () => {
                  navigate(EVENTS.link);
                  props.closeGlobalModal();
                  props.resetPcuError();
                }
              },
              {
                id: "pcu_error_ok",
                text: t2("IDUS_OK"),
                type: "primary",
                onClick: () => {
                  props.closeGlobalModal();
                  props.resetPcuError();
                }
              }
            ],
            props.resetPcuError
          );
        }
      }, [errors.action]);
      const triggerUpdate = () => props.pcuTriggerUpdate(EulaVersion, EulaTag);
      const updatingBackendProcess = runningActions.accepting || runningActions.updating || runningActions.checking;
      const acceptingBackendProcess = runningActions.accepting || runningActions.checking;
      let hasUpdate;
      let matchingStatus;
      if (!appUpdateInfo || Size === void 0 || ReleaseDate === void 0) {
        hasUpdate = false;
        matchingStatus = {
          headline: t2("IDUS_STATUS_UNKNOWN"),
          status: PROTECTION_STATUS.UNKNOWN,
          text: ""
        };
      } else {
        switch (State) {
          case EnumAppUpdateState.CE_APP_UPDATE_STATE_NEED_TO_APPROVE_DOWNLOAD:
          case EnumAppUpdateState.CE_APP_UPDATE_STATE_READY_FOR_REINSTALLATION:
            hasUpdate = true;
            matchingStatus = {
              headline: autoupdatesFlag ? t2("IDUS_PCU_UPDATE_AVAILABLE") : t2("IDUS_PCU_OUT_OF_DATE"),
              status: PROTECTION_STATUS.INFO,
              text: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
                displayRow(t2("IDUS_PCU_VERSION"), Version),
                displayRow(t2("IDUS_PCU_UPDATE_SIZE"), formatFileSize(Size)),
                displayRow(t2("IDUS_PCU_RELEASE_DATE"), getLocalizedTime(ReleaseDate, OUR_DATE_SHORT))
              ] })
            };
            break;
          case EnumAppUpdateState.CE_APP_UPDATE_STATE_NOT_AVAILABLE:
          default:
            hasUpdate = false;
            matchingStatus = {
              headline: t2("IDUS_PCU_UP_TO_DATE"),
              status: PROTECTION_STATUS.GREEN
            };
        }
      }
      const hasEula = State === EnumAppUpdateState.CE_APP_UPDATE_STATE_NEED_TO_APPROVE_DOWNLOAD && EulaUrl && EulaVersion && EulaTag && EulaStatus === EnumAppEulaStatus.CE_EULA_STATUS_MUST_ACCEPT;
      const buttons = [];
      let dropdownStart = null;
      let dropdownEnd = null;
      if (hasUpdate) {
        if (autoupdatesFlag) {
          if (hasEula) {
            dropdownStart = /* @__PURE__ */ jsxRuntimeExports.jsx(
              Dropdown,
              {
                id: "dropdown_update_options",
                reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { ref: r2, onClick: toggle, type: "primary", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: t2("IDUS_PCU_UPDATE_OPTIONS") }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowTriangularDown, { fill: "white" })
                ] }) }),
                placement: "bottom",
                multilineItem: true,
                content: [
                  {
                    items: [
                      {
                        id: "button-accept-update",
                        title: t2("IDUS_PCU_ACCEPT_AND_UPDATE"),
                        callback: !updatingBackendProcess ? triggerUpdate : void 0,
                        loading: updatingBackendProcess
                      },
                      {
                        id: "button-accept-update-reboot",
                        title: t2("IDUS_PCU_ACCEPT_AND_UPDATE_REBOOT"),
                        callback: !acceptingBackendProcess ? () => {
                          props.pcuConfirmUpdate(EulaVersion, EulaTag);
                        } : void 0,
                        loading: acceptingBackendProcess,
                        disabled: runningActions.updating
                      }
                    ]
                  }
                ]
              }
            );
          } else {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button_auto_update_now",
                  type: "primary",
                  onClick: !updatingBackendProcess ? triggerUpdate : void 0,
                  text: t2("IDUS_PCU_UPDATE_NOW"),
                  loadingText: t2("IDUS_PCU_UPDATE_NOW"),
                  loading: updatingBackendProcess
                },
                "button_auto_update_now"
              )
            );
          }
          buttons.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$f,
              {
                id: "button_changelog_link",
                type: "secondary",
                onClick: () => {
                  openInTabAndFocus(ChangelogUrl);
                },
                disabled: !ChangelogUrl,
                text: t2("IDUS_PCU_SEE_CHANGELOG")
              },
              "button_changelog_link"
            )
          );
        } else {
          const updateButtonText = t2(hasEula ? "IDUS_PCU_ACCEPT_AND_UPDATE" : "IDUS_PCU_UPDATE_NOW");
          if (turnOnAutoUpdates) {
            buttons.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button_enable_auto_updates",
                  type: "primary",
                  onClick: turnOnAutoUpdates,
                  text: t2("IDUS_PCU_AU_ENABLE")
                },
                "button_enable_auto_updates"
              )
            );
          }
          dropdownEnd = /* @__PURE__ */ jsxRuntimeExports.jsx(
            Dropdown,
            {
              id: "dropdown_update_actions",
              reference: (r2, toggle) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { ref: r2, onClick: toggle, type: "secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-1", children: t2("IDUS_ACTIONS") }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowTriangularDown, { fill: colors.primary })
              ] }) }),
              placement: "bottom",
              multilineItem: true,
              content: [
                {
                  items: [
                    {
                      id: "button_update_now",
                      title: updateButtonText,
                      callback: !updatingBackendProcess ? triggerUpdate : void 0,
                      loading: updatingBackendProcess
                    },
                    {
                      id: "button_changelog_link",
                      title: t2("IDUS_PCU_SEE_CHANGELOG"),
                      callback: () => {
                        openInTabAndFocus(ChangelogUrl);
                      },
                      disabled: !ChangelogUrl
                    },
                    {
                      id: "button_auto_updates_help",
                      title: t2("IDUS_PCU_AU_HELP_LINK"),
                      callback: () => {
                        openInTabAndFocus(HELP_AUTOUPDATES);
                      },
                      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowExternal, {}),
                      disabled: !ChangelogUrl
                    }
                  ]
                }
              ]
            }
          );
        }
      } else {
        buttons.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$f,
            {
              id: "button_check_updates",
              type: "primary",
              onClick: !runningActions.checking ? props.checkForPcuUpdate : void 0,
              text: t2("IDUS_PCU_CHECK_FOR_UPDATES"),
              loading: runningActions.checking,
              loadingText: t2("IDUS_PCU_CHECKING_FOR_UPDATE")
            },
            "button_check_updates"
          )
        );
      }
      const eulaText = autoupdatesFlag ? t2("IDUS_PCU_EULA_AGREEMENT_INFO_AUTO") : t2("IDUS_PCU_EULA_AGREEMENT_INFO");
      const eulaInterpolatedText = sprintf(eulaText, t2("IDUS_PCU_ACCEPT_AND_UPDATE"), t2("IDUS_PCU_ACCEPT_AND_UPDATE_REBOOT"));
      const eula = insertHtmlToTemplate(eulaInterpolatedText, {
        eulalink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { text: t2("IDUS_EULA"), onClick: () => openInTabAndFocus(EulaUrl) }),
        pplink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { text: t2("IDUS_PRIVACY_POLICY"), onClick: () => openInTabAndFocus(POLICY_LINK) })
      });
      logGroup(
        "ProductStatus",
        [
          ["props", props],
          ["eula", eula],
          ["buttons", buttons],
          ["matchingStatus", matchingStatus],
          ["hasEula", hasEula],
          ["hasUpdate", hasUpdate],
          ["errors", errors],
          ["links", HELP_AUTOUPDATES, POLICY_LINK]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$h, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          ErrorMessage,
          {
            id: "pcu-error",
            when: !!errors.background,
            type: getCodeType(errors.backgroundCode),
            textId: errors.backgroundCode ?? "",
            dynamicTextId: true,
            children: [
              t2("IDUS_PCU_UPDATE_FAILED"),
              ": ",
              errors.background
            ]
          }
        ) }),
        matchingStatus.status === PROTECTION_STATUS.UNKNOWN ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$$.DetailItem,
          {
            headline: t2(matchingStatus.headline),
            type: convertStatusToType(matchingStatus.status),
            separator: false
          }
        ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
          default_1$$.StatusItem,
          {
            separator: false,
            headline: matchingStatus.headline,
            type: convertStatusToType(matchingStatus.status),
            children: [
              runningActions.accepting && // same as downloading
              /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mb-4", className: style$r.withPrefixIcon, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, { className: style$r.prefixIcon }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Headline, { type: "h4", bottomMargin: false, children: t2("IDUS_PCU_DOWNLOAD_PROGRESS") })
              ] }),
              matchingStatus.text && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: matchingStatus.text }),
              hasEula && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-3", children: eula }),
              hasUpdate && autoupdatesFlag ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: hasEula ? "pb-3" : "py-3", children: t2("IDUS_PCU_AU_RESTART_INFO") }) : null,
              dropdownStart && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pt-4 pr-4", className: style$r.inlineBlock, children: dropdownStart }),
              buttons.length === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pr-4 py-4", className: style$r.inlineBlock, children: buttons[0] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$E, { id: "pcu_buttons", orientation: "left", buttons }),
              dropdownEnd && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pb-4", className: style$r.inlineBlock, children: dropdownEnd })
            ]
          }
        )
      ] });
    };
    const mapDispatchToProps$g = {
      checkForPcuUpdate,
      pcuTriggerUpdate,
      pcuConfirmUpdate,
      showGlobalModal: showModal,
      closeGlobalModal: showNextModal,
      resetPcuError
    };
    const ProductStatus = withErrorBoundary()(withTranslation()(connect(null, mapDispatchToProps$g)(PureProductStatus)));
    ProductStatus.displayName = "ProductStatus";
    const AutoUpdatesEnabled = "Settings.Updater.AutoUpdates.Enabled";
    const PureProductUpdate = (props) => {
      const {
        t: t2,
        pcuState,
        availableAppUpdate,
        eulaInfo,
        autoupdatesFlag,
        runningActions,
        backendRunningActions,
        activatedProduct,
        cfgSetValues: cfgSetValues2
      } = props;
      const [allowSettingsChange, setAllowSettingsChange] = reactExports.useState(false);
      reactExports.useEffect(() => {
        cfgValueFlagsGetRequest([AutoUpdatesEnabled]);
        const cfgSettingsValueFlagsEraSubscription = cfgSettingsValueFlagsEra$.pipe().subscribe((result) => {
          const isNotSetByEra = !result[AutoUpdatesEnabled] || result[AutoUpdatesEnabled].set_by_era_flag === 0;
          setAllowSettingsChange(isNotSetByEra);
        });
        return () => {
          cfgSettingsValueFlagsEraSubscription.unsubscribe();
        };
      }, []);
      const turnOnAutoUpdates = reactExports.useCallback(() => cfgSetValues2({ [AutoUpdatesEnabled]: 1 }), [cfgSetValues2]);
      const runningFlags = {
        checking: runningActions.checking || backendRunningActions.checking,
        accepting: runningActions.accepting || backendRunningActions.accepting,
        updating: runningActions.updating || backendRunningActions.updating
      };
      logGroup(
        "ProductUpdate",
        [
          ["props", props],
          ["allowSettingsChange", allowSettingsChange]
        ],
        void 0,
        props.debug
      );
      const enabler = allowSettingsChange ? turnOnAutoUpdates : void 0;
      const updateState = availableAppUpdate ? availableAppUpdate.State : null;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        !activatedProduct && pcuState ? /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$$.StatusItem, { separator: false, headline: t2("IDUS_PCU_NOT_AVAILABLE"), type: "error", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: t2("IDUS_PCU_ACTIVATION_NEEDED") }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$E,
            {
              id: "not_activated_buttons",
              orientation: "left",
              buttons: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "button_activate",
                    type: "primary",
                    onClick: () => props.switchRightSidebar(routes$1.overviewLicense),
                    text: t2("IDUS_PCU_ACTIVATE")
                  },
                  "activate"
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "button_check_updates",
                    type: "secondary",
                    disabled: true,
                    text: t2("IDUS_PCU_CHECK_FOR_UPDATES")
                  },
                  "updates"
                )
              ]
            }
          )
        ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
          ProductStatus,
          {
            appUpdateInfo: availableAppUpdate,
            eulaInfo,
            autoupdatesFlag,
            runningActions: runningFlags,
            turnOnAutoUpdates: enabler
          }
        ),
        pcuState && /* @__PURE__ */ jsxRuntimeExports.jsx(
          ProductInfo,
          {
            lastCheck: pcuState.LastTimeCheck,
            autoupdatesFlag,
            turnOnAutoUpdates: updateState === EnumAppUpdateState.CE_APP_UPDATE_STATE_NOT_AVAILABLE ? enabler : void 0
          }
        )
      ] });
    };
    const mapDispatchToProps$f = {
      cfgSetValues
    };
    const mapStateToProps$f = (state) => ({
      pcuState: state.pcu.state,
      availableAppUpdate: state.pcu.AvailableAppUpdate,
      eulaInfo: state.pcu.AvailableEulaUpdate,
      autoupdatesFlag: state.pcu.autoupdatesFlag,
      runningActions: state.pcu.runningActions,
      backendRunningActions: state.pcu.backendRunningActions,
      activatedProduct: ![PROTECTION_STATUS.RED, PROTECTION_STATUS.UNKNOWN].includes(
        state.protectionStatus.groups.License.status
      )
    });
    const ProductUpdate = withErrorBoundary()(
      withTranslation()(connect(mapStateToProps$f, mapDispatchToProps$f)(PureProductUpdate))
    );
    ProductUpdate.displayName = "ProductUpdate";
    const optionsSection = "_optionsSection_ezuor_1";
    const optionsCollapse = "_optionsCollapse_ezuor_5";
    const isOpened = "_isOpened_ezuor_8";
    const style$6 = {
      optionsSection,
      optionsCollapse,
      isOpened
    };
    const table = "_table_10sje_1";
    const td1 = "_td1_10sje_5";
    const style$5 = {
      table,
      td1
    };
    class PureLicenseInfo extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "renderLicenseInfo", () => {
          const { t: t2, info, languagePluralType } = this.props;
          const productLicense = info.find((lic) => lic.ProductCode === pkgid.product_activation_code);
          if (!productLicense) {
            return null;
          }
          let localizedExpDate = "";
          let validityTitle = "";
          let tag = null;
          if (productLicense.ExpirationDate > 0) {
            localizedExpDate = getLocalizedTime(productLicense.ExpirationDate, OUR_DATE_SHORT);
            validityTitle = t2("IDUS_HELP_LICENSE_VALIDITY");
          } else if (productLicense.RenewalPeriod > 0) {
            const renewalPeriod = productLicense.RenewalPeriod;
            const isFullYears = renewalPeriod % 12 === 0;
            const message = isFullYears ? "IDUS_LICENCE_SUBSCRIPTION_YEAR" : "IDUS_LICENCE_SUBSCRIPTION_MONTH";
            localizedExpDate = pluralize(t2(message), isFullYears ? renewalPeriod / 12 : renewalPeriod, languagePluralType);
            validityTitle = t2("IDUS_LICENSE_RENEWAL_FREQUENCY");
            tag = /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { children: t2("IDUS_LICENSE_SUBSCRIPTION") });
          }
          return /* @__PURE__ */ jsxRuntimeExports.jsx("table", { className: style$5.table, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: style$5.td1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: validityTitle }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: localizedExpDate }) })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: style$5.td1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: t2("IDUS_LICENSE_PUBLIC_ID") }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { children: productLicense.PublicId }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: tag })
            ] })
          ] }) });
        });
      }
      render() {
        const { protectionStatus, plainText, t: t2, debug } = this.props;
        logGroup("LicenseInfo", [["props", this.props]], void 0, debug);
        if (!protectionStatus) {
          return null;
        }
        const text = (protectionStatus.status === PROTECTION_STATUS.UNKNOWN && protectionStatus.text ? t2(protectionStatus.text) : protectionStatus.text) || protectionStatus.textOK && t2(protectionStatus.textOK) || "";
        if (plainText) {
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { bold: true, spacer: "mt-3", children: text }),
            this.renderLicenseInfo()
          ] });
        }
        return protectionStatus.status === PROTECTION_STATUS.UNKNOWN ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$$.DetailItem,
          {
            headline: t2(protectionStatus.text),
            type: convertStatusToType(protectionStatus.status),
            separator: false
          }
        ) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$$.StatusItem, { headline: text, type: convertStatusToType(protectionStatus.status), separator: false, children: this.renderLicenseInfo() });
      }
    }
    const mapStateToProps$e = (state) => ({
      protectionStatus: state.protectionStatus.groups.License,
      info: state.activation.LicenseInfo,
      languagePluralType: state.language.plural
    });
    const LicenseInfo = connect(mapStateToProps$e, {})(withErrorBoundary()(withTranslation()(PureLicenseInfo)));
    LicenseInfo.displayName = "LicenseInfo";
    const fullWidth = "_fullWidth_ty1ga_1";
    const registrationInfo = "_registrationInfo_ty1ga_5";
    const withGap = "_withGap_ty1ga_10";
    const flexTitle = "_flexTitle_ty1ga_14";
    const complexCollapsible = "_complexCollapsible_ty1ga_21";
    const collapsibleIcon = "_collapsibleIcon_ty1ga_25";
    const licenseRadio = "_licenseRadio_ty1ga_29";
    const structuredHeader = "_structuredHeader_ty1ga_37";
    const leftSide = "_leftSide_ty1ga_42";
    const rightSide = "_rightSide_ty1ga_43";
    const hubTooltip = "_hubTooltip_ty1ga_47";
    const collapsible = "_collapsible_ty1ga_25";
    const style$4 = {
      fullWidth,
      registrationInfo,
      withGap,
      flexTitle,
      complexCollapsible,
      collapsibleIcon,
      licenseRadio,
      structuredHeader,
      leftSide,
      rightSide,
      hubTooltip,
      "level-1": "_level-1_ty1ga_52",
      collapsible,
      "level-2": "_level-2_ty1ga_70",
      "level-3": "_level-3_ty1ga_88",
      "level-4": "_level-4_ty1ga_106",
      "level-5": "_level-5_ty1ga_124"
    };
    class PureActivationOptions extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "options", []);
        __publicField(this, "renderLink", (option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$7,
          {
            id: option.id,
            display: "block",
            onClick: () => {
              this.props.setActivationType(option.type);
              this.props.setRightSidebarLevel(true);
            },
            children: option.header
          }
        ));
        const { t: t2, links } = props;
        const linkText = t2("IDLS_ACTIVATION_OPTIONS", { returnObjects: true });
        this.options = [
          {
            id: "activation-by-licence-key",
            header: t2("IDUS_LICENSE_KEY_ACTIVATE"),
            text: t2("IDUS_PRODACT_TYPE_ACTKEY"),
            link: "",
            type: ActivationType.Key
          },
          {
            id: "activation-by-business-account",
            header: t2("IDUS_BUSINESS_ACTIVATION"),
            text: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
              t2("IDUS_BUSINESS_ACTIVATION_DESC"),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-1", className: style$4.hubTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_BUSINESS_ACTIVATION_DESC_TOOLTIP"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { size: 16 }) }) })
            ] }),
            link: "",
            type: ActivationType.EBA
          },
          {
            id: "activation-by-offline-license",
            header: linkText[1],
            text: t2("IDUS_ACTIVATE_OFFILE_TEXT"),
            link: "",
            type: ActivationType.File
          },
          {
            id: "activation-esmc",
            header: t2("IDUS_SMC"),
            text: t2("IDUS_ACTIVATE_SMC"),
            link: links.ACTIVATION_ESMC,
            type: null
          }
        ];
      }
      render() {
        const { headline: headline2, debug } = this.props;
        logGroup(
          "ActivationOptions",
          [
            ["props", this.props],
            ["options", this.options]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: headline2 }),
          this.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5 mb-2", children: option.type ? this.renderLink(option) : /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { id: option.id, text: option.header, link: option.link }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { children: option.text })
          ] }, option.id))
        ] });
      }
    }
    const ActivationOptions = withErrorBoundary()(withTranslation()(PureActivationOptions));
    ActivationOptions.displayName = "ActivationOptions";
    const requiredConstraint = (translate) => ({
      presence: { message: `^${translate("IDUS_REQUIRED")}`, allowEmpty: false }
    });
    const patternConstraint = (translate, pattern = ".*", message = "IDUS_BAD_FORMAT") => ({
      format: {
        pattern,
        flags: "i",
        message: `^${translate(message)}`
      }
    });
    const activationKeyValidation = (t2) => ({
      ...requiredConstraint(t2),
      ...patternConstraint(t2, "([a-z0-9]{4}-){4}[a-z0-9]{4}", "IDUS_LICENSE_KEY_FORMAT")
    });
    const BAD_FORMAT = "IDUS_BAD_FORMAT";
    const LABELS = {
      FNAME: {
        label: "IDUS_PRODACT_ACTKEY_FIRST_NAME"
      },
      LNAME: {
        label: "IDUS_PRODACT_ACTKEY_LAST_NAME"
      },
      COMPANY_NAME: {
        label: "IDUS_PRODACT_ACTKEY_COMPANY",
        optional: "IDUS_PRODACT_ACTKEY_COMPANY_OPT"
      },
      PNUMB: {
        label: "IDUS_PRODACT_ACTKEY_PHONE_NUMBER"
      },
      EMAIL: {
        label: "IDUS_PRODACT_ACTKEY_EMAIL_ADDRESS",
        optional: "IDUS_PRODACT_ACTKEY_EMAIL_ADDRESS_OPTIONAL",
        confirm: "IDUS_PRODACT_ACTKEY_EMAIL_ADDRESS_CONFIRM",
        format: "IDUS_PRODACT_WARNING2",
        confirmFormat: "IDUS_PRODACT_WARNING1"
      },
      ADDRESS1: {
        label: "IDUS_PRODACT_ACTKEY_ADDRESS"
      },
      ADDRESS2: {
        label: "IDUS_PRODACT_ACTKEY_ADDRESS2",
        optional: "IDUS_PRODACT_ACTKEY_ADDRESS2_OPT"
      },
      CITY: {
        label: "IDUS_PRODACT_ACTKEY_CITY"
      },
      ZIP: {
        label: "IDUS_PRODACT_ACTKEY_ZIP_CODE"
      },
      COUNTRY: {
        label: "IDUS_PRODACT_ACTKEY_COUNTRY"
      },
      STATE: {
        label: "IDUS_PRODACT_ACTKEY_STATE_PROVINCE"
      },
      CONFIRM_EMAIL_NEWS: {
        label: "IDUS_PRODACT_ACTKEY_PRODUCT_UPDATES",
        optional: "IDUS_PRODACT_ACTKEY_PRODUCT_UPDATES"
      },
      NOTE: {
        label: "IDUS_PRODACT_ACTKEY_NOTE"
      },
      CONFIRM_LICENSE_CHANGES_EMAIL_NOTIFICATIONS: {
        label: "IDUS_PRODACT_ACTKEY_RENEWAL_REMIND"
      },
      NAME: {
        label: "IDUS_PRODACT_ACTKEY_NAME"
      },
      VATID: {
        label: "IDUS_PRODACT_ACTKEY_VATID"
      }
    };
    const getLabel = (name) => LABELS[name].label;
    const getOptionalLabel = (name) => LABELS[name].optional ? LABELS[name].optional : LABELS[name].label;
    const getConfirmLabel = (name) => LABELS[name].confirm ? LABELS[name].confirm : LABELS[name].label;
    const getFormatError = (name) => LABELS[name].format ? LABELS[name].format : BAD_FORMAT;
    const getConfirmError = (name) => LABELS[name].confirmFormat ? LABELS[name].confirmFormat : BAD_FORMAT;
    const generateCountries = (countries) => countries.map((country) => ({
      label: country.name,
      value: country.id
    }));
    const typeMap = {
      COUNTRY: "country",
      CONFIRM_LICENSE_CHANGES_EMAIL_NOTIFICATIONS: "checkbox",
      CONFIRM_EMAIL_NEWS: "checkbox"
    };
    const getDefaultValue = (type, value) => {
      if (type === "checkbox") {
        return value && ["true", "false"].includes(value) ? value === "true" : false;
      }
      return value ?? "";
    };
    const generateForm = (attributes, t2) => arrayToObject(
      attributes.map((item) => {
        const isRequired = !!item.is_required;
        const label = t2(isRequired ? getLabel(item.name) : getOptionalLabel(item.name));
        const type = typeMap[item.name] ?? "input";
        const defaultValue = getDefaultValue(type, item.default_value);
        let validate = {};
        if (isRequired) {
          validate = { ...validate, ...requiredConstraint(t2) };
        }
        if (item.validate_regex) {
          validate = { ...validate, ...patternConstraint(t2, item.validate_regex, getFormatError(item.name)) };
        }
        const confirmationElement = item.needs_confirmation ? {
          label: t2(getConfirmLabel(item.name)),
          isRequired,
          name: `${item.name}_C`,
          validate: {
            equality: {
              attribute: item.name,
              message: `^${t2(getConfirmError(item.name))}`
            },
            ...isRequired ? requiredConstraint(t2) : {}
          }
        } : void 0;
        return {
          [item.name]: {
            label,
            type,
            isRequired,
            defaultValue,
            validate,
            confirmationElement
          }
        };
      })
    );
    class PureActivationAttributes extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "form");
        __publicField(this, "countries");
        __publicField(this, "processValue", (value, key) => {
          const error = "Error: unexpected format.";
          switch (typeof value) {
            case "string":
              return value;
            case "boolean":
              return value ? 1 : 0;
            case "object": {
              if (value[key] !== void 0) {
                return value[key];
              }
              if (value.value !== void 0) {
                return value.value;
              }
              return error;
            }
            default:
              return error;
          }
        });
        __publicField(this, "onSend", () => {
          const valuesToSend = Object.entries(this.state.data).map(([key, value]) => ({
            name: key,
            value: this.processValue(value, key)
          }));
          this.setState({ responseSent: true }, () => this.props.activationAttrResponse(valuesToSend));
        });
        __publicField(this, "onCancel", () => {
          this.setState({ responseSent: true }, () => this.props.activationAttrResponse([], true));
        });
        // undefined for those who actively passed validation, false for the required ones that were never filled-in
        __publicField(this, "checkIfValid", () => Object.values(this.state.validation).every((invalid) => invalid === void 0));
        __publicField(this, "changeState", (key, validationCriteria) => (value) => {
          const result = Validation.validateSingle(value, validationCriteria);
          this.setState(({ data: data2, validation }) => ({
            data: {
              ...data2,
              [key]: value
            },
            validation: {
              ...validation,
              [key]: result
            }
          }));
        });
        __publicField(this, "changeCombinedState", ([key1, key2], validationCriteria) => (values) => {
          const result = Validation.validate(values, validationCriteria);
          this.setState(({ data: data2, confirmationData, validation }) => ({
            data: {
              ...data2,
              [key1]: values[key1]
            },
            confirmationData: {
              ...confirmationData,
              [key2]: values[key2]
            },
            validation: {
              ...validation,
              [key1]: void 0,
              [key2]: void 0,
              ...result
            }
          }));
        });
        __publicField(this, "generateAttributesForm", () => Object.entries(this.form).map(
          ([key, element], index) => element.confirmationElement ? this.generateConfirmedField(key, element, element.confirmationElement, index === 0) : this.generateField(key, element, index === 0)
        ));
        const form = generateForm(props.attributes, props.t);
        const data2 = arrayToObject(Object.keys(form).map((key) => ({ [key]: form[key].defaultValue })));
        const confirmationData = arrayToObject(
          Object.values(form).map((value) => value.confirmationElement ? { [value.confirmationElement.name]: "" } : {})
        );
        const validation = {};
        Object.entries(form).forEach(([key, value]) => {
          if (value.isRequired) {
            validation[key] = false;
          }
          if (value.confirmationElement && value.confirmationElement.isRequired) {
            validation[value.confirmationElement.name] = false;
          }
        });
        this.state = {
          data: data2,
          validation,
          responseSent: false,
          confirmationData
        };
        this.form = form;
        this.countries = generateCountries(props.countries);
      }
      componentWillUnmount() {
        if (!this.state.responseSent) {
          this.onCancel();
        }
      }
      generateField(name, { label, type, validate: valDefinition }, autofocus = false) {
        const matchingValidation = this.state.validation[name];
        const onChange = this.changeState(name, valDefinition);
        const validationProps = {
          required: !!valDefinition.presence,
          hasError: !!matchingValidation,
          validationText: matchingValidation ? matchingValidation[0] : void 0
        };
        const common = {
          key: name,
          id: `activation-attribute-${name}`
        };
        switch (type) {
          case "checkbox": {
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                ...common,
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$r, { value: "", checked: this.state.data[name] ? 1 : 0, text: label, onChange }),
                ...validationProps
              }
            );
          }
          case "country": {
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                ...common,
                labelText: label,
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Select,
                  {
                    placeholder: this.props.t("IDUS_PORDACTEES_REQFILED_COUNTRY"),
                    options: this.countries,
                    onChange
                  }
                ),
                ...validationProps
              }
            );
          }
          default:
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                ...common,
                labelText: label,
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "text", value: this.state.data[name], onChange, autoFocus: autofocus }),
                ...validationProps
              }
            );
        }
      }
      generateConfirmedField(name, element, confirmElement, autofocus = false) {
        const confirmName = confirmElement.name;
        const handleChange = this.changeCombinedState([name, confirmName], {
          [name]: { ...element.validate },
          [confirmName]: { ...confirmElement.validate }
        });
        const onNameChange = (value) => handleChange({ [name]: value, [confirmName]: this.state.confirmationData[confirmName] });
        const onConfirmChange = (value) => handleChange({ [confirmName]: value, [name]: this.state.data[name] });
        const nameValidation = this.state.validation[name];
        const confirmValidation = this.state.validation[confirmName];
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$p,
            {
              id: `activation-attribute-${name}`,
              labelText: element.label,
              content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "text", value: this.state.data[name], onChange: onNameChange, autoFocus: autofocus }),
              required: !!element.validate.presence,
              hasError: !!nameValidation,
              validationText: nameValidation ? nameValidation[0] : void 0
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$p,
            {
              id: `activation-attribute-${confirmName}`,
              labelText: confirmElement.label,
              content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "text", value: this.state.confirmationData[confirmName], onChange: onConfirmChange }),
              required: !!confirmElement.validate.presence,
              hasError: !!confirmValidation,
              validationText: confirmValidation ? confirmValidation[0] : void 0
            }
          )
        ] }, name);
      }
      render() {
        const { t: t2, debug } = this.props;
        const { responseSent } = this.state;
        logGroup(
          "ActivationAttributes",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(VisualForm, { children: this.generateAttributesForm() }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$o, { when: this.props.attributes.length > 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$E,
            {
              id: "activation-attributes-btn-group",
              orientation: "left",
              buttons: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "activation-attributes-send",
                    type: "primary",
                    loading: responseSent,
                    disabled: responseSent || !this.checkIfValid(),
                    onClick: this.onSend,
                    children: t2("IDUS_OK")
                  },
                  "send"
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    id: "activation-attributes-cancel",
                    type: "secondary",
                    loading: responseSent,
                    disabled: responseSent,
                    onClick: this.onCancel,
                    children: t2("IDUS_CANCEL")
                  },
                  "cancel"
                )
              ]
            }
          ) })
        ] });
      }
    }
    const mapDispatchToProps$e = {
      activationAttrResponse
    };
    const mapStateToProps$d = (state) => ({
      attributes: state.activation.attributes,
      countries: state.activation.countries,
      challenge: state.activation.challenge
    });
    const ActivationAttributes = withTranslation()(
      connect(mapStateToProps$d, mapDispatchToProps$e)(withErrorBoundary()(PureActivationAttributes))
    );
    ActivationAttributes.displayName = "ActivationAttributes";
    const PureActivationButton = ({ t: t2, id: id2, loading: loading2, onClick, disabled: disabled2, debug }) => {
      logGroup(
        "ActivationButton",
        [
          ["id", id2],
          ["loading", loading2],
          ["disabled", disabled2]
        ],
        void 0,
        debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$p,
        {
          content: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$f,
            {
              type: "primary",
              id: id2,
              onClick: !loading2 ? onClick : void 0,
              disabled: disabled2,
              loading: loading2,
              text: t2("IDUS_ACTIVATE"),
              loadingText: t2("IDUS_PORDACTEES_ACTIVATING_TITLE")
            }
          )
        }
      );
    };
    const ActivationButton = withTranslation()(PureActivationButton);
    ActivationButton.displayName = "ActivationButton";
    const btnWithIcon = "_btnWithIcon_6661l_1";
    const btnIcon = "_btnIcon_6661l_4";
    const style$3 = {
      btnWithIcon,
      btnIcon
    };
    const PureActivationError = (props) => {
      const { error, errorCode = 0, t: t2, simplified } = props;
      logGroup("ActivationError", [["props", props]], void 0, props.debug);
      const overusedLicense = errorCode === ErrorCode.ACTIVATION_OVERUSED_LICENSE;
      const displayError = errorCode > 0 && !!error && !overusedLicense;
      const closeModal = () => {
        props.closeModal();
        props.disableErrorModal(true);
      };
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        simplified && displayError ? /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { dynamic: true, id: errorCode, children: error }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
          ErrorMessage,
          {
            when: displayError,
            spacer: "mb-3",
            type: "error",
            id: "activation-error",
            textId: errorCode,
            dynamicTextId: true,
            children: error
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          ConfirmationModal,
          {
            id: "activation-error-modal",
            show: !props.modalDisabled && overusedLicense,
            type: "error",
            message: t2("IDUS_ACTIVATE_ERROR_LICENSE_OVERUSE_TITLE"),
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button-learn-more",
                  altText: t2("IDUS_STATUS_ACTION_MORE"),
                  onClick: () => window.open(props.licenseKBLink),
                  type: "primary",
                  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$3.btnWithIcon, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("IDUS_STATUS_ACTION_MORE") }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowExternal, { size: "14px", fill: colors.secondary, className: style$3.btnIcon }) })
                  ] })
                },
                "learn-more"
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "button-cancel", onClick: closeModal, text: t2("IDUS_CANCEL"), type: "secondary" }, "cancel")
            ],
            onClose: closeModal,
            children: t2("IDUS_ACTIVATE_ERROR_LICENSE_OVERUSE_DESC")
          }
        )
      ] });
    };
    const mapDispatchToProps$d = {
      closeModal: showNextModal,
      disableErrorModal
    };
    const mapStateToProps$c = (state) => ({
      errorCode: state.activation.responseCode,
      error: state.activation.errors.activation,
      modalDisabled: state.activation.modalDisabled,
      licenseKBLink: state.language.links.LICENSE_OVERUSE_KB_LINK
    });
    const ActivationError = withTranslation()(connect(mapStateToProps$c, mapDispatchToProps$d)(PureActivationError));
    ActivationError.displayName = "ActivationError";
    const PureActivationByKey = (props) => {
      const [key, setKey] = React.useState("");
      const { t: t2, inProgress, challenge, debug } = props;
      const { HELP_ACTIVATION_LINK, HELP_ACTIVATION_USERNAME_LINK } = props.links;
      logGroup(
        "ActivationByKey",
        [
          ["props", props],
          ["key", key]
        ],
        void 0,
        debug
      );
      const keyValidation = hooks.useFormSingleValidation(key, activationKeyValidation(t2));
      if (challenge) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationAttributes, {});
      }
      const activationDisabled = !!keyValidation.hasError || key.length === 0;
      const activate = () => {
        props.activationByKey({ key, lang: props.winid });
      };
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationError, {}),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$p,
          {
            id: "activation-license-key",
            labelText: t2("IDUS_LICENSE_KEY_ACTIVATE"),
            content: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$q,
              {
                autoFocus: true,
                type: "text",
                value: key,
                contentLeft: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$11, { fill: colors.disabled, size: 12 }),
                placeholder: t2("IDUS_LICENSE_KEY"),
                onChange: setKey,
                onEnterPress: !activationDisabled ? activate : void 0
              }
            ),
            ...keyValidation
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { text: t2("IDUS_ACTIVATION_FIND_LICENSE_KEY"), link: HELP_ACTIVATION_LINK }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { text: t2("IDUS_ACTIVATION_QUESTION"), link: HELP_ACTIVATION_USERNAME_LINK }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          ActivationButton,
          {
            id: "activation-by-key-submit",
            onClick: activate,
            disabled: activationDisabled,
            loading: inProgress
          }
        )
      ] });
    };
    const mapDispatchToProps$c = {
      activationByKey
    };
    const mapStateToProps$b = (state) => ({
      challenge: state.activation.challenge,
      inProgress: state.activation.active.activation,
      winid: state.language.winid,
      links: state.language.links
    });
    const ActivationByKey = withTranslation()(
      connect(mapStateToProps$b, mapDispatchToProps$c)(withErrorBoundary()(PureActivationByKey))
    );
    ActivationByKey.displayName = "ActivationByKey";
    const SIZE_LIMIT = 20 * 1e3 * 1e3;
    class PureActivationByFile extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          file: null,
          callbackError: null
        });
        __publicField(this, "send", () => {
          const formData = new FormData();
          formData.append("activationFile", this.state.file);
          this.props.sendFormData(this.props.winid, formData, (callbackError) => this.setState({ callbackError }));
        });
      }
      render() {
        const { t: t2, inProgress, debug } = this.props;
        const activationOptions = t2("IDLS_ACTIVATION_OPTIONS", { returnObjects: true });
        logGroup(
          "ActivationByFile",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        let rejectionMessages = getDefaultFileUploadMessages(t2);
        rejectionMessages = {
          ...rejectionMessages,
          fileTooLarge: sprintf(rejectionMessages.fileTooLarge, formatFileSize(SIZE_LIMIT, 10))
          // to display in regular MB and not MiB
        };
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ErrorMessage,
            {
              when: this.state.callbackError !== null,
              spacer: "mb-3",
              type: "error",
              id: "activation-error",
              textId: "IDUS_TITLE_PRODACT_ERROR",
              children: t2("IDUS_TITLE_PRODACT_ERROR")
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationError, {}),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(VisualForm, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                labelText: activationOptions[1],
                content: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "240px", maxHeight: "240px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$12,
                  {
                    id: "activation-file-upload",
                    placeholderText: t2("IDUS_ACTIVATE_CHOOSE_OFFILE_FILE"),
                    disabled: inProgress,
                    maxFiles: 1,
                    onRemove: () => this.setState({ file: null }),
                    onFileLoad: (fileInfo) => this.setState({ file: fileInfo }),
                    rejectionMessages,
                    maxSize: SIZE_LIMIT,
                    sizeUnits: "KB"
                  }
                ) })
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ActivationButton,
              {
                id: "act_file",
                loading: inProgress,
                onClick: this.send,
                disabled: this.state.file === null
              }
            )
          ] })
        ] });
      }
    }
    const mapDispatchToProps$b = {
      sendFormData
    };
    const mapStateToProps$a = (state) => ({
      inProgress: state.activation.active.activation,
      winid: state.language.winid
    });
    const ActivationByFile = withTranslation()(
      connect(mapStateToProps$a, mapDispatchToProps$b)(withErrorBoundary()(PureActivationByFile))
    );
    ActivationByFile.displayName = "ActivationByFile";
    const SimpleCollapsible = (props) => {
      const { children, icon, title, debug, level, hideSelector, value, selected, tooltip, onSelect } = props;
      const [open, setOpen] = React.useState(false);
      logGroup(
        "SimpleCollapsible",
        [
          ["props", props],
          ["open", open]
        ],
        void 0,
        debug
      );
      let header2 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$4.structuredHeader, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$4.leftSide, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${style$4.collapsibleIcon} ${!value && !hideSelector ? style$4.withGap : ""}`, children: open ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$13, { size: 20 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowCaretDown, { size: 20 }) }) }),
          icon,
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "ml-1", children: title })
        ] }),
        tooltip && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4.rightSide, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: tooltip, placement: "left", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { fill: colors.iconColor }) }) })
      ] });
      if (value) {
        const radio = (
          // EslintNote: As the purpose here is merely to remove the propagated event, it does not really have any accessibility meaning
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "span",
            {
              id: `radio-wrapper-${value}`,
              "data-label": `radio-wrapper-${value}`,
              onClick: (e) => {
                e.stopPropagation();
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1.RadioItem, { name: title, value, checked: selected === value, onChange: onSelect })
            }
          )
        );
        header2 = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          radio,
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4.flexTitle, children: header2 })
        ] });
      }
      const customHeader = /* @__PURE__ */ jsxRuntimeExports.jsx(ClickableWrapper, { className: `${style$4[`level-${level}`]} ${style$4.collapsible}`, onClick: () => setOpen(!open), children: header2 });
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        customHeader,
        /* @__PURE__ */ jsxRuntimeExports.jsx(PanelExpander, { open, tooltip: false, withoutHeader: true, pureRendering: true, onToggle: setOpen, children })
      ] });
    };
    const statusIconMap = {
      [StatusType.AS_ERROR]: { icon: IconStatusError, color: colors.error },
      [StatusType.AS_WARNING]: { icon: IconStatusWarning, color: colors.warningBig },
      [StatusType.AS_NORMAL]: { icon: IconStatusOk, color: colors.successBig },
      [StatusType.LS_ERROR]: { icon: IconStatusError, color: colors.error },
      [StatusType.LS_WARNING]: { icon: IconStatusWarning, color: colors.warningBig },
      [StatusType.LS_NORMAL]: { icon: default_1$J, color: colors.successBig }
    };
    const textColorMap = {
      [StatusType.AS_ERROR]: colors.error,
      [StatusType.AS_WARNING]: colors.warning,
      [StatusType.AS_NORMAL]: colors.text,
      [StatusType.LS_ERROR]: colors.error,
      [StatusType.LS_WARNING]: colors.warning,
      [StatusType.LS_NORMAL]: colors.text
    };
    const BusinessStatusLine = ({ status, text }) => {
      const LineIcon = statusIconMap[status].icon;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: textColorMap[status] }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(LineIcon, { fill: statusIconMap[status].color, display: "inline-block", style: { verticalAlign: "bottom" } }),
        " ",
        text
      ] });
    };
    const PureBusinessLicenseInfo = (props) => {
      const { debug, license, subtitle, children, units, t: t2 } = props;
      logGroup("BusinessLicenceInfo", [["props", props]], void 0, debug);
      const owner = license.owner ?? license.contact;
      const expDate = license.expdate ? getLocalizedTime(parseInt(license.expdate, 10), OUR_DATE_SHORT) : "";
      const displayedUnits = units ?? license.units;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-1", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$4.flexTitle, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: license.name }) }),
          license.id && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { children: license.id })
        ] }),
        subtitle,
        owner && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: colors.text }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(IconUserUser, { display: "inline-block", style: { verticalAlign: "bottom" } }),
          " ",
          owner
        ] }),
        expDate && /* @__PURE__ */ jsxRuntimeExports.jsx(BusinessStatusLine, { status: license.expstate ?? StatusType.AS_NORMAL, text: expDate }),
        displayedUnits && /* @__PURE__ */ jsxRuntimeExports.jsx(
          BusinessStatusLine,
          {
            status: displayedUnits.state,
            text: `${displayedUnits.used}/${displayedUnits.total} ${t2("IDUS_BUSINESS_ACTIVATION_UNITS")}`
          }
        ),
        children
      ] });
    };
    const BusinessLicenseInfo = withTranslation()(PureBusinessLicenseInfo);
    BusinessLicenseInfo.displayName = "BusinessLicenseInfo";
    const BusinessLicense = (props) => {
      const { debug, level, license, value, selected, onSelect } = props;
      logGroup("BusinessLicense", [["props", props]], void 0, debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4[`level-${level}`], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Item, { value, checked: selected === value, className: style$4.licenseRadio, onChange: onSelect, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BusinessLicenseInfo, { license }) }) });
    };
    const PureBusinessBundle = (props) => {
      const { debug, level, license, bundle, selected, onSelect, t: t2 } = props;
      const [open, setOpen] = reactExports.useState(false);
      logGroup(
        "BusinessBundle",
        [
          ["props", props],
          ["open", open]
        ],
        void 0,
        debug
      );
      if (bundle.length === 1 && bundle[0].value) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4[`level-${level}`], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Radio.Item,
          {
            value: bundle[0].value,
            checked: selected === bundle[0].value,
            className: style$4.licenseRadio,
            onChange: onSelect,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              BusinessLicenseInfo,
              {
                license,
                units: bundle[0].units,
                subtitle: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$g, { noMargin: true, fontWeight: "bold", children: [
                  "(",
                  bundle[0].name,
                  ")"
                ] }) })
              }
            )
          }
        ) });
      }
      const owner = license.owner ?? license.contact;
      const expDate = license.expdate ? getLocalizedTime(parseInt(license.expdate, 10), OUR_DATE_SHORT) : "";
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(ClickableWrapper, { className: `${style$4[`level-${level}`]} ${style$4.collapsible}`, onClick: () => setOpen(!open), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$4.complexCollapsible, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4.collapsibleIcon, children: open ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowCaretDown, { size: 20 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$13, { size: 20 }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-2", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$4.flexTitle, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: license.name }) }),
              license.id && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$3, { children: license.id })
            ] }),
            owner && /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$g, { noMargin: true, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(IconUserUser, { display: "inline-block" }),
              " ",
              owner
            ] }),
            expDate && /* @__PURE__ */ jsxRuntimeExports.jsx(BusinessStatusLine, { status: license.expstate ?? StatusType.AS_NORMAL, text: expDate }),
            license.units && /* @__PURE__ */ jsxRuntimeExports.jsx(
              BusinessStatusLine,
              {
                status: license.units.state,
                text: `${license.units.used}/${license.units.total} ${t2("IDUS_BUSINESS_ACTIVATION_UNITS")}`
              }
            )
          ] })
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(PanelExpander, { open, tooltip: false, withoutHeader: true, pureRendering: true, onToggle: setOpen, children: bundle.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$4[`level-${level + 1}`], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Radio.Item,
          {
            value: item.value,
            checked: item.value === selected,
            className: style$4.licenseRadio,
            onChange: onSelect,
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "ml-1", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: item.name }),
              item.units && /* @__PURE__ */ jsxRuntimeExports.jsx(
                BusinessStatusLine,
                {
                  status: item.units.state,
                  text: `${item.units.used}/${item.units.total} ${t2("IDUS_BUSINESS_ACTIVATION_UNITS")}`
                }
              )
            ] })
          }
        ) }, item.id)) })
      ] });
    };
    const BusinessBundle = withTranslation()(PureBusinessBundle);
    BusinessBundle.displayName = "BusinessBundle";
    const iconTypes = {
      [CompanyType.COMPANY]: default_1$14,
      [CompanyType.MSP_COMPANY]: default_1$14,
      [CompanyType.SECURITY_ADMIN]: IconUserUser,
      SITE: default_1$15
    };
    const categoryMap = {
      [CompanyType.COMPANY]: "IDUS_LICENSE_POOL_TYPE_COMPANY",
      [CompanyType.MSP_COMPANY]: "IDUS_LICENSE_POOL_TYPE_MSP_ADMINISTRATOR",
      [CompanyType.SECURITY_ADMIN]: "IDUS_LICENSE_POOL_TYPE_SECURITY_ADMIN"
    };
    class PureActivationByAccountSelection extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          selectedLicense: ""
        });
        __publicField(this, "setLicense", (selectedLicense) => {
          this.setState({ selectedLicense });
        });
        __publicField(this, "renderLicense", (prefix, data2, level) => {
          const { value, items } = data2;
          if (value) {
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              BusinessLicense,
              {
                value,
                selected: this.state.selectedLicense,
                onSelect: this.setLicense,
                license: data2,
                level
              },
              `${prefix}-${data2.id}`
            );
          }
          return items ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            BusinessBundle,
            {
              selected: this.state.selectedLicense,
              onSelect: this.setLicense,
              license: data2,
              bundle: items,
              level
            },
            `${prefix}-${data2.id}`
          ) : null;
        });
        __publicField(this, "renderPool", (prefix, data2, type, level, hasSomePoolsSelectable) => {
          var _a, _b;
          const key = `${prefix}-${data2.name}`;
          const hasSomeSitesSelectable = (data2.sites ?? []).some((site) => !!site.value);
          const licenceJump = hasSomePoolsSelectable ? 1 : 0;
          const TypeIcon = iconTypes[type];
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(
            SimpleCollapsible,
            {
              level,
              onSelect: this.setLicense,
              selected: this.state.selectedLicense,
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TypeIcon, { size: 18 }),
              value: data2.value,
              hideSelector: !hasSomePoolsSelectable,
              tooltip: data2.value ? this.props.t("IDUS_BUSINESS_ACTIVATION_POOL_HELP_TOOLTIP") : void 0,
              title: data2.name,
              children: [
                (_a = data2.sites) == null ? void 0 : _a.map((site) => this.renderPool(key, site, "SITE", level + 1 + licenceJump, hasSomeSitesSelectable)),
                (_b = data2.licenses) == null ? void 0 : _b.map((license) => this.renderLicense(key, license, level + 1 + licenceJump))
              ]
            },
            key
          );
        });
        __publicField(this, "renderCompany", (data2) => {
          const hasSomePoolsSelectable = data2.pools.some((pool) => !!pool.value);
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "my-3", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: this.props.t(categoryMap[data2.type]) }),
            data2.pools.map((pool) => this.renderPool(data2.type, pool, data2.type, 1, hasSomePoolsSelectable))
          ] }, data2.type);
        });
        __publicField(this, "activate", () => {
          const { login, password } = this.props.credentials;
          const { licenseId, poolId } = this.props.valueMap[this.state.selectedLicense];
          this.props.businessAccountActivation(login, password, poolId, licenseId);
        });
      }
      render() {
        const { debug, t: t2, data: data2 } = this.props;
        logGroup(
          "ActivationByAccountSelection",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { limitContentWidth: false, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationError, {}),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_BUSINESS_ACTIVATION_ACTIVATE") }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$q,
            {
              id: "ba-search-license",
              name: "search",
              type: "text",
              placeholder: `${t2("IDUS_BUSINESS_ACTIVATION_SEARCH")}...`,
              contentLeft: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$6, {}),
              onChanged: this.props.businessAccountSearch,
              value: this.props.search
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Radio,
            {
              name: "businessLicence",
              onChange: this.setLicense,
              value: this.state.selectedLicense,
              className: style$4.fullWidth,
              children: data2.map((entry) => this.renderCompany(entry))
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            ActivationButton,
            {
              id: "activation-business-btn",
              loading: this.props.activationInProgress,
              onClick: this.activate,
              disabled: !this.state.selectedLicense
            }
          ) })
        ] });
      }
    }
    const mapDispatchToProps$a = {
      businessAccountActivation,
      businessAccountSearch
    };
    const mapStateToProps$9 = (state) => ({
      data: state.activation.businessLicenses ?? [],
      search: state.activation.businessSearch,
      activationInProgress: state.activation.active.activation,
      valueMap: state.activation.businessLicenseValueMap,
      winid: state.language.winid
    });
    const ActivationByAccountSelection = connect(
      mapStateToProps$9,
      mapDispatchToProps$a
    )(withErrorBoundary()(withTranslation()(PureActivationByAccountSelection)));
    ActivationByAccountSelection.displayName = "ActivationByAccountSelection";
    class PureActivationByAccount extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "login", () => {
          const { login, password } = this.state;
          this.props.businessAccountLogin(login, password);
        });
        this.state = {
          login: "",
          password: ""
        };
      }
      render() {
        const { t: t2, hasData, debug } = this.props;
        const { login, password } = this.state;
        if (hasData) {
          return /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationByAccountSelection, { credentials: this.state });
        }
        const { BUSINESS_ACTIVATION_REGISTRATION, BUSINESS_ACTIVATION_FORGOTTEN } = this.props.links;
        logGroup(
          "ActivationByAccount",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$h, { limitContentWidth: false, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ErrorMessage,
            {
              when: !!this.props.loginError,
              spacer: "mb-3",
              type: "error",
              id: "activation-error",
              textId: this.props.errorCode,
              dynamicTextId: true,
              children: this.props.loginError
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_BUSINESS_ACTIVATION_LOGIN") }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$q,
            {
              id: "ba-login-email",
              name: "email",
              type: "email",
              placeholder: t2("IDUS_BUSINESS_ACTIVATION_EMAIL"),
              contentLeft: /* @__PURE__ */ jsxRuntimeExports.jsx(IconUserUser, {}),
              onChange: (value) => this.setState({ login: value }),
              value: login
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$q,
            {
              id: "ba-login-password",
              name: "password",
              type: "password",
              placeholder: t2("IDUS_PASSWORD"),
              contentLeft: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionLock, {}),
              onChange: (value) => this.setState({ password: value }),
              value: password
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { text: t2("IDUS_FORGOTTEN_PASSWORD"), link: BUSINESS_ACTIVATION_FORGOTTEN }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$f,
            {
              id: "ba-login-btn",
              type: "primary",
              loading: this.props.inProgress,
              loadingText: t2("IDUS_BUSINESS_ACTIVATION_LOGIN_BUTTON"),
              disabled: !this.state.login,
              onClick: this.login,
              children: t2("IDUS_BUSINESS_ACTIVATION_LOGIN_BUTTON")
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "my-4 py-4", className: style$4.registrationInfo, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconLetterI, { fill: colors.primary, size: 16 }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_BUSINESS_ACTIVATION") }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$g, { style: { marginTop: "12px" }, children: [
                t2("IDUS_BUSINESS_ACTIVATION_CREATE_DESC"),
                /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "px-1", className: style$4.hubTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_BUSINESS_ACTIVATION_DESC_TOOLTIP"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { size: 16 }) }) })
              ] }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                ExternalLink,
                {
                  id: "ba-registration-link",
                  text: t2("IDUS_BUSINESS_ACTIVATION_CREATE"),
                  link: BUSINESS_ACTIVATION_REGISTRATION
                }
              ) })
            ] })
          ] })
        ] });
      }
    }
    const mapDispatchToProps$9 = {
      businessAccountLogin
    };
    const mapStateToProps$8 = (state) => ({
      hasData: !!state.activation.businessLicenses,
      loginError: state.activation.errors.businessLogin,
      inProgress: state.activation.active.businessLogin,
      errorCode: state.activation.responseCode,
      winid: state.language.winid,
      links: state.language.links
    });
    const ActivationByAccount = connect(
      mapStateToProps$8,
      mapDispatchToProps$9
    )(withErrorBoundary()(withTranslation()(PureActivationByAccount)));
    ActivationByAccount.displayName = "ActivationByAccount";
    const activationComponentMap = {
      [ActivationType.Key]: ActivationByKey,
      [ActivationType.File]: ActivationByFile,
      [ActivationType.EBA]: ActivationByAccount
    };
    class PureActivation extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "state", {
          optionsShow: false
        });
        __publicField(this, "renderOptionsList", () => {
          const { t: t2, licenseStatus } = this.props;
          const missingLicense = licenseStatus !== PROTECTION_STATUS.GREEN;
          const optionsExpandButtons = !this.state.optionsShow ? /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$7, { onClick: () => this.setState({ optionsShow: true }), children: [
            "+ ",
            t2("IDUS_ACTIVATE_OPTIONS_SHOW")
          ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$7, { onClick: () => this.setState({ optionsShow: false }), children: [
            "- ",
            t2("IDUS_ACTIVATE_OPTIONS_HIDE")
          ] }) });
          return missingLicense ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            ActivationOptions,
            {
              headline: t2("IDUS_ACTIVATE_OPTIONS"),
              businessAccountReset: this.props.businessAccountReset,
              setRightSidebarLevel: this.props.setRightSidebarLevel,
              links: this.props.links,
              setActivationType: this.props.setActivationType
            }
          ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              PanelExpander,
              {
                id: "activation-show-hide",
                className: style$6.optionsCollapse,
                open: this.state.optionsShow,
                tooltip: false,
                withoutHeader: true,
                pureRendering: true,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  ActivationOptions,
                  {
                    headline: t2("IDUS_ACTIVATE_CHANGE_LICENSE_OPTIONS"),
                    links: this.props.links,
                    setRightSidebarLevel: this.props.setRightSidebarLevel,
                    setActivationType: this.props.setActivationType
                  }
                )
              }
            ),
            optionsExpandButtons
          ] });
        });
      }
      componentDidMount() {
        this.props.setRightSidebarLevel(!!this.props.activationType);
      }
      componentDidUpdate(prevProps) {
        if (prevProps.activationType !== this.props.activationType) {
          this.props.setRightSidebarLevel(!!this.props.activationType);
        }
        if (prevProps.responseCode !== this.props.responseCode && this.props.responseCode <= 0) {
          this.props.setRightSidebarLevel(false);
          this.props.setActivationType(null);
        }
        if (prevProps.rightSidebarLevel !== this.props.rightSidebarLevel) {
          this.props.businessAccountReset();
          this.props.resetActivationResult();
        }
      }
      componentWillUnmount() {
        this.props.setActivationType(null);
      }
      render() {
        const { debug } = this.props;
        if (this.props.rightSidebarLevel && this.props.activationType !== null) {
          const OpenedOption = activationComponentMap[this.props.activationType];
          return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(OpenedOption, {}) });
        }
        logGroup(
          "Activation",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(LicenseInfo, {}),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$h, { className: style$6.optionsSection, children: this.renderOptionsList() })
        ] });
      }
    }
    const mapDispatchToProps$8 = {
      resetActivationResult,
      businessAccountReset,
      setActivationType,
      setRightSidebarLevel
    };
    const mapStateToProps$7 = (state) => ({
      rightSidebarLevel: state.layout.content.rightSidebarLevel,
      responseCode: state.activation.responseCode,
      activationType: state.activation.activationType,
      licenseStatus: state.protectionStatus.groups.License.status,
      links: state.language.links
    });
    const Activation = withTranslation()(connect(mapStateToProps$7, mapDispatchToProps$8)(withErrorBoundary()(PureActivation)));
    Activation.displayName = "Activation";
    const underListSection = "_underListSection_uh4hj_1";
    const style$2 = {
      underListSection
    };
    const PureWatchdogStatusList = (props) => {
      const { t: t2 } = props;
      const location = useLocation();
      const contentKey = getRightContentByUrl(location.pathname) ?? "";
      const isFullyLoaded = useSelector(
        (state) => state.watchdog.statusesLoaded && state.watchdog.watchdogLoaded
      );
      const service = useSelector(
        (state) => state.watchdog.services.find((s) => s.group === contentKey) ?? {
          data: [],
          severity: EnumWorkingSeverity.CE_WORKING_SEVERITY_UNKNOWN
        }
      );
      const stateEnum = useSelector((state) => state.cfg.enums[Enums.EnumWorkingState]);
      const watchdogIsEnabled = useSelector((state) => state.watchdog.isEnabled);
      const tilesData = reactExports.useMemo(
        () => (!isFullyLoaded ? [] : service.data).map((s) => {
          if (s.State === EnumWorkingState.CE_WORKING_STATE_UNKNOWN) {
            return null;
          }
          if (s.key === PROTECTION_STATUS_SERVICE_KEY && s.originalProtectionStatuses) {
            const addedWatchdogStuff = s.originalProtectionStatuses.map((x) => ({
              ...x,
              ...STATUSES_FOR_WATCHDOG_INFO[x.id]
            }));
            return {
              ...processStatusesForSidebar(processProtectionStatusesIntoGroups(addedWatchdogStuff, t2))[0],
              title: t2("IDUS_WATCHDOG_TILE_GENERAL_STATUS")
            };
          }
          if (!watchdogIsEnabled) {
            return null;
          }
          let info;
          switch (s.State) {
            case EnumWorkingState.CE_WORKING_STATE_NOTWORKING: {
              info = t2("IDUS_WATCHDOG_SIDEBAR_GENERIC_NOT_WORKING");
              break;
            }
            case EnumWorkingState.CE_WORKING_STATE_DISABLED:
            case EnumWorkingState.CE_WORKING_STATE_WORKING:
            default: {
              info = "";
            }
          }
          const id2 = `${contentKey}-${s.key}`;
          return {
            id: id2,
            statusId: s.key,
            muted: !!s.muted,
            muteable: false,
            forced: false,
            info,
            title: s.Title,
            type: WatchdogServiceSeverityMap[s.Severity].type,
            actions: [],
            tags: stateEnum[s.State] ? [
              {
                id: `${s.key}-tag-state-${s.State}`,
                status: s.Severity,
                severity: 0,
                text: t2(stateEnum[s.State].label),
                type: TagType.EnumWorkingSeverity
              }
            ] : [],
            extraInfo: !!s.StateChangeDate || !!s.StateCheckDate ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
              !!s.StateChangeDate && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-2", id: `${id2}-last-change`, children: sprintf(
                t2("IDUS_WATCHDOG_TILE_SINCE_TIME"),
                getLocalizedTime(s.StateChangeDate, OUR_DATETIME_SHORT)
              ) }),
              !!s.StateCheckDate && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-1", id: `${id2}-last-check`, children: sprintf(
                t2("IDUS_WATCHDOG_TILE_SINCE_CHECK"),
                getLocalizedTime(s.StateCheckDate, OUR_DATETIME_SHORT)
              ) })
            ] }) : void 0
          };
        }).filter((x) => x),
        [service, contentKey, stateEnum, t2, watchdogIsEnabled, isFullyLoaded]
      );
      logGroup(
        "WatchdogStatusList",
        [
          ["service", service],
          ["stateEnum", stateEnum],
          ["tilesData", tilesData],
          ["isFullyLoaded", isFullyLoaded]
        ],
        void 0,
        props.debug
      );
      if (isFullyLoaded && tilesData.length === 0) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: routes$1.notFound404 });
      }
      if (!isFullyLoaded) {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "my-5 mx-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, {}) });
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        tilesData.map((tile2, i) => /* @__PURE__ */ reactExports.createElement(StatusItem, { ...tile2, separator: i !== 0, key: tile2.id })),
        watchdogIsEnabled && tilesData.length < service.data.length && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-2 py-4", className: [style$r.topDivider, style$2.underListSection].join(" "), children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { align: "center", children: t2("IDUS_WATCHDOG_SIDEBAR_SKIPPED_UNKNOWN") }) }),
        !watchdogIsEnabled && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-2 py-4", className: [style$r.topDivider, style$2.underListSection].join(" "), children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { align: "center", children: t2("IDUS_WATCHDOG_SIDEBAR_DISABLED_WATCHDOG") }) })
      ] });
    };
    const WatchdogStatusList = withErrorBoundary()(withTranslation()(PureWatchdogStatusList));
    WatchdogStatusList.displayName = "WatchdogStatusList";
    const dynamicSettings = {
      [CONTENT_KEYS.PROTECTION_STATUS]: { ...OVERVIEW_PROTECTION, content: ProtectionStatusList },
      [CONTENT_KEYS.MODULES_UPDATE]: { ...OVERVIEW_MODULES, content: Update },
      [CONTENT_KEYS.PRODUCT_UPDATE]: { ...OVERVIEW_PCU, content: ProductUpdate },
      [CONTENT_KEYS.LICENSE]: { ...OVERVIEW_LICENSE, content: Activation }
    };
    const watchdogSettings = {};
    Object.entries(WatchdogGroup).forEach(([key, value]) => {
      watchdogSettings[value] = {
        ...WatchdogContentSettings[value],
        ...WatchdogMenuItems[`Overview${key}`],
        content: WatchdogStatusList
      };
    });
    const allSettings = {
      ...dynamicSettings,
      ...watchdogSettings
    };
    const SIDEBAR_CONTENT = combineContentSettings(allSettings);
    const id = "right-sidebar";
    const PureRightSidebarWithContent = (props) => {
      const { t: t2 } = useTranslation();
      const location = useLocation();
      const navigate = useNavigate();
      const { feedback, rightSidebarOpen, setRightSidebarLevel: setRightSidebarLevelFn, rightSidebarLevel } = props;
      const contentKey = getRightContentByUrl(location.pathname) ?? "";
      const matchingContent = SIDEBAR_CONTENT[contentKey] ?? {};
      const SidebarContentComponent = matchingContent.content;
      const closeWithUrl = reactExports.useCallback(() => {
        props.updateLayoutRightSidebar(false);
        navigate(matchingContent.parentLink);
      }, [matchingContent]);
      reactExports.useEffect(() => onTransitionEndEffect(id, props.updateLayoutRightSidebarComplete, void 0, true));
      let header2 = /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: matchingContent.title, children: t2(matchingContent.title) });
      if (rightSidebarLevel) {
        header2 = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$16,
            {
              size: 24,
              onClick: () => setRightSidebarLevelFn(false),
              display: "inline-block",
              style: { verticalAlign: "middle" },
              className: style$a.headlineBack
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pl-1", className: style$a.headlineText, children: header2 })
        ] });
      }
      header2 = /* @__PURE__ */ jsxRuntimeExports.jsx(
        Headline,
        {
          id: "right-sidebar-headline",
          type: "h2",
          bottomMargin: false,
          className: rightSidebarLevel ? style$a.headline : style$a.headlineText,
          children: header2
        }
      );
      const switchRightSidebar = (link) => navigate(props.switchRightSidebar(link, matchingContent.link, matchingContent.parentLink));
      logGroup(
        "RightSidebarWithContent",
        [
          ["props", props],
          ["feedback", feedback],
          ["rightSidebarOpen", rightSidebarOpen]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$$, { onClose: closeWithUrl, headline: header2, className: style$a.rightSidebar, id, children: matchingContent.content && /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarContentComponent, { switchRightSidebar }) });
    };
    const mapDispatchToProps$7 = {
      updateLayoutRightSidebar,
      updateLayoutRightSidebarComplete,
      setRightSidebarLevel
    };
    const mapStateToProps$6 = (state) => ({
      rightSidebarLevel: state.layout.content.rightSidebarLevel,
      feedback: state.layout.modals.feedback,
      rightSidebarOpen: state.layout.content.rightSidebar
    });
    const RightSidebarWithContent = withErrorBoundary()(
      connect(mapStateToProps$6, mapDispatchToProps$7)(PureRightSidebarWithContent)
    );
    RightSidebarWithContent.displayName = "RightSidebarWithContent";
    const content = "_content_qz57y_1";
    const style$1 = {
      content
    };
    class PureScanErrorModal extends React.Component {
      componentDidUpdate(prevProps) {
        if (prevProps.error !== this.props.error && this.props.error && this.props.errorGlobal) {
          let buttons = [
            {
              id: "scan_error_ok",
              text: this.props.t("IDUS_OK"),
              type: "primary",
              onClick: () => {
                this.props.closeGlobalModal();
              }
            }
          ];
          if (this.props.error.activity === ErrorType.NEW_SCAN) {
            buttons = [
              {
                id: "scan_error_events",
                text: this.props.t("IDUS_STATUS_ACTION_EVENTS"),
                type: "secondary",
                onClick: () => {
                  this.props.navigate(EVENTS.link);
                  this.props.closeGlobalModal();
                }
              },
              ...buttons
            ];
          }
          this.props.showGlobalModal(
            "error",
            ErrorType$1.scan.title[this.props.error.activity],
            this.props.t(ErrorType$1.scan.desc[this.props.error.activity]) ?? "",
            buttons
          );
          this.props.resetScanError();
        }
      }
      render() {
        logGroup(
          "ScanErrorModal",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        return null;
      }
    }
    const mapDispatchToProps$6 = {
      resetScanError,
      showGlobalModal: showModal,
      closeGlobalModal: showNextModal
    };
    const mapStateToProps$5 = (state) => ({
      error: state.scans.error,
      errorGlobal: state.scans.errorGlobal
    });
    const ScanErrorModal = withNavigate(withTranslation()(connect(mapStateToProps$5, mapDispatchToProps$6)(PureScanErrorModal)));
    ScanErrorModal.displayName = "ScanErrorModal";
    class PureConnectionLimit extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "refresh", () => {
          removeSocketTransportInfo(this.props.socketId);
          window.location.reload();
        });
        __publicField(this, "getContent", () => {
          const { t: t2, type, pluralType, overallTabsLimit, pollingLimit } = this.props;
          switch (type) {
            case "polling":
              return pluralize(t2("IDUS_CONNECTIONS_LIMIT_POLLING"), pollingLimit, pluralType);
            case "tabs":
              return pluralize(t2("IDUS_CONNECTIONS_LIMIT_TABS"), overallTabsLimit, pluralType);
            case "conf":
              return t2(ERROR_MESSAGE_MAPPING[PerseusErrors.PERSEUS_E_RESOURCE_ALLOC]);
            default:
              return null;
          }
        });
      }
      componentDidUpdate(oldProps) {
        if (this.props.socketId !== oldProps.socketId || this.props.socketProtocol !== oldProps.socketProtocol) {
          this.props.triggerSocketCleanup();
        }
      }
      render() {
        const { type, t: t2 } = this.props;
        logGroup("ConnectionLimit", [["props", this.props]], void 0, this.props.debug);
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(
          ConfirmationModal,
          {
            id: "connection-limit-error-modal",
            show: !!type,
            type: "error",
            message: t2("IDUS_CONNECTIONS_LIMIT_TITLE"),
            buttons: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                default_1$f,
                {
                  id: "button-try-again",
                  onClick: this.refresh,
                  text: t2("IDUS_TRY_AGAIN"),
                  type: "primary"
                },
                "try-again"
              )
            ],
            onClose: this.refresh,
            onKeyEsc: this.refresh,
            children: [
              this.getContent(),
              " ",
              t2("IDUS_CONNECTIONS_LIMIT_ACTION_TEXT")
            ]
          }
        );
      }
    }
    const mapDispatchToProps$5 = {
      triggerSocketCleanup
    };
    const mapStateToProps$4 = (state) => ({
      socketId: state.utils.socketId,
      socketProtocol: state.utils.socketProtocol,
      overallTabsLimit: state.config.overallTabsLimit,
      pollingLimit: state.config.pollingLimit,
      pluralType: state.language.plural,
      type: state.layout.modals.connectionLimit
    });
    const ConnectionLimit = withTranslation()(connect(mapStateToProps$4, mapDispatchToProps$5)(PureConnectionLimit));
    ConnectionLimit.displayName = "ConnectionLimit";
    const BadgeWatcher = (props) => {
      const { debug } = props;
      const watchdogServices = useSelector((state) => state.watchdog.services);
      const statusGroups = useSelector((state) => state.protectionStatus.groups);
      const dispatch = useDispatch();
      reactExports.useEffect(() => {
        const statusValues = Object.values(statusGroups).map((s) => s ? s.status : PROTECTION_STATUS.GREEN);
        const watchdogValues = watchdogServices.map((s) => s.severity);
        const countByLimits = (statusLimit, watchdogLimit) => statusValues.filter((v) => v === statusLimit).length + watchdogValues.filter((v) => v === watchdogLimit).length;
        const info = countByLimits(PROTECTION_STATUS.INFO, EnumWorkingSeverity.CE_WORKING_SEVERITY_INFO);
        const warning = countByLimits(PROTECTION_STATUS.YELLOW, EnumWorkingSeverity.CE_WORKING_SEVERITY_WARNING);
        const error = countByLimits(PROTECTION_STATUS.RED, EnumWorkingSeverity.CE_WORKING_SEVERITY_ERROR);
        const newBadges = {
          info,
          warning: warning > 0 ? info + warning : 0,
          error: error > 0 ? info + warning + error : 0
        };
        log(["BadgeWatcher recalculated", newBadges], void 0, debug);
        dispatch(setBadgeDataForMenu({ [STATUS_OVERVIEW.id]: newBadges }));
      }, [watchdogServices, statusGroups, dispatch, debug]);
      return null;
    };
    BadgeWatcher.displayName = "BadgeWatcher";
    const EnumLoader = (props) => {
      const { debug } = props;
      const winid = useSelector((state) => state.language.winid);
      const dispatch = useDispatch();
      reactExports.useEffect(() => {
        const loadedPaths = { "State.Plugins.Watchd.Services.OAScand.State": Enums.EnumWorkingState };
        dispatch(cfgGetEnums(loadedPaths, winid));
        log(["EnumLoader reloaded with language", winid], void 0, debug);
      }, [winid, dispatch, debug]);
      return null;
    };
    EnumLoader.displayName = "EnumLoader";
    const PureLoggingRedirect = (props) => {
      const location = useLocation();
      reactExports.useEffect(() => {
        props.logInvalidUrl(location.pathname);
      });
      logGroup(
        "LoggingRedirect",
        [
          ["to", props.to],
          ["location", location]
        ],
        void 0,
        props.debug
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: props.to });
    };
    const mapDispatchToProps$4 = {
      logInvalidUrl
    };
    const LoggingRedirect = connect(null, mapDispatchToProps$4)(PureLoggingRedirect);
    LoggingRedirect.displayName = "LoggingRedirect";
    const withCurrentPath = (Component) => (props) => {
      const currentPathProps = useCurrentPath();
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...props, ...currentPathProps });
    };
    const PureOnboardingWelcome = (props) => {
      const challenge = useSelector((state) => state.activation.challenge);
      const activationInProgress = useSelector((state) => state.activation.active.activation);
      const productActivationStatus = useSelector((state) => state.protectionStatus.groups.License.status);
      const notActivatedProduct = reactExports.useMemo(
        () => productActivationStatus === PROTECTION_STATUS.RED,
        [productActivationStatus]
      );
      const winid = useSelector((state) => state.language.winid);
      const dispatch = useDispatch();
      const { t: t2 } = useTranslation();
      const navigate = useNavigate();
      const [displayActivation, setDisplayActivation] = reactExports.useState(null);
      const [key, setKey] = reactExports.useState("");
      const keyValidation = hooks.useFormSingleValidation(key, activationKeyValidation(t2));
      const activationDisabled = !!keyValidation.hasError || key.length === 0;
      const activate = reactExports.useCallback(() => dispatch(activationByKey({ key, lang: winid })), [winid, key, dispatch]);
      reactExports.useEffect(() => {
        if (challenge) {
          navigate(routes$1.overviewLicense);
          dispatch(setActivationType(ActivationType.Key));
          dispatch(toggleWelcome(false));
        }
      }, [challenge]);
      reactExports.useEffect(() => {
        if (displayActivation === null && productActivationStatus !== PROTECTION_STATUS.UNKNOWN) {
          setDisplayActivation(notActivatedProduct);
        }
      }, [productActivationStatus, displayActivation, notActivatedProduct, dispatch]);
      logGroup(
        "OnboardingWelcome",
        [
          ["challenge", challenge],
          ["activationInProgress", activationInProgress],
          ["productActivationStatus", productActivationStatus],
          ["winid", winid],
          ["key", key],
          ["keyValidation", keyValidation]
        ],
        void 0,
        props.debug
      );
      const validationError = keyValidation.hasError && keyValidation.validationText && /* @__PURE__ */ jsxRuntimeExports.jsx(ValidationError, { children: keyValidation.validationText });
      const productTourTile = {
        title: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_TITLE"), pkgid.product_info_long),
        icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$17, {}),
        texts: [
          sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_DESC_PARAG1"), pkgid.product_info_short),
          t2("IDUS_ONBOARDING_PRODUCT_TOUR_DESC_PARAG2")
        ],
        button: {
          id: "onboarding-product-tour",
          text: t2("IDUS_ONBOARDING_PRODUCT_TOUR_BTN"),
          onClick: () => {
            if (!notActivatedProduct) {
              props.sendFreshFlag();
            }
            dispatch(toggleWelcome(false));
            dispatch(toggleProductTour(true));
          }
        }
      };
      const tiles = [productTourTile];
      if (notActivatedProduct) {
        const licenseTile = {
          title: t2("IDUS_LICENSE_KEY_ACTIVATE"),
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$11, {}),
          texts: [t2("IDUS_ONBOARDING_DESC_LICENSE_PARAG1"), t2("IDUS_ONBOARDING_DESC_LICENSE_PARAG2")],
          customContent: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { style: { width: "265px" }, type: "mt-4", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$q,
              {
                autoFocus: true,
                id: "onboarding-license-key",
                type: "text",
                value: key,
                placeholder: t2("IDUS_LICENSE_KEY"),
                onChange: setKey,
                onEnterPress: !activationDisabled ? activate : void 0,
                ...keyValidation
              }
            ),
            validationError,
            /* @__PURE__ */ jsxRuntimeExports.jsx(ValidationError, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivationError, { simplified: true }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              ActivationButton,
              {
                id: "onboarding-activation-by-key-submit",
                onClick: activate,
                disabled: activationDisabled,
                loading: activationInProgress
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$7,
              {
                id: "onboarding-other-options-link",
                onClick: () => {
                  dispatch(setActivationType(null));
                  navigate(routes$1.overviewLicense);
                  props.sendFreshFlag();
                  dispatch(toggleWelcome(false));
                },
                children: t2("IDUS_ONBOARDING_OTHER_OPTIONS")
              }
            ) })
          ] })
        };
        tiles.push(licenseTile);
      } else if (displayActivation) {
        tiles.push({
          title: t2("IDUS_ACTIVATION_STATUS_TRUE"),
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconStatusOk, {})
        });
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$18,
        {
          testDataLabel: "welcome-window-modal",
          show: true,
          disableFocusHelper: true,
          skip: {
            id: "onboarding-welcome-skip",
            text: t2("IDUS_ONBOARDING_SKIP").toLocaleUpperCase(),
            onClick: () => {
              props.sendFreshFlag();
              dispatch(toggleWelcome(false));
            }
          },
          subTitle: [t2("IDUS_ONBOARDING_DESC_PARAG1"), t2("IDUS_ONBOARDING_DESC_PARAG2")],
          tiles,
          title: sprintf(t2("IDUS_ONBOARDING_TITLE"), pkgid.product_info_long)
        }
      );
    };
    const OnboardingWelcome = withErrorBoundary()(PureOnboardingWelcome);
    OnboardingWelcome.displayName = "OnboardingWelcome";
    const PureUrlHandler = (props) => {
      const location = useLocation();
      const { feedback, clickableGroups } = props;
      const contentKey = getRightContentByUrl(location.pathname) ?? "";
      const matchingContent = SIDEBAR_CONTENT[contentKey] ?? {};
      const SidebarContentComponent = matchingContent.content;
      reactExports.useEffect(() => {
        const contentKeyExists = !!contentKey;
        const hiddenContentByWatchdog = Object.keys(watchdogSettings).includes(contentKey) && !clickableGroups.includes(contentKey);
        const noContent = !SidebarContentComponent || feedback;
        props.updateLayoutRightSidebar(!noContent && !hiddenContentByWatchdog && contentKeyExists);
      }, [contentKey, clickableGroups, feedback]);
      return null;
    };
    const mapDispatchToProps$3 = {
      updateLayoutRightSidebar
    };
    const mapStateToProps$3 = (state) => ({
      feedback: state.layout.modals.feedback,
      clickableGroups: state.watchdog.clickableGroups
    });
    const UrlHandler = withErrorBoundary()(connect(mapStateToProps$3, mapDispatchToProps$3)(PureUrlHandler));
    UrlHandler.displayName = "UrlHandler";
    const NotFound = () => {
      const { t: t2 } = useTranslation();
      const { HELP_LINK, FORUM_LINK, KB_LINK } = useSelector((state) => state.language.links);
      const redirectTo = reactExports.useCallback(
        (url) => () => {
          window.open(url);
        },
        []
      );
      const linksArray = reactExports.useMemo(
        () => [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$7,
            {
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(IconSymbolHelp, { size: 20 }),
              id: "404-help-link",
              onClick: redirectTo(HELP_LINK),
              text: t2("IDUS_ERROR_404_HELP")
            },
            "404-help-link"
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$7,
            {
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$19, { size: 20 }),
              id: "404-kb-link",
              onClick: redirectTo(KB_LINK),
              text: t2("IDUS_MENU_KNBASE_ON_WEB")
            },
            "404-kb-link"
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$7,
            {
              icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$1a, { size: 20 }),
              id: "404-forum-link",
              onClick: redirectTo(FORUM_LINK),
              text: t2("IDUS_ERROR_404_FORUM")
            },
            "404-forum-link"
          )
        ],
        [t2, HELP_LINK, FORUM_LINK, KB_LINK, redirectTo]
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$1b,
        {
          bottomText: "",
          headline: t2("IDUS_ERROR_404_TITLE"),
          links: linksArray,
          logo: null,
          text: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { align: "center", noMargin: true, children: t2("IDUS_ERROR_404_TEXT") }),
          type: "error"
        }
      );
    };
    const tourDashboard = "/assets/tour-dashboard-4994edcf.png";
    const tourDetections = "/assets/tour-detections-9349fd23.png";
    const tourHelp = "/assets/tour-help-2d661883.png";
    const tourScans = "/assets/tour-scans-c1e466b5.png";
    const tourScanDetail = "/assets/tour-scan-detail-1afd1057.png";
    const tourScanDetections = "/assets/tour-scan-detections-afdba933.png";
    const tourStatusOverview = "/assets/tour-status-overview-156d735f.png";
    const tourAutoupdates = "/assets/tour-autoupdates-ce23797a.png";
    const tourFilteredWeb = "/assets/tour-filtered-web-43a5c8dd.png";
    const tourFilteredWebMenu = "/assets/tour-filtered-web-menu-dccee1b9.png";
    const IMAGE_SIZES = [521, 505];
    const productTourTheme = {
      Modal: {
        maxHeight: "min(700px, 90%)",
        maxWidth: "min(1000px, 90%)"
      }
    };
    const PureProductTour = (props) => {
      const { isFreshInstall } = props;
      const { HELP_DASHBOARD, HELP_DETECTIONS, HELP_STATUS_OVERVIEW, HELP_SCANS, HELP_AUTOUPDATES, HELP_WAP } = useSelector(
        (state) => state.language.links
      );
      const notActivatedProduct = useSelector(
        (state) => state.protectionStatus.groups.License.status === PROTECTION_STATUS.RED
      );
      const dispatch = useDispatch();
      const { t: t2 } = useTranslation();
      const closeProductTour = reactExports.useCallback(() => {
        dispatch(toggleProductTour(false));
        if (notActivatedProduct && isFreshInstall) {
          dispatch(toggleWelcome(true));
        }
      }, [dispatch, notActivatedProduct, isFreshInstall]);
      logGroup("ProductTour", [["props", props]], void 0, props.debug);
      const mark = reactExports.useCallback(
        (dataImages) => (content2, key) => /* @__PURE__ */ jsxRuntimeExports.jsx("mark", { "data-images": dataImages, children: content2 }, key),
        []
      );
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: productTourTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$1c,
        {
          testDataLabel: "product-tour-modal",
          backButton: {
            id: "product-tour-back",
            text: t2("IDUS_BACK")
          },
          finishButton: {
            id: "product-tour-finish",
            text: t2("IDUS_FINISH"),
            onClick: closeProductTour
          },
          nextButton: {
            text: t2("IDUS_NEXT"),
            id: "product-tour-next"
          },
          onCancelled: closeProductTour,
          pages: [
            {
              sections: [
                {
                  title: t2("IDUS_DASHBOARD"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_DASHBOARD1") }, "dash1"),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_DASHBOARD2") }, "dash2"),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_DASHBOARD3") }, "dash3")
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_DASHBOARD")),
                    link: HELP_DASHBOARD
                  }
                }
              ],
              images: [tourDashboard],
              imageDimensions: IMAGE_SIZES
            },
            {
              sections: [
                {
                  title: t2("IDUS_THREATS"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_DETECTIONS1"),
                      { mark1: mark(1) },
                      "tour-detection-p1"
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_DETECTIONS2"),
                      { mark1: mark(1) },
                      "tour-detections-p2"
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_DETECTIONS3") }, "detections1")
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_THREATS")),
                    link: HELP_DETECTIONS
                  }
                },
                {
                  title: t2("IDUS_FILTERED_WEBSITES"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_FILTERED_WEBSITES1"),
                      { mark2: mark(2) },
                      "tour-wap-p2"
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_FILTERED_WEBSITES2"),
                      { mark3: mark(3) },
                      "tour-wap-p3"
                    ) })
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_STATUS_WAP_TITLE")),
                    link: HELP_WAP
                  }
                }
              ],
              images: [tourDetections, tourFilteredWeb, tourFilteredWebMenu],
              imageDimensions: IMAGE_SIZES
            },
            {
              sections: [
                {
                  title: t2("IDUS_SCANS"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_SCANS1"),
                      { mark1: mark(1) },
                      "tour-scans-p1"
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_SCANS2"),
                      { mark1: mark(1), mark2: mark(2) },
                      "tour-scans-p2"
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_SCANS3"),
                      { mark3: mark(3) },
                      "tour-scans-p3",
                      void 0,
                      void 0,
                      { gt: ">" }
                    ) })
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_SCANS")),
                    link: HELP_SCANS
                  }
                }
              ],
              images: [tourScans, tourScanDetail, tourScanDetections],
              imageDimensions: IMAGE_SIZES
            },
            {
              sections: [
                {
                  title: t2("IDUS_STATUS_OVERVIEW"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_STATUS_OVERVIEW1") }, "onboard1"),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, { children: t2("IDUS_ONBOARDING_PRODUCT_TOUR_STATUS_OVERVIEW2") }, "onboard2")
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_STATUS_OVERVIEW")),
                    link: HELP_STATUS_OVERVIEW
                  }
                }
              ],
              images: [tourStatusOverview],
              imageDimensions: IMAGE_SIZES
            },
            {
              sections: [
                {
                  title: t2("IDUS_AUTOUPDATES"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_AUTOUPDATES"), pkgid.product_info_long),
                      { mark1: mark(1) },
                      "tour-autoupdates-p1"
                    ) })
                  ],
                  learnMore: {
                    text: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP"), t2("IDUS_AUTOUPDATES")),
                    link: HELP_AUTOUPDATES
                  }
                },
                {
                  title: t2("IDUS_MENU_HELP"),
                  paragraphs: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: translateHtmlInTemplate(
                      t2("IDUS_ONBOARDING_PRODUCT_TOUR_HELP_INFO"),
                      { mark2: mark(2) },
                      "tour-help-p1"
                    ) })
                  ]
                }
              ],
              images: [tourAutoupdates, tourHelp],
              imageDimensions: IMAGE_SIZES
            }
          ],
          pagingStatus: (currentPage, totalPages) => sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_PAGE"), currentPage + 1, totalPages),
          title: sprintf(t2("IDUS_ONBOARDING_PRODUCT_TOUR_MODAL_TITLE"), pkgid.product_info_short)
        }
      ) });
    };
    const ProductTour = withErrorBoundary()(PureProductTour);
    ProductTour.displayName = "ProductTour";
    const EULA_MODAL_STATUSES = [EnumAppEulaStatus.CE_EULA_STATUS_NOTIFY_USER, EnumAppEulaStatus.CE_EULA_STATUS_MUST_ACCEPT];
    const PCUEulaWatcher = (props) => {
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const [timerId, setTimerId] = reactExports.useState();
      const [notifyOverrideToClosed, setNotifyOverrideToClosed] = reactExports.useState({
        flag: false,
        storedEulaTag: "",
        storedEulaVersion: ""
      });
      const { POLICY_LINK } = useSelector((state) => state.language.links);
      const eulaInfo = useSelector((state) => state.pcu.AvailableEulaUpdate);
      const { checking, updating, accepting } = useSelector((state) => state.pcu.backendRunningActions);
      const moduleUpdating = useSelector((state) => state.update.updating);
      useCE([
        {
          path: "State.Plugins.PCU",
          callback: (value) => dispatch(pcuUpdateState(value))
        },
        {
          path: "Settings.Updater.AutoUpdates.Enabled",
          callback: (value) => dispatch(pcuAutoupdatesFlag(value))
        },
        {
          path: "Runtime.Plugins.PCU.State",
          callback: (value) => dispatch(updateRunningActions(value))
        },
        {
          path: "Runtime.Plugins.Updated.State",
          callback: (value) => dispatch(setUpdatedRuntime(value))
        }
      ]);
      const { EulaStatus, EulaUrl, EulaNotify, EulaTag = "", EulaVersion = "" } = eulaInfo ?? {};
      const fakeCloseEulaIfNeeded = reactExports.useCallback(
        (tag, version2) => {
          if (checking || updating || accepting || moduleUpdating) {
            setNotifyOverrideToClosed({ flag: true, storedEulaTag: tag, storedEulaVersion: version2 });
          }
        },
        [checking, updating, accepting, moduleUpdating]
      );
      const acceptEula = reactExports.useCallback(() => {
        dispatch(notifyAboutEula(EulaTag, EulaVersion));
        fakeCloseEulaIfNeeded(EulaTag, EulaVersion);
      }, [dispatch, EulaTag, EulaVersion, fakeCloseEulaIfNeeded]);
      const nofifyOfSeenEula = reactExports.useCallback(() => {
        dispatch(notifyAboutEula(EulaTag, EulaVersion, false));
        fakeCloseEulaIfNeeded(EulaTag, EulaVersion);
      }, [dispatch, EulaTag, EulaVersion, fakeCloseEulaIfNeeded]);
      reactExports.useEffect(() => {
        if (notifyOverrideToClosed.flag) {
          if (!EulaNotify || notifyOverrideToClosed.storedEulaTag !== EulaTag || notifyOverrideToClosed.storedEulaVersion !== EulaVersion) {
            if (timerId) {
              clearTimeout(timerId);
              setTimerId(void 0);
            }
            setNotifyOverrideToClosed({ flag: false, storedEulaTag: "", storedEulaVersion: "" });
          } else if (!checking && !updating && !accepting && !moduleUpdating) {
            const id2 = setTimeout(
              () => setNotifyOverrideToClosed({ flag: false, storedEulaTag: "", storedEulaVersion: "" }),
              2e3
            );
            setTimerId(id2);
          } else if (timerId) {
            clearTimeout(timerId);
          }
        }
      }, [EulaNotify, EulaVersion, EulaTag, checking, updating, accepting, moduleUpdating]);
      const modalInfo = reactExports.useMemo(() => {
        switch (EulaStatus) {
          case EnumAppEulaStatus.CE_EULA_STATUS_MUST_ACCEPT:
            return {
              title: "IDUS_PCU_EULA_MAJOR_TITLE",
              desc2: "IDUS_PCU_EULA_MAJOR_DESC2",
              buttonTitle: "IDUS_ACCEPT",
              cancelCallback: nofifyOfSeenEula
            };
          case EnumAppEulaStatus.CE_EULA_STATUS_NOTIFY_USER:
            return {
              title: "IDUS_PCU_EULA_MINOR_TITLE",
              desc2: "IDUS_PCU_EULA_MINOR_DESC2",
              buttonTitle: "IDUS_DONE",
              cancelCallback: acceptEula
            };
          default:
            return null;
        }
      }, [EulaStatus, nofifyOfSeenEula, acceptEula]);
      const shouldShowModal = !notifyOverrideToClosed.flag && EulaNotify && EulaStatus && EULA_MODAL_STATUSES.includes(EulaStatus);
      logGroup(
        "PCUEulaWatcher",
        [
          ["Eula Info", eulaInfo],
          ["Policy Link", POLICY_LINK],
          ["Modal Info", modalInfo],
          ["shouldShowModal", shouldShowModal],
          ["notifyOverrideToClosed", notifyOverrideToClosed],
          ["running flags", !checking, !updating, !accepting, !moduleUpdating]
        ],
        void 0,
        props.debug
      );
      return modalInfo && shouldShowModal ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
        ConfirmationModal,
        {
          id: "changed-eula-modal",
          show: true,
          type: "info",
          message: t2(modalInfo.title),
          buttons: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$f,
              {
                id: "eula-ok-btn",
                onClick: acceptEula,
                text: t2(modalInfo.buttonTitle),
                type: "primary"
              },
              "eula-ok-btn"
            )
          ],
          onClose: modalInfo.cancelCallback,
          onKeyEsc: modalInfo.cancelCallback,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { spacer: "pb-3", children: sprintf(t2("IDUS_PCU_EULA_DESC1"), pkgid.product_info_long) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(PlainText, { spacer: "pb-3", children: insertHtmlToTemplate(sprintf(t2(modalInfo.desc2), pkgid.product_info_long), {
              eulalink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { text: t2("IDUS_EULA"), onClick: () => openInTabAndFocus(EulaUrl) }),
              pplink: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { text: t2("IDUS_PRIVACY_POLICY"), onClick: () => openInTabAndFocus(POLICY_LINK) })
            }) })
          ]
        }
      ) : null;
    };
    PCUEulaWatcher.displayName = "PCUEulaWatcher";
    const UNDETERMINED_FEAT = "Undetermined";
    const autoupdatesPic = "/assets/auto-updates-info-49ad2131.png";
    const wapPic = "/assets/wap-info-2d29c159.png";
    const getFeatureInfo = (key, version2, featureEnabled, title, content2, setupLink, helpText, helpKey, picture) => ({
      sinceVersion: version2,
      dependencies: (state) => ({
        helpLink: state.language.links[helpKey],
        enabled: featureEnabled(state)
      }),
      hasContent: (featureData) => featureData.enabled === null ? UNDETERMINED_FEAT : !!featureData.enabled,
      content: (t2, openSetup, style2, conditionData) => ({
        title: t2(title),
        buttonsLeft: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            default_1$7,
            {
              className: style$r.linkWithButtons,
              id: "features-info-config-btn",
              onClick: () => openSetup(setupLink.link),
              text: t2(setupLink.text)
            },
            "features-info-config-btn"
          )
        ],
        content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$1d, { src: picture, scale: "fit", className: style2.image }) }, `${key}-pic`),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-4", children: content2.map((c) => /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { className: style2.description, align: "center", children: t2(c) }, c)) }, `${key}-desc`),
          /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$7, { onClick: () => openInTabAndFocus(conditionData.helpLink), text: t2(helpText) }) }, `${key}-help`)
        ] })
      })
    });
    const defaultFeatureDefinitions = {
      [
        "AutoUpdates"
        /* AutoUpdates */
      ]: getFeatureInfo(
        "au",
        [9, 1, 0, 0],
        (state) => state.pcu.autoupdatesFlag,
        "IDUS_NEW_FEATURE_AU_TITLE",
        ["IDUS_NEW_FEATURE_AU_DESC"],
        { text: "IDUS_NEW_FEATURE_AU_CONFIG", link: SETUP_SCREEN_URLS.UPDATE },
        "IDUS_NEW_FEATURE_AU_HELP",
        "HELP_AUTOUPDATES",
        autoupdatesPic
      ),
      [
        "WAP"
        /* WAP */
      ]: getFeatureInfo(
        "wap",
        [10, 1, 0, 0],
        (state) => state.websites.enabled,
        "IDUS_NEW_FEATURE_WAP_TITLE",
        ["IDUS_NEW_FEATURE_WAP_DESC_1", "IDUS_NEW_FEATURE_WAP_DESC_2", "IDUS_NEW_FEATURE_WAP_DESC_3"],
        { text: "IDUS_NEW_FEATURE_WAP_CONFIG", link: SETUP_SCREEN_URLS.WAP },
        "IDUS_NEW_FEATURE_WAP_HELP",
        "HELP_WAP",
        wapPic
      )
    };
    const image = "_image_k6tu4_1";
    const description = "_description_k6tu4_5";
    const style = {
      image,
      description
    };
    const CURRENT_VERSION = pkgid.version;
    const PureFeatureInfos = (props) => {
      const { featureDefinitions: propFeatureDefinitions } = props;
      const featureDefinitions = reactExports.useMemo(
        () => ({ ...defaultFeatureDefinitions, ...propFeatureDefinitions }),
        [propFeatureDefinitions]
      );
      const defKeys = reactExports.useMemo(() => Object.keys(featureDefinitions), [featureDefinitions]);
      const [openedFeatureIndex, setOpenedFeatureIndex] = reactExports.useState(-1);
      const next = reactExports.useCallback(() => setOpenedFeatureIndex((i) => i + 1), []);
      const dispatch = useDispatch();
      const navigate = useNavigate();
      const { t: t2 } = useTranslation();
      const lastVersion = useCELocally(
        [
          {
            path: "State.Plugins.Webd.LastProcessedVersion",
            callback: (version2) => version2
          }
        ],
        null
      );
      const onCurrentVersion = lastVersion ? compareVersions(lastVersion, CURRENT_VERSION) : null;
      reactExports.useEffect(() => {
        setOpenedFeatureIndex(onCurrentVersion ? -1 : 0);
      }, [onCurrentVersion, lastVersion]);
      const closeModal = reactExports.useCallback(
        () => dispatch(cfgSetValues({ "State.Plugins.Webd.LastProcessedVersion": CURRENT_VERSION })),
        [dispatch]
      );
      const dataMapping = useSelector((state) => {
        const result = {};
        defKeys.forEach((key) => {
          result[key] = featureDefinitions[key].dependencies(state);
        });
        return result;
      }, compareObjectSelectors);
      const filteredFeatures = reactExports.useMemo(
        () => defKeys.map((feature) => {
          if (!lastVersion) {
            return UNDETERMINED_FEAT;
          }
          const def = featureDefinitions[feature];
          if (compareVersions(lastVersion, def.sinceVersion)) {
            return false;
          }
          const data2 = dataMapping[feature];
          const hasContent = def.hasContent(data2);
          return hasContent === true ? { def, data: data2 } : hasContent;
        }).filter((x) => x),
        // remove the ones that we know for sure should not be displayed
        [dataMapping, featureDefinitions, lastVersion, defKeys]
      );
      const someUndetermined = reactExports.useMemo(() => filteredFeatures.some((x) => x === UNDETERMINED_FEAT), [filteredFeatures]);
      const processedFeatures = reactExports.useMemo(
        () => someUndetermined ? [] : filteredFeatures.map((f, i) => {
          const openSetup = (url) => {
            if (i === filteredFeatures.length - 1) {
              closeModal();
              navigate(url);
            } else {
              navigate(url);
              next();
            }
          };
          return f.def.content(t2, openSetup, style, f.data);
        }),
        [t2, filteredFeatures, someUndetermined, closeModal, navigate, next]
      );
      const noMatchingFeatures = reactExports.useMemo(
        () => onCurrentVersion === false && !someUndetermined && filteredFeatures.length === 0,
        [onCurrentVersion, someUndetermined, filteredFeatures]
      );
      reactExports.useEffect(() => {
        if (noMatchingFeatures) {
          closeModal();
        }
      }, [closeModal, noMatchingFeatures]);
      logGroup(
        "FeatureInfos",
        [
          ["openedFeatureIndex", openedFeatureIndex],
          ["lastVersion", lastVersion],
          ["onCurrentVersion", onCurrentVersion],
          ["filteredFeatures", filteredFeatures],
          ["processedFeatures", processedFeatures],
          ["someUndetermined", someUndetermined],
          ["dataMapping", dataMapping]
        ],
        void 0,
        props.debug
      );
      if (someUndetermined || noMatchingFeatures || !!onCurrentVersion || openedFeatureIndex === -1) {
        return null;
      }
      const currentInfo = processedFeatures[openedFeatureIndex];
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        default_1$j,
        {
          id: "features-info-modal",
          show: true,
          buttons: [
            openedFeatureIndex === filteredFeatures.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "features-info-done-btn", onClick: closeModal, text: t2("IDUS_OK") }) : /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "features-info-next-btn", onClick: next, text: t2("IDUS_NEXT") })
          ],
          buttonsLeft: currentInfo.buttonsLeft,
          onClose: closeModal,
          onKeyEsc: closeModal,
          title: currentInfo.title,
          children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$r.centeredFlexCol, children: currentInfo.content })
        }
      );
    };
    const FeatureInfos = withErrorBoundary()(PureFeatureInfos);
    FeatureInfos.displayName = "FeatureInfos";
    const criterion = "_criterion_ia0uu_1";
    const criterionText = "_criterionText_ia0uu_6";
    const criterionIcon = "_criterionIcon_ia0uu_9";
    const styles = {
      criterion,
      criterionText,
      criterionIcon
    };
    const Criterion = (props) => {
      const { fulfilled, text, id: id2 } = props;
      logGroup("Criterion", [["props", props]], void 0, props.debug);
      const icon = fulfilled ? {
        icon: IconStatusOk,
        fill: colors.successBig,
        id: `${id2}-fulfilled`,
        size: 12
      } : {
        icon: default_1$1e,
        fill: "currentcolor",
        id: `${id2}-missing`,
        size: 6
      };
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "mt-1", id: id2, className: styles.criterion, style: { color: colors.text }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mr-1", className: styles.criterionIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(icon.icon, { ...icon }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.criterionText, children: text })
      ] });
    };
    const MIN_LENGTH = 10;
    const MAX_LENGTH = 160;
    const PasswordCriteria = (props) => {
      const { t: t2 } = useTranslation();
      const { minLength, lowercase, uppercase, number, special } = props.validation;
      logGroup("PasswordCriteria", [["props", props]], void 0, props.debug);
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "pass-criteria", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Criterion,
          {
            fulfilled: minLength,
            text: sprintf(t2("IDUS_CHANGE_PASSWORD_CRITERIA_LENGTH"), MIN_LENGTH),
            id: "pass-criteria-length"
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Criterion, { fulfilled: lowercase, text: t2("IDUS_CHANGE_PASSWORD_CRITERIA_LOWER"), id: "pass-criteria-lower" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Criterion, { fulfilled: uppercase, text: t2("IDUS_CHANGE_PASSWORD_CRITERIA_UPPER"), id: "pass-criteria-upper" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Criterion, { fulfilled: number, text: t2("IDUS_CHANGE_PASSWORD_CRITERIA_NUMBER"), id: "pass-criteria-number" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Criterion, { fulfilled: special, text: t2("IDUS_CHANGE_PASSWORD_CRITERIA_SPECIAL"), id: "pass-criteria-special" })
      ] });
    };
    const constraints = {
      currentPassword: {
        presence: {
          allowEmpty: false,
          message: () => ""
        }
      },
      newPassword: {
        presence: {
          allowEmpty: false,
          message: () => ""
        },
        length: {
          minimum: MIN_LENGTH,
          message: (val) => val.length > MAX_LENGTH ? "IDUS_CHANGE_PASSWORD_CRITERIA_TOO_LONG" : "",
          maximum: MAX_LENGTH
        }
      },
      confirmPassword: {
        presence: {
          allowEmpty: false,
          message: () => ""
        },
        equality: {
          attribute: "newPassword",
          message: "IDUS_CHANGE_PASSWORD_CRITERIA_EQUAL"
        }
      }
    };
    const customValidate = (newPassword) => ({
      minLength: newPassword.length >= MIN_LENGTH,
      lowercase: !!newPassword.match(/[a-z]/),
      uppercase: !!newPassword.match(/[A-Z]/),
      number: !!newPassword.match(/[0-9]/),
      special: !!newPassword.match(/[ ~!@#$%^&()[\]{}<>:;,.?/\\|\-'`"_+=*]/)
    });
    const getErrorMsg = (errors) => {
      if (!errors) {
        return void 0;
      }
      const clean = errors.filter((x) => x);
      return clean.length > 0 ? clean.join(". ") : void 0;
    };
    const ChangePasswordModal = (props) => {
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const { close } = props;
      const [currentPassword, setCurrentPassword] = reactExports.useState("");
      const [newPassword, setNewPassword] = reactExports.useState("");
      const [confirmPassword, setConfirmPassword] = reactExports.useState("");
      const { error, running } = useSelector((state) => state.auth.changePassword);
      const invalidPassword = error === "current-password-invalid";
      const genericValidation = hooks.useValidation({ currentPassword, newPassword, confirmPassword }, constraints, {
        fullMessages: false
      });
      const customValidation = reactExports.useMemo(() => customValidate(newPassword), [newPassword]);
      const { lowercase, uppercase, number, special } = customValidation;
      const hasCustomError = !(lowercase && uppercase && number && special);
      logGroup(
        "ChangePasswordModal",
        [
          ["props", props],
          ["genericValidation", genericValidation],
          ["customValidation", customValidation],
          ["Form values", currentPassword, newPassword, confirmPassword]
        ],
        void 0,
        props.debug
      );
      const validationTextNew = getErrorMsg(genericValidation == null ? void 0 : genericValidation.newPassword);
      const validationTextConfirm = getErrorMsg(genericValidation == null ? void 0 : genericValidation.confirmPassword);
      const saveDisabled = hasCustomError || !!(genericValidation == null ? void 0 : genericValidation.newPassword) || !!(genericValidation == null ? void 0 : genericValidation.confirmPassword) || !!(genericValidation == null ? void 0 : genericValidation.currentPassword);
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        default_1$j,
        {
          show: true,
          id: "change-password-modal",
          disableFocusHelper: true,
          title: t2("IDUS_CHANGE_PASSWORD"),
          onClose: close,
          onKeyEsc: close,
          buttons: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$f,
              {
                id: "save-changed-password-btn",
                text: t2("IDUS_SETUP_SAVE_BUTTON_SAVE"),
                onClick: () => {
                  dispatch(changePasswordAction(props.username, currentPassword, newPassword, confirmPassword));
                },
                loading: running,
                loadingText: t2("IDUS_SETUP_SAVE_BUTTON_SAVE"),
                disabled: !!saveDisabled,
                type: "primary"
              },
              "save-btn"
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$f,
              {
                id: "cancel-changed-password-btn",
                text: t2("IDUS_CANCEL"),
                onClick: close,
                type: "secondary"
              },
              "cancel-btn"
            )
          ],
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorMessage, { when: !!error, children: t2(ErrorType$1.auth.passwordChanging[error]) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                id: "old-password",
                labelText: t2("IDUS_CHANGE_PASSWORD_OLD"),
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "password", value: currentPassword, onChange: setCurrentPassword, autoFocus: true }),
                required: true,
                hasError: invalidPassword || !!(genericValidation == null ? void 0 : genericValidation.currentPassword),
                validationText: invalidPassword ? t2("IDUS_CHANGE_PASSWORD_INVALID") : void 0
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                id: "new-password",
                labelText: t2("IDUS_CHANGE_PASSWORD_NEW"),
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "password", value: newPassword, onChange: setNewPassword }),
                required: true,
                hasError: !newPassword || !!(genericValidation == null ? void 0 : genericValidation.newPassword),
                validationText: validationTextNew ? sprintf(t2(validationTextNew), MAX_LENGTH) : void 0
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$p,
              {
                id: "confirm-password",
                labelText: t2("IDUS_CHANGE_PASSWORD_CONFIRM"),
                content: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$q, { type: "password", value: confirmPassword, onChange: setConfirmPassword }),
                required: true,
                hasError: !confirmPassword || !!(genericValidation == null ? void 0 : genericValidation.confirmPassword),
                validationText: validationTextConfirm ? t2(validationTextConfirm) : void 0
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(PasswordCriteria, { validation: customValidation })
          ]
        }
      );
    };
    function useCEFlagLocally(path, initData = false) {
      const [isLocked, setIsLocked] = reactExports.useState(initData);
      const dispatch = useDispatch();
      reactExports.useEffect(() => {
        dispatch(cfgGetFlagsWithCallback(path, setIsLocked));
      }, []);
      return isLocked;
    }
    const Profile = (props) => {
      const { t: t2 } = useTranslation();
      const dispatch = useDispatch();
      const isPasswordLocked = useCEFlagLocally("Settings.Plugins.Authd.Simple.PasswordHash");
      const [changePasswordOpen, toggleChangePassword] = reactExports.useState(false);
      const username = useSelector((state) => state.auth.username ?? "");
      logGroup("Profile", [["props", props]], void 0, props.debug);
      const close = reactExports.useCallback(() => toggleChangePassword(false), [toggleChangePassword]);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MainPage,
        {
          title: t2("IDUS_PROFILE"),
          content: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1, { type: "px-2", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "pl-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Headline, { type: "h3", children: t2("IDUS_PROFILE_SECURITY_SETTINGS") }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "py-4", className: style$r.bottomDivider, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$D, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { className: style$r.middleRow, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 5, sm: 4, md: 3, xl: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$g, { fontWeight: "bold", children: t2("IDUS_PASSWORD") }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Column, { size: 7, sm: 8, md: 9, xl: 10, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: style$r.centeredFlex, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  default_1$f,
                  {
                    text: t2("IDUS_CHANGE_PASSWORD"),
                    onClick: () => {
                      dispatch(setPasswordChangeStatus(false));
                      toggleChangePassword(true);
                    },
                    type: "secondary",
                    disabled: isPasswordLocked
                  }
                ),
                isPasswordLocked && /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { type: "mx-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { tooltipContent: t2("IDUS_TOOLTIP_DISABLED_VIA_ESET_MC"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconActionLock, { size: 16, fill: colors.disabled }) }) })
              ] }) })
            ] }) }) }),
            changePasswordOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(ChangePasswordModal, { close, username })
          ] })
        }
      );
    };
    const activeFlag = {
      active: true,
      message: "",
      priority: 0,
      action: void 0,
      route: void 0
    };
    const missingModulesFlags = (areModulesMissing = true, priority = 5) => {
      const inactive = {
        active: false,
        message: "IDUS_FEATURE_INACTIVE_MISSING_MODULES",
        priority,
        action: "IDUS_FEATURE_INACTIVE_MISSING_MODULES_ACTION",
        route: routes$1.overviewModules
      };
      const affectedFeatures = [
        FEATURES.ON_DEMAND_SCAN,
        FEATURES.QUARANTINE_TABLE,
        FEATURES.SUBMIT_SAMPLE,
        FEATURES.REALTIME_PROTECTION,
        FEATURES.WAP
      ];
      const value = {};
      affectedFeatures.forEach((feature) => {
        value[feature] = areModulesMissing ? inactive : activeFlag;
      });
      return {
        type: FEATURES_ACTION_KEYS.FEATURES_MISSING_MODULES,
        value
      };
    };
    const FeatureFlagsWatcher = () => {
      const dispatch = useDispatch();
      useCE([
        {
          path: "State.Plugins.Updated.Modules.EM001.Build",
          callback: (value) => dispatch(missingModulesFlags(value === 0, 3))
        }
      ]);
      return null;
    };
    FeatureFlagsWatcher.displayName = "FeatureFlagsWatcher";
    const WapWatcher = () => {
      const dispatch = useDispatch();
      useCE([
        {
          path: "Settings.Plugins.Wapd.UrlLists",
          callback: (list) => dispatch(setUrlLists(list))
        },
        {
          path: "Settings.Plugins.Wapd.Protoscan.WebProtectionEnabled",
          callback: (enabled) => dispatch(setWapEnabled(enabled))
        }
      ]);
      return null;
    };
    WapWatcher.displayName = "WapWatcher";
    const routes = [...deepLinkRoutes, ...mainRoutes].filter((menuItem) => !!menuItem.link || !!menuItem.subItems);
    class PureLayout extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "registeredCallbacks");
        __publicField(this, "openRightSidebar", (link, currentLink, parentLink) => {
          const clickedOnOpen = link === currentLink && this.props.rightSidebar;
          this.props.updateLayoutRightSidebar(!clickedOnOpen);
          this.props.setRightSidebarLevel(false);
          return clickedOnOpen ? parentLink : link;
        });
        __publicField(this, "sendFreshFlag", () => {
          this.props.cfgSetValues({ "State.Plugins.Webd.IsFreshInstall": 0 });
        });
        __publicField(this, "renderRoute", (route) => {
          const currentExactRoute = this.props.currentPathname;
          const parentPath = HIERARCHY[this.props.currentPath];
          const openRightSidebar = (link) => this.openRightSidebar(link, currentExactRoute, parentPath);
          const parentRoute = parentPath ? this.state.routes.find((r2) => r2.link === parentPath) : void 0;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(route.component, { title: route.title, openRightSidebar, parentRoute });
        });
        this.state = {
          routes: getTranslatedMenu(routes, props.t)
        };
      }
      componentDidMount() {
        this.props.setUsername(getUser() ?? "");
        this.registeredCallbacks = cfgRegisterCallback(
          [
            {
              path: "State.Plugins.Webd.IsFreshInstall",
              callback: (value) => {
                const flag = value === 1;
                this.props.setFreshInstallFlag(flag);
                if (flag) {
                  this.props.toggleWelcome(true);
                }
              }
            }
          ],
          this.props.winid
        );
      }
      componentWillUnmount() {
        cfgUnregisterCallback(this.registeredCallbacks);
      }
      render() {
        logGroup(
          "Layout",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          this.props.debug
        );
        const routesList = [
          ...this.state.routes.map(
            (route) => route.subItems ? route.subItems.filter((r2) => !!r2.link).map((r2) => /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: r2.link, element: this.renderRoute(r2) }, r2.link)) : (route.combinedPaths ?? [route.link]).map((path) => /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path, element: this.renderRoute(route) }, route.title))
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Route,
            {
              path: `${STATUS_OVERVIEW.link}/*`,
              element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggingRedirect, { to: routes$1.notFound404 })
            },
            "status-overview-catch-all"
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: routes$1.about, element: /* @__PURE__ */ jsxRuntimeExports.jsx(About, {}) }, "about"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: routes$1.profile, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Profile, {}) }, "profile"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: routes$1.logout, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Logout, {}) }, "logout"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: routes$1.notFound404, element: /* @__PURE__ */ jsxRuntimeExports.jsx(NotFound, {}) }, "invalid-url"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/", element: /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: DEFAULT_PAGE.link }) }, "empty-path-redirect"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/*", element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggingRedirect, { to: routes$1.notFound404 }) }, "invalid-url-redirect")
        ];
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(
          default_1$1f,
          {
            header: /* @__PURE__ */ jsxRuntimeExports.jsx(Header, { wrapWithRouteConfirmation: this.props.wrapWithRouteConfirmation }),
            rightSidebar: /* @__PURE__ */ jsxRuntimeExports.jsx(RightSidebarWithContent, { switchRightSidebar: this.openRightSidebar }),
            rightSidebarOpen: this.props.rightSidebar,
            sidebar: /* @__PURE__ */ jsxRuntimeExports.jsx(MainSidebar, { wrapWithRouteConfirmation: this.props.wrapWithRouteConfirmation }),
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(LockScreen, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(AutoLogout, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(FeatureFlagsWatcher, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$1g, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(EnumLoader, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(StateListener, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(UrlHandler, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(PCUEulaWatcher, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(WapWatcher, {}),
              !this.props.isFreshInstall && /* @__PURE__ */ jsxRuntimeExports.jsx(FeatureInfos, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Feedback, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(SubmitSample, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(ScanErrorModal, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectionLimit, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(BadgeWatcher, {}),
              this.props.welcomeIsOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(OnboardingWelcome, { isFreshInstall: this.props.isFreshInstall, sendFreshFlag: this.sendFreshFlag }),
              this.props.productTourIsOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(ProductTour, { isFreshInstall: this.props.isFreshInstall }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style$1.content, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Routes, { children: routesList }) }) })
            ]
          }
        );
      }
    }
    const mapStateToProps$2 = (state) => ({
      rightSidebar: state.layout.content.rightSidebar,
      sidebar: state.layout.content.sidebar,
      isFreshInstall: state.layout.isFreshInstall,
      welcomeIsOpen: state.layout.modals.welcome,
      productTourIsOpen: state.layout.modals.productTour,
      winid: state.language.winid
    });
    const mapDispatchToProps$2 = {
      updateLayoutRightSidebar,
      setFreshInstallFlag,
      cfgSetValues,
      toggleWelcome,
      setUsername,
      setRightSidebarLevel
    };
    const Layout = withCurrentPath(withTranslation()(connect(mapStateToProps$2, mapDispatchToProps$2)(PureLayout)));
    Layout.displayName = "Layout";
    const LoginForm = (props) => {
      const { error } = props;
      const { FORGOTTEN_PASSWORD_LINK } = useSelector((state) => state.language.links);
      const submitted = useSelector((state) => state.auth.loginRequested);
      const { t: t2, i18n } = useTranslation();
      const dispatch = useDispatch();
      const currentLangKey = i18n.language;
      const handleSubmit = reactExports.useCallback(
        (username, password) => {
          if (!submitted) {
            dispatch(
              loginAction({
                auth_challenge_response: {
                  simple: {
                    username: username.toLowerCase(),
                    password
                  }
                }
              })
            );
          }
        },
        [submitted, dispatch]
      );
      logGroup(
        "Simple",
        [
          ["props", props],
          ["submitted", submitted],
          ["FORGOTTEN_PASSWORD_LINK", FORGOTTEN_PASSWORD_LINK],
          ["currentLangKey", currentLangKey]
        ],
        void 0,
        props.debug
      );
      return reactExports.useMemo(() => {
        const currentLanguage = langs$1.find((l) => currentLangKey === l.value);
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          default_1$1h,
          {
            id: "login-form",
            fullWidth: true,
            onLoginFormSubmit: handleSubmit,
            hasError: !!error,
            btnLogin: {
              text: t2("IDUS_LOG_IN"),
              id: "login-button"
            },
            btnChangePassword: {
              text: t2("IDUS_FORGOTTEN_PASSWORD"),
              onClick: () => {
                window.open(FORGOTTEN_PASSWORD_LINK);
              },
              id: "forgotten-password-button",
              hidePasswordForm: true
            },
            fieldUsername: {
              label: t2("IDUS_USERNAME"),
              id: "loginInputUsername",
              defaultValue: ""
            },
            fieldPassword: {
              id: "loginInputPassword",
              label: t2("IDUS_PASSWORD"),
              defaultValue: ""
            },
            fieldLanguage: {
              id: "loginInputLanguage",
              value: currentLanguage,
              onChange: changeToSelectedLanguageEverywhere,
              options: langs$1
            },
            fieldAllowSession: {
              hidden: true
            },
            fieldLogIntoDomain: {
              hidden: true
            }
          }
        );
      }, [currentLangKey, t2, FORGOTTEN_PASSWORD_LINK, handleSubmit, error]);
    };
    LoginForm.displayName = "LoginForm";
    const bgSmall = "/assets/bgSmall-5df3a5df.jpg";
    const bgMedium = "/assets/bgMedium-6c85d87e.jpg";
    const bgMedium2x = "/assets/bgMedium2x-398dd8ef.jpg";
    const bgLarge = "/assets/bgLarge-6cb8fafe.jpg";
    const bgLarge2x = "/assets/bgLarge2x-6050e434.jpg";
    const VERSION_CHECK_FREQUENCY = 4e3;
    const PureLogin = (props) => {
      const { isLogged, debug } = props;
      const HELP_LINK = useSelector((state) => state.language.links.HELP_LINK);
      const error = useSelector((state) => state.auth.error);
      const location = useLocation();
      const { t: t2 } = useTranslation();
      reactExports.useEffect(() => {
        let intervalId;
        if (checkFeatureFlag(FEATURE_FLAG.RELOAD_ON_VERSION_DIFFERENCE)) {
          intervalId = setInterval(reloadOnVersionMisalign, VERSION_CHECK_FREQUENCY);
          reloadOnVersionMisalign();
        }
        return () => {
          if (intervalId) {
            clearInterval(intervalId);
          }
        };
      }, []);
      logGroup("Login", [["props", props]], void 0, debug);
      const content2 = reactExports.useMemo(() => /* @__PURE__ */ jsxRuntimeExports.jsx(LoginForm, { error }), [error]);
      const notification = reactExports.useMemo(
        () => error ? /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$8, { type: "error", id: "login-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IdText, { id: error, children: t2(error) }) }) : void 0,
        [error, t2]
      );
      if (isLogged) {
        const { from } = location.state ?? { from: { pathname: "/" } };
        resetCfgSerial();
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: from });
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        LoginUI,
        {
          id: "login-form",
          bgLarge,
          bgLarge2x,
          bgMedium,
          bgMedium2x,
          bgSmall,
          bgSmall2x: bgMedium,
          logoComponent: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$1i, { fill: "currentcolor", height: "42px" }),
          logoTitle: pkgid.product_info_short,
          headline: t2("IDUS_LOG_IN"),
          footerLinks: [{ link: HELP_LINK, title: t2("IDUS_MENU_HELP"), id: "help-link" }],
          footerText: `${getCopyright(t2)} ${t2("IDUS_COPYRIGHT_ALL_RIGHTS")}`,
          notification,
          children: content2
        }
      );
    };
    const Login = withErrorBoundary()(PureLogin);
    Login.displayName = "Login";
    const mappedActions = {
      updateEnd,
      updateRollbackResult,
      updateResumeResult,
      activationResult,
      activationAttrChallenge,
      getLicensesResponse: businessAccountLicenses,
      pcuUpdateCheckResponse,
      pcuTriggerUpdateResponse,
      pcuConfirmUpdateResponse,
      logInformationResponse: logsCallbackResponse,
      logQueryExecuteResponse: logsCallbackResponse,
      logQueryWindowResponse: logsCallbackResponse,
      logQueryWindowNotification: newLogsUpdateFromQueryResponse,
      quarantineSendSampleResponse: sendSampleResponse,
      quarantineInformationResponse: quarantineCallbackResponse,
      quarantineQueryExecuteResponse: quarantineCallbackResponse,
      quarantineQueryWindowResponse: quarantineCallbackResponse,
      quarantineQueryWindowNotification: newQuarantineUpdateFromQueryResponse,
      quarantineDownloadResponse: quarantineCallbackResponse,
      quarantineDeleteResponse: quarantineActionErrorHandler("IDUS_QUARANTINE_DELETE_ERROR"),
      quarantineRestoreExcludeResponse: quarantineActionErrorHandler("IDUS_QUARANTINE_RESTORE_EXCLUDE_ERROR"),
      quarantineRestoreResponse: quarantineActionErrorHandler("IDUS_QUARANTINE_RESTORE_ERROR"),
      sendSampleResponse,
      disconnect: logoutConnectionLostHandler(ErrorType$1.auth.connectionLost),
      unauthorized: triggeredLogoutWithReason,
      startODScanResult,
      startODScanResponse: scanActionCallbackResponse,
      pauseODScanResponse: scanActionCallbackResponse,
      resumeODScanResponse: scanActionCallbackResponse,
      stopODScanResponse: scanActionCallbackResponse,
      cleanedStatusDetectionAggregationResponse: statisticsCallbackResponse,
      absoluteDetectionsByMethodAggregationResponse: statisticsCallbackResponse,
      lastXDetectionsResponse: statisticsCallbackResponse,
      topXUsersOnAccessResponse: statisticsCallbackResponse,
      lastXScansWithDetectionsResponse: statisticsCallbackResponse,
      scannedFilesByMethodAggregationResponse: statisticsCallbackResponse,
      systemStatsAggregationResponse: statisticsCallbackResponse,
      cfgSetValuesResponse: cfgCallbackResponse,
      cfgAddToArrayResponse: cfgCallbackResponse,
      cfgResetToDefaultResponse: cfgCallbackResponse,
      cfgRegisterCallbackResponse,
      limitReached: () => toggleConnectionLimit("tabs"),
      socketCleanupListResponse: socketCleanupResponse,
      cfgGetEnumsResponse: cfgCallbackResponse,
      changePasswordResponse: authCallbackResponse,
      cfgValueFlagsGetResponse: (data2) => data2.callbackId ? cfgCallbackResponse(data2) : () => cfgValueFlagsGetResponse(data2)
    };
    const mapActionsToSocket = (socket) => {
      Object.keys(mappedActions).forEach((event) => {
        socket.on(event, (data2) => {
          store.dispatch(mappedActions[event](data2));
        });
      });
    };
    const addTransportProtocolWatcher = (socket) => {
      socket.onAny(() => {
        store.dispatch(setSocketTransportProtocol(socket.id, socket.io.engine.transport.query.transport));
      });
    };
    const mappedFunctions = {
      cfgCallbackNotification
    };
    const mapFunctionsToSocket = (socket) => {
      Object.keys(mappedFunctions).forEach((event) => {
        socket.on(event, (data2) => {
          mappedFunctions[event](data2);
        });
      });
    };
    const prepareSocket = () => {
      const socket = socketio.connectSocketIO();
      addTransportProtocolWatcher(socket);
      mapActionsToSocket(socket);
      mapFunctionsToSocket(socket);
    };
    class PureLoggedRoute extends React.Component {
      constructor(props) {
        super(props);
        __publicField(this, "checkComplete", () => {
          this.setState({ checked: true });
          if (this.props.isFreshLogin) {
            this.props.sendLastGUIUsage();
          }
        });
        __publicField(this, "checkAuth", () => {
          this.setState({ checked: false });
          if (this.props.isLogged) {
            this.props.checkToken(this.checkComplete, prepareSocket);
          } else {
            this.checkComplete();
          }
        });
        this.state = {
          checked: false
        };
      }
      componentDidMount() {
        this.checkAuth();
      }
      componentDidUpdate(oldProps) {
        if (this.props.isLogged !== oldProps.isLogged) {
          this.checkAuth();
        }
      }
      render() {
        const { isLogged, wrapWithRouteConfirmation, component: Component, debug } = this.props;
        logGroup(
          "LoggedRoute",
          [
            ["props", this.props],
            ["state", this.state]
          ],
          void 0,
          debug
        );
        if (!this.state.checked || !this.props.loadedLanguage) {
          return null;
        }
        const state = this.props.location.state ?? {};
        const previousLocation = state.from ?? this.props.location;
        return isLogged && this.state.checked ? /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { wrapWithRouteConfirmation }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: routes$1.login, state: { from: previousLocation } });
      }
    }
    const mapStateToProps$1 = (state) => ({
      loadedLanguage: state.language.loadedLanguage,
      isFreshLogin: state.auth.isFreshLogin
    });
    const mapDispatchToProps$1 = {
      checkToken,
      sendLastGUIUsage
    };
    const LoggedRoute = withLocation(connect(mapStateToProps$1, mapDispatchToProps$1)(PureLoggedRoute));
    LoggedRoute.displayName = "LoggedRoute";
    const logInvalidConfig = () => {
      log(["Could not load the config, falling back to defaults."], LogLevel.WARNING, LogEnv.DEVELOPMENT);
    };
    const getConfig = () => async (dispatch) => {
      try {
        const response = await fetch(getUrl(URLS.config), {
          method: "GET",
          headers: {
            "Content-Type": "application/json"
          }
        });
        const content2 = response.ok ? await response.json() : null;
        if (content2) {
          dispatch({ type: CONFIG_ACTION_KEYS.CONFIG_SET_CONFIG, value: content2 });
        } else {
          logInvalidConfig();
        }
      } catch (e) {
        logInvalidConfig();
      }
    };
    const theme = {
      FormGroup: {
        label: {
          fontSize: "13px"
        }
      },
      RightSidebar: {
        backgroundColor: "white",
        StatusItem: {
          headline: {
            fontSize: "15px"
          }
        }
      },
      Sidebar: {
        minHeight: "300px"
      }
    };
    const { FONT_FAMILY } = constants;
    const DEF_BASE_FONT = "Helvetica, Arial, sans-serif";
    const getLocaleTheme = (fontFamily) => {
      if (fontFamily) {
        const ff = [`'${fontFamily}'`, DEF_BASE_FONT].join(", ");
        document.body.style.fontFamily = ff;
        return {
          Global: {
            fontFamily: ff
          }
        };
      } else {
        document.body.style.fontFamily = FONT_FAMILY;
        return {};
      }
    };
    class PureMain extends React.Component {
      constructor() {
        super(...arguments);
        __publicField(this, "wrapWithRouteConfirmation", (actionToWrap) => {
          const { routeConfirmation } = this.props;
          if (routeConfirmation) {
            const { continueButton, cancelButton } = routeConfirmation;
            this.props.showModal("warning", routeConfirmation.title, routeConfirmation.text, [
              {
                ...continueButton,
                id: "route-conf-discard",
                onClick: () => {
                  this.props.closeModal();
                  if (continueButton.onClick) {
                    continueButton.onClick();
                  }
                  this.props.removeRouteChangeConfirmation();
                  actionToWrap();
                }
              },
              {
                ...cancelButton,
                id: "route-conf-cancel",
                type: "secondary",
                onClick: () => {
                  this.props.closeModal();
                  if (cancelButton.onClick) {
                    cancelButton.onClick();
                  }
                }
              }
            ]);
          } else {
            actionToWrap();
          }
        });
        __publicField(this, "renderNotifications", () => {
          const { lastModal, t: t2 } = this.props;
          const getModal = (modal, isOpen) => {
            const defaultClose = () => {
              this.props.closeModal();
              if (modal.onClose) {
                modal.onClose();
              }
            };
            const buttons = modal.buttons ? modal.buttons.map((button) => /* @__PURE__ */ jsxRuntimeExports.jsx(
              default_1$f,
              {
                id: button.id,
                onClick: button.onClick,
                text: button.isTranslationKey ? t2(button.text) : button.text,
                type: button.type
              },
              button.id
            )) : [/* @__PURE__ */ jsxRuntimeExports.jsx(default_1$f, { id: "modal_ok", onClick: defaultClose, text: t2("IDUS_OK") }, "modal_ok")];
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              ConfirmationModal,
              {
                show: isOpen,
                type: modal.type,
                message: t2(modal.message),
                buttons,
                onClose: defaultClose,
                children: modal.isTranslationKey ? t2(modal.children) : modal.children
              },
              modal.id
            );
          };
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            lastModal && getModal(lastModal, false),
            this.props.modals.length > 0 && getModal(this.props.modals[0], true)
          ] });
        });
      }
      componentDidMount() {
        this.props.getConfig();
        const isAuth = !!getAuth();
        this.props.setLoggedIn(isAuth);
        if (!isAuth) {
          requestSync();
        }
      }
      componentDidUpdate(oldProps) {
        const { localeFont } = this.props;
        if (localeFont !== oldProps.localeFont && !!localeFont) {
          loadFontForCSS(localeFont);
        }
      }
      render() {
        const { isLogged, localeFont } = this.props;
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Theme.Provider, { theme: getLocaleTheme(localeFont), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(default_1$1j, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: routes$1.login, element: /* @__PURE__ */ jsxRuntimeExports.jsx(Login, { isLogged }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Route,
              {
                path: "/*",
                element: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  LoggedRoute,
                  {
                    isLogged,
                    component: Layout,
                    wrapWithRouteConfirmation: this.wrapWithRouteConfirmation
                  }
                )
              }
            )
          ] }),
          this.renderNotifications()
        ] }) }) });
      }
    }
    const mapStateToProps = (state) => ({
      lastModal: state.notification.lastModal,
      modals: state.notification.modals,
      routeConfirmation: state.layout.modals.routeConfirmation,
      isLogged: state.auth.isLogged,
      localeFont: state.language.font
    });
    const mapDispatchToProps = {
      closeModal: showNextModal,
      removeRouteChangeConfirmation,
      showModal,
      getConfig,
      setLoggedIn
    };
    const Main = withTranslation()(
      connect(mapStateToProps, mapDispatchToProps)(withErrorBoundary("IDUS_ERROR_BOUNDARY_APP")(PureMain))
    );
    Main.displayName = "Main";
    addCustomEventPolyfill();
    dispatchRefresh();
    document.title = pkgid.product_info_short;
    reactDomExports.render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, { store, children: /* @__PURE__ */ jsxRuntimeExports.jsx(HistoryRouter, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Main, {}) }) }),
      document.getElementById("root")
    );
  }
});
export default require_index_001();
//# sourceMappingURL=index-7308cf87.js.map
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
March 05 2025 05:58:57
0 / 0
0755
NotoSansJP-bold-d3328ee5.js
7.28 MB
July 26 2024 11:16:53
0 / 0
0644
NotoSansJP-normal-9d0308a9.js
7.29 MB
July 26 2024 11:16:53
0 / 0
0644
Roboto-bold-358c8381.js
217.992 KB
July 26 2024 11:16:53
0 / 0
0644
Roboto-normal-ca1f2e34.js
219.201 KB
July 26 2024 11:16:53
0 / 0
0644
auto-updates-info-49ad2131.png
12.086 KB
July 26 2024 11:16:53
0 / 0
0644
bgLarge-6cb8fafe.jpg
659.197 KB
July 26 2024 11:16:53
0 / 0
0644
bgLarge2x-6050e434.jpg
1.65 MB
July 26 2024 11:16:53
0 / 0
0644
bgMedium-6c85d87e.jpg
437.479 KB
July 26 2024 11:16:53
0 / 0
0644
bgMedium2x-398dd8ef.jpg
1.11 MB
July 26 2024 11:16:53
0 / 0
0644
bgSmall-5df3a5df.jpg
86.635 KB
July 26 2024 11:16:53
0 / 0
0644
index-3baecef2.css
14.215 KB
July 26 2024 11:16:53
0 / 0
0644
index-7308cf87.js
758.555 KB
July 26 2024 11:16:53
0 / 0
0644
pdf.logo-c59ca59b.png
25.614 KB
July 26 2024 11:16:53
0 / 0
0644
tour-autoupdates-ce23797a.png
109.417 KB
July 26 2024 11:16:53
0 / 0
0644
tour-dashboard-4994edcf.png
200.445 KB
July 26 2024 11:16:53
0 / 0
0644
tour-detections-9349fd23.png
271.892 KB
July 26 2024 11:16:53
0 / 0
0644
tour-filtered-web-43a5c8dd.png
206.393 KB
July 26 2024 11:16:53
0 / 0
0644
tour-filtered-web-menu-dccee1b9.png
219.081 KB
July 26 2024 11:16:53
0 / 0
0644
tour-help-2d661883.png
81.353 KB
July 26 2024 11:16:53
0 / 0
0644
tour-scan-detail-1afd1057.png
100.283 KB
July 26 2024 11:16:53
0 / 0
0644
tour-scan-detections-afdba933.png
110.08 KB
July 26 2024 11:16:53
0 / 0
0644
tour-scans-c1e466b5.png
139.241 KB
July 26 2024 11:16:53
0 / 0
0644
tour-status-overview-156d735f.png
110.469 KB
July 26 2024 11:16:53
0 / 0
0644
vendor-2313bbfd.css
24.319 KB
July 26 2024 11:16:53
0 / 0
0644
vendor-a489d579.js
4.77 MB
July 26 2024 11:16:53
0 / 0
0644
wap-info-2d29c159.png
7.846 KB
July 26 2024 11:16:53
0 / 0
0644
zui-64ffcf4f.js
4.75 MB
July 26 2024 11:16:53
0 / 0
0644